fix_intel_video_tearing.ksh 625 B

12345678910111213141516171819202122
  1. #!/bin/ksh
  2. print ""
  3. echo -e "\033[33;5m If using laptop, unplug any external displays if connected... \033[0m"
  4. print ""
  5. read -r "Press enter when finish to continue..."
  6. if [ ! -f /etc/X11/xorg.conf.d/20-intel.conf ]; then
  7. {
  8. echo "Section \"Device\""
  9. echo " Identifier \"Intel Graphics\""
  10. echo " Driver \"intel\""
  11. echo " Option \"TearFree\" \"true\""
  12. echo "EndSection"
  13. } | doas tee -a /etc/X11/xorg.conf.d/20-intel.conf
  14. fi
  15. output=$(xrandr | grep " connected " | awk '{print $1;}')
  16. output=$(echo $output|tr -d '\n')
  17. echo "To enable immediately just type: '$ xrandr --output $output --set TearFree on'"