Bug 366981

Summary: ConsoleKit tries to find the console using keyboard ioctls that don't always work
Product: [Fedora] Fedora Reporter: Peter Jones <pjones>
Component: ConsoleKitAssignee: David Zeuthen <davidz>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-18 15:31:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to use VT_ETSTATE and tty0 none

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 ***