ConsoleKit: cannot activate session after switching
Andriy Gapon
avg at FreeBSD.org
Fri Sep 30 11:29:26 BST 2022
What I have:
- stable/13
- latest packages from pkg.FreeBSD.org
- KDE / plasma
- lightdm
What I did:
- logged in on ttyv8 via lightdm into KDE
- used KDE's "Switch session" function to activate X and lightdm on ttyv9
- logged in as a different use
- locked the session
- switched back to ttyv8 using Ctrl+Alt+F9
Result:
- noticed that auto screen locking and turning off monitors stopped working
- noticed that the ttyv8 session is not active in ck-list-sessions
- tried to activate the session via dbus but that failed
The dbus command:
qdbus-qt5 --system org.freedesktop.ConsoleKit
/org/freedesktop/ConsoleKit/Session2 org.freedesktop.ConsoleKit.Session.Activate
Error: org.freedesktop.ConsoleKit.Session.Error.General
Unable to activate session
ktrace of console-kit-daemon, note that 9 is passed as a parameter, I would
expect 8:
2545 console-kit-daemon CALL ioctl(0xb,VT_ACTIVATE,0x9)
2545 console-kit-daemon RET ioctl -1 errno 25 Inappropriate ioctl for device
2545 console-kit-daemon CALL writev(0x2,0x820fbeaa0,0x2)
2545 console-kit-daemon GIO fd 2 wrote 96 bytes
"console-kit-daemon 2545 - - WARNING: Unable to activate console:
Inappropriate ioctl for device
"
fstat of console-kit-daemon, note that 11 is a bad file descriptor while 12 is
for ttyv8:
USER CMD PID FD MOUNT INUM MODE SZ|DV R/W
root console-kit-daemon 2545 11 - - bad -
root console-kit-daemon 2545 12 /dev 128 crw------- ttyv8 r
Finally, ck-list-sessions output:
Session2:
unix-user = '1001'
realname = 'Andriy Gapon'
seat = 'Seat1'
session-type = 'unspecified'
session-class = 'user'
session-state = 'online'
active = FALSE
x11-display = ':0'
x11-display-device = '/dev/ttyv8'
display-device = '/dev/ ? '
remote-host-name = ''
is-local = TRUE
on-since = '2022-09-29T20:24:43.339060Z'
login-session-id = ''
XDG_RUNTIME_DIR = '/var/run/user/1001'
VTNr = '9'
Session4:
unix-user = '1002'
realname = 'XXX XXXX'
seat = 'Seat1'
session-type = 'unspecified'
session-class = 'user'
session-state = 'online'
active = FALSE
x11-display = ':1'
x11-display-device = '/dev/ttyv9'
display-device = '/dev/ ? '
remote-host-name = ''
is-local = TRUE
on-since = '2022-09-29T20:27:19.450823Z'
login-session-id = ''
XDG_RUNTIME_DIR = '/var/run/user/1002'
VTNr = '10'
--
Andriy Gapon
More information about the kde-freebsd
mailing list