Summary: | media-gfx/splashutils-1.5.4.4-r2 unable to switch from silent mode to verbose using F2 with the 2nd keyboard | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Asaf Gery <asaf.gery> |
Component: | Current packages | Assignee: | Asaf Gery <asaf.gery> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aklhfex, proxy-maint |
Priority: | Normal | ||
Version: | 10.1 | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
splashutils-1.5.4.4-multi-keyboard.patch
splashutils-1.5.4.4-r3.ebuild |
Description
Asaf Gery
2013-01-04 10:14:04 UTC
I checked the sources and I think that I found out the cause for this bug in libfbsplash.c. The function "int fbsplash_set_evdev(void)" (lines 596 - 631) looks for the first keyboard device file it can open and then breaks the loop. The problem is that I have two keyboards - one is the laptop's own keyboard and the other one is my external USB keyboard. The internal keyboard shows firts, so the loop stops with this keyboard and set the evdev to the internal keyboard. It probably has nothing to do with the fact that my external keyboard is a USB keyboard, since ALT + F1 does work with that keyboard. Both libfbsplash.c and daemon.c should be modified in order to support multiple keyboards. I am not an expert C programmer, but I will try my luck solving this bug and send a patch if I succeed :-) Created attachment 335138 [details, diff]
splashutils-1.5.4.4-multi-keyboard.patch
Without this patch, fbsplashd listens on the first keyboard it manages to open and ignores the other keyboards.
Currently once fbsplashd manages to open a keyboard input device, it gets out of the loop and start reading events from that keyboard.
The patch uses select in order to read from all the keyboards attached to the machine (I didn't touch the embedded scripts that search for keyboards).
I have a laptop with a docking station and an external keyboard connected to the docking station. Usually when the laptop is docked, I keep the lid closed and use only the external keyboard. It was really annoying to have to open the lid just to press F2 for verbose mode. The patch fixes this situation.
I would greatly appreciate if you could review it.
Asaf
Created attachment 335140 [details]
splashutils-1.5.4.4-r3.ebuild
This is the ebuild that applies the patch.
I managed to solve the bug. I attached both the patch and the ebuild that applies the patch. I don't know whether the patch would work on embedded device since I don't have access to one. I would appreciate if one of you guys could review the patch. Thanks, Asaf +*splashutils-1.5.4.4-r3 (16 Jun 2013) + + 16 Jun 2013; Pacho Ramos <pacho@gentoo.org> + +files/splashutils-1.5.4.4-multi-keyboard.patch, + +splashutils-1.5.4.4-r3.ebuild, metadata.xml: + Support multiple keyboards (#450156), Asaf Gery will also proxy maintain this + package. + |