Hi Ian,

this is the script I use on my main machine (Ubuntu 9.04) to
successfully suspend (hibernate in my case) when dvbserver is running:


Code:
--------------------
    
  r...@star2007:~# cat /etc/pm/sleep.d/dvbserver
  #!/bin/bash
  case $1 in
  hibernate)
  /usr/bin/killall -9 dvbserver.pl
  /usr/bin/killall -9 getstream
  /usr/bin/killall -9 femon
  /sbin/rmmod  budget budget_core stv0299 dvb_core ves1x93
  /sbin/rmmod  budget budget_core stv0299 dvb_core ves1x93
  exit 0
  ;;
  thaw)
  /sbin/modprobe budget
  /usr/local/share/dvbserver/dvbserver.pl -s &
  sleep 2
  /usr/bin/femon > /dev/null &
  ;;
  *)
  ;;
  esac
  
--------------------


You will have to add a suspend case, and you probably won't need the
getstream and femon part (I am using dvbserver v1, since for my setup it
is more stable), it should look like this:


Code:
--------------------
    
  #!/bin/bash
  case $1 in
  suspend)
  /usr/bin/killall -9 dvbserver.pl
  /usr/bin/killall -9 getstream
  /usr/bin/killall -9 femon
  /sbin/rmmod  budget budget_core stv0299 dvb_core ves1x93
  /sbin/rmmod  budget budget_core stv0299 dvb_core ves1x93
  exit 0
  ;;
  thaw)
  /sbin/modprobe budget
  /usr/local/share/dvbserver/dvbserver.pl -s &
  sleep 2
  /usr/bin/femon > /dev/null &
  ;;
  *)
  ;;
  esac
  
--------------------


The script should be placed in /etc/pm/sleep.d/, I called mine
dvbserver

The important part in order to successfully suspend is the kill/rmmod
since the machine won't suspend if the budget module is loaded

Let me know if this helps

Regards
Mattia


-- 
madmatt71
------------------------------------------------------------------------
madmatt71's Profile: http://forums.slimdevices.com/member.php?userid=21421
View this thread: http://forums.slimdevices.com/showthread.php?t=54713

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to