Wayland Unusable with Nvidia Driver

I’ve been experiencing KDE Plasma hard freezing to where I need to force power off my workstation. I had a similar problem with Nouveau on Linux Mint, I used it’s driver utility to install the 470xx drivers and all was well. However on Plasma with Wayland, Plasma is so laggy it’s unusable. x11 works fine… I just can’t figure out what I might be missing or if it’s a limitation of the card

My card details:

lspci -k -d ::03xx
01:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 670] (rev a1)
        Subsystem: Gigabyte Technology Co., Ltd Device 3542
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia_drm, nvidia

Kernel version:

$ uname -r
6.11.7-arch1-1

Initial setup of drivers using the following utility:

nvidia-inst -t

I’m prompted to run the following:

pacman -Rs --noconfirm --noprogressbar --nodeps xf86-video-nouveau
sudo pacman -Rs --noconfirm --noprogressbar --nodeps xf86-video-nouveau
yay -Syu nvidia-470xx-dkms nvidia-470xx-utils nvidia-470xx-settings

I add the nvidia_drm.modeset=1 to GRUB_CMDLINE_LINUX_DEFAULT

sudo vim /etc/default/grub
sudo grub-mkconfig -o /boot/grub/grub.cfg

Also have ran:

sudo dracut-rebuild

Attempted the following:

mv .config/kwinoutputconfig.json .config/kwinoutputconfig.json.bak

I can see nvidia drivers are installed:

$ lsmod | grep nvidia
nvidia_drm             81920  18
nvidia_uvm           2793472  0
nvidia_modeset       1511424  38 nvidia_drm
video                  81920  2 asus_wmi,nvidia_modeset
nvidia              40759296  1598 nvidia_uvm,nvidia_modeset

Get expected resolution when adding modeset but lag makes it unusable:

GRUB_CMDLINE_LINUX_DEFAULT='nvidia_drm.modeset=1 nowatchdog nvme_load=YES

I can confirm it’s enabled based on suggestion from the Arch Wiki:

cat /sys/module/nvidia_drm/parameters/modeset
Y

I also saw mention in the Arch Wiki about fbdev, but no matter if I add nvidia_drm.fbdev=1 or just fbdev=1 I get the following:

cat /sys/module/nvidia_drm/parameters/fbdev
cat: /sys/module/nvidia_drm/parameters/fbdev: No such file or directory

FWIW, I tried the linux-zen and linux-zen-headers kernel but I don’t get far in the boot process.

Stops at Reached target Graphical interface during boot.

I’ve ran dracut-rebuild as well to be sure.

Are you sure that is possible?

I am not an expert in this area but doesn’t kwin wayland support require GBM support? I thought that was added in 4.95. I think if your GPU is older, you may have to use Nouveau which is not the best from a performance perspective.

I think Gnome(and things based on it) may still support eglstreams.

Is there a reason you can’t stick with X11?

Hopefully someone with more experience working with older nvidia hardware under kwin can chime in.

I think you are pretty much out of luck trying to run KDE in a Wayland session with this legacy driver branch.

To get an “OK” experience on (KDE) Wayland you need at least driver version 560. And even then it works just “OK” compared to Intel or AMD. Nvidia still has to improve their Wayland support quite a lot. But that is only going to happen for the newer drivers.

You really should stick to X11 for now.

Your only options are trying to use Nouveau / NVK or ultimately switching to an Intel/AMD GPU or a newer Nvidia GPU (at least 30 series, better 40 series).

Can you show inxi -Ga

It’s not the end of the world if I have to stick to X11 on this driver. I’m mainly wanting to make sure there’s nothing I’m missing. The plan is to eventually get an AMD card for this box. I suppose my main concern is the eventual dropping of x11 support on KDE Plasma…

inxi -Ga
Graphics:
  Device-1: NVIDIA GK104 [GeForce GTX 670] vendor: Gigabyte driver: nvidia
    v: 470.256.02 alternate: nouveau,nvidia_drm non-free: series: 470.xx+
    status: legacy-active (EOL~2024-09-xx) arch: Kepler-2 code: GKxxx
    process: TSMC 28nm built: 2012-2018 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 2 speed: 5 GT/s ports: active: none off: HDMI-A-1
    empty: DP-1,DVI-D-1,DVI-I-1 bus-ID: 01:00.0 chip-ID: 10de:1189
    class-ID: 0300
  Display: x11 server: X.Org v: 21.1.14 with: Xwayland v: 24.1.4
    compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 93 s-size: 524x292mm (20.63x11.50")
    s-diag: 600mm (23.62")
  Monitor-1: HDMI-A-1 mapped: HDMI-0 note: disabled model: Samsung S24F350
    serial: H4ZK101264 built: 2018 res: 1920x1080 hz: 60 dpi: 94 gamma: 1.2
    size: 521x293mm (20.51x11.54") diag: 598mm (23.5") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: kms_swrast surfaceless: drv: swrast x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 470.256.02
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 670/PCIe/SSE2
    memory: 1.95 GiB
  API: Vulkan v: 1.3.295 layers: 1 device: 0 type: discrete-gpu
    name: NVIDIA GeForce GTX 670 driver: nvidia v: 470.256.02
    device-ID: 10de:1189 surfaces: xcb,xlib

I think you still have some time until X11 support is dropped. While I am sure it will happen eventually, as far as I know, there is no imminent roadmap for that on the KDE side.

2 repliess from KDE devs regarding dropping the X11 session completely, about 2 months old:

That being said there will most likely be distros that will do this on their own (build Plasma without the X11 session) way before KDE is actually dropping it. But I doubt Endeavouros / Arch will be among those.

1 Like

Interesting enough the same hard freeze happened in X11… woke the device, began to play music from cmus which is playing from a mounted local NFS share on my Synology and it just locks. Unsure what specifically could be causing this.

Digging through journalctl at the timestamp I found the following:

nov 14 14:39:56 myPC plasmashell[2305]: QRhiGles2: Context is lost.
nov 14 14:39:56 myPC plasmashell[2305]: Graphics device lost, cleaning up scenegraph and releasing RHI

Maybe it has been a Plasma thing… might install Xfce and run the Xfce EOS theme setup and test.