[mythtv-users] HDPVR Kernel module reload as power cycle

Michael mythtv at blandford.net
Thu Dec 6 22:20:07 UTC 2012


On 12/06/2012 02:52 PM, Rob Davis wrote:
> On 2012-12-06 15:40, Myth TV wrote:
>> On Wed, Dec 5, 2012 at 7:59 AM, Rob Davis <rob at davis-family.info> wrote:
>>
>>> On 2012-12-04 11:26, Michael wrote:
>>>
>>>> On 11/30/2012 09:33 AM, Steven Adeff wrote:
>>>>
>>>>> from the wiki,
>>>>> "If you still experience problems with stability, a small kernel
>>>>> module re-load script is included below in the Bitrate and Picture
>>>>> Controls sub section that re-loads the kernel modules and acts like a
>>>>> power cycle on the HD-PVR." -
>>>>>
>>>>>
>>>>> http://www.mythtv.org/wiki/Hauppauge_HD-PVR#Firmware_Version_Stability 
>>>>> [1]
>>>>>
>>>>> Is this correct, that reloading the kernel module for the hdpvr acts
>>>>> as a power cycle negating the need for the user to physically power
>>>>> cycle the device?
>>>>>
>>>>> If so, has anyone figured out a way to initiate a module reload at a
>>>>> time where MythTV won't be using any attached HDPVR devices?
>>>>
>>>> Here is what I use to see if my hdpvrs are in use and if not, power
>>>> down my satellite receiver.  You could probably modify it to do what
>>>> you want.
>>>>
>>>> !/bin/bash
>>>> export PATH=/usr/bin
>>>> MYTHWEBURL=http://<url>/mythweb/status
>>>>
>>>> wget -O - --quiet $MYTHWEBURL | grep HDPVR |
>>>> while read line; do
>>>>         dish=`echo $line | sed -e 's/.*hdpvr([0-9]).*/1/'`
>>>>         if `echo $line | grep --quiet 'and is not recording'`; then
>>>>                 echo "Powering off directv-${dish}"
>>>>                 /usr/local/bin/directv-${dish} off
>>>>         else
>>>>                 echo "directv-${dish} is busy"
>>>>         fi
>>>> done
>>>
>>> How often do you run this?
>>
>> Since I want the satellite off any time it isn't in use, I run this
>> every 30 minutes.
>>
>> In the case of reloading the module, may you run want to reload once
>> or twice a day.
>>
>> The script would probably need to be modified to:
>>
>> 2) Check to see if the PVR is in use
>> 3) If it is, sleep 10 minutes and loop until it isn't
>> 4) Reload the module
>> 5) exit
>>
>> Michael
>>
>>
> I just went back to cable after 2 years with OTA only.  I have 
> modified your script to work with a Comcast box to turn it off when 
> not in use.  I had a watch script to check if the backend had exited 
> every 20 mins, so I added it to that.  I have a line in it to check if 
> the box is being used and is on or off, if not being used and on it 
> will turn it off, then another in my channel change script to check 
> it's status and turn it on before changing channel.  Not sure how much 
> electricity it will save, but better than nothing.
>

I am glad it was useful for someone.  i am sure there are much smarter 
ways to do this with mythtv, but this was just something I hacked up.

I used to have dish network.  There was almost no difference in 
electricity in having the receiver off or on - it was hot all the time.  
With my directv receivers, they actually do use less power when off and 
in my already hot office it makes a difference.

Michael



More information about the mythtv-users mailing list