bayasdev / envycontrol

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

Add XDM support and option to include nvidia modules in initramfs #63

Closed porschemad911 closed 7 months ago

porschemad911 commented 2 years ago

Hi, added support for XDM and an option to include nvidia modules in initramfs (Debian-based distros). I had to modify display manager detection regex for Debian, but should work with other distros. Feel free to change as needed. I am also unsure how to include modules in initramfs for non-Debian distros, so please add if you know how to do this. Lastly I am no python guru (second program I have touched only), so apologies for any bad coding practices.

Closes #61

bayasdev commented 1 year ago

@porschemad911 please adapt your changes for the latest version

So far only need to add xdm to SUPPORTED_DISPLAY_MANAGERS variable, and create the /etc/X11/xdm/Xsetup file with executable permissions.

Rebuilding the initramfs is already handled so no need to duplicate code.

porschemad911 commented 7 months ago

Apologies, I no longer own a laptop with an Nvidia GPU, so am unable to test a revised version. Closing.