bayasdev / envycontrol

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

[Wiki Update] Add Void Linux to tested-distros list #163

Closed yenurbek closed 7 months ago

yenurbek commented 7 months ago

Works well on Void Linux (bspwm, dwm), but adding the blacklisting of nouveau is required.

/etc/modprobe.d/nouveau.conf

blacklist nouveau

klmcwhirter commented 7 months ago

What works or doesn't work requiring the blacklist?

envycontrol is doing that.

Please see https://github.com/bayasdev/envycontrol/blob/main/envycontrol.py#L21

Also note that testing all Linux distros is not practical at this time. But perhaps with your help we can address your issue.

Can I please request that you weigh in on #157 ?

Thanks.

bayasdev commented 7 months ago

PTAL @yenurbek just updated the wiki https://github.com/bayasdev/envycontrol/wiki/Frequently-Asked-Questions#tested-distros

Regarding blacklisting nouveau this is already handled by EnvyControl.

yenurbek commented 7 months ago

I noticed that envycontrol doesn't generate /etc/modprobe.d/blacklist-nvidia.conf. I am using 3.2.0 version of envycontrol, maybe it is crucial.

@klmcwhirter approach you mentioned looks really interesting, i will try it but later because of time.

Edited: now i have checked the code and realized that it shouldn't create blacklist-nvidia.conf anyway when switching to nvidia mode.

Blacklisting nouveau is required when switching to nvidia mode, otherwise xorg session is not starting

bayasdev commented 7 months ago

Blacklisting nouveau is required when switching to nvidia mode, otherwise xorg session is not starting

Then your distro got its Nvidia packaging wrong, each distro I've tested automatically blacklists nouveau when the user installs the proprietary driver.

yenurbek commented 7 months ago

I think you are right

According to https://github.com/void-linux/void-packages/blob/master/srcpkgs%2Fnvidia%2Ftemplate#L263 nvidia package creates the blacklist file in /usr/lib/modprobe.d where it has no effect on the system

bayasdev commented 7 months ago

I think you are right

According to https://github.com/void-linux/void-packages/blob/master/srcpkgs%2Fnvidia%2Ftemplate#L263 nvidia package creates the blacklist file in /usr/lib/modprobe.d where it has no effect on the system

You should open an issue downstream

bayasdev commented 7 months ago

Closing this as of now

klmcwhirter commented 7 months ago

For @yenurbek and future readers, since Void Linux does not use systemd the approach described in #157 does not apply.

It assumes availability of systemd's tmpfiles feature.

FYI