Bug 513667 - Long delay when switching from tty to desktop kwin session
Summary: Long delay when switching from tty to desktop kwin session
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: core (other bugs)
Version First Reported In: 6.5.4
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-21 18:14 UTC by Shmerl
Modified: 2025-12-21 18:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shmerl 2025-12-21 18:14:41 UTC
I noticed that there is a long delay (sometimes 6+ seconds) when switching from tty to regular kwin session.

Switching from desktop session to tty is fast in contrast.

I have two GPUs, one discrete (AMD Radeon 7900 XTX) to which the monitor is connected. Another is integrated in the AMD APU (AMD Ryzen 9 7950X), which is listed as RAPHAEL_MENDOCINO).

Here is a list of card# and renderD12#:

```
ls -l /dev/dri/by-path
total 0
lrwxrwxrwx 1 root root  8 Dec 20 21:14 pci-0000:48:00.0-card -> ../card0
lrwxrwxrwx 1 root root 13 Dec 20 21:14 pci-0000:48:00.0-render -> ../renderD128
lrwxrwxrwx 1 root root  8 Dec 20 21:14 pci-0000:5d:00.0-card -> ../card1
lrwxrwxrwx 1 root root 13 Dec 20 21:14 pci-0000:5d:00.0-render -> ../renderD129
```

```
lspci | rg VGA
48:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900 GRE/7900M] (rev c8)
5d:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raphael (rev c1)
```

So as you can note, In my case

* card0 / renderD128 is 7900 XTX (active GPU)
* card1 / renderD129 is iGPU (not unused)

When switching from tty to the desktop session, I see this in kwin log:

```
sudo journalctl _SYSTEMD_USER_UNIT=plasma-kwin_wayland.service

```
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/renderD128 device (No such device)
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_wayland_drm: Failed to open drm device /dev/dri/renderD128
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:02 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:03 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:04 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:05 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:06 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:07 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:07 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:07 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:07 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
Dec 21 13:11:07 host kwin_wayland_wrapper[2588]: kwin_wayland_drm: Failed to open drm device /dev/dri/card1
Dec 21 13:11:07 host kwin_wayland_wrapper[2588]: kwin_core: Failed to open /dev/dri/renderD129 device (No such device)
Dec 21 13:11:07 host kwin_wayland_wrapper[2588]: kwin_wayland_drm: Failed to open drm device /dev/dri/renderD129
```

Note how it's trying to open the device for unused GPU for more than 5 seconds. That's directly corresponds to the delay that I'm observing when switching from tty.