snap doesn't map joystick buttons correctly

Bug #1988660 reported by Carlos V
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
New
Undecided
Unassigned

Bug Description

I tested the deb version and works fine.

Steps to reproduce the problem:
1.Connect the PS4 joystick by Bluetooth in Linux
2.Test mapping in a webpage like gamepad-tester.com
3.Almost all buttons are incorrectly mapped

Problem Description:
The buttons of the joystick are incorrectly mapped in the browser and this makes impossible to play Stadia, even the right axis remain always pressed when you press R2 once, you can see the error by yourself at this short video: https://www.youtube.com/watch?v=VLPQkXyVAsM

Tags: snap
Revision history for this message
Olivier Tilloy (osomon) wrote :

That video you linked suggests running a command that fixes the mappings for this joystick: https://wiki.archlinux.org/title/Gamepad#Playstation_5_(Dualsense)_controller.

This doesn't sound like a snap-specific problem. Can you reproduce in Google Chrome installed as a deb?

Changed in chromium-browser (Ubuntu):
status: New → Incomplete
Revision history for this message
Carlos V (linuxkernel94) wrote :

As I said chromium in the deb version works ok I tested a PPA, all snaps of chromium and chromium based like brave have the same problem.

Even flatpak chromium if you add this command flatpak --user override --filesystem=/run/udev:ro org.chromium.Chromium works fine.

I tested a PS4 controller but maybe all joysticks are also affected.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Can you attach Chromium's stderr and the journalctl output?

tags: added: snap
Revision history for this message
Carlos V (linuxkernel94) wrote :

set 06 15:25:47 carlos-notebook gsd-power[2252]: Call to iio-proxy failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.136 was not provided by any .service files
set 06 15:25:47 carlos-notebook upowerd[1314]: treated changed event as add on /sys/devices/pci0000:00/0000:00:08.1/0000:03:00.4/usb3/3-2/3-2:1.0/bluetooth/hci0/hci0:1/0005:054C:09CC.0002/power_supply/sony_cont>
set 06 15:25:47 carlos-notebook audit[966]: USER_AVC pid=966 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/freedesktop/UPower" interface=">
                                             exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
set 06 15:25:47 carlos-notebook audit: MAC_TASK_CONTEXTS subj_apparmor=unconfined
set 06 15:25:48 carlos-notebook kernel: audit: type=1107 audit(1662470747.995:163): pid=966 uid=102 auid=4294967295 ses=4294967295 subj=? msg='apparmor="DENIED" operation="dbus_signal" bus="system" path="/org/>
                                         exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
set 06 15:25:48 carlos-notebook kernel: audit: type=1420 audit(1662470747.995:164): subj_apparmor=unconfined

Revision history for this message
Matt Reynolds (nondebug) wrote :

Hi, I found this bug while investigating the Chromium bug https://crbug.com/1359677

I'm guessing this is caused by Chromium's use of udev for device enumeration. Gamepad API on Linux uses udev to enumerate devices in the joydev, evdev, and hidraw subsystems.

flatpak has a similar problem: https://github.com/flathub/org.chromium.Chromium/issues/40

"Unfortunately we're mostly stuck like this for now, since Chromium expects to read devices from udev, which cannot be directly exposed into the sandbox due to having an unstable ABI."

As noted up-thread, there's a flatpak workaround that involves configuring the udev filesystem to be read-only.

I'd like to fix this by removing Chromium's dependency on udev. Is there an alternative that plays nicely with snap/flatpak sandboxing?

Changed in chromium-browser (Ubuntu):
status: Incomplete → New
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.