Gamepads only working in devmode

Bug #1756285 reported by JungleRobba
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Medium
Zygmunt Krynicki

Bug Description

I have tested with an Xbox One S Controller and a DualShock 4 and both of those do not get recognized by the application with the joystick interface connected. They work when installing the snap in devmode however, even without joystick interface. Tested on Ubuntu 17.10 and Fedora 27

Revision history for this message
Oliver Grawert (ogra) wrote :

you check syslog for any denials you get when the snap is used in strict mode and a controller is attached ?

Revision history for this message
JungleRobba (junglerobba) wrote :

I did now, I get these two:

Mar 16 13:25:50 tobias-desktop dbus[7236]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/freedesktop/ScreenSaver" interface="org.freedesktop.ScreenSaver" member="Inhibit" mask="send" name="org.freedesktop.ScreenSaver" pid=11451 label="snap.ppsspp.ppsspp" peer_pid=7494 peer_label="unconfined"
Mar 16 13:25:50 tobias-desktop dbus[7236]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/gnome/ScreenSaver" interface="org.gnome.ScreenSaver" member="SimulateUserActivity" mask="send" name="org.gnome.ScreenSaver" pid=11451 label="snap.ppsspp.ppsspp" peer_pid=7377 peer_label="unconfined"

Revision history for this message
Oliver Grawert (ogra) wrote :

hmm, clearly unrelated (thats a known issue with teh screensaver inhibition)

do you see different "ALLOWED" lines in syslog when you run it in devmode ?

Revision history for this message
JungleRobba (junglerobba) wrote :
Download full text (3.6 KiB)

There's this whole block that didn't appear in strict mode.

Mar 16 13:22:26 tobias-desktop kernel: [16776.042723] audit: type=1400 audit(1521202946.364:267650): apparmor="ALLOWED" operation="open" profile="snap.ppsspp.ppsspp" name="/sys/devices/system/memory/block_size_bytes" pid=10666 comm="PPSSPPSDL" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 16 13:22:26 tobias-desktop dbus[7236]: apparmor="ALLOWED" operation="dbus_method_call" bus="session" path="/org/freedesktop/ScreenSaver" interface="org.freedesktop.ScreenSaver" member="Inhibit" mask="send" name="org.freedesktop.ScreenSaver" pid=10666 label="snap.ppsspp.ppsspp" peer_pid=7494 peer_label="unconfined"
Mar 16 13:22:26 tobias-desktop kernel: [16776.100199] audit: type=1400 audit(1521202946.421:267651): apparmor="ALLOWED" operation="open" profile="snap.ppsspp.ppsspp" name="/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input16/capabilities/ev" pid=10666 comm="PPSSPPSDL" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 16 13:22:26 tobias-desktop kernel: [16776.100202] audit: type=1400 audit(1521202946.421:267652): apparmor="ALLOWED" operation="open" profile="snap.ppsspp.ppsspp" name="/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input16/capabilities/abs" pid=10666 comm="PPSSPPSDL" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 16 13:22:26 tobias-desktop kernel: [16776.100235] audit: type=1400 audit(1521202946.421:267653): apparmor="ALLOWED" operation="open" profile="snap.ppsspp.ppsspp" name="/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input16/capabilities/rel" pid=10666 comm="PPSSPPSDL" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 16 13:22:26 tobias-desktop kernel: [16776.100237] audit: type=1400 audit(1521202946.421:267654): apparmor="ALLOWED" operation="open" profile="snap.ppsspp.ppsspp" name="/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input16/capabilities/key" pid=10666 comm="PPSSPPSDL" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 16 13:22:26 tobias-desktop kernel: [16776.100388] audit: type=1400 audit(1521202946.422:267655): apparmor="ALLOWED" operation="open" profile="snap.ppsspp.ppsspp" name="/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input17/capabilities/ev" pid=10666 comm="PPSSPPSDL" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 16 13:22:26 tobias-desktop kernel: [16776.100390] audit: type=1400 audit(1521202946.422:267656): apparmor="ALLOWED" operation="open" profile="snap.ppsspp.ppsspp" name="/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input17/capabilities/abs" pid=10666 comm="PPSSPPSDL" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 16 13:22:26 tobias-desktop kernel: [16776.100417] audit: type=1400 audit(1521202946.422:267657): apparmor="ALLOWED" operation="open" profile="snap.ppsspp.ppsspp" name="/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input17/capabilities/rel" pid=10666 comm="PPSSPPSDL" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
Mar 16 13:22:26 tobias-desktop kernel: [16776.100429] audit: type=1400 audit(1521202946.422:267658): apparmor="ALLOWED" operation="open" profil...

Read more...

Revision history for this message
Oliver Grawert (ogra) wrote :

there you go, the joystick interface needs to allow access to the input device at:

/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2/input16/capabilities/ev

Revision history for this message
Oliver Grawert (ogra) wrote :
Revision history for this message
Oliver Grawert (ogra) wrote :

hmm, in fact https://forum.snapcraft.io/t/joysick-access-for-sdl2-apps/3027/7 says it has been merged into snapd 2.30, that should actually be in use everwhere.

what is the output of "snap version" on your test systems ? i wonder if something regressed here.

Revision history for this message
JungleRobba (junglerobba) wrote :

First of all thanks for all the help so far, really appreciate it :)
On Fedora the output is
snap 2.31.1-2.fc27
snapd 2.31.1-2.fc27
series 16
fedora 27
kernel 4.15.8-300.fc27.x86_64

Ubuntu
snap 2.31.2
snapd 2.31.2
series 16
ubuntu 17.10
kernel 4.13.0-37-generic

So that fix should be on both systems. I actually came across that same thread and wondered why it was not working.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I happen to have both gamepads available and I can give that a try. For now I'm marking this as confirmed.

affects: snappy → snapd
Changed in snapd:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Zygmunt Krynicki (zyga)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.