Screen Tearing after latest Nvidia PRIME nonfree driver installation

After the latest update to mhwd-db on my Manjaro Openbox edition, i removed my previously installed video-hybrid-intel-nvidia-430xx-bumblebee (installed via sudo mhwd -a pci nonfree 0300 before the update), and then installed video-hybrid-intel-nvidia-440xx-prime (again, via sudo mhwd -a pci nonfree 0300, but after the update). But then after I rebooted, a lot of screen tearing ensued.
After researching a bit, I think that most probably the problem is PRIME Synchronization. But I can't seem to fix the problem.

Output of inxi -Fx:

  Host: Y700 Kernel: 5.4.12-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0
  Desktop: Openbox 3.6.1 Distro: Manjaro Linux
  Type: Laptop System: LENOVO product: 80NV v: Lenovo ideapad Y700-15ISK
  serial: <root required>
  Mobo: LENOVO model: Allsparks 5A v: SDK0J40688 WIN serial: <root required>
  UEFI: LENOVO v: CDCN54WW date: 06/13/2017
  ID-1: BAT0 charge: 45.8 Wh condition: 45.8/57.0 Wh (80%)
  model: SANYO L14S4P22 status: Full
  Topology: Quad Core model: Intel Core i7-6700HQ bits: 64 type: MT MCP
  arch: Skylake-S rev: 3 L2 cache: 6144 KiB
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  bogomips: 41621
  Speed: 800 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 800 2: 800
  3: 800 4: 800 5: 800 6: 800 7: 800 8: 800
  Device-1: Intel HD Graphics 530 vendor: Lenovo driver: i915 v: kernel
  bus ID: 00:02.0
  Device-2: NVIDIA GM107M [GeForce GTX 960M] vendor: Lenovo driver: nvidia
  v: 440.44 bus ID: 01:00.0
  Display: x11 server: X.Org 1.20.7 driver: modesetting,nvidia
  unloaded: nouveau resolution: 1920x1080~60Hz
  OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
  v: 4.6 Mesa 19.3.2 direct render: Yes
  Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Lenovo
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3
  Sound Server: ALSA v: k5.4.12-1-MANJARO
  Device-1: Intel Dual Band Wireless-AC 3165 Plus Bluetooth driver: iwlwifi
  v: kernel port: 4000 bus ID: 08:00.0
  IF: wlp8s0 state: up mac: ac:2b:6e:52:a5:df
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
  vendor: Lenovo driver: r8169 v: kernel port: 3000 bus ID: 09:00.0
  IF: enp9s0 state: down mac: 50:7b:9d:d2:92:cd
  Local Storage: total: 1.03 TiB used: 23.60 GiB (2.2%)
  ID-1: /dev/sda vendor: Samsung model: MZNLN128HCGR-000L2 size: 119.24 GiB
  ID-2: /dev/sdb vendor: Western Digital model: WD10SPCX-24HWST1
  size: 931.51 GiB
  ID-1: / size: 36.39 GiB used: 11.78 GiB (32.4%) fs: ext4 dev: /dev/sda5
  ID-2: /home size: 689.38 GiB used: 11.79 GiB (1.7%) fs: ext4
  dev: /dev/sdb3
  ID-3: swap-1 size: 3.75 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda4
  System Temperatures: cpu: 34.0 C mobo: N/A
  Fan Speeds (RPM): N/A
  Processes: 208 Uptime: 10m Memory: 7.61 GiB used: 1.46 GiB (19.3%)
  Init: systemd Compilers: gcc: 9.2.0 Shell: zsh v: 5.7.1 inxi: 3.0.37

Welcome to Manjaro.
Prime sync doesn't (yet) work on linux54 try an older kernel, for example linux419:

$ mhwd-kernel -i linux419

I don't know about Nvidia but a little on Intel

Create a config at /etc/X11/xorg.conf.d/20-intel.conf with the content

Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "TearFree" "true"

The extreme version by @Days

Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "AccelMethod"     "sna"
    Option      "TearFree"        "true"
    Option      "SwapbuffersWait" "true"
    Option      "DRI"             "2"

Currently using the extreme version - no problems (only Intel).

1 Like

prime sync only works with PRIME and as much as nvidia would seemingly like to call it "prime render-offload" it is a completely different setup than prime as it's been called for a while.

if the limitations of render-offload were not enough, using the modesetting driver on a skylake cpu is nothing short of a disaster. you can offload to the intel driver instead so you can use the "TearFree" option modesetting does not have and the tearing is much less pronounced but this comes at a steep cost to performance.

if you want the full performance without any screen tearing then setup PRIME (the good prime, not render-offload prime :nauseated_face:)

i suggest prime or optimus-switch which is also prime but allows you to switch from intel-only and nvidia prime modes.


It worked! Thanks guys, but I had a mixed approach regarding how I corrected the screen tearing. I will describe the process that worked for me, for any future person bumbling into this forum post.

But before anything, it was pretty weird when I first uninstalled the driver (via sudo mhwd -r pci video-hybrid-intel-nvidia-440xx-prime) and rebooted, screen tearing was still occuring, even on the free driver!

Then the first thing I tried was switching to Linux Kernel 4.19 via sudo mhwd -i linux419 and then changing Kernel from boot menu. Screen tearing still persisted there, even on the free driver on 4.19. So I removed Linux kernel 4.19 (via sudo mhwd -r linux419). Note: Don't remove the kernel while you are running the same version.

Then I tried adding /etc/X11/xorg.conf.d/20-intel.conf with the content described above. Both of them resulted in my GUI not turning on. Thus, I had to remove the file from virtual console.

Last, I tried installing PRIME as described in jonathan's tutorial, as well as optimus manager, as described on GitHub. But the screen tearing persisted.

Finally, what I did was reinstall Linux kernel 4.19, and then instead of installing PRIME via mhwd, install PRIME following jonathan's tutorial (one can see it as following freggel.doe's advice, and then dglt's advice, I guess (correct me if I am just speaking out of my ... :grin:)). Then it all came together, like magic! No more cursed screen tearing.

Note: An advice for the Community Manjaro Openbox user who stumbled here, if you are confused which DM is running, it is most probably XFCE with LightDM. That was the case for me, but please check before installing PRIME.

PS: I hope they add PRIME support on Linux kernel 5.4 soon. And btw, how do I run games with Nvidia PRIME. I know for Bumblebee, it was primusrun %COMMAND%, but what about PRIME?

If I could, I would make both the posts the solution, but it seems Manjaro forums doesn't seem to think it is possible :thinking:.

you just run them, no need for launch parameters at all.

1 Like

No worries, important thing is you got it working.

1 Like

Switching to Linux Kernel 4.19 worked for me too. Thank you.

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

Forum kindly sponsored by