Created
February 1, 2021 04:14
-
-
Save xtenduke/9888c02a1219494828b805223d7a654d to your computer and use it in GitHub Desktop.
Gnome AMD EGPU eject
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AMD EGPU EJECT GNOME | |
# I offer absolutely no warranty using this software | |
# Instructions: | |
# - Ctrl + Alt + F2 to enter console | |
# - run script as root | |
# - wait 5 seconds and unplug your egpu | |
# - wait for gdm to restart | |
#!/bin/bash | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
echo "Stopping gdm3" | |
sudo service gdm3 stop | |
echo "Unloading amdgpu module" | |
sudo modprobe -r amdgpu | |
echo "Please disconnect egpu" | |
sleep 10 | |
echo "Restarting gdm3" | |
sudo service gdm3 start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment