Screen tearing nvidia

Hello everyone
First of all, new design is awesome!! I’ve been waiting to post here :slight_smile:
I wanted to change xscreen settings to get rid of screen tearing because that’s so annoying when playing games
But strangely, there is NO xscreen
Also my nvidia.conf in /etc/X11/mhwd.d/ is empty
My specs:

System:    Kernel: 5.7.9-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.1.0 Desktop: KDE Plasma 5.19.3 
           tk: Qt 5.15.0 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: HP product: HP Pavilion Gaming Laptop 15-ec1xxx v: N/A serial: <root required> 
           Chassis: type: 10 serial: <root required> 
           Mobo: HP model: 87B1 v: 31.17 serial: <root required> UEFI: AMI v: F.02 date: 05/14/2020 
Battery:   ID-1: BAT0 charge: 34.0 Wh condition: 52.1/52.1 Wh (100%) volts: 11.4/11.6 
           model: Hewlett-Packard Primary type: Li-ion serial:   status: Discharging cycles: 469 
CPU:       Topology: 6-Core model: AMD Ryzen 5 4600H with Radeon Graphics bits: 64 type: MT MCP arch: Zen rev: 1 
           L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 71895 
           Speed: 1395 MHz min/max: 1400/3000 MHz boost: enabled Core speeds (MHz): 1: 1394 2: 1394 3: 1395 
           4: 1397 5: 1575 6: 2027 7: 1394 8: 1394 9: 1397 10: 1397 11: 1397 12: 1397 
Graphics:  Device-1: NVIDIA vendor: Hewlett-Packard driver: nvidia v: 440.100 bus ID: 01:00.0 chip ID: 10de:1f99 
           Device-2: Advanced Micro Devices [AMD/ATI] Renoir vendor: Hewlett-Packard driver: amdgpu v: kernel 
           bus ID: 05:00.0 chip ID: 1002:1636 
           Display: x11 server: X.Org 1.20.8 driver: amdgpu,nvidia FAILED: ati unloaded: modesetting,nouveau 
           alternate: fbdev,nv,vesa compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: AMD RENOIR (DRM 3.37.0 5.7.9-1-MANJARO LLVM 10.0.0) v: 4.6 Mesa 20.1.3 
           direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor 
           vendor: Hewlett-Packard driver: N/A bus ID: 05:00.5 chip ID: 1022:15e2 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Hewlett-Packard 
           driver: snd_hda_intel v: kernel bus ID: 05:00.6 chip ID: 1022:15e3 
           Sound Server: ALSA v: k5.7.9-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard driver: r8169 
           v: kernel port: e000 bus ID: 02:00.0 chip ID: 10ec:8168 
           IF: eno1 state: down mac: b0:5c:da:42:34:3f 
           Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter vendor: Hewlett-Packard 
           driver: rtw_pci v: N/A port: d000 bus ID: 03:00.0 chip ID: 10ec:c822 
           IF: wlo1 state: up mac: 70:66:55:bb:04:b7 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 2.74 TiB used: 1.13 TiB (41.3%) 
           ID-1: /dev/nvme0n1 model: KBG40ZNV512G KIOXIA size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 
           serial: 306PEEC9PBV1 rev: HP00AE00 scheme: GPT 
           ID-2: /dev/sda type: USB vendor: Western Digital model: WD My Passport 0748 size: 465.73 GiB 
           serial: 575842314139325638363033 rev: 1019 scheme: GPT 
           ID-3: /dev/sdb type: USB vendor: Seagate model: Expansion size: 1.82 TiB serial: NA8CJH3T rev: 0707 
           scheme: GPT 
Partition: ID-1: / size: 459.50 GiB used: 134.39 GiB (29.2%) fs: ext4 dev: /dev/nvme0n1p2 
           ID-2: swap-1 size: 8.80 GiB used: 1.04 GiB (11.9%) fs: swap dev: /dev/nvme0n1p3 
Sensors:   System Temperatures: cpu: 49.2 C mobo: N/A gpu: amdgpu temp: 47 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 317 Uptime: 12h 49m Memory: 7.21 GiB used: 3.33 GiB (46.1%) Init: systemd v: 245 Compilers: 
           gcc: 10.1.0 Shell: bash v: 5.0.18 running in: konsole inxi: 3.0.37

mhwd:

0000:02:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2016.04.20                true            PCI


> 0000:01:00.0 (0300:10de:1f99) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-amd-nvidia-440xx-prime            2020.03.26               false            PCI
    video-nvidia-440xx            2019.10.25               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:05:00.0 (0300:1002:1636) Display controller ATI Technologies Inc:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-amd-nvidia-440xx-prime            2020.03.26               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI

Things I’ve tested:

  • Compositor in kde
  • Installing other distros stupidly

Notes:

  • When I record the screen using OBS everything is fine but when playing I can see screen tearing a lot
  • It’s only in games
  • Also sometimes I have some problems with vlc(when I hit right arrow couple times, it would take some time to show the video correctly)

These days it should work out of the box. Make sure you do not have any old hacks left, like environmental variables or something. Try creating a new user and logging in.

Thanks for your comment

I tested it and even reinstalled manjaro but nothing changed

If you have no content in mhwd.d then you have not used mhwd to install the nvidia driver.

If you have used nvdia-xconfig as root then you will have a file in X11 named xorg.conf.

If you don’t have this either then you are not using nvidia driver which may answer for the tearing.

If your card supports the latest driver in Manjaro repo install using this command

sudo mhwd -i pci video-nvidia-440xx

I installed graphic card driver using this command:

sudo mhwd -a pci nonfree 0300

I ran this command:

sudo prime-run nvidia-settings

But still no configuration for screen

Also I don’t have a file named xorg.conf


But I play games with my nvidia graphic card. There is no way I’m using the other one


If I install that, then I always use my nvidia by default, right?

So my battery consumption would be too much, wouldn’t it?

Your machine has a hybrid AMD/Nvidia GPUs. Might want to take a look here:

1 Like

Thanks
I will install it and give you the result
Just one question, what is this supposed to do?

Is facilitating the switch between the GPUs and probably creates better configs that help to have a proper display experience. Is still new to me and got no time to dive into it much.

Ok thanks anyways
I will give you the result once I install it

I installed it. But when I execute sudo set-nvidia.sh and reboot, my system won’t boot up.

I needed to go to a tty to execute sudo set-amd.sh again in order for it to work

Overall, it didn’t work

Edit: No wait, it worked but when I boot up it shows a black screen, I’m able to enter the password and log in.
Now I’m going to check if I still have screen tearing or not

Edit 2: Hey that worked!!
Also my xscreen is back :slight_smile:
But still black login screen is a problem.
How can I fix that?

Edit 3: I guess I found the issue. While installing using sudo sh install.sh I get this error:

Copying contents of ~/optimus-switch/* to /etc/ .......
mkdir: cannot create directory ‘/etc/switch/’: File exists
mkdir: cannot create directory ‘/etc/lightdm/lightdm.conf.d’: No such file or directory
cp: cannot create regular file '/etc/lightdm/lightdm.conf.d/lightdm.conf': No such file or directory

Since you are on KDE Plasma, the script needs to be adapted to SDDM. Do not install LightDM as a workaround for this! Better ask on the github page for help if the script can be used in case of SDDM and how to do it.

1 Like

Hey I fixed that.
It was a silly problem
I just needed to install this link for my sddm to work properly


Anyway, thanks a lot :slight_smile:
1 Like