Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 1390 - /etc/init.d/gpm fails at startup with usb mouse and devfs
Summary: /etc/init.d/gpm fails at startup with usb mouse and devfs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-29 06:19 UTC by Arnaud Cornet
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/init.d/gpm new version (gpm,1.46 KB, text/plain)
2002-06-04 09:37 UTC, Brandon Low (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arnaud Cornet 2002-03-29 06:19:04 UTC
That happens because there is a short period of time between the 
loading of modules in /etc/modules.autoload and the apparition of
device nodes in /dev/input. On my system /dev/input/mouse0 appears
after "/etc/init.d/gpm start" is run. So that gpm fails with oops
/dev/input/mouse0 not found. After this, logging restarting gpm 
works fine.
my uggly workaround is a /bin/sleep 1 just before gpm is run in 
/etc/init.d/gpm

--
nohar
Comment 1 Brandon Low (RETIRED) gentoo-dev 2002-04-29 19:05:38 UTC
a note about this, it isn't really a devfs issue, it is just a USB issue, the 
USB controller takes about that long to probe devices once it is activated.
Comment 2 Brandon Low (RETIRED) gentoo-dev 2002-06-04 09:37:36 UTC
Created attachment 1335 [details]
/etc/init.d/gpm new version

This script detects (hopefully) if we are using a dynamically loaded mouse
device, then attempts to wait for that device to come online for 3 seconds, and
then attempts to start gpm regardless.	Also updated to properly detect the
exit status of gpm (gpm doesn't return 1 on a failed device open like a
civilized program would)
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-05 16:53:16 UTC
Could work.  Why the second sleep loop (after gpm start)?  Also, it should
prob test for USB as well.

To be honest though, I am not sure this is the correct fix.  If this is a
universal problem with USB, we should rather fix it USB side .. maybe a 
USB rc-script that handles the module probing and sleep if needed.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-27 16:49:08 UTC
This works fine for me with current kernels.