Solved Problem on wakeup from suspend/hibernate
#1
I've installed ubuntu server 14.04 LTS and xbmc by following this HowTo (vaapi-sse4: Deinterlacing Testing).
everything works fine but I've problems on wakeup from S4.

1.) xbmc starts to fast so that the network was not up and so xbmc didn't find my MySQL databases...
this problem was be solved by setting the network from dhcp to static...

2.) when I wakeup from suspend/hibernate my VDR / tuner-card DD CineS2 do not work again so i surched for a solution and found out that there is a known
problem for my tuner-card a solution should be to create a /etc/pm/config.d/00sleep_module
Code:
# USB-Kernelmodule und forcedeth (Netzwerkkarte) machen Aerger bei SUSPEND & RESUME mit pm-utils
# daher sollen sie automatisch ent- und geladen werden
SUSPEND_MODULES="$SUSPEND_MODULES ddbridge cxd2099 dvb_core"

this didn't help at all so create a /etc/pm/sleep.d/99_htpc.sh
Code:
#!/bin/sh
case "$1" in
suspend|hibernate)
service lirc stop
service vdr stop
;;
resume|thaw)
service lirc start
service vdr start
;;
esac

but it didn't work... here is the syslog....
any ideas whats going wrong...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#2
maybe you need to make sure that the device file is always the same. Check if /dev/dvb/adapter1/frontend0 is there after resume. If it changes, you could try to pin it via a udev rule
Reply
#3
I just had a similar problem with my tuner and suspend - sleep hook needed to be prefixed with 00 and not 99 so that it is exectued later. Using a file in the config.d directory didn't work either, so I did it via the sleep hook. Also you can get more info about suspend hooks being run in /var/log/pm-suspend
Reply
#4
thanks for answers. I will try again.

While my testing I found out that when I unload the kernerl modules via console

Code:
rmmod ddbridge cxd2099 dvb_core

after that I reload the kernel modules

Code:
modprobe ddbridge cxd2099 dvb_core

when I now stop VDR and start again it works... It looks like that the modules not unloaded or loaded right...
so maybe I can try as follow /etc/pm/sleep.d/00_htpc.sh
Code:
#!/bin/sh
case "$1" in
suspend|hibernate)
rmmod ddbridge cxd2099 dvb_core
service lirc stop
service vdr stop
;;
resume|thaw)
modprobe ddbridge cxd2099 dvb_core
service lirc start
service vdr start
;;
esac

instead of using /etc/pm/config.d/00sleep_module

Code:
# USB-Kernelmodule und forcedeth (Netzwerkkarte) machen Aerger bei SUSPEND & RESUME mit pm-utils
# daher sollen sie automatisch ent- und geladen werden
SUSPEND_MODULES="$SUSPEND_MODULES ddbridge cxd2099 dvb_core"
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#5
Yep that sleep hook is pretty much how I have mi e setup.
Reply
#6
I haven't luck with this. I get the following error in syslog...

Code:
Oct 28 20:14:20 mediacenter vdr: [1913] ERROR: invalid primary device number: 1
Oct 28 20:14:20 mediacenter vdr: [1916] epg data reader thread ended (pid=1913, tid=1916)
Oct 28 20:14:20 mediacenter vdr: [1913] ERROR: no primary device found - using first device!
Oct 28 20:14:20 mediacenter vdr: [1913] ERROR: invalid primary device number: 1

so what else can I do?
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#7
(2014-10-28, 15:19)wsnipex Wrote: maybe you need to make sure that the device file is always the same. Check if /dev/dvb/adapter1/frontend0 is there after resume. If it changes, you could try to pin it via a udev rule

yes you are right, it must be the same device file all times...
so I have to create a udev rule...

is this right? etc/udev/rules.d/62-dvb.rules
Code:
# dvb devices
KERNEL=="DDBridge*", DRIVERS=="ddbridge cxd2099 dvb_core ", NAME="dvb/adapter0/%k"

It's a Dual-Tuner-Card so I'm not sure...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#8
after 2 day try and error I must say it didn't work for me...
After wake up I can`t get my vdr and Cine S2 work...
It all times is not possible...

I've searched the "whole" internet but can't find a solution...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#9
Looking at your resume hook you probably need to stop vdr before unloading the module - if its in use by vdr it won't unload the module. To unload modules I used modprobe -r instead of rmmod as it is more verbose and I piped the output of all the commands to a text file to see what was happening, eg:

modprobe ddbridge cxd2099 dvb_core >> /tmp/vdr-log
Reply
#10
thanks again for helping... I will try again today evening...
It's very frustrating if you try and try again and it didn't work...
Maybe its a problem of my tv-card, I will have a look into the media_build_experimental kernel...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#11
No it's not problem of your TV card. You cannot unload a driver module when it is still in use. Therefore stop vdr before unloading it.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
yes, that make sense...

yesterday I tried as follow by using console..

Code:
sudo service vdr stop # waiting till I see in syslog vdr has stoped
sudo rmmod ddbridge cxd2099 dvb_core
sudo sudo pm-hibernate

wake up by IR-Remote

Code:
sudo modprobe ddbridge cxd2099 dvb_core
sudo service vdr start

VDR start without any error BUT
when I select a chanel I got an error "no chanel 16"

For me it looks like the TV-Tuner is not ready. Thats why I thought it's a problem of my tv-card...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#13
(2014-10-30, 10:56)fritsch Wrote: No it's not problem of your TV card. You cannot unload a driver module when it is still in use. Therefore stop vdr before unloading it.

I've change the hook as follow
Code:
#!/bin/sh
case "$1" in
suspend|hibernate)
service lirc stop
service vdr stop
sleep 10
modprobe -r ddbridge cxd2099 dvb_core
;;
resume|thaw)
modprobe ddbridge cxd2099 dvb_core
service lirc start
service vdr start
;;
esac

here is the pm-suspend.log

I don't know why but the ddbridge is in use although vdr is stoped...
2nd thing is that after wakeup my IR-Remote dosen't work and my pulse-eight-adapter lost conection...

The good thing is, tuner-cards is ready after wakeup...
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply
#14
finaly I get it solved...
The problem was, VDR need more than sleep 10 to stop thats why ddbridge was in use and couldn't be stoped.
so I set it to sleep 15 and it works perfect...

Code:
#!/bin/sh
case "$1" in
suspend|hibernate)
stop vdr
sleep 15
modprobe -r ddbridge cxd2099 dvb_core
;;
resume|thaw)
modprobe ddbridge cxd2099 dvb_core
service vdr start
;;
esac
Board: B85M-ITX
CPU: i3 4330
GPU: Geforce GTX 750ti
Reply

Logout Mark Read Team Forum Stats Members Help
Problem on wakeup from suspend/hibernate0