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.

How is the NFS share mounted? Make sure you use a systemd-automount so it won’t get hung up if the connection is interrupted.

Using sudo mount.nfs <ip>:/volume1/music /mnt/music. I will take a look at systemd-automount.

Try this instead.

fstab:

<ip>:/volume1/music /mnt/music nfs x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0

mount command:

mount.nfs <ip>:/volume1/music /mnt/music -o x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0

Wayland works great on AMD. I don’t know about gaming but for most desktop use it is working great. Your gpu should work on the 470.xx drivers. I’m not sure what your motherboard is and if the Bios is up to date. From the age of your gpu it sounds like maybe it’s older hardware? Or is it just an older gpu?

Awesome, if I understand correctly I either add to my fstab or run that modified mount.nfs command? I’ve added to fstab and ran mount -a and it pops up now. I will see how this goes. It’s possible the freeze happens after I wake when having had the nfs share mounted the non systemd-automount way.

This time it happened as I had the desktop “caffeinated” and running cmus. At the moment I’m keeping it awake playing music via Plex in a browser just to see if I encounter the same issue.

In the meantime I was doing some searching and came across mentions of trying soft along with a timeo of 5 and retrans of 5. Unsure if any of these options are conflicting. I’m not as familiar with the systemd options.

192.168.1.86:/volume1/music /mnt/music nfs soft,timeo=5,retrans=5,x-systemd.automount,x-systemd.idle-timeout=1min,x-systemd.requires=network-online.target,x-systemd.after=network-online.target 0 0

It’s got some years but still a Intel i7 Sandy Bridge with 32GB of RAM. I mainly am using it for audio production using Reaper along with native CLAP plugins and Windows emulation via yabridge.

It works just fine if you use the latest driver. Your problem is almost certainly because of the old and crusty driver you’re using. Use the 565 version.

The used GPU is not supported by the latest driver.

1 Like

I know it’s a harsh proposal, but what if you get rid of the GTX 670 and buy a used GTX 950 (or similar)?

The problems with driver issues etc for this card will only get worse from here on, you have the latest driver for this card, but it’s still too old and the hardware is not performant enough anyway.

I have looked on eBay, and a used GTX 950 goes for less than 20 €.

I seem to not be having issues since trying the LTS kernel… However I eventually want to get a used AMD. I despise Nvidia.

Its weird this person is having the exact same issue but I do not have any xf86-video-intel installs… https://bbs.archlinux.org/viewtopic.php?id=272914

Uses an Intel HD Graphics iGPU of the N3000 Series. Which isn’t comparable to your GTX 670.

In case you’re located within the EU, you could PM me. I’ve got an Radeon RX 580 8 GB (Sapphire Nitro + RX 480 with an RX 580 BIOS upgrade) in my old machine which I don’t use anymore and it’s just collecting dust at the moment. These are selling between 45,- to 75,- € at the moment (without the 580 BIOS though)