Advertisement
dHeinemann

10_fix-flash-after-suspend

Jun 8th, 2011
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.87 KB | None | 0 0
  1. #!/bin/sh
  2. # Comment from dHeinemann:
  3. # This script was borrowed from http://ubuntuforums.org/showpost.php?p=10868975&postcount=18
  4. # Fixes HD Flash and HTML5 video becoming extremely choppy after a suspend/hibernate.
  5. # Despite the comment below about Nvidia, I experienced this problem on an ATI card.
  6. # Has side-effects related to virtualisation (see above post for details).
  7.  
  8. # Original comment:
  9. # Disable hyper-threading processor cores on suspend and hibernate, re-enable them
  10. # on resume. Presumably helps for buggy nvidia behaviour.
  11. # This file goes into /etc/pm/sleep.d/
  12.  
  13. case $1 in
  14.     hibernate|suspend)
  15.         echo 0 > /sys/devices/system/cpu/cpu1/online
  16.         echo 0 > /sys/devices/system/cpu/cpu3/online
  17.         ;;
  18.  
  19.     thaw|resume)
  20.         echo 1 > /sys/devices/system/cpu/cpu1/online
  21.         echo 1 > /sys/devices/system/cpu/cpu3/online
  22.         ;;
  23. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement