nvidia-hybrid-stuttering/README.md

40 lines
2.1 KiB
Markdown

If you have a laptop with hybrid GPUs (Intel + Nvidia in my case) and you are using some sort of power management to switch to hybrid mode to be able to use the external HDMI monitor and you are experiencing some sort of Stuttering or weird Tearing, and you don't want to switch to Nvidia mode, this is the solution that worked for me.
After a lot of research and testing, I found that disabling the `modesetting` driver and using the Intel driver helps with the problem.
First, install the Intel driver. If you are on Arch, you install it with `sudo pacman -S xf86-video-intel`
Then, if you use `optimus-manager`, make sure to enable the Intel driver on the `/etc/optimus-manager/optimus-manager.conf` file like so:
```
[intel]
driver=intel
accel=
tearfree=yes
DRI=3
modeset=no
```
I recommend enabling hybrid mode automatically when your laptop is connected to the power:
```
[optimus]
startup_mode=auto
startup_auto_battery_mode=integrated
startup_auto_extpower_mode=hybrid
```
If you aren't doing anything graphics intensive and you just want to plug in an HDMI monitor, using the Nouveau driver also helps in my experience
```
[optimus]
switching=nouveau
```
You can see more documentation about `optimus-manager.conf` [here in this link](https://github.com/Askannz/optimus-manager/blob/master/optimus-manager.conf)
If you use some sort of screen compositor like Picom, remember to enable hardware acceleration to get rid of the tearing:
```
backend = "glx";
```
If `glx` doesn't work, you can also try `xrender` instead.
If you are on `Pop!_OS` (which also has this same stuttering issue with nvidia cards) you are probably using `system76-power`.
I didn't found an easy way to enable the Intel driver instead the `modesetting` driver with `system76-power`, but if you know how to do so and it works for you please let me know to update this guide.
There is still the issue when you use the external screen only in hybrid mode and it goes extremely slow at like 1FPS, one workaround for this is mirroring the screen and turning off the backlight of the laptop.
I hope this is helpful for you since I couldn't find a solution for the stuttering anywhere.