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.
Created attachment 243861 [details] patch to use VT_ETSTATE and tty0
(Comment #1 should say VT_GETSTATE, of course)
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.
Sorry this bug got lost for me. Jon, what do you think? Thanks.
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.
In git now. Thanks for the patch Peter.
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 :)
*** Bug 429157 has been marked as a duplicate of this bug. ***
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.
*** Bug 366981 has been marked as a duplicate of this bug. ***