Phantom scrolling in ES menu and up down goes left right in menu but only sometimes?
-
Hello,
Let's start with the basics:
Pi Model or other hardware: Raspberry Pi Zero W
Power Supply used: Adafruit PowerBoost 1000 Charger - Rechargeable 5V Lipo USB Boost @ 1A - 1000C with Lithium Ion Battery - 3.7v 2000mAh
RetroPie Version Used (eg 3.6, 3.8.1, 4.1 - do not write latest): 4.5.1
Built From: retropie.org.uk downloaded image
USB Devices connected: Generic sound card supported by ALSA with only headphone out
Controller used: Retrogame by Adafruit allows GPIO pins to be turned into keyboard
Error messages received: None
Log found in /dev/shm/runcommand.log (if relevant): None found
Guide used: Adafruit's Pi Grll Zero Guide
File: Not sure what this is
Emulator: Emulation station menu
Attachment of config files: I'm sorry, but I don't know what files would be relevant for this issue. I know this means you can't answer right away. I'm hoping maybe you can tell me what file to get, and I can get it, and we can move on from there.
How to replicate the problem: Boot into Emulation station, press A to enter an emulator, and then hit the down key, and the system scrolls through emulators/RetroPie setup. Hit Select or Start to bring up menu, and hit the down key, and scroll down as expected. For example, when I bring up the menu to jump to a certain letter, left and right scroll through the letters, and up and down move up and down the menu. Finally, sometimes, just sit on the RetroPi setup menu, and the selection will scroll to the bottom.I decided to build a clone of Adafruit's PiGrllZero project, but using mostly what I had on hand. I had a typical SPI 320x240 TFT display, and used fbcp-ili9341 to get it up and running. I designed and ordered circuit boards for the controllers printed on JLCPCB (https://www.easyeda.com/rick_9005/pigrll0-button-board) (the shoulder buttons are just buttons, no board). I did buy the battery and PowerBoost just for this project. I had a generic USB "sound card", so I threw that in as well. It's all enclosed in a customized version of the Fusion 360 files Adafruit provides.
Because the display isn't the one that Adafruit sells, I had to wire my display to the Pi myself. I designed a board in EasyEDA, but when I placed the order for about 5 different projects, I forgot to include that, so now I have everything wired up via a perfboard. The Pi, buttons and the display are soldered into the perfboard, and wires connect everythign.
Finally, I used the RetroGame system that Adafruit has to create the controller. My D pad is setup for the arrow keys on the keyboard, and I've run the configuration a few times to make sure it's right.
The weird behavior only happens when I'm in the ES menu, not in the games (when I can get into one).
I've searched here, and the internet in general, and found one post that seemed similar, but there was never a solution on that post.
Please let me know if there is anything else I need to include.
Thanks
Rick -
Can you try to see if the ghosting is present without EmulationStation ?
Exit EmulationStation, then run from the terminal:jstest /dev/input/js0
and leave it for a period of time. If any ghost inputs appear, the test will show them.
You can run the test via SSH, just in case you don't have a keyboard attached to the system, just exit EmulationStation before starting the test. -
@mitu said in Phantom scrolling in ES menu and up down goes left right in menu but only sometimes?:
jstest /dev/input/js0
Thanks for your reply. I quit ES as you indicated, and then tried to run that command via SSH. I got "jstest: No such file or directory". I changed into the /dev directory, and then tried to change into the input directory, and got the error "-bash: cd: /input: No such file or directory". I even ran "sudo find / -name js0", but it didn't return anything.
Back on my unit, I've hit up on the d-pad, and got the last command run next to the prompt. I'm leaving it there. If there's any ghosting of up or down, that command will change. Also, my screen has gone blank due to not using the unit for a while. Any ghosting should activate the screen as well.
Rick
-
@rickseiden If you have no
/dev/input/js0
, then maybe your GPIO gamepad is a keyboard device and not a joystick/gamepad. In this case, you can try runningevtest
and choose which device you want tested, it should list your keyboard-like device or any other input device.
-
@mitu It's definitely like a keyboard. I shutdown ES and then ran evtest and let it sit for 20 minutes. Attached is the result. No ghosting.
Right now I've got it running evtest with ES running, but no input. It's running in screensaver mode. Next, I'm going to run it again, and that time, use the inputs to see if I catch the ghosting.
Thanks again
Rickpi@retropie:~ $ date Wed May 27 13:58:04 EDT 2020 pi@retropie:~ $ evtest /dev/input/event1 Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x1 product 0x1 version 0x1 Input device name: "retrogame" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 2 (KEY_1) Event code 3 (KEY_2) Event code 5 (KEY_4) Event code 19 (KEY_R) Event code 21 (KEY_Y) Event code 28 (KEY_ENTER) Event code 30 (KEY_A) Event code 38 (KEY_L) Event code 45 (KEY_X) Event code 48 (KEY_B) Event code 103 (KEY_UP) Event code 105 (KEY_LEFT) Event code 106 (KEY_RIGHT) Event code 108 (KEY_DOWN) Properties: Testing ... (interrupt to exit) ^Cpi@retropie:~ $ date Wed May 27 14:18:26 EDT 2020 pi@retropie:~ $
-
You can run
emulationstation
with the--debug
flag and it should report any inputs it receives and processes, just likeevtest
. -
@mitu I ran evtest while ES was running in screensaver mode, and got nothing. I then ran evtest and pressed the down button on my d-pad, and got this:
Event: time 1590607519.254418, type 1 (EV_KEY), code 108 (KEY_DOWN), value 1 Event: time 1590607519.254418, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 1 Event: time 1590607519.254418, -------------- SYN_REPORT ------------
So it looks like when I press down, it's also pressing right. That's got to be something with the physical setup inside my device, and I've got to deal with that. But what follows shows, I hope, that this isn't the issue with the ghost scrolling.
I then ran evtest when I was on the main ES menu, in one of the emulators. I pressed the right button on my d-pad, and it flipped to the ES menu. Then proceeded to scroll through the menu to the bottom. Here's the output from that.
pi@retropie:~ $ evtest /dev/input/event1 Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x1 product 0x1 version 0x1 Input device name: "retrogame" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 2 (KEY_1) Event code 3 (KEY_2) Event code 5 (KEY_4) Event code 19 (KEY_R) Event code 21 (KEY_Y) Event code 28 (KEY_ENTER) Event code 30 (KEY_A) Event code 38 (KEY_L) Event code 45 (KEY_X) Event code 48 (KEY_B) Event code 103 (KEY_UP) Event code 105 (KEY_LEFT) Event code 106 (KEY_RIGHT) Event code 108 (KEY_DOWN) Properties: Testing ... (interrupt to exit) Event: time 1590607580.699494, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 1 Event: time 1590607580.699494, -------------- SYN_REPORT ------------ Event: time 1590607580.894407, type 1 (EV_KEY), code 106 (KEY_RIGHT), value 0 Event: time 1590607580.894407, -------------- SYN_REPORT ------------
There's the right button press, but nothing else, and on the screen, it scrolled down through the choices.
After I quit ES and went to a prompt, I started ES with
export DISPLAY=0 emulationstation --debug
That started ES on the display on the screen. I moved around the menu a few times before it scrolled to the bottom. This is the end of the output that showed up after pressing right and then watching the menu scroll to the bottom.
May 27 15:34:59 lvl3: UIModeController::logInput( Keyboard ):Key Right, isMappedTo= right, , value=0 May 27 15:35:03 lvl3: UIModeController::logInput( Keyboard ):Key Right, isMappedTo= right, , value=1 May 27 15:35:03 lvl3: UIModeController::logInput( Keyboard ):Key Right, isMappedTo= right, , value=0 May 27 15:35:08 lvl3: UIModeController::logInput( Keyboard ):Key Right, isMappedTo= right, , value=1 May 27 15:35:08 lvl3: UIModeController::logInput( Keyboard ):Key Right, isMappedTo= right, , value=0
So it looks like both evtest and --debug are showing that during the ghost scrolling, no input is being registered, not even the down button.
Rick
-
Update your RetroPie installation - including EmulationStation - and re-try the test.
-
@rickseiden try a more powerful power supply to your setup. It's been known that inadequate power can cause ghost input issues. It even happened to me until I changed a third party power supply to an official one.
-
I took apart my device and ran evtest while pressing the down button. Just the down button registered, so I definitely have an issue with the way my device is put together.
@mitu I'll try that next.
@thestarglider That's not going to be easy. Ill need to tear down my device to be able to plug it into a different power supply. I will do it, but I don't think it's the problem, as I'm following a guide from Adafruit using the Adafruit "power" hardware. But, then again, they set their device up with a Pi Zero, not a Pi Zero W. The fact that wireless is running could be the difference in power consumption that makes it do this. I'll report back and let you know if there was a change.
-
I re-printed my d-pad with a thinner base, and that took care of the down and right problem.
I took the whole thing apart and powered it from a 2.1A power supply like @thestarglider suggested, and I didn't see the phantom scrolling. So I put it back together, and I still don't see the scrolling. I'm guessing that I had a wire too close to something when I put it together, and that this time, the wire went someplace else.
Thanks for your help guys!
-
@rickseiden well although it wasn't the issue I thought it might be, I'm glad you found the solution.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.