-
-
Save thimslugga/d25f18d9841dbb87de4d95ac3c772fa6 to your computer and use it in GitHub Desktop.
Automatically enable Freesync on Linux
This file contains hidden or 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