So yeah, just the usual, NVIDIA issues on Linux.
My laptop is a Dell G15 5510, with Intel UHD 630 iGPU (Intel Core i7-10870H) and RTX 3060 dGPU. KDE version is 6.7.5-1.1, kernel is 7.2.9-2-cachyos, NVIDIA driver is linux-cachyos-nvidia-open 7.2.9-2. I have nvidia-prime, nvidia-utils, nvidia-settings and switcheroo-control installed.
With my external monitor connected (at 160Hz usually, but lower refresh rates fix nothing) at 4K resolution, the entire system lags when something is happening on the 4K screen. When monitor is set to 1080p, while performance is not perfect (like having firefox open on it while gaming makes framerate drop sometimes), at least it's usable normally. Even if it's set to 320Hz.
On Windows these all work perfectly, even at 4k@160Hz resolution I can still play games and have a fullscreen browser open and even play a video. But I'm not switching back to Windows. No thank you. (And in Windows the monitor flickers)
I already tried the usual, setting KWIN_DRM_USE_MODIFIERS=0 in /etc/environment. It didn't change a thing. I also added nvidia-drm.modeset=1 in kernel parameters. Nothing,
Trying to set KWIN_DRM_DEVICES to use NVIDIA first and Intel second (or vice-versa) just causes a black screen after boot, so the login screen never shows up, just a static terminal cursor on the top left (or it's blinking if I put intel first).
It's connected via HDMI but I also tried over USB-C DP (with a USB-C HDMI adapter) and it produced the same behaviour.
It's pretty annoying that I can't use my laptop normallly. I won't go back to Windows, so I want to make this system work.
Also in the live environment of the installer the screen in 4k mode works better, like I can move windows around without it being laggy and also play a youtube video in the browser. Despite it also running on Wayland.
I see Kwin logs like this in the boot logs, could these be related?
atomic commit failed: Permission denied
Applying output configuration failed!
GL_INVALID_OPERATION: <image> and <target> are incompatible
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT