bayasdev / envycontrol

Easy GPU switching for Nvidia Optimus laptops under Linux
https://bayas.dev/envycontrol
MIT License
1.14k stars 55 forks source link

Use Nvidia Sound Card for output in integrated graphics mode #151

Closed niraularohan closed 6 months ago

niraularohan commented 6 months ago

I have an arch installation with pipewire-pulse, and whenever I'm on integrated graphics mode with envycontrol, it completely disables nvidia card along with its sound card functionality, and my laptop is bound to use HDA Intel PCH which for some reason has always interfered with the headphone sound and a constant small buzz sound keeps coming from the headphones in linux. The issue isn't there at all when using windows with the same sound card.

Anyway, what I want to do is not disable just the sound card functionality of the nvidia card even when envycontrol is set to integrated mode. Anyway to do that?

bayasdev commented 6 months ago

I have an arch installation with pipewire-pulse, and whenever I'm on integrated graphics mode with envycontrol, it completely disables nvidia card along with its sound card functionality, and my laptop is bound to use HDA Intel PCH which for some reason has always interfered with the headphone sound and a constant small buzz sound keeps coming from the headphones in linux. The issue isn't there at all when using windows with the same sound card.

Anyway, what I want to do is not disable just the sound card functionality of the nvidia card even when envycontrol is set to integrated mode. Anyway to do that?

You can edit the script and remove the udev rules that disable the sound card however I think it will prevent the Nvidia card from powering down completely

niraularohan commented 6 months ago

Hey, thanks for the reply! I'll do that! Sorry for the question but as a newbie, I'm having hard time searching for envycontrol.py in my computer that's saved after installation. Where is the script located exactly? The one named "envycontrol.py" located in usr/bin just appears to be installation script and not the original envycontrol.py file that's in the repo.

Do I need to clone the repository, edit the file and install again?

bayasdev commented 6 months ago

Hey, thanks for the reply! I'll do that! Sorry for the question but as a newbie, I'm having hard time searching for envycontrol.py in my computer that's saved after installation. Where is the script located exactly? The one named "envycontrol.py" located in usr/bin just appears to be installation script and not the original envycontrol.py file that's in the repo.

Do I need to clone the repository, edit the file and install again?

The easiest is way is cloning the repo and editing the script there, then you can create a bash/zsh alias so envycontrol command always run from that folder ;)

niraularohan commented 6 months ago

Hey, I was successful with it! Thank you! You can close the issue!