Bug 472763 - SDL apps in framebuffer cannot use gpm mouse
SDL apps in framebuffer cannot use gpm mouse
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
12
All Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-24 08:54 EST by Tomas Miljenović (TomasM)
Modified: 2017-08-08 20:33 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-25 08:09:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Workaround: make gpm mouse device readable for all users (330 bytes, patch)
2008-11-24 08:54 EST, Tomas Miljenović (TomasM)
no flags Details | Diff

  None (edit)
Description Tomas Miljenović (TomasM) 2008-11-24 08:54:25 EST
Created attachment 324473 [details]
Workaround: make gpm mouse device readable for all users

Description of problem:
SDL apps in framebuffer cannot use gpm mouse.  An attempt to run an SDL application (even one which does not require mouse support) returns the following error:
  Could not initialize SDL: Unable to open mouse.

Version-Release number of selected component (if applicable):
  All

How reproducible:
  Always

Steps to Reproduce:
1. Ensure you have booted with framebuffer support enabled
2. Check gpm has been initialised
3. Switch to a tty without an X server, and attempt to run an SDL application (e.g. uqm)
  
Actual results:
  Application fails to stat mouse device (see above)

Expected results:
  SDL stats mouse, initialises, and application runs

Additional info:
  The mouse device created by gpm is by default only readable for root.  Changing permissions so that all users can read the mouse device (see attached patch) resolves the problem.  I've successfully used this workaround/fix for a couple of months, with no problems observed.  However, I'm not sure if there's a good reason for these default permissions (in which case SDL has a bug, not gpm).
Comment 1 Zdenek Prikryl 2008-11-26 08:24:42 EST
Hello,
device /dev/input/mice isn't created by gpm but by udev. Also udev's rule sets access permission to that device, so changing its permission in gpm's init script isn't good idea. Furthermore, this error message is displayed even when gpm is stopped. So in my opinion this isn't bug in gpm at all. (better workaround, in case that you don't need a mouse, is set environment variable SDL_NOMOUSE=1)

I'm reassigning this to SDL, so the maintainer can make a comment.
Comment 2 Tomas Miljenović (TomasM) 2008-11-26 21:11:00 EST
Thanks Zdenek.

For me, SDL applications report the same error under X when I have no mouse support.  Everything is fine when using an X server, mouse input is enabled, and the relevant mouse device(s) are readable by all users (as they are by default).

(Unfortunately I do need a mouse for some apps, so I'm stuck with changing permissions in init scripts.)
Comment 3 Bug Zapper 2009-06-09 23:21:23 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Tomas Miljenović (TomasM) 2009-06-11 23:31:44 EDT
Bug still present in Fedora 11; changed version to 11.
Comment 5 Mamoru TASAKA 2009-09-09 03:52:12 EDT
Still exist on rawhide
Comment 6 Bug Zapper 2009-11-16 04:38:01 EST
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Thomas Woerner 2010-02-12 09:59:17 EST
There is nothing SDL can do about this. The device with the permissions are handled by udev.

Assigning to udev.
Comment 8 Harald Hoyer 2010-03-17 11:52:18 EDT
Solution could be:

KERNEL=="mouse*|mice*",	ENV{ACL_MANAGE}="1"

Don't know what security problems could arise with that.
Comment 9 Harald Hoyer 2010-06-25 08:09:18 EDT
Can't make this a default policy. Sorry.
Comment 10 infove 2017-08-08 20:33:08 EDT
The bug is still present in Fedora 13, 14, 15, 19, 20, 22, 24 and 25.
Please provide a workaround or fix, regardless of the currently supported version.

Note You need to log in before you can comment on or make changes to this bug.