bayasdev / envycontrol

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

Fix xrandr script not running under LightDM in Nvidia mode #47

Closed TessaiMusa closed 1 year ago

TessaiMusa commented 2 years ago

I faced an issue where LightDM was not working only when switching to Nvidia (I think it worked first time but I don't remember exactly), hybrid and integrated worked fine, Nvidia mode also worked in SDDM but didn't in LightDM. After some digging I found that 20-nvidia.conf was not getting regenerated, causing xrandr script to not run.

This change ensures that 20-nvidia.conf always gets generated in LightDM for Nvidia mode.

Checking for lightdm.conf.d directory is not needed as it generates parent directories if it doesn't exist