Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 115123 - Problem with DVB-T devices using udev-0.77-r3
Summary: Problem with DVB-T devices using udev-0.77-r3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-10 12:34 UTC by Alexander Minges
Modified: 2005-12-19 10:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Minges 2005-12-10 12:34:29 UTC
The DVB devices are not longer located in /dev/dvb but in /dev and strangely
named ; /dev/dvb0.frontend0 instead of /dev/dvb/adapter0/frontend0

Because of the new location and naming, xine-lib and dvbscan are not able to
handle DVB any more.

The problematic line in 50-udev.rules seems to be:

# dvb devices
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf
dvb/adapter%%i/%%i $${K%%%%.*} $${K#*.}'", NAME="%c"


Reproducible: Always
Steps to Reproduce:
1.emerge =udev-0.77-r3
2.emerge linuxtv-dvb-apps
3.dvbscan /usr/share/dvb/dvb-t/[your region]

Actual Results:  
scanning /usr/share/dvb/dvb-t/de-Ruhrgebiet
using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
main:2216: FATAL: failed to open '/dev/dvb/adapter0/frontend0': 2 No such file
or directory


Expected Results:  
Should have scanned all available DVB-T channels.
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-12-10 15:11:09 UTC
I don't see how the "." would show up there.

What does running udevtest for that device show?
  udevtest /sys/class/dvb/frontend0 dvb

(if that's the proper class device, I don't know the dvb naming scheme, sorry.
Comment 2 Jörg Gollnick 2005-12-12 12:05:52 UTC
Is reproducible here: 
 
udevtest /sys/class/dvb/dvb0.frontend0 dvb 
main: looking at device '/class/dvb/dvb0.frontend0' from subsystem 'dvb' 
main: opened class_dev->name='dvb0.frontend0' 
run_program: '/bin/sh -c 'K=dvb0.frontend0; K=${K#dvb}; printf dvb/adapter%i/%i 
${K%%.*} ${K#*.}'' 
run_program: '/bin/sh' (stdout) 'dvb/adapter0/0' 
run_program: '/bin/sh' (stderr) ': line 0: printf: frontend0: invalid number' 
run_program: '/bin/sh' returned with status 1 
udev_rules_get_name: no node name set, will use kernel name 'dvb0.frontend0' 
create_node: creating device node '/dev/dvb0.frontend0', major = '212', minor = 
'3', mode = '0660', uid = '0', gid = '0' 
 
# solution may be to print a string? 
# 50-udev.rules 
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf 
dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c" 
Comment 3 Alexander Minges 2005-12-12 15:42:33 UTC
One solution is to create an additional rule in /etc/udev/rules.d/51-dvb.rules:

KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c"

if no /etc/udev/scripts/dvb.sh exists, create a new one, containing

#!/bin/sh
/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\
2\3,'

and make sure you run 'chmod +x /etc/udev/scripts/dvb.h".
But it would be nice, if it qould work right out of the box again (had no
problems while using udev-073).
Comment 4 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-12-12 22:49:31 UTC
ok...
Comment 5 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-12-12 22:51:04 UTC
Ugh, I was trying to get away from running an external script (that's what 
the older versions of udev did.)

Hm, the gentoo rule is following the suse rule exactly, wonder why 
they don't have problems...

anyway, if you change the line in the rule file to the one in comment #2, does
it all work properly for you?
Comment 6 Alexander Minges 2005-12-13 09:01:04 UTC
(In reply to comment #5)
> Ugh, I was trying to get away from running an external script (that's what 
> the older versions of udev did.)
> 
> Hm, the gentoo rule is following the suse rule exactly, wonder why 
> they don't have problems...
> 
> anyway, if you change the line in the rule file to the one in comment #2, does
> it all work properly for you?

Yes, that works just fine.
Comment 7 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-12-13 11:34:49 UTC
Ok, thanks, is fixed in 077-r5 release
Comment 8 Matthias Schwarzott gentoo-dev 2005-12-13 14:33:06 UTC
This is not yet functional like dvb-support in udev-0.70-r1. The permissions 
are not yet set. There is missing a GROUP="video" or similar. 
 
Comment 9 Jörg Gollnick 2005-12-13 14:48:04 UTC
No big deal: 
Either add to file like 49-udev-local.rules: 
# DVB 
SUBSYSTEM=="dvb", GROUP="video" 
or append to dvb in 50-udev.rules 
, GROUP="video", MODE="0660" 
(take care for first comma) 
From my point of view I prefer the 49-udev-local.rules solution, which is my 
private way to give groups. I'm not familiar with udev configuration in deep, 
may be there is another way to give an group, if it is statte in 50-udev.rules 
without touching the file. 
 
Comment 10 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-12-19 10:46:50 UTC
Ok, added group to config file, will be there in 078 release in a bit.