[mythtv-users] Kernel Crash when starting up in au0828-video.c line 895

Mark Lord mythtv at rtr.ca
Sun Apr 8 00:53:19 UTC 2012


On 12-04-07 06:44 PM, jrh wrote:
> Would you mind sharing your script?
..
> On Apr 7, 2012, at 6:30 PM, Mark Lord wrote:
..
>> The HVR950Q suffers from race conditions between the various
>> kernel modules that control different internal parts of the device.
>>
>> The standard way of avoiding most of the issues is to blacklist au0828
>> so that the kernel won't autoload it at boot time.
>>
>> Then, just before starting mythbackend, manually insmod au0828,
>> and then delay (sleep for a couple of seconds).
>>
>> After which it's usually working.
>>
>> I have a script that does this for me in a somewhat fancier fashion,
>> resetting the 950Q's beforehand, and then loading xc5000/au0828 in
>> the order that seems to work, with the magic sleeps.


Sure, no problem at all.

Here (attached, hopefully, is the /etc/init/mythtv.conf Upstart script
that I use for starting mythbackend -- free free to edit/rename it
to match what Mythbuntu calls it.  I use this in Xubuntu-12.04 prerelease.

The /etc/init/mythtv.conf script invokes /usr/local/bin/reset_hauppauge_usb.sh
to do the dirty work.  That script is also attached.

Finally, that latter script needs to perform USB resets,
which involves a very simple C program called usbreset.c (attached),
which you should compile and place the binary into /usr/local/bin/usbreset

My scripts may assume free use of "sudo",
which I've configured in /etc/sudoers to never prompt for passwords.
That file is _also_ attached, but the critical line is this one:

   mythtv  ALL=NOPASSWD: ALL

Cheers
-ml
-------------- next part --------------
# MythTV Backend service
# /etc/init/mythtv.conf

description     "MythTV Backend"
author          "Mario Limonciello <superm1 at ubuntu.com>"

start on (local-filesystems and net-device-up IFACE=lo and started udev-finish)
stop on starting shutdown

#expect fork
respawn
respawn limit 2 3600

pre-start script 
    [ -x /usr/sbin/mysqld ] || exit 0
    for i in `seq 1 30` ; do
       /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping && exit 0
       sleep .5
    done
end script

script
	/usr/local/bin/reset_hauppauge_usb.sh reinit
	test -f /etc/default/locale && . /etc/default/locale || true
	LANG=$LANG /usr/bin/mythbackend -v channel --logfile /var/log/mythtv/mythbackend.log --user mythtv
end script

post-stop script
	/usr/local/bin/reset_hauppauge_usb.sh
end script
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reset_hauppauge_usb.sh
Type: text/x-sh
Size: 1674 bytes
Desc: not available
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20120407/6674ee83/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usbreset.c
Type: text/x-csrc
Size: 445 bytes
Desc: not available
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20120407/6674ee83/attachment-0003.bin>
-------------- next part --------------
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
#Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Defaults	logfile=/dev/null
Defaults	!syslog
Defaults:mythtv !syslog,always_set_home

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d


# Note: these later entries override stuff higher up:
mythtv	ALL=NOPASSWD: ALL


More information about the mythtv-users mailing list