[Bug 285394] sysutils/consolekit2 seems to use wrong tty

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 13 Aug 2026 03:45:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285394

Oleg <oleglelchuk@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |oleglelchuk@gmail.com

--- Comment #38 from Oleg <oleglelchuk@gmail.com> ---
 I can confirm another manifestation of this problem on FreeBSD 16-CURRENT with
consolekit2-2.0.0_2 and a dual serial/video console configured as follows:

  console="efi,comconsole"
  boot_multicons="YES"
  boot_serial="YES"

 The system reports both ttyu0 and ttyv0 as consoles, with serial as the
primary console and video as the secondary console.

 The D-Bus-activated console-kit-daemon opens /dev/console. CONS_GETVERS
succeeds, so ConsoleKit accepts that descriptor, but VT_GETACTIVE immediately
fails with “Inappropriate ioctl for device.” ConsoleKit consequently records
active VT 0. A local session on /dev/ttyv1 is added to seat0 but is never
marked active. As a result, this command fails:

  ck-launch-session dbus-run-session kwin_wayland

 KWin reports that it cannot authenticate the DRM magic token, and DRM
modesetting operations fail with Permission denied. Starting KWin through
seatd-launch works.
 On the same system, VT_GETACTIVE fails on /dev/console, while /dev/ttyv0
correctly reports the active VT. Applying the proposed /dev/ttyv0 change fixes
the problem. ConsoleKit then detects ttyv1 as active, emits
SEAT_ACTIVE_SESSION_CHANGED, and KWin starts without the DRM permission
failures. I built and tested the change against the current ports tree as
consolekit2-2.0.0_3. I am aware of the separate concern discussed in comment
32: /dev/ttyv0 can itself be revoked when a login session on ttyv0 exits.
Nevertheless, this test provides another concrete case where /dev/console is
unsuitable, specifically when serial and video consoles are enabled together.

-- 
You are receiving this mail because:
You are the assignee for the bug.