2010-04-04, 20:22
The Problem:
XBMC PVR branch on Ubuntu 9.10 (Karmic Koala), with vdr and a USB-connected dvb-t stick doesn't suspend or hibernate correctly (it hangs) and therefore cannot be resumed.
The Cause:
The dvb module/driver prevents suspend or hibernate.
The Solution:
Somehow offload the dvb module before suspend or hibernate, and then reload on resume.
Unfortunately it is not as simple as this, as the dvb module is used by the dvb-t USB stick, which is used by vdr, which in turn is used by XBMC.
The steps involved are:
On hibernate/suspend:
1. Stop XBMC
2. Stop vdr
3. Offload the dvb module
On wake up/resume, do the reverse:
1. Reload the dvb module
2. Start vdr
3. Start XBMC
NOTE: Only do this if suspend or hibernate, and wake up/resume works without the dvb-t USB stick, but doesn't work with the dvb-t stick.
Step One:
Open a terminal, and type (or copy/paste) the following:
Press <enter> type your password (if prompted to do so) and press <enter>. A gedit window will open up.
Step Two:
Type the following in the gedit window (or copy/paste):
Save the file and close the gedit window.
Step Three:
Make the script created above executable:
Open a terminal, and type (or copy/paste) the following:
Press <enter> type your password (if prompted to do so) and press <enter>
Close all windows, reboot (I think this is optional, but to be safe I do this anyway) and all should be good.
I hope this helps others, as I spent a few hours trying to sort this out.
XBMC PVR branch on Ubuntu 9.10 (Karmic Koala), with vdr and a USB-connected dvb-t stick doesn't suspend or hibernate correctly (it hangs) and therefore cannot be resumed.
The Cause:
The dvb module/driver prevents suspend or hibernate.
The Solution:
Somehow offload the dvb module before suspend or hibernate, and then reload on resume.
Unfortunately it is not as simple as this, as the dvb module is used by the dvb-t USB stick, which is used by vdr, which in turn is used by XBMC.
The steps involved are:
On hibernate/suspend:
1. Stop XBMC
2. Stop vdr
3. Offload the dvb module
On wake up/resume, do the reverse:
1. Reload the dvb module
2. Start vdr
3. Start XBMC
NOTE: Only do this if suspend or hibernate, and wake up/resume works without the dvb-t USB stick, but doesn't work with the dvb-t stick.
Step One:
Open a terminal, and type (or copy/paste) the following:
Code:
gksudo gedit /etc/pm/sleep.d/50_dvb_usb_dib0700_quirk
Press <enter> type your password (if prompted to do so) and press <enter>. A gedit window will open up.
Step Two:
Type the following in the gedit window (or copy/paste):
Code:
#!/bin/sh
case "$1" in
hibernate|suspend)
killall xbmc
/etc/init.d/vdr stop
modprobe -r dvb_usb_dib0700
;;
thaw|resume)
modprobe dvb_usb_dib0700
/etc/init.d/vdr start
xbmc
;;
*) exit $NA
;;
esac
Save the file and close the gedit window.
Step Three:
Make the script created above executable:
Open a terminal, and type (or copy/paste) the following:
Code:
sudo chmod +x /etc/pm/sleep.d/50_dvb_usb_dib0700_quirk
Press <enter> type your password (if prompted to do so) and press <enter>
Close all windows, reboot (I think this is optional, but to be safe I do this anyway) and all should be good.
I hope this helps others, as I spent a few hours trying to sort this out.