After "sleep" the controller disappears
-
I have a raspberry pi 3b that I installed the latest retropie image and I also have a tankstick. Once it goes into full "sleep" mode (the machine is still available via ssh, etc, but the screen darkens slightly) the tankstick is gone.
Emulationstation will dim and no inputs from the tankstick work. I keep a keyboard plugged in though and it sill still work and even brings out of the dimmed mode. I can use F4 and drop to a terminal session and when I look at /dev/input the tankstick devices are completely missing, so I have to restart the whole machine.
Is this a retroarch thing or a raspberry pi thing? Could it be a tankstick thing? Regardless, is there a setting that would potentially remedy this for me?
-
Check the output of
dmesg
to see if the tansktick disconnect/connect messages appear there. Looks like an issue with the tankstick, it may pause itself after a period and doesn't re-connect.By default, when the 'sleep' mode kicks in , EmulationStation doesn't do anything except diming the screen and reduce the video refresh rate. While you can run additional scripts triggered by the 'sleep' event, the default image doesn't include any script that would interract with the OS.
EDIT: as a workaround, you can try to resed the USB ports on the Pi with uhubctl hoping this would trigger the re-connection of the controller.
-
@mitu
When I look at dmesg, I see the tankstick being recognized (the keyboard is 1-1.3) but nothing after that:[ 5.124406] usb 1-1.4: New USB device found, idVendor=045e, idProduct=0719, bcdDevice= 1.00 [ 5.124673] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 5.124704] usb 1-1.4: Product: X-Arcade 2 [ 5.124719] usb 1-1.4: Manufacturer: XGaming
Interestingly, I found something on the tankstick site that refers to it stopping working after sleep but says it's a windows thing. The fix is to go to the power settings and uncheck "Allow the computer to turn off this device to save power" but I'm having a hard time trying to find a linux equivalent of this. The weird part is that the red button on the tankstick is still lit up.
The article would lead me to believe the issue is caused by the OS, not the device, but I don't understand why the keyboard would still work (unless the tankstick doesn't have the right "functions" to do a proper resume, needing the above 'fix').
I looked at uhubctl but not sure it will do what I need
-
@old_arcade_dude said in After "sleep" the controller disappears:
... but I'm having a hard time trying to find a linux equivalent of this.
The auto-suspend/power saving feature for USB connected devices in Linux is described on this page. It can be disabled globally, but each device can be controlled separately using the
power
node(s) under/sys/devices/usb/<device>
- like described on this page. -
@mitu
Thanks! I was poking around on there. I installed uhubctl and I was considering possibly doing something with the screensaver-stop script. I still have some more investigation on behaviors and artifacts to do though. -
Could also be that the Tankstick does not implement USB power control (autosuspend) correctly.
For a quick evaluation if it is the case you may issue this to disable autosuspend for USB devices:
sudo su echo -1 > /sys/module/usbcore/parameters/autosuspend If the issue is then gone after the ES sleep, then you most likely have found the culprit.
I have posted some more infos here recently. -
Here's the weird part...it hasn't done this again since I rebooted after installing uhubctl. Makes no rational sense to me. It was doing it regularly before. No other changes. I'll keep the above in my back pocket for now and keep trying to get it to happen again.
-
-
@old_arcade_dude thanks for the update. As it also can happen with this Redmond software it further thickens the plot that the tankstick firmware does not implement the USB spec by the letter.
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.