0

I have a laptop with two GPUs that's running Linux Mint with the cinnamon de. I created a primitive script that I set to run at boot via systemctl, which sets the active GPU to nvidia if AC power is detected, otherwise it sets the GPU to intel. The script is as follows:

#!/bin/sh
read -r online<"/sys/class/power_supply/AC0/online"
if [ "$online" = '1' ]; then prime-select nvidia
else prime-select intel
fi

Now, if I boot my computer on battery, it successfully sets the GPU to intel and I am able to log in without any issues, however when I attempt to log in when it was supposed to switch the GPU from intel to nvidia, cinnamon crashes. The only way I can get cinnamon to work after that is by logging out and logging back in. This doesn't happen if nvidia was the selected GPU already, it only happens if it's switching from intel to nvidia. Here's the systemd log: pastebin.com/BtMHknXf

Any and all help appreciated, thanks!

0

Are there any options in BIOS which would allow you to select default display adapter?

I think that you need to make nvidia the system default video adapter, here's how to do it.

  • Nope. It's a laptop, so the BIOS has very few options. – B3L1NSKY Feb 17 '18 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.