bayasdev / envycontrol

Easy GPU switching for Nvidia Optimus laptops under Linux
MIT License
1.22k stars 62 forks source link

[Suggestion] Nvidia hybrid mode fix #73

Open VaRusLAN opened 1 year ago

VaRusLAN commented 1 year ago

My setup: Laptop + Intel + NVIDIA 1650 + External monitor + Closed lid + KDE Switched to hybrid mode from nvidia mode, had some issues, but found a fix for them.

SDDM won't show on external monitor:

Solution: add "xrandr --auto" to "/usr/share/sddm/scripts/Xsetup" .

1FPS problem when lid is closed:

Solution: export environment variable LIBGL_DRI3_DISABLE="true" by creating file "/etc/profile.d/nvidia-hybrid.sh" and adding there "export LIBGL_DRI3_DISABLE="true"". Found it here.

Btw, plasma in hybrid mode feels much better than in nvidia mode.

bayasdev commented 1 year ago

Hello there!

SDDM won't show on external monitor:

Solution: add "xrandr --auto" to "/usr/share/sddm/scripts/Xsetup" .

This shouldn't be needed on hybrid mode (at least on my HD630 + GTX1060 laptop), envycontrol already does this only for Nvidia mode.

1FPS problem when lid is closed:

Solution: export environment variable LIBGL_DRI3_DISABLE="true" by creating file "/etc/profile.d/nvidia-hybrid.sh" and adding there "export LIBGL_DRI3_DISABLE="true"". Found it here.

Falling back to DRI2 isn't recommended as it can cause screen tearing and artifacts on screens wired to Intel graphics, however if it does the trick for you then we can add this as workaround on the project's FAQ.

VaRusLAN commented 1 year ago

This shouldn't be needed on hybrid mode

But in my case there is a need for that.

envycontrol already does this only for Nvidia mode

Yeah, and because of that, SDDM is displayed on my external monitor in nvidia mode, but not in hybrid mode.

As I understand, there is no downsides of adding it to the hybrid mode. If it fixes the problem for some and has no impact on others, why not use it?