Bug 501926 - Laptop internal display freezes when default GPU is NVIDIA
Summary: Laptop internal display freezes when default GPU is NVIDIA
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (other bugs)
Version First Reported In: 6.3.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-23 21:20 UTC by Tarballwalf
Modified: 2025-03-24 13:28 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tarballwalf 2025-03-23 21:20:21 UTC
SUMMARY

Whenever I want to use my laptop at my desk with my docking station and external monitors, I have to go into the laptops UEFI and switch the primary GPU to the NVIDIA one to avoid bad perfomance. 

I have to mention my laptop has a mux switch, and switching from the UEFI forces the internal screen to the dGPU, and the Thunderbolt 4 port is wired directly to the dGPU.

Randomly, the laptops internal freezes displaying the last frame and nothing is drawn on it. External screens work fine, and programs are not quitting/crashing as I'm able to move them out of the frozen screen.

STEPS TO REPRODUCE
1. Switch primary GPU from the iGPU to the dGPU.
2. Randomly (I'm not sure what triggers this), the internal screen gets stuck.
3. Unable to get it "unstuck" unless I log out and log back in.

OBSERVED RESULT
Screen is frozen, programs still work as I'm able to move them out of the problematic screen, external displays are fine. Unplugging the dock/displays does not fix anything, in fact it gets the internal screen completely stuck requiring a forced poweroff. 

I cannot confirm if switching TTYs is a potential fix, as the internal screen sprung back to life after trying a whole bunch of things before resorting to a forced poweroff. 

I have also noticed trying to take a region screenshot doesn't work when the display freezes, spectacle throws out an error related to the screens.

EXPECTED RESULT
Internal display should not freeze and work normally.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
Running Wayland, with the NVIDIA open kernel modules 570.133.07. This issue has kept happening in the past with older KDE and NVIDIA drivers. My laptop requires `acpi_backlight=native` for internal display brightness to work when on dGPU mode, but this has been happening with or without it.

Laptop is ROG Strix Scar 16, currently waiting for https://github.com/NVIDIA/open-gpu-kernel-modules/issues/650 to get fixed so I can use hybrid mode at my desk and hopefully bypass this issue if it can't get fixed or it's something related to my hardware.

Let me know if I need to upload any logs, as I have no idea how to properly debug.
Comment 1 Tarballwalf 2025-03-23 21:29:07 UTC
oof, looked at the journal logs and found
>Mar 23 21:16:09 Strix-16 systemd[1]: systemd-hostnamed.service: Deactivated successfully.
>Mar 23 21:18:08 Strix-16 kernel: NVRM: nvAssertFailedNoLog: Assertion failed: CliGetEventInfo(rpc_params->hClient, rpc_params->hEvent, >&pEvent) @ kernel_gsp.c:466
>Mar 23 21:18:08 Strix-16 kernel: NVRM: _kgspProcessRpcEvent: Failed to process received event 0x1003 (POST_EVENT) from GPU0: status=0x57
>Mar 23 21:18:09 Strix-16 kwin_wayland[4928]: kwin_wayland_drm: Pageflip timed out! This is a bug in the nvidia-drm kernel driver
>Mar 23 21:18:09 Strix-16 kwin_wayland[4928]: kwin_wayland_drm: Please report this at https://forums.developer.nvidia.com/c/gpu-graphics/linux
>Mar 23 21:18:09 Strix-16 kwin_wayland[4928]: kwin_wayland_drm: With the output of 'sudo dmesg' and 'journalctl --user-unit plasma-kwin_wayland --boot 0'
>Mar 23 21:18:10 Strix-16 kwin_wayland[4928]: kwin_wayland_drm: Pageflip timed out! This is a bug in the nvidia-drm kernel driver
spamming the log. I will go open an issue at nvidia too, hopefully it's not KDE at fault. You guys really put hard work into smoothing things out.
Comment 2 Zamundaaa 2025-03-24 13:28:24 UTC
Yeah, that's definitely a driver bug. There's nothing we can do about it on our side.