1
My laptop has two graphics units - Intel HD graphics and a 2015 nvidia GPU. Whenever I want to switch to the GPU, I need to do the following two steps:
Step 1: Run a script
echo Updating alternatives
sudo update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/nvidia-352-prime/ld.so.conf
sudo update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/nvidia-352-prime/alt_ld.so.conf
echo "Starting nvidia-352"
sudo modprobe nvidia-352
Step 2: Use nvidia-settings
# Open nvidia-settings
# Select Nvidia, enter my password (gsudo) and then quit the window.
Is there a way I can incorporate Step 2 into my script in Step 1?