[snap] Gamepads are no longer detected

Bug #1962403 reported by Leonardo Müller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Fix Released
Medium
Olivier Tilloy

Bug Description

After the upgrade from Firefox deb to Firefox snap, my gamepad is no longer being detected.

One gamepad is a Feitun FM0013, a gamepad with at least 5 operation modes I've found so far: Nintendo Switch Pro Controller, X-Box wired controller, PS3 wired controller, PS3 wireless controller and generic Bluetooth controller.

From these 5 operation modes, X-Box wired controller, PS3 wired controller and generic Bluetooth controller work on my computer, while Nintendo Switch Pro Controller mode is found but doesn't detect any buttons while using PS3 wireless controller mode isn't found.

When using on my notebook and smartphone, I normally use this gamepad in generic Bluetooth controller mode, as I want to use it wirelessly more often. I have noticed that any of the modes that worked with Firefox deb (X-Box wired controller, PS3 wired controller and generic Bluetooth controller) stopped working with the snap.

Steps to reproduce:

1) Have Firefox installed as a snap;
2) Connect gamepad with one of its compatible modes;
3) Access page/game to test the gamepad (https://hacks.mozilla.org/2013/12/the-gamepad-api/ or https://luser.github.io/gamepadtest/ or http://www.cross-code.com/en/start for example);
4) Notice how the gamepad isn't detected.

I have a Redragon Seymur 2 too, and it also isn't detected. Using the Firefox from the Mozilla page, the gamepads are found and appear as follow in the luser's page:

gamepad: 0079-0006-DragonRise Inc. Generic USB Joystick
gamepad: 045e-028e-Microsoft X-Box 360 pad

The X-Box 360 one is the Feitun. Using Bluetooth, the Feitun appear as:

gamepad: 1949-0402-Gamepad

So, unfortunately, Firefox snap is unusable to play games while using gamepads. For example, I can play CrossCode on the Chromium snap, but am unable to play it on Firefox snap.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: firefox 1:1snap1-0ubuntu1
ProcVersionSignature: Ubuntu 5.15.0-22.22-generic 5.15.19
Uname: Linux 5.15.0-22-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu78
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: XFCE
Date: Sun Feb 27 11:25:06 2022
InstallationDate: Installed on 2017-06-13 (1719 days ago)
InstallationMedia: Xubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
Snap.Changes: não foram encontradas alterações
SourcePackage: firefox
UpgradeStatus: Upgraded to jammy on 2019-12-22 (797 days ago)
modified.conffile..etc.cron.daily.apport: [deleted]

Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

The firefox snap declares a plug on the joystick interface (https://snapcraft.io/docs/joystick-interface), which should enable detecting and using your gamepad.

It's not auto-connected though. Can you try:

    snap connect firefox:joystick

Then restart firefox, and test again?

Changed in firefox (Ubuntu):
status: New → Incomplete
Revision history for this message
Leonardo Müller (leozinho29-eu) wrote :

I added the plug to Firefox using the command. Once the command finished, it crashed. When Firefox restarted, the theme was messed up and it was using the wrong cursor theme, reminiscent from the early days of snapd.

After sending the crash report to Mozilla, closing that messed up Firefox and opening it again, it worked normally and the gamepads were detected.

Is there a reason the joystick plug isn't enabled by default? I believe it would be better for the users to have it enabled by default, as they could believe gamepads don't work on Firefox. Especially if the snap becomes the default for Jammy.

Also, the kernel bug on the Redragon Seymur 2 is back! 😭️ Even using usbhid.quirks=0x0079:0x0006:0x100000 there is an extra analog axis which messes controls, making it nearly unusable.

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

I filed a store request to have the joystick interface auto-connected: https://forum.snapcraft.io/t/auto-connecting-the-joystick-interface-for-the-firefox-snap/28981.

Regarding that kernel bug, please file a separate issue against the linux source package.

Changed in firefox (Ubuntu):
status: Incomplete → Confirmed
summary: - Gamepads are no longer detected
+ [snap] Gamepads are no longer detected
tags: added: snap
Changed in firefox (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Olivier Tilloy (osomon) wrote :

The store auto-connection request was granted.

Changed in firefox (Ubuntu):
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
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.