Worse responsiveness in KDE with nonfree drivers, smooth with free

Hi, I'm having trouble using the proprietary drivers for my GPU (NVIDIA GTX 1070). I'd like to use the non-free drivers so I can play games, but when I install them I notice poor performance in KDE. Especially when using the menus. Everything feels less responsive. It feels like there is input lag and animations are less fluid. It's nothing extreme, but still noticeable compared to nouveau and therefore annoying. The best way I've found so far to get something concrete to show is by using the FPS desktop effect. (Let me know if I should use something different since it does say it shouldn't be used as a benchmark. :sweat_smile:) When using menus the widget shows a lot of lag spikes. When I switch back to free, the issues disappear and the lag spikes sink to significantly lower and almost unnoticeable levels. FPS seems to be roughly the same across both driver setups. Can anyone help me get the same performance on non-free as on free? Thanks in advance!

The following was run while on the free drivers.

inxi -Fxxxza --no-host
  Kernel: 5.5.7-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.1 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.5-x86_64 
  root=UUID=8f53eaed-1532-48d2-9e5d-2ab7990d324a rw quiet apparmor=1 
  security=apparmor resume=UUID=2ae5608d-8369-4c4e-a6ae-423897750b75 
  Desktop: KDE Plasma 5.17.5 tk: Qt 5.14.1 info: latte-dock wm: kwin_x11 dm: SDDM 
  Distro: Manjaro Linux 
  Type: Desktop Mobo: ASUSTeK model: Z170-A v: Rev 1.xx serial: <filter> 
  UEFI: American Megatrends v: 3802 date: 03/15/2018 
  Topology: Quad Core model: Intel Core i5-6600K bits: 64 type: MCP arch: Skylake-S 
  family: 6 model-id: 5E (94) stepping: 3 microcode: D6 L2 cache: 6144 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 28009 
  Speed: 800 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 
  4: 800 
  Vulnerabilities: Type: itlb_multihit status: KVM: Vulnerable 
  Type: l1tf mitigation: PTE Inversion 
  Type: mds mitigation: Clear CPU buffers; SMT disabled 
  Type: meltdown mitigation: PTI 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, 
  STIBP: disabled, RSB filling 
  Type: tsx_async_abort mitigation: Clear CPU buffers; SMT disabled 
  Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: Micro-Star MSI driver: nouveau 
  v: kernel bus ID: 01:00.0 chip ID: 10de:1b81 
  Display: x11 server: X.Org 1.20.7 driver: nouveau unloaded: modesetting 
  alternate: fbdev,nv,vesa compositor: kwin_x11 tty: N/A 
  OpenGL: renderer: NV134 v: 4.3 Mesa 19.3.4 direct render: Yes 
  Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:a170 
  Device-2: NVIDIA GP104 High Definition Audio vendor: Micro-Star MSI 
  driver: snd_hda_intel v: kernel bus ID: 01:00.1 chip ID: 10de:10f0 
  Device-3: Blue Microphones Yeti Stereo Microphone type: USB 
  driver: hid-generic,snd-usb-audio,usbhid bus ID: 1-11:3 chip ID: b58e:9e84 
  serial: <filter> 
  Sound Server: ALSA v: k5.5.7-1-MANJARO 
  Device-1: Intel Ethernet I219-V vendor: ASUSTeK driver: e1000e v: 3.2.6-k 
  port: f000 bus ID: 00:1f.6 chip ID: 8086:15b8 
  IF: enp0s31f6 state: up speed: 100 Mbps duplex: full mac: <filter> 
  Local Storage: total: 4.77 TiB used: 23.03 GiB (0.5%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO 1TB size: 931.51 GiB 
  block size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
  serial: <filter> rev: 2B2QEXE7 scheme: GPT 
  ID-2: /dev/sda vendor: Kingston model: SUV400S37120G size: 111.79 GiB block size: 
  physical: 4096 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 96R9 
  scheme: MBR 
  ID-3: /dev/sdb vendor: Western Digital model: WD30EZRZ-00Z5HB0 size: 2.73 TiB 
  block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 5400 rpm 
  serial: <filter> rev: 0A80 scheme: GPT 
  ID-4: /dev/sdc vendor: Western Digital model: WD10EZEX-00BN5A0 size: 931.51 GiB 
  block size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s rotation: 7200 rpm 
  serial: <filter> rev: 1A01 scheme: MBR 
  ID-5: /dev/sdd vendor: Crucial model: CT120M500SSD1 size: 111.79 GiB block size: 
  physical: 4096 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: MU05 
  scheme: GPT 
  ID-1: / raw size: 914.08 GiB size: 898.73 GiB (98.32%) used: 23.03 GiB (2.6%) 
  fs: ext4 dev: /dev/nvme0n1p2 
  ID-2: swap-1 size: 17.14 GiB used: 0 KiB (0.0%) fs: swap swappiness: 60 (default) 
  cache pressure: 100 (default) dev: /dev/nvme0n1p3 
  System Temperatures: cpu: 22.0 C mobo: N/A gpu: nouveau temp: 58 C 
  Fan Speeds (RPM): N/A gpu: nouveau fan: 0 
  Processes: 204 Uptime: 28m Memory: 15.58 GiB used: 2.07 GiB (13.3%) Init: systemd 
  v: 242 Compilers: gcc: 9.2.1 Shell: bash v: 5.0.16 running in: konsole 
  inxi: 3.0.37

You must be doing something wrong during the driver install process, and maybe the compositor is disabled.
Remember, in order to have proper functionality, all the other drivers must be uninstalled. :wink:



Thanks for the reply. I've double-checked and confirmed that I properly uninstalled the other driver when testing both setups. I've tried to install with both the GUI and using the command line. I have already reinstalled Manjaro completely once while trying to hunt down the problem and narrowed the difference down to the drivers.

As for the compositor, I believe that's turned on? "Enable compositor on startup" is enabled in the settings menu, in any case.

Just to illustrate what I was mentioning in the first post, I've attached images from my "tests" here:

lagspikes-nouveau lagspikegraph-nonfree

The first picture is with nouveau drivers, the second is with the non-free drivers. I still feel a bit silly using this widget given the text underneath it. :sweat_smile: Again, let me know if this is at all meaningful. If you'd like to see if you can reproduce the problem, all I do during this test is hover over the different options in the application menu rapidly or opening and closing the menu repeatedly. Especially while opening the application menu I experience a lot of lag. The lag spans most of the opening animation, meaning the menu goes from "open a tiny bit" to a lag spike to open completely, instead of sliding open smoothly like when I'm using nouveau. I know it's a bit vague, but I haven't found a way to express or show it any different. Thanks for taking a look regardless.

You mean clicking on it very quickly multiple times?
Is the first time i heard someone doing such a "test" and having issues about the outcome ...

Yes, exactly. As I said, I'm not too sure what the best method would be to approach this issue, and mine definitely feels very clumsy. I just noticed latency/lag, particularly when using the menu. The reason I open and reopen the menu a lot of times is so I can show the spikes appearing on the graph. That way I have something to show instead of only "something feels off". The lag spike appears to happen every single time I open the menu or when I hover over items. I'm just documenting what exactly I'm doing at the time I take the screenshot of the fps widget, in the hopes that you might be able to do something with that information. Sorry if that made things less clear. All I've found so far that looked a bit similar to what I am experiencing is this thread.

I know it is possible that I'm just imagining things, but I can't test the difference between the drivers on any other setup right now so I can't even rule that out. Otherwise I'd have definitely done so.
Any suggestions?

try different options in kde settings for compositor. it's been a while since i used kde but with my nvidia i had to set it to xrender instead of opengl. :man_shrugging:

That is extreme, and unjustified IMHO.
I had a GTX 650 that was barely able to work with nouveau and worked perfectly with video-nvidia with some minor tweaks. Then i switched to GTX 960 that was okish with nouveau, but performs flawlessly with video-nvidia without any custom addition to /etc/X11/mhwd.d/nvidia.conf
Can you share yours to see what you did on it?
Here is something to compare

The KWIN_COMPOSE=O2ES is when you want to use EGL instead of GLX. That would be justified if you want wayland, but wayland is not ready.

Fire up a game and see the difference, fire up Blender and render something with the GPU, Krita fails in some instances when using nouveau.
Spikes due to repeated quick clicks in the menu is not the norm to benchmark.

Not if you using a 144hz monitor. Opengl 2/3.1 cap it around 75 to 70hz for me.

i think he was referring to it as extreme since it's more cpu dependent. i only suggested it because kwin on my 960m had annoying issues when using opengl for compositing but there are other option in KDE compositor settings that have a big impact on how it works but i cant remember those exactly. i wanna say it's something like "painting" set to accurate that can cause issues but it's been a while since using kde.

1 Like

Your comment shows we speak the same language :wink:

1 Like

Thanks for taking an interest everyone. Really appreciate it!

Tried this and appears to fix my issue! This definitely feels like it matches the performance I was getting on nouveau. Seems the "magic lamp" desktop effect disappears along with it though. It'd be something I'm willing to sacrifice if it means better performance, but given what @bogdancovaciu said:

I'm not too sure. Should I put it back then? I'll wait with marking as a solution for now.

Absolutely! Here's a pastebin of the contents. I haven't messed around in the file directly myself iirc, but I think nvidia settings might have. It looks a hell of a lot less well defined than your example that's for sure.

Sure. I know it's not. That's just where I saw the issue arise.

Ok. I've tested a few games now since that was the most convenient method out of the ones you listed. I discuss the games in more detail below but if it's TL;DR: Games installed using steam with linux support do just fine. (nonfree drivers work as good or better than free for these games.) Games run through lutris/wine struggle and usually have bad overall performance, even if their respective lutris page suggests that should not be the case. These can only be run on proprietary though, so I cannot use them to test the difference between nonfree and free. All I can compare them to is their performance on my system when on Windows.

Overwatch (through lutris/wine):
With Nvidia drivers everything launches properly, but performance is absolutely dreadful. 20-30fps at best on low settings, even after the shader compilation finishes. Unplayable for me. On Windows I easily reach 144fps. Certainly not the expected performance mentioned on the lutris page. (supposedly flawless with tweaks)
Incidentally, it seems like overwatch isn't picking up GPU temperature either. Don't know if that is at all meaningful.
overwatch stats
Yeah, I don't think my gpu fan is quite that good.

The Sims 4 (through lutris/wine)
I played a bit of Sims 4 with the nvidia drivers before I reinstalled Manjaro, and performance compared to Windows was a little worse, though not nearly as bad as Overwatch was. FPS was a tad lower across the board with the occasional more extreme dip. I don't have it installed anymore at the moment so I can't give any more details. Moved everything back to Windows to play it there.

Hotline Miami, Starbound, Half-Life 2 and Plague Inc (topical, I know.)
These all seemed to perform just fine on both driver setups. Nvidia drivers gave moderate to far superior performance across all games except Hotline, which had a rock-solid 60fps on both setups.

I don't have a lot of graphically demanding games installed at the moment, but if you need more tests I can start downloading them or try and do stuff with blender.

xrender is software rendering so it uses more cpu whereas opengl uses the gpu. this wont have any effect on gaming or running other graphic intensive app's since the compositor gets disabled when they start (they're suppose to anyway). anyway, it's not really a fix and more of a workaround like damn near everything else involving kde/kwin :sweat_smile:

I see, so we're not out of the woods just yet. But, to clear things up for me, that does narrow it down to my GPU/drivers, right? Since software rendering gets me decent performance? I've since tested Bioshock Infinite as well, which is supposed to be running native, and it also doesn't seem to be coping well. FPS is all over the place on Manjaro, even on low settings, whereas my system can handle it easily @ 144fps with graphics settings maxed out on Windows. Should I even be comparing performance to that on Windows or is this just the way it is on Linux at the moment?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by