daily pastebin goal
87%
SHARE
TWEET

Reventlov

a guest Feb 20th, 2011 177 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #!/bin/sh
  3. # File: "/etc/pm/sleep.d/20_custom-ehci_hcd".
  4. case "${1}" in
  5.         hibernate|suspend)
  6.               # La je sauvegarde le niveau du rétroéclairage du clavier
  7.                cp /sys/class/leds/asus\:\:kbd_backlight/brightness /tmp/keyboard_backlit_save
  8.               # Ensuite je l'éteint sinon il va clignoter
  9.                echo 0 > /sys/class/leds/asus\:\:kbd_backlight/brightness
  10.               # Unbind ehci_hcd for first device XXXX:XX:XX.X:
  11.                echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
  12.               # Unbind ehci_hcd for second device XXXX:XX:XX.X:
  13.                echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/ehci_hcd/unbind
  14.         ;;
  15.         resume|thaw)
  16.               # Bind ehci_hcd for first device XXXX:XX:XX.X:
  17.               echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/ehci_hcd/bind
  18.               # Bind ehci_hcd for second device XXXX:XX:XX.X:
  19.               echo -n "XXXX:XX:XX.X" | tee /sys/bus/pci/drivers/ehci_hcd/bind
  20.               # Je restore le rétroéclairage du clavier
  21.               lvl=$(cat /tmp/keyboard_backlit_save)
  22.               echo $lvl > /sys/class/leds/asus\:\:kbd_backlight/brightness
  23.         ;;
  24. esac
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top