Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save diegogslomp/a24c59766cfe841b60cbb1cb1ee6082a to your computer and use it in GitHub Desktop.
Save diegogslomp/a24c59766cfe841b60cbb1cb1ee6082a to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Fix amdgpu ubuntu missing files and screen tearing
# Show missing files
cat /var/log/**/*.log | grep -i amdgpu
# Download and copy missing files to system location
cd ~/repos/
git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
sudo cp -r ~/repos/linux-firmware/amdgpu/* /lib/firmware/amdgpu/
# Update
sudo update-initramfs -k all -u -v
# Fix Screen Tearing (Need Reboot)
cat <<EOF > /etc/X11/xorg.conf.d/20-amdgpu.conf
Section "Device"
Identifier "AMD Graphics"
Driver "amdgpu"
Option "TearFree" "true"
EndSection
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment