https://bugs.kde.org/show_bug.cgi?id=519988

            Bug ID: 519988
           Summary: Ctrl+Alt+F1..F12 do not switch virtual terminals from
                    a KWin Wayland session
    Classification: Plasma
           Product: kwin
      Version First 6.6.4
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

On a KWin Wayland session, the standard kernel/console keybindings
  Ctrl+Alt+F1 .. Ctrl+Alt+F12 do not change the active virtual terminal
  (VT). The keypresses are silently consumed by KWin / xkbcommon and
  never reach logind / the kernel, so the user remains in the Plasma
  session with no visual feedback.

  This breaks a critical recovery path: when the Plasma compositor
  freezes or fails to render (e.g. KWin hangs, GPU regression, blank
  screen at session start), the user cannot fall back to a TTY to
  investigate or restart services. The only workarounds today are:

    1. Run `sudo chvt N` from an already-open terminal — useless if
       the session is unresponsive or has no terminal open.
    2. Connect via SSH from another machine and run `sudo chvt N`.
    3. Hard-reboot.

  Note that the reverse direction works correctly: once on a TTY,
  Ctrl+Alt+F<N> returns to the Plasma VT without issue, because the
  kernel handles VT switching directly when no Wayland compositor is
  holding the session.

  In an X11 Plasma session (or a console-only login), Ctrl+Alt+F<N>
  works as expected, since Xorg forwards the keys to the kernel.

  Steps to reproduce
  ------------------
  1. Log into a Plasma 6 Wayland session (verified on 6.6.4).
  2. Press Ctrl+Alt+F1 (or any other F2..F12 not occupied by the
     current session).

  Actual result
  -------------
  Nothing happens. The Plasma session continues unchanged.
  `/var/log/journal` shows no VT switch event from logind.

  Expected result
  ---------------
  KWin should forward the key combination to the seat manager (logind /
  seatd) so the kernel performs the VT change, matching X11 behaviour.
  Equivalently, KWin could expose default global shortcuts "Switch to
  VT 1" .. "Switch to VT 12" bound to Ctrl+Alt+F1..F12, with a default
  action of `chvt N` via logind's SwitchTo() D-Bus method.

  Suggested fix
  -------------
  - Register default KWin global shortcuts for VT switching (Switch to
    VT 1..12) bound to Ctrl+Alt+F1..F12 on Wayland, mirroring what the
    kernel/Xorg does on X11.
  - The action should call into systemd-logind's
`org.freedesktop.login1.Seat.SwitchTo(uint32 vtnr)` D-Bus method, which already
    exists and works without root.

  Workaround
  ----------
  From any open terminal:
      sudo chvt 1
  or via systemd-logind D-Bus (no sudo):
      busctl call org.freedesktop.login1 /org/freedesktop/login1/seat/seat0 \
        org.freedesktop.login1.Seat SwitchTo u 1

  Once on a TTY, Ctrl+Alt+F<N> works in both directions.

  System
  ------
  - KWin:           6.6.4
  - plasma-workspace: 6.6.4
  - plasma-desktop: 6.6.4
  - KDE Frameworks: 6.26.0
  - Qt:             6.11.0
  - libinput:       1.31.1
  - systemd:        260.1
  - Kernel:         7.0.4 (xanmod1)
  - Distribution:   Arch Linux (rolling) — using CachyOS x86_64-v3
                    repositories prepended over upstream Arch repos.
                    This is *not* a CachyOS-installed system.
  - Session:        Wayland (XDG_SESSION_TYPE=wayland, XDG_CURRENT_DESKTOP=KDE)
  - Display server: KWin Wayland with SDDM autologin on VT2.
  - GPU:            AMD Radeon RX 580 (amdgpu / Polaris10).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to