Red Hat Bugzilla – Bug 156818
bttv driver resets card upon querying capabilities with VIDIOCGCAP ioctl
Last modified: 2015-01-04 17:19:24 EST
Description of problem:
radio tuner is reseted by gimp
Version-Release number of selected component (if applicable):
since FC1 or so
Steps to Reproduce:
1. listen to the radio
2. start gimp or update the gimp rpm
no more radio listening
leave my tuner alone!
I can't reproduce your problem -- my radio plays flawlessly if I start or update
the gimp. Please provide more info.
What info? I could show you the effect in personal!
FYI, this is a TV card with a radio tuner... not an external one disconnected
from the computer :)
[Tim: I'm Ccing you in case someone opens a similar bug against xsane/sane]
Ahh... interesting. I've tried this out on your machine and found this:
- Updating the gimp package didn't do anything to the running radio (which is to
be expected since it only installs some symlinks, updates the icon cache... in
the %post* scripts)
- Running the gimp _did_ reset the radio, it seemed to come from the xsane
plugin (which tries to determine what scanner-like hardware is present on the
system when starting the GIMP)
- I confirmed this with running the standalone xsane which tries to open
/dev/bttv, /dev/video[0-3] (as configured in your /etc/sane.d/v4l.conf)
- I tracked this to the v4l sane plugin sending the ioctl VIDIOCGCAP to
/dev/video0 (which is incidentally the same TV/radio card that gets reset) in
order to determine the card's capabilities.
To me it looks like the bug is in the bttv driver which resets the _radio_ part
of the card when querying its _video_ capabilities, therefore I reassign this to
kernel. NB: One could argue that the card shouldn't reset anything when querying
any capabilities, but let's not be greedy ;-).
Harald, as a workaround, commenting out the offending lines in
/etc/sane.d/v4l.conf should help.
VIDIOCGCAP is big hint.
bttv_do_ioctl() does the following check before checking ioctl command:
However, ->errors are REset to 0 by bttv_reinit_bt848().
Where they are SEt, you ask? Ha!
Harald, please, test this:
@@ -3085,7 +3085,7 @@ static int bttv_open(struct inode *inode
/* allocate per filehandle data */
- fh = kmalloc(sizeof(*fh),GFP_KERNEL);
+ fh = kzalloc(sizeof(*fh),GFP_KERNEL);
if (NULL == fh)
file->private_data = fh;
(I have no idea how Fedora users test one-liners)
hmm, seek the kmalloc in vmlinuz and toggle some bytes :)
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.
Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.
This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.
Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.
In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed. See bug 207474 for further details.
If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.
If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.
This bug has been mass-closed along with all other bugs that
have been in NEEDINFO state for several months.
Due to the large volume of inactive bugs in bugzilla, this
is the only method we have of cleaning out stale bug reports
where the reporter has disappeared.
If you can reproduce this bug after installing all the
current updates, please reopen this bug.
If you are not the reporter, you can add a comment requesting
it be reopened, and someone will get to it asap.
Thomas just saw the problem isn't fixed on Rawhide with
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.
If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)
Thanks for your help, and we apologize again that we haven't handled
these issues to this point.
The process we're following is outlined here:
We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.
If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.
The process we're following is outlined here: