Skip to content

Instantly share code, notes, and snippets.

@s4mpl3d
Created March 31, 2018 05:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s4mpl3d/a73264aa7864ed3db8d6ba06e374e15a to your computer and use it in GitHub Desktop.
Save s4mpl3d/a73264aa7864ed3db8d6ba06e374e15a to your computer and use it in GitHub Desktop.
Workaround for gdm3/nvidia-prime "loginscreen freeze bug" on Ubuntu when switching between nvidia gtx1070 & intel gpu (Alienware 15)
#!/bin/bash
sudo prime-select intel
nohup bash -c "gnome-session-quit --force --no-prompt && sleep 3 && sudo /etc/init.d/gdm3 restart" &
#!/bin/bash
sudo prime-select nvidia
nohup bash -c "gnome-session-quit --force --no-prompt && sleep 3 && sudo /etc/init.d/gdm3 restart" &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment