Askannz / optimus-manager

A Linux program to handle GPU switching on Optimus laptops.
MIT License
2.27k stars 165 forks source link

Added a hybrid driver mode for xorg integrated driver #564

Closed hadi77ir closed 5 months ago

hadi77ir commented 5 months ago

I had this problem that when I switched to NVIDIA mode and logged out, SDDM was just black and my screen was completely off (even its backlight was turned off). I had experience with nvidia-xrun and its default configuration always worked for me. The only way for optimus-manager to work, was to only use "integrated" and "hybrid" modes.

After comparing xorg configurations from optimus-manager and nvidia-xrun, it turned out that nvidia-xrun always uses modesetting as driver for "integrated" GPU, while optimus-manager had no option to "use intel driver when in integrated mode, use modesetting when in NVIDIA mode".

This pull request adds a "hybrid" driver for integrated GPUs that has solved the problem for me.

One would just set the driver option for intel to hybrid to enable this behavior. Also omitting DRI version may help too. (didn't check if it has any effect, but added this as an option too)

[intel]
driver=hybrid
dri=0
hadi77ir commented 5 months ago

Possibly fixes #302 #464

es20490446e commented 5 months ago

Thanks for the fix.

When opening a pull request make sure to mention me: @es20490446e

Otherwise I don't get noticed.