Bug 366981 - ConsoleKit tries to find the console using keyboard ioctls that don't always work
Summary: ConsoleKit tries to find the console using keyboard ioctls that don't always ...
Keywords:
Status: CLOSED DUPLICATE of bug 359361
Alias: None
Product: Fedora
Classification: Fedora
Component: ConsoleKit
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: David Zeuthen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-05 16:13 UTC by Peter Jones
Modified: 2013-03-06 03:53 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-03-18 15:31:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to use VT_ETSTATE and tty0 (1.32 KB, patch)
2007-11-05 16:13 UTC, Peter Jones
no flags Details | Diff

Description Peter Jones 2007-11-05 16:13:35 UTC
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-11-05 16:13:35 UTC
Created attachment 248391 [details]
patch to use VT_ETSTATE and tty0

Comment 2 Lubomir Kundrak 2008-03-18 15:31:41 UTC

*** This bug has been marked as a duplicate of 359361 ***


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