retroarch-snap
retroarch-snap copied to clipboard
Wired DualShock4 controller no longer being recognized after upgrade to retroarch 1.10 on Ubuntu 20.04
After snapd automatically updated my version of retroarch to 1.10.0, my gamepad stopped working. I use a DualShock4 controller wired into USB. Historically, I have always used the "x" input driver and "udev" controller driver.
Here is how the problem manifests:
-
In previous versions of
retroarch(1.9.x), upon launchingretroarchI would get a notification at the bottom of the screen stating that my DualShock4 controller had been detected. That notification no longer appears. -
Previously, I could use my controller to navigate the retroarch GUI, but now I can't.
-
In Settings -> Input -> Port 1 Controls, the Device Index is "Disabled" with no other available options.
-
When I try to re-map the buttons on the controller, the dialog box times out.
More observations:
-
I know that Ubuntu still recognizes my DS4 because I can use it outside of
retroarch, which rules out something like a problem with my USB cable. -
I did a
diffof the current activeretroarch.cfgfile against a recent backup copy, and the only changes appear to be new lines corresponding to new settings introduced by 1.10.0. -
I tried using other controller drivers. The only one I could get to work -- that is, the only one that allowed me to re-map buttons via the Settings -> Input -> Port 1 Controls screen -- was "linuxraw". But I couldn't get "linuxraw" to allow me to use my left analog stick to act as a D-pad, which is how the controller just naturally worked before (or perhaps because of the Analog to Digital Type setting). And using "linuxraw" didn't cause the controller notifications to reappear upon launching
retroarch. -
Previous versions of
retroarchwould print the following lines to the log:[INFO] [udev]: Pad #0 (/dev/input/event256) supports force feedback. [INFO] [udev]: Pad #0 (/dev/input/event256) supports 16 force feedback effects. [INFO] [Joypad]: Found joypad driver: "udev".But now, the log only contains:
[INFO] [Joypad]: Found joypad driver: "udev". -
After the update to 1.10.0, I tried running both the Update Assets and Update Controller Profiles commands. Neither had any noticeable effect.
Any idea what might have caused the problem, or how I might troubleshoot or fix?
Thanks in advance.
UPDATE: Oh, and one more thing. Ever since the upgrade to 1.10.0, when launching retroarch I now get the following error message on the command line (although it doesn't seem to prevent retroarch from running):
ERROR: ld.so: object '/snap/retroarch/1178/lib/libsnapcraft-preload.so' from
LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
It may be unrelated to the controller detection issue, but I thought I'd mention it anyway.
UPDATE2: To the extent that the above ld.so error is something that needs to be fixed, it would appear that something is looking for libsnapcraft-preload.so in the wrong location. It appears to reside in usr/lib/libsnapcraft-preload.so, not lib/libsnapcraft-preload.so.
Hi,
Is it still an issue with latest stable ?
Unfortunately, it appears so.
I've been on on retroarch 1.10.2 for a few days now. I changed the controller driver from "linuxraw" back to "udev", then quit and restarted retroarch. Upon re-launch, the UI no longer responded to my controller buttons. :confused:
For anyone else inconvenienced by this issue, here is my workaround in Ubuntu 20.04:
- Use "linuxraw" as the
retroarchcontroller driver (and "x" as the input driver). - Then install AntiMicroX and configure it to map either (or both) analog sticks to the arrow keys. I was able to use the .deb package without any issues.
- I think this is already the default, but make sure that the D-pad entries in Settings -> Input -> Port 1 Controls accept the arrow keys.
Hello,
I've encountered this same issue with any game controllers since the version 1.10.0 update and the 1.10.2 update unfortunately did not fix this either.
I also have the preload library error on startup and I can confirm that the library is placed in incorrect place inside the snap filesystem:
ERROR: ld.so: object '/snap/retroarch/1318/lib/libsnapcraft-preload.so' from
LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
However as a not so great mitigation I can get controllers to work by unplugging and plugging them in while the retroarch is running. I think that might be related to something the preload is supposed to do but can't at the moment.
I have the same issue. A Wii U Pro Controller works if I reconnect while the emulator is running, but I just can't get a Switch Pro Controller to be detected at all. Both controllers work with an old apt-get installable Retroarch version in Ubuntu.
I too have the extract same issues with a Bluetooth PS3 controller. Controller is not detected if retro arch is launched and the controller is already on. Turning it off and on connects it. Then when running a core the controller is disconnected again. Turning it off and on again reconnects. Same when exiting a core. Seems only related to snap. I have plugged usb-raw, joystick, bluez no luck.
I'm quite sure the root cause of this issue is tied to the preload library put in incorrect location. Shame that snap filesystems are immutable by design and debugging this issue would require installing the whole snap development and packaging environment which considerably raises the effort needed for casual debugging.
Hi,
Can you try to install it from edge channel (in about one hour) as we have just added one export ?
It might help to solve this issue.
sudo snap install retroarch --edge
Thank you.
Well, I tried the installation, but it seems that snap does not like it when you have the retroarch already installed:
sudo snap install retroarch --edge
snap "retroarch" is already installed, see 'snap help refresh
Uh oh... if I go through the removal route it sounds very much like it's going to destroy my configuration (yet again).
Fortunately refreshing (probably) did the trick:
sudo snap refresh retroarch --edge
retroarch (edge) 1.10.2 from hunterk (libretro) refreshed
The core version is now 1.10.3 but the problem is still present:
retroarch
ERROR: ld.so: object '/snap/retroarch/1350/lib/libsnapcraft-preload.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
And the game controllers are not detected.
You can backup your config files, mine are under USER/snap/retroarch/latest/.confg.
I haven't had a chance to test the edge version.
I pushed some more updates to the edge channel. It seems to have gotten rid of the preload error, so if the ds4 is still not working, they were probably not related.
I'm going to hold off pushing these builds to the stable channel until I get confirmation that they help (or at least don't hurt)
EDIT: anybody had a chance to test the latest edge build? EDIT2: well, it seemed okay in my testing and we needed to get the stable build out, so I went ahead and promoted it to all of the channels. We'll see if anything blows up. Please still report back if your controller issue is/isn't fixed.
I have just tested using a Wii U Pro Controller connected via Bluetooth. It still wasn't detected until reconnected.
Ok, thanks for testing/reporting. I think we can safely assume the preload stuff is/was unrelated.
As a bit of a sanity check, can anyone roll back to a previous version and verify that this is indeed a problem on our end and not something upstream (i.e., via snapcraft-core, etc.)?
To do so, you need to list the versions installed on your system and then select one to roll back to:
$ snap list retroarch --all
$ sudo snap revert retroarch --revision [whatever]
Can confirm the preload stuff was unrelated. Just tested 1.10.3 and the preload error is now gone but the issue with controllers remains.
I was unable to get a previous version list to rollback to using
snap list retroarch —all
The options available are 1.10.2 and 1.10.3. .2 is already to confirmed to have the issue. If anyone else has older versions previously installed to test that would be great.
Can confirm the preload stuff was unrelated. Just tested 1.10.3 and the preload error is now gone but the issue with controllers remains.
Yes, I can also confirm this. The preload error is now fixed 1.10.3 - 1365 build but the controller issue remains.
As a bit of a sanity check, can anyone roll back to a previous version and verify that this is indeed a problem on our end and not something upstream (i.e., via snapcraft-core, etc.)?
If there is a way to rollback to a version 1.9.x snap then this could be tested but so far the rollback does not promising:
snap list retroarch --all
Name Version Rev Tracking Publisher Notes
retroarch 1.10.3 1365 latest/edge libretro disabled
retroarch 1.10.3 1373 latest/edge libretro -
I was wondering if this could have any connection to the connected interfaces, does it?
For testing, I ran this command to get all interfaces that Yuzu uses but Retroarch doesn't:
snap interfaces | grep "yuzu" | grep -v "retroarch"
gtk-common-themes:icon-themes citra-emu,discord,dolphin-emulator,firefox,gimp,inkscape,kdenlive,krita,obs-studio,snap-store,yuzu
gtk-common-themes:sound-themes citra-emu,discord,dolphin-emulator,firefox,gimp,kdenlive,krita,obs-studio,snap-store,yuzu
nightmayr-kf5-qt-5-15-2-core20:nightmayr-kf5-qt-5-15-2-core20 citra-emu,dolphin-emulator,yuzu
:browser-support discord,firefox:browser-sandbox,gimp,obs-studio,yuzu
:desktop-legacy citra-emu,discord,dolphin-emulator,firefox,gimp,inkscape,kdenlive,krita,moonlight,obs-studio,snap-store,yuzu
:gsettings citra-emu,discord,dolphin-emulator,firefox,gimp,inkscape,obs-studio,snap-store,yuzu
:hardware-observe firefox,yuzu
:mount-observe yuzu
The only interesting entries here would be hardware-observe and mount-observe, even though I do not know their exact purposes.
desktop-legacy could be another possibility, I guess /shrug
You could try connecting them and see if it improves anything.
When I try to manually connect any interface, I get errors:
sudo snap connect retroarch:desktop-legacy :desktop-legacy
snap "retroarch" has no plug named "desktop-legacy"
I just added desktop-legacy to the plugs. It should be available in the next edge build: https://github.com/libretro/retroarch-snap/blob/master/snapcraft.yaml#L58
Also I noticed that the "reconnecting controller after starting retroarch" mitigation is not that great as the controller is lost every time you launch content using a core.
Is there an estimate of when a new build will be uploaded?
It looks like it does them automatically every 3 days and they just did a new build yesterday, but I went ahead and triggered a new one. It'll probably publish in the next 30 min to an hour.
So a build was released and I was able to connect desktop-legacy. Not sure if it made any difference.
I also noticed that while my Wii U Pro Controller works the same as before (connects via Bluetooth, I need to connect after opening retroarch to have it detected), my Switch Pro Contoller (I'm connecting via USB) works randomly: if I disconnect and connect many times, sometimes it is detected.
If it helps in any way, here's the Yuzu yaml file for reference/comparison: https://github.com/Nightmayr-snaps/yuzu-snap/blob/master/snap/snapcraft.yaml
Now that a new permission was mentioned I wonder if something broke in the retroarch or the snap itself?
Hmm... retroarch does not have hardware-observe. Could it be related?
alright, i tried adding hardware-observe, mount-observe and browser-support. None of those sound at all related based on their documentation, but whatever. We'll give it a shot :) New builds should publish in an hour or so.
Yeah, no changes coming from the connections... :(
Thanks for checking.
I migrated to Ubuntu 22.04 and I can say that this issue is at least consistent: same controller problem with the snap.
I finally gave up and installed the PPA version and everything just worked nicely out of the box and the settings were easy to migrate.
Yeah this is still occurring. I've just given up on retroarch and am not using it. Not sure even where to start looking to resolve this.