LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-16-2007, 08:31 AM   #1
OR13
Member
 
Registered: Jun 2006
Distribution: Fedora 14
Posts: 51

Rep: Reputation: 15
Video Card only works in certain conditions


Good day, friends.

I'm using a video input card (AverMedia EZMaker Gold, saa7134 protocol, virtual device on /dev/video0, working with v4l2).

Over time, I realised that when I turn on the computer while it is connected to the VCR, and the VCR is on - the card works perfectely fine, however:
1. When I turn the computer on when the VCR is either disconnected or shut, it sometimes works, but mostly doesn't.
2. When, after turning-on as usual, with the VCR on, the computer goes into stand-by (suspension), the card usually stops working.
After either of these two, if I want to use tvtime or record TV using mencoder, I have to reboot the system. Not even logout-login does anything...

And what do I mean by "doesn't work"?
A) tvtime takes about 5 secs to start, then gives a blank, blue, screen.
B) mencoder ("mencoder tv:// -tv driver=v4l2:input=0:norm=pal:width=720:height=576:outfmt=yuy2:device=/dev/video0:forceaudio:audiorate=32000 buffersize=64 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=5000:keyint=25 -oac pcm -o foo.avi") gives the following message:
Quote:
v4l2: ioctl dequeue buffer failed: Input/output error, idx = 0
over and over again, and records nothing.

It would be very very nice to be able to use my lovely card even though I started the computer with the VCR off, or put the machine in suspend...
Thank you very very much!
Oded R. =)
 
Old 05-16-2007, 09:09 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
In each of the situations A) it's working, and B) it's NOT working, have you happened to check 'lsmod' to see if the issue is that the required module(s) for the device are or are not loaded into the kernel?

If there is a difference, note the missing modules, and try modprobing it/them before trying to use the card after either a sleep or a VCR-less bootup.

I venture a guess, that the card doesn't do anything unless there is some sort of input being sent to it, and that it doesn't (always) correctly detect the (VCR) that is connected to it.
 
Old 05-17-2007, 08:00 AM   #3
OR13
Member
 
Registered: Jun 2006
Distribution: Fedora 14
Posts: 51

Original Poster
Rep: Reputation: 15
First of all, thank you for your help.

This is what I did:
1. /sbin/lsmod >lsmod-tv-not-working.txt
2. Restart computer with the VCR connected and on. Check with tvtime and mencoder that the TV card is working.
3. /sbin/lsmod >lsmod-tv-working.txt
4. diff lsmod-tv-not-working.txt lsmod-tv-working.txt >tv.patch

This is tv.patch:
Quote:
2,11c2,3
< vfat 16193 0
< fat 53469 1 vfat
< sg 37213 0
< usblp 17473 1
< usb_storage 69121 0
< ohci1394 37489 0
< ieee1394 294681 1 ohci1394
< button 11857 0
< i915 26177 3
< drm 78421 4 i915
---
> i915 26177 2
> drm 78421 3 i915
31a24
> button 11857 0
38a32,33
> ohci1394 37489 0
> ieee1394 294681 1 ohci1394
44,46d38
< snd_seq_midi_event 11201 1 snd_seq_oss
< snd_seq 51249 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
< snd_seq_device 11853 3 snd_seq_dummy,snd_seq_oss,snd_seq
47a40
> snd_seq_midi_event 11201 1 snd_seq_oss
49d41
< snd_pcm_oss 43616 0
51d42
< snd_mixer_oss 19393 1 snd_pcm_oss
53a45,52
> snd_seq 51249 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
> videodev 29633 1 saa7134
> snd_seq_device 11853 3 snd_seq_dummy,snd_seq_oss,snd_seq
> snd_pcm_oss 43616 0
> v4l2_common 26945 2 saa7134,videodev
> snd_mixer_oss 19393 1 snd_pcm_oss
> serio_raw 10821 0
> v4l1_compat 16581 2 saa7134,videodev
55d53
< i2c_i810 9669 0
56a55
> i2c_i810 9669 0
58,61d56
< e100 37705 0
< videodev 29633 1 saa7134
< i2c_algo_bit 11337 1 i2c_i810
< iTCO_vendor_support 7877 1 iTCO_wdt
62a58,59
> iTCO_vendor_support 7877 1 iTCO_wdt
> i2c_algo_bit 11337 1 i2c_i810
65d61
< v4l2_common 26945 2 saa7134,videodev
68,69d63
< serio_raw 10821 0
< ide_cd 40673 0
71,72d64
< mii 9409 1 e100
< v4l1_compat 16581 2 saa7134,videodev
73a66,68
> e100 37705 0
> mii 9409 1 e100
> ide_cd 40673 0
82c77
< scsi_mod 138093 4 sg,usb_storage,libata,sd_mod
---
> scsi_mod 138093 2 libata,sd_mod
I personally don't see anything here, but I'm certainly not an expert on hardware and modules...

Thank you!
Oded R. =)
 
Old 05-17-2007, 10:41 AM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
OK, pretty clever idea however, I can't make heads nor tails of what I'm looking at there..
I see the < and > thingies, but what do they mean, and which file do they each refer to?

If you could present this data in a simpler to read way (at least for me anyway) then I/we *might* be able to tell what's going on. Or, if you have the diff file, email it to me so I can look at it in the viewer.
Of course, if someone else can figure out what's up here, feel free
 
Old 05-17-2007, 01:09 PM   #5
OR13
Member
 
Registered: Jun 2006
Distribution: Fedora 14
Posts: 51

Original Poster
Rep: Reputation: 15
I thought this was a diff file... Isn't it?
If it isn't, how do I make one?

Anyway, the "<" means that this is a line found in the first (tv not working) file that wasn't found by 'diff' in the second file (tv working). The ">" is the opposite - this line was found in the second file and wasn't found in the first file.

Thank you again for your help,
Oded
 
Old 05-17-2007, 04:30 PM   #6
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Well.. I see stuff there twice, first with < and then the second time with > so something is amiss here.
Since no one has stepped in here yet with some advice, how about posting the actual two files you made, before you diff'd them, as it would be more clear.. and probably use [code] tags, if it's a really long list.
You're welcome -- hopefully you get it sorted out sooner or later.
 
Old 05-18-2007, 04:31 AM   #7
OR13
Member
 
Registered: Jun 2006
Distribution: Fedora 14
Posts: 51

Original Poster
Rep: Reputation: 15
Ok, I give up on the diff.
Since the files are quite long, here is the tv-not-working file, and here os the tv-working file.

I do hope this helps...

Thanks!!!
Oded R.
 
Old 05-18-2007, 05:06 AM   #8
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
http://marc.info/?l=linux-video&m=114384148826390&w=2

I've read some v4l mailing list threads, and though many users have gotten the same error, I haven't read specifically of one using a VCR input as you are.
That said however, try the following (when the card is in the non-working state):

STEP1: modprobe -r saa7134 (or modprobe -fr saa7134 if the first way complains)

then, reinsert the module like this:

modprobe saa7134

and test it. if that doesn't work by itself, remove the module again using STEP1, and then try:

modprobe saa7134 noninterlaced=1

Let me know if anything happens. Still looking around for more stuff you.. BTW the lsmod's appear virtually identical as far as actual loaded modules. The issue seems to be "initializing the card", which should happen when inserting the module saa7134 as mentioned above.
If by chance the modprobe works with the "noninterlaced" option, we will need to make you a 'modprobe' rule which will apply this automatically.
Good luck

Last edited by GrapefruiTgirl; 05-18-2007 at 05:07 AM.
 
Old 05-19-2007, 02:56 PM   #9
OR13
Member
 
Registered: Jun 2006
Distribution: Fedora 14
Posts: 51

Original Poster
Rep: Reputation: 15
Oh, yeah!
The modprobe with the "noninterlaced=1" works!
Thank you a thousand times..!

Now I don't know how to make modprobe rules... But I'm very very glad this works!

Thanks again!
Oded =)
 
Old 05-19-2007, 03:19 PM   #10
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556Reputation: 556
Fantastic -- I love it when a plan comes together!
Code:
alias bond0 bonding
options bonding mode=active-backup miimon=1000 primary=eth0
There's an example of a modprobe rule. This is from a text-file I called 'bonding', which is stored in the location /etc/modprobe.d/.. The alias part means I (or the system) can use either 'modprobe bonding' or 'modprobe bond0' and get the same result: the module called 'bonding' gets inserted.. It's literally an alias. I am not certain you would need an alias for your situation. Probably not necessary.
The options line is where you specify, in your case, 'noninterlaced=1'
Try creating such a file for yourself, and try it out.
NOTE: you use fedora, and I don't so there may be minor semantic differences, but I think the requirements are basically the same. Also, if you have a modprobe.conf file in /etc then you can put the rule in there instead, but I believe that if you have files in /modprobe.d folder, they take priority over the modprobe.conf file.


~ Sasha
 
Old 06-03-2007, 12:24 PM   #11
OR13
Member
 
Registered: Jun 2006
Distribution: Fedora 14
Posts: 51

Original Poster
Rep: Reputation: 15
First of all, thanks!
Second - anyone who quotes the "A Team" receives a few points as far as I'm concerned...

Now, this works, and when I boot the machine the card always works (AWAIK), but after stand-by I still have to remove and re-insert the saa7134 module.
Though this is unbelievably better than having to restart the computer (and I must thank you again for that...), I wonder if there is some way to avoid this as well... But don't bother too much, it really is very good as it is right now..!

(sorry it took me so long, I have many many exams right now...)

thanks again,
Oded R. =)


PS: As you said, I really didn't need the alias, it works w/o it.
 
  


Reply

Tags
ioctl, mencoder, tvtime, v4l2, video, videocard



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Card works on WinXP, dead in Linux: Prism2 MiniPCI card in tablet PC tunasashimi Linux - Wireless Networking 0 08-15-2006 11:16 AM
excel count with multiple conditions mfrick Programming 11 05-23-2006 08:21 PM
Expect test conditions jnusa Programming 0 08-18-2004 04:32 AM
Changed Video Card Memory X No longer works :P johnnybezak Linux - Hardware 1 11-22-2003 09:29 PM
video card found, but only VGA works sperry Slackware 5 09-10-2003 10:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration