Red Hat Bugzilla – Full Text Bug Listing
|Summary:||ConsoleKit tries to find the console using keyboard ioctls that don't always work|
|Product:||[Fedora] Fedora||Reporter:||Peter Jones <pjones>|
|Component:||ConsoleKit||Assignee:||David Zeuthen <davidz>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||rawhide||CC:||jmccann, koala, lkundrak, mclasen|
|Target Milestone:||---||Keywords:||EasyFix, Patch|
|Fixed In Version:||0.2.3-3.fc8.1||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2008-03-01 04:28:11 EST||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Peter Jones 2007-10-30 18:45:58 EDT
Description of problem: ConsoleKit tries to find a valid fd it can issue VT_WAITACTIVE against by iterating across a file list and issuing ioctl(fd, KDGKBTYPE, &arg), then checking the return value. Not all console devices support this ioctl, so in some cases it never finds a valid file descriptor to use, and from then on never marks any session active. We probably ought to be using something like VT_GETSTATE instead of a keyboard ioctl, but that's not sufficient to fix it. One fix that seems to work, though I'm not completely sure if it's the best answer, is to add /dev/tty0 to the list of files to try before /dev/console. I've attached a patch that seems to resolve the issue for me.
Comment 1 Peter Jones 2007-10-30 18:45:58 EDT
Created attachment 243861 [details] patch to use VT_ETSTATE and tty0
Comment 3 Lubomir Kundrak 2007-12-03 08:51:06 EST
Raising priority to high, keeping track of active sessions is fairly important. Furthermore the fix is attached to this problem. I found this issue while determining why was my desktop user unable to hibernate a machine. This fix fixes the problem for me. The workaround was to run the consolekit daemon with --no-daemon option which caused it to find the active tty correctly.
Comment 4 David Zeuthen 2007-12-03 14:07:44 EST
Sorry this bug got lost for me. Jon, what do you think? Thanks.
Comment 5 jmccann 2007-12-03 14:14:49 EST
Hi, sorry for the lag. I think this looks reasonable. I'll test and commit this as soon as I get my development machine back up (hopefully in the next few days). Thanks.
Comment 6 jmccann 2007-12-08 23:04:43 EST
In git now. Thanks for the patch Peter.
Comment 7 Lubomir Kundrak 2008-01-19 09:12:43 EST
I'm wondering if there's a chance that ConsoleKit update will occur for Fedora 8. In case yes, this fix is a good candidate to be included :)
Comment 8 Lubomir Kundrak 2008-02-29 14:39:15 EST
*** Bug 429157 has been marked as a duplicate of this bug. ***
Comment 9 Fedora Update System 2008-03-01 04:28:07 EST
ConsoleKit-0.2.3-3.fc8.1 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.