problem with /dev/video0 after using tvtime with new kernel 3.14

hi,

updated today to kernel-desktop-3.14.0-1.1.g79de0a7.x86_64 and
after running and closing down tvtime (tvtime-1.0.2-260.1.3.x86_64) the following message occurred
when trying to restart it again,
“saa7134: Device of resource busy
Cannot open capture device /dev/video0”

this problem was not noticed with the kernel-desktop-3.13 series kernels

tvtime starts ok again after reboot but the situation is the same trying a logout & login

A780GM-m1<2014Apr01><23:34><~> sudo umount /dev/video0
root’s password:
umount: /dev/video0: not mounted
A780GM-m1<2014Apr01><23:34><~>
also has no effect

is there a simple remedy? is a bug report needed?

this was also noticed with the rc8-1 kernel and KDE 4.12.3

cheers

today’s status
A780GM-m1 Kernel: 3.14.0-1.g79de0a7-desktop x86_64 (64 bit)
Desktop: KDE 4.12.4 Distro: openSUSE 13.1 (Bottle)
Mobo: ASRock model: A780GM-LE, Quad core AMD Phenom II X4 940


A780GM-m1<2014Apr01><23:34><~>  sudo umount /dev/video0
root's password:
umount: /dev/video0: not mounted
A780GM-m1<2014Apr01><23:34><~> 
also has no effect

That won’t work. It is a device node, not a mountable partition. You could try reloading the driver with

modprobe -r saa7134
modprobe saa7134

Is the capture device PCI-based card or a USB device?

is a bug report needed?

Perhaps, but you probably need to get a better handle on what isn’t working first.

@deano_ferrari

thx for the response

what have I missed?

trial as shown,

A780GM-m1:~ # lsmod | grep alsa
saa7134_alsa           18437   1 
snd_pcm               115950   4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,
                                 saa7134_alsa
snd                    87595  23 snd_hda_codec_realtek,snd_hda_codec_generic,
                                 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,
                                 snd_hwdep,snd_seq,saa7134_alsa,snd_pcm,
                                 snd_timer,snd_seq_device
saa7134               190533  1 saa7134_alsa
videobuf_dma_sg        19262  2 saa7134_alsa,saa7134
A780GM-m1:~ #

A780GM-m1:~ # modprobe -r saa7134
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
FATAL: Module saa7134 is in use.
A780GM-m1:~ # modprobe -r saa7134_alsa
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
FATAL: Module saa7134_alsa is in use.
A780GM-m1:~ # modprobe -r snd
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
FATAL: Module snd is in use.
A780GM-m1:~ # modprobe -r videobuf_dma_sg
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
FATAL: Module videobuf_dma_sg is in use.
A780GM-m1:~ #

cheers

Why do you have /etc/modprobe.conf? You should remove that.
But better post its content first to check if it’s important/necessary.

Maybe tvtime is not quitting correctly? Have a look in the process list (Ctrl+ESC in KDE) if it is still running and kill it.
It should work then again if this is the issue.

@deano_ferrari

missed your question

its an old pci card, elta 8681 lv-flyvideo 3000

cheers

@wolfi323

nothing in the process list looks appropriate to delete,
top gives

A780GM-m1<2014Apr02><15:51><~>  top -n 1 
top - 15:51:47 up 27 min,  3 users,  load average: 0.13, 0.13, 0.14
Tasks: 173 total,   1 running, 172 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.0 us,  1.5 sy,  0.0 ni, 93.4 id,  1.2 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   1793728 total,  1041988 used,   751740 free,    67672 buffers
KiB Swap:  2104476 total,        0 used,  2104476 free,   462284 cached

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                             
    9 root      20   0       0      0      0 S 6.373 0.000   0:04.75 rcu_preempt                                                                         
 1376 michael   20   0  517596  43484  27352 S 6.373 2.424   0:07.65 dolphin                                                                             
 2568 michael   20   0   15352   1684    996 R 6.373 0.094   0:00.01 top                                                                                 
    1 root      20   0   47544   3828   2144 S 0.000 0.213   0:01.39 systemd                                                                             
    2 root      20   0       0      0      0 S 0.000 0.000   0:00.00 kthreadd                                                                            
    3 root      20   0       0      0      0 S 0.000 0.000   0:00.01 ksoftirqd/0                                                                         
    5 root       0 -20       0      0      0 S 0.000 0.000   0:00.00 kworker/0:0H                                                                        
    7 root      -2   0       0      0      0 S 0.000 0.000   0:00.00 rcuc/0                                                                              
    8 root      -2   0       0      0      0 S 0.000 0.000   0:00.00 rcub/0                                                                              
   10 root      20   0       0      0      0 S 0.000 0.000   0:01.31 rcuop/0                                                                             
   11 root      20   0       0      0      0 S 0.000 0.000   0:05.34 rcuop/1                                                                             
   12 root      20   0       0      0      0 S 0.000 0.000   0:01.76 rcuop/2                                                                             
   13 root      20   0       0      0      0 S 0.000 0.000   0:01.03 rcuop/3                                                                             
   14 root      20   0       0      0      0 S 0.000 0.000   0:00.00 rcu_sched                                                                           
   15 root      20   0       0      0      0 S 0.000 0.000   0:00.00 rcuos/0                                                                             
   16 root      20   0       0      0      0 S 0.000 0.000   0:00.00 rcuos/1                                                                             
   17 root      20   0       0      0      0 S 0.000 0.000   0:00.00 rcuos/2                                                                             
   18 root      20   0       0      0      0 S 0.000 0.000   0:00.00 rcuos/3                                                                             
A780GM-m1<2014Apr02><15:51><~>

nothing looks appropriate either from the System Monitor, Process Table

the file is empty, but it will be deleted anyway,

A780GM-m1<2014Apr02><15:55></etc>  ls -al | grep modprobe
-rw-r--r--   1 root root          0 Nov 16 11:18 modprobe.conf
drwxr-xr-x   2 root root       4096 Apr  1 23:06 modprobe.d
A780GM-m1<2014Apr02><15:56></etc>

cheers

The process should be named “tvtime”. But that was just a guess.

Maybe “lsof /dev/video0” would show it’s still in use?

@wolfi323

when tvtime is running ok, top shows it as

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 1674 michael   20   0   81716  29084   7264 S 18.91 1.621   0:05.69 tvtime

when it is stopped. first instance, it disappears from the process list and
does not return until after its started again on reboot

so its assumed tvtime is not closing down all associated processes correctly
with kernel 3.14 but I’m not able to find anything which indicates this

cheers

On 04/02/2014 04:26 PM, keellambert wrote:
> when it is stopped. first instance, it disappears from the process list
> and
> does not return until after its started again on reboot
>
> so its assumed tvtime is not closing down all associated processes
> correctly
> with kernel 3.14 but I’m not able to find anything which indicates this

For me, tvtime shuts down correctly. I use it hundreds of times between reboots;
however, I do not start it on boot. In addition, mine is used with a USB tuner.

I suspect a problem with the saa1734 driver in 3.14. The proper way to determine
what is causing the problem this would be to obtain the mainline kernel from the
git repo and bisect the error. If you are not willing to try this, then report
the bug on linux-kernel@vger.kernel.org and linux-media@vger.kernel.org. That
will get the attention of the developers.

BTW, there are no explicit changes to saa1734 with kernel 3.14. That makes it
seem that it was some other change that is causing the problem.

thx for the replies

Kernel Bug Tracker – Bug 73471 Submitted