[ConsoleKit] Active VT tracking can fail at startup

Leen Besselink consolekit at consolejunkie.net
Mon Aug 23 16:51:45 PDT 2010


On Tue, Aug 24, 2010 at 12:52:24AM +0200, Lennart Poettering wrote:
> On Tue, 24.08.10 00:30, Leen Besselink (consolekit at consolejunkie.net) wrote:
> 
> > Hi folks,
> > 
> > I'm willing to do the coding, although I've not done C in ages and don't
> > know consolekit very well, I just want to know how you want it to be
> > fixed (proper).
> 
> No, we prefer things to stay broken. ;-)
> 
> Wouldn't this patch fix things for you as a side effect?
> 
> https://bugs.freedesktop.org/attachment.cgi?id=37970
> 

I don't think it would solve the bug I encountered.

I could be wrong, but I think it needs a call to ck_get_a_console_fd to get the new console_fd to fix the problem.

Judging by what I was doing your change would probably be retrying the wrong thing.

Because the threads all fail:

"Error waiting for native console 4 activation: Invalid argument"

when it would do the:

res = ioctl (console_fd, VT_WAITEVENT, &vt);

Here a version with some g_debug replace with g_warning:
https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/comments/60

Here is my quick hack for testing:

http://launchpadlibrarian.net/54207130/consolekit_0.4.1-3ubuntu1_0.4.1-3ubuntu1-lbesselink2.diff.gz

And the result:
https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/544139/comments/64

I'll see if I can do some testing tomorrow with your change, I was thinking of trying out the version
from git anyway or atleast do some more diffs.

Judging by the bugreport your attachment is attached to it seems very similair to what I'm fixing:

"I am that user. The patch broke the logout process of Ubuntu: the
currently logged in user lost the ability to power off the system,
only logout worked."

That's what I had. Although it did only fix the one bug I encountered in consolekit. The shutdown still
does a logout, but atleast I can shutdown from the login-screen now, which I couldn't before.

> Lennart
> 

Leen.

> -- 
> Lennart Poettering - Red Hat, Inc.
> 


More information about the ConsoleKit mailing list