Created
April 2, 2017 15:07
-
-
Save anoother/411c6c76b2c743e9683a3a56544b5997 to your computer and use it in GitHub Desktop.
Automatically enable Freesync on Linux
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
#!/bin/bash | |
## Enable freesync - put this in eg. your .xsession | |
## http://support.amd.com/en-us/kb-articles/Pages/HOW-TO-ENABLE-AMD-FREESYNC-IN-LINUX.aspx | |
set -u | |
xrandr --prop | while read line; do | |
if echo "$line" | grep ' connected' > /dev/null; then | |
monitor=$(echo $line | awk '{print $1}') | |
else | |
if echo "$line" | grep 'freesync_capable: 1' > /dev/null; then | |
echo "Enabling freesync on $monitor" | |
xrandr --output $monitor --set "freesync" 1 | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment