[pvrusb2] Problems with HVR 1950

Edmundo Agurcia edmundo at paradise-computers.com
Tue Mar 30 17:05:17 CDT 2010



-----Original Message-----
From: Blake Campbell [mailto:blake at paradise-computers.com] 
Sent: Tuesday, March 30, 2010 12:42 PM
To: isely at isely.net; pvrusb2 at isely.net
Cc: edmundo at paradise-computers.com
Subject: RE: [pvrusb2] Problems with HVR 1950

Hello Mike,

I'm working with Edmundo on this project and wanted to follow up with our
previous post.  I was able to modify the udev rules as you suggested, and
now on bootup the video nodes all mount with the correct permissions and
ownership.  I accomplished this by adding the following line to
"/lib/udev/rules.d/41-mythtv-permissions.rules":
KERNEL=="video[0-2]", OWNER="paradise", MODE="0777"

However, despite these permissions, the MythTV frontends still give this
error after a reboot: "Error: MythTV is using all inputs, but there are no
active recordings?"

The only way we've found to get the frontends to work is to manually stop
and then start mythtv-backend from a terminal or script.  I'm not sure if
it's related, but I have noticed that the video devices don't appear as
/dev/video[0-2] until maybe 10 or 20 seconds after the desktop appears.
Could it be that the MythTV backend is initially loading before the usb
video devices are mounted by the system, and that's why stopping and
starting the backend fixes the problem?

We are grateful for any ideas you might have.

blake


-----Original Message-----
From: Edmundo Agurcia [mailto:edmundo at paradise-computers.com]
Sent: Tuesday, March 30, 2010 12:13 PM
To: blake at paradise-computers.com
Subject: FW: [pvrusb2] Problems with HVR 1950



-----Original Message-----
From: Mike Isely [mailto:isely at isely.net] 
Sent: Saturday, March 27, 2010 9:59 AM
To: Communications nexus for pvrusb2 driver
Cc: edmundo at paradise-computers.com
Subject: Re: [pvrusb2] Problems with HVR 1950


Edmundo:

I see you also e-mailed me directly about this, but I'll reply to the 
group here so that others can see it as well...

[Note: None of this has anything to do with the pvrusb2 driver; it is a 
fact of life when dealing with udev-controlled hot-pluggable devices.]

The key problem here is that your mythtv backend does not have the 
proper permissions to access the capture device(s).  I know; you've 
figured that much out already.  Just doing a chmod() doesn't help of 
course because the /dev/videoX nodes are created on-the-fly by udev when 
the devices appear.  There are two possible solutions to this:

1. You can modify / add rules to udev so that usable permissions are 
applied to those nodes when they are created.  That will *definitely* 
work, since after all it is udev that sets these things up according to 
rulesets in its configuration.  But you'll have to learn how to hack 
udev rules to do this.

2. This is the more common solution: Take note of the group associated 
with those /dev/videoX devices.  Do "ls -l /dev/video*" - you will 
notice that they are probably owned by root but in my Debian system the 
group ID is "video".  You'll probably also find that the permissions 
mask allows the devices to be group read/write capable.  So...  Just add 
the user ID of the mythtv backend process as a member of that group.

For example on my back end, my mythtv backend runs as user "mythtv".  So 
in my case I have this line in my /etc/group:

	video:x:44:test,mythtv

Thus the "video" group is defined with ID 44 and the accounts "test" and 
"mythtv" are members of that group.  Having group membership grants 
those users access to any files (or device nodes) associated with that 
group.  Note that when you make the change you'll probably have to stop 
/ restart the backend process for it to take effect (or just reboot 
again).  Problem solved.

The example above is for my Debian setup; it might be different for your 
Linux distribution, e.g. the name of the group might be different, you 
might be running mythtv with a different account, the numeric group ID 
will almost certainly be different, etc.  But the basic idea is the same 
regardless of whether it's Debian, Ubuntu, Fedora, SuSE...

  -Mike


On Sat, 27 Mar 2010, Edmundo Agurcia wrote:

> Hello Mike,
> 
>  
> 
> Thanks for the firmware for the HVR-1950 device. I'm a newbie into linux
> systems and specially ubuntu / MythTV. My boss bought some HVR1950 to
setup
> a mythtv server with 3 frontend. This is what happened.
> 
>  
> 
>  
> 
> Backend
> 
> 1.       I installed ubuntu 9.10 (32bits)
> 
> 2.       Installed mysql
> 
> 3.       Installed mythtv
> 
> 4.       Download your firmware
> 
> 5.       In the general setup of the backend
> 
> a.       Capture card type IVTV 
> 
>                                                                i.      I
had
> to write the devices /dev/video0 (to 2)
> 
> 6.       Did all the scan and everything
> 
> 7.       Fill the database
> 
> 8.       Runs perfectly
> 
> 9.       When I reboot the machine and try it again, is not working
> 
>  
> 
> I read some forums in the internet and found this:
> 
>  
> 
> 1.       Sudo chmod 0777 /dev/video0
> 
> 2.       Sudo chmod 0777 /dev/video1
> 
> 3.       Sudo chmod 0777 /dev/video2
> 
> 4.       Sudo killall mythbackend
> 
> 5.       Mythbackend
> 
>  
> 
> Works, not sure if it's the best way but it worked. Then I tried to create
a
> script that ran at the boot of the computer so I don't have to write this
> commands every time that the server restarts. 
> 
>  
> 
> I know you are an expert and probably don't have the time to explain about
> it. But:
> 
>  
> 
> 1.       How can I make the server works without this steps above?
> 
> a.       Create a script that runs when and where?
> 
> b.      Permits issue?
> 
>  
> 
> I've being reading a lot about this in the past few weeks and I am about
to
> run crazy!!
> 
>  
> 
> Please need your help and I apologize for my bad English but I am from
> Honduras!!
> 
>  
> 
> Edmundo.
> 
>  
> 
> _______________________________________________
> pvrusb2 mailing list
> pvrusb2 at isely.net
> http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2
> 

-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.791 / Virus Database: 271.1.1/2779 - Release Date: 03/30/10
00:32:00
-------------- next part --------------

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.791 / Virus Database: 271.1.1/2779 - Release Date: 03/30/10 00:32:00


More information about the pvrusb2 mailing list