Bug#884595: closed by Michael Biebl <biebl at debian.org> (Re: kernel recognizes keyboards and mice as joysticks)

Antoni Villalonga antoni at friki.cat
Mon Dec 18 19:27:57 GMT 2017


Hi,

I'll try to sumarize my findings about this topic:

1.- powermanga accepts all joysticks from SDL
2.- Reading SDL: SDL_SYS_JoystickInit function for Linux seems to look
for /dev/input/event*, /dev/input/js*, /dev/js* devices. Some extra
checks are done at this function EV_IsJoystick.
3.- Linux 'joydev' module creates /dev/input/js0 device for de MS usb
mouse 045e:075c
4.- udev isn't involved (or should be somehow transparent)

Some questions I can't reply by myself:
- Should Linux create a js device for 045e:075c?
- Should SDL accept this js device?
- Should powermanga accept a js without axes?

FTR:

As a hotfix for powermanga:
 # modprobe -r joydev

Regards,

On Mon, Dec 18, 2017 at 06:21:59PM +0000, Antoni Villalonga wrote:
> Hi,
> 
> My problem trying to play powermanga remains :-/
> 
> On Mon, Dec 18, 2017 at 05:33:04PM +0000, Debian Bug Tracking System wrote:
> > This is an automatic notification regarding your Bug report
> > which was filed against the udev package:
> > 
> > #884595: udev: consider blacklisting fake joystick devices
> > 
> > It has been closed by Michael Biebl <biebl at debian.org>.
> > 
> > Their explanation is attached below along with your original report.
> > If this explanation is unsatisfactory and you have not received a
> > better one in a separate message then please contact Michael Biebl <biebl at debian.org> by
> > replying to this email.
> > 
> > 
> > -- 
> > 884595: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884595
> > Debian Bug Tracking System
> > Contact owner at bugs.debian.org with problems
> 
> > Date: Mon, 18 Dec 2017 18:28:40 +0100
> > From: Michael Biebl <biebl at debian.org>
> > To: Markus Koschany <apo at debian.org>
> > Cc: 884595-done at bugs.debian.org, Antoni Villalonga <antoni at friki.cat>,
> >  control at bugs.debian.org
> > Subject: Re: kernel recognizes keyboards and mice as joysticks
> > 
> > Am 18.12.2017 um 17:55 schrieb Markus Koschany:
> > > retitle 884595 udev: consider blacklisting fake joystick devices
> > > reassign 884595 udev
> > > clone 884595 -1
> > > reassign -1 src:linux
> > > retitle -1 kernel recognizes keyboards and mice as joysticks
> > > thanks
> > > 
> > > Am 18.12.2017 um 00:33 schrieb Michael Biebl:
> > >> Control: reassign -1 powermanga
> > >>
> > >> Am 17.12.2017 um 23:24 schrieb Markus Koschany:
> > >>> Am 17.12.2017 um 23:02 schrieb Michael Biebl:
> > >>> [...]
> > >>>> I don't have access to such a device, but it looks like this device node
> > >>>> /dev/input/js0 is created by the kernel.
> > >>>> Please elaborate why this is supposed to be a bug in udev.
> > >>>
> > >>> I'm not familiar with udev and I would have expected that the device
> > >>> manager is responsible for creating or handling device nodes. This could
> > >>> also be a bug in the kernel. We have received similar bug reports [1]
> > >>> [2] for games in the past.
> > >>>
> > >>> In #714399 [3] Peter De Wachter pointed out that it might be a
> > >>> longstanding kernel bug, reported as:
> > >>>
> > >>> https://bugzilla.kernel.org/show_bug.cgi?id=28912
> > >>> https://bugzilla.kernel.org/show_bug.cgi?id=37982
> > >>>
> > >>> But there is also a way to work around this issue by blacklisting such
> > >>> devices with udev rules:
> > >>>
> > >>> https://github.com/denilsonsa/udev-joystick-blacklist
> > >>>
> > >>> I'm not sure if someone ever intends to fix these kernel bugs. If udev
> > >>> is not responsible for creating those fake joystick devices for
> > >>> keyboards and mice, then please consider to blacklist the affected
> > >>> devices, so that they will not be confused with joysticks.
> > >>
> > >> I'm reassigning this back to powermanga. the udev package is not a
> > >> proper place for such a blacklist. I'll let you decide if you want to
> > >> reassign this bug to the kernel or if you want to provide such a
> > >> blacklist on your own.
> > > 
> > > Michael what point does it serve to reassign this bug back to
> > > powermanga? I explained to you that keyboards and mice are recognized as
> > > joysticks and powermanga is surely not responsible for creating device
> > > nodes. All games and applications with joystick support are affected.
> > > 
> > > I am going to clone this bug report and reassign it to src:linux and
> > > reassign 884595 back to udev.
> > > 
> > > Reasoning for reassignment:
> > > 
> > > The kernel is responsible for creating device nodes. Various keyboard
> > > and mouse models are detected as joysticks though. This makes several
> > > games hard or even impossible to control because the application code
> > > assumes a joystick is a joystick and not a keyboard or a mouse.
> > > 
> > > There are two longstanding kernel bugs which describe the same issue for
> > > two devices:
> > > 
> > > https://bugzilla.kernel.org/show_bug.cgi?id=28912
> > > https://bugzilla.kernel.org/show_bug.cgi?id=37982
> > > 
> > > Here are two more Debian bug reports which describe the same issue
> > > 
> > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711350
> > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714401
> > > 
> > > The issue is still reproducible with the latest kernel in Sid.
> > > 
> > > If this bug cannot be fixed in time for the next stable release aka
> > > Buster then I would like to see that the udev maintainers create a
> > > blacklist for such keyboards and mice.
> > > 
> > > Preliminary work is already available at:
> > > 
> > > https://github.com/denilsonsa/udev-joystick-blacklist
> > > 
> > > If the udev maintainers don't want to create and maintain such a
> > > blacklist, then please mark this bug report as "wontfix" accordingly.
> > > Please don't reassign it back to affected games and applications.
> > > Whether I or someone else wants to provide a patch should not be the
> > > criterion for bug assignment.
> > > 
> > 
> > And you reassigned it back even though I explained that udev is not the
> > proper place to maintain such a blacklist.
> > 
> > I'm thus going to close this bug report
> > 
> > 
> > -- 
> > Why is it that all of the instruments seeking intelligent life in the
> > universe are pointed away from Earth?
> > 
> 
> 
> 
> 
> > Date: Sun, 17 Dec 2017 13:25:09 +0100
> > From: Antoni Villalonga <antoni at friki.cat>
> > To: Debian Bug Tracking System <submit at bugs.debian.org>
> > Subject: powermanga: Controls didn't work
> > X-Mailer: reportbug 7.1.7
> > 
> > Package: powermanga
> > Version: 0.93.1-2
> > Severity: important
> > 
> > Dear Maintainer,
> > 
> > The game didn't work at all.
> > 
> > After loading the game the selected option is 'Quit'. 'Up arrow' key didn't
> > work on main menu, so I only can change menu option by pressing 'down arrow'.
> > 
> > Once 'Play' option is selected the game starts and the ship goes to up-left
> > corner and I can't move it from there.
> > 
> > Regards,
> > 
> > 
> > -- System Information:
> > Debian Release: buster/sid
> >   APT prefers unstable
> >   APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
> > Architecture: amd64 (x86_64)
> > Foreign Architectures: i386
> > 
> > Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores)
> > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
> > Shell: /bin/sh linked to /bin/dash
> > Init: systemd (via /run/systemd/system)
> > 
> > Versions of packages powermanga depends on:
> > ii  libc6            2.25-4
> > ii  libpng16-16      1.6.34-1
> > ii  libsdl-mixer1.2  1.2.12-14
> > ii  libsdl1.2debian  1.2.15+dfsg2-0.1
> > ii  powermanga-data  0.93.1-2
> > 
> > powermanga recommends no packages.
> > 
> > powermanga suggests no packages.
> > 
> > -- no debconf information
> 
> 
> -- 
> Antoni Villalonga
> http://friki.cat/

-- 
Antoni Villalonga
http://friki.cat/




More information about the Pkg-systemd-maintainers mailing list