PDA

View Full Version : v4l module causes instability


AutoPilot
01-30-03, 11:51 PM
I recently posted the thread "GeForce2 w/NVIDIA driver & bttv (video4linux) = mess" and learned that I needed the v4l driver loaded when using the NVIDIA drivers (unlike the nv or banshee drivers). Software is RedHat 8.0 with a clean, home-built kernel (from kernel.org), and the newest drivers from NVIDIA (1.0-4191).

After adding the v4l module to the X config, I'm experiencing theX lockups many people have mentioned, as well as the console/tty corruption after to having to kill X remotely (while locked up, it takes 100% of the CPU).

Running strace against X returns the following repeatedly:

sigreturn() = ? (mask now [])
--- SIGALRM (Alarm clock) ---

WindowMaker is my preferred window-manager, not sure if it matters. The lockups occur mostly when moving windows around, especially if I'm using v4l (bt878 card displaying TV). They also occur at random, like when loading a web page in Mozilla (1.2.1, built on this machine), for example.

Before I configured XF86Config to load the "v4l" module, it was quite stable, even with this card and the NVIDIA driver.

Thanks.

captnmark
01-31-03, 08:24 AM
I had similiar problem.

I fixed it by loading all modules for devices that share the same interrupt (see /proc/interruprs) before the nvidia driver.

Apparently nvidia driver is buggy.

Platform=AMD Athlon XP, VIA KT-266A, geforce4

Mark

NVidia: please release interface specs or open the driver source for your hardware.

AutoPilot
02-01-03, 12:55 PM
I'm not so sure that it's the interrupts... here's my list:

[root@buthus root]# cat /proc/interrupts
CPU0 CPU1
0: 1998275 1948459 IO-APIC-edge timer
1: 515 549 IO-APIC-edge keyboard
2: 0 0 XT-PIC cascade
4: 55221 56496 IO-APIC-edge serial
5: 0 0 IO-APIC-level CMI8738
8: 0 1 IO-APIC-edge rtc
9: 1250924 1317892 IO-APIC-level acpi, nvidia, bttv, btaudio
10: 2756 2826 IO-APIC-level eth0
11: 38538 38685 IO-APIC-level aic7xxx, aic7xxx, usb-uhci, ohci1394
12: 17040 16976 IO-APIC-edge PS/2 Mouse
NMI: 0 0
LOC: 3946469 3946455
ERR: 0
MIS: 0

As you can see... only the ACPI and v4l drivers are sharing interrupt 9 with the nvidia driver. Neither was being used during this lockup... I had just gone online and was not using the capture card. It locked the instant it drew a new window (kppp's online status), but before it could fill in the window.

I loaded the new driver on my friend's box and added the v4l line, and his locked up as well.

I already tried removing the v4l module from XF86Config and it still locks VERY repeatedly in KDE... all you have to do is launch a "terminal" from the menu. Gnome locks pretty quickly as well. Looks like WindowMaker is the most stable, takes a few hours usually.

This is without question the most unstable I've ever seen any Linux system, and I've been using it heavily for nearly 11 years! (since 0.96xxx)

Time to downgrade to an older driver?
(or time to buy a Radeon?)

AutoPilot
02-01-03, 02:24 PM
I moved my cards around and here's the new interrupt assignment list:

[root@buthus root]# cat /proc/interrupts
CPU0 CPU1
0: 38541 40121 IO-APIC-edge timer
1: 374 175 IO-APIC-edge keyboard
2: 0 0 XT-PIC cascade
4: 4288 4270 IO-APIC-edge serial
5: 1 1 IO-APIC-level CMI8738, bttv, btaudio
8: 1 0 IO-APIC-edge rtc
9: 10233 9785 IO-APIC-level acpi, nvidia
10: 1443 1669 IO-APIC-level eth0
11: 5100 5142 IO-APIC-level aic7xxx, aic7xxx, usb-uhci, ohci1394
12: 1788 2052 IO-APIC-edge PS/2 Mouse
NMI: 0 0
LOC: 78557 78543
ERR: 0
MIS: 0


Unless an inactive ACPI is causing the problem, I'd say the problem lies elsewhere. I was able to lock up X seconds after logging in - no change.

AutoPilot
02-03-03, 11:16 PM
I downgraded to the 1.0-3123 release and my system has been up for over 24 hours without a lockup. (record with 4191 was 6 hours)

NVIDIA: Please look into this! The newest release has some NASTY BUGS!

(Does Nvidia actually monitor this site?)

captnmark
02-04-03, 09:33 AM
I just realized that I didn't have v4l loaded.

When I load it, there is no lockup, but xawtv works much worse than before.

I have the latest drivers (4191)

AutoPilot
02-07-03, 10:06 PM
Well, it took almost 5 days, but 3123 locked up too. Same scenario as above.

NVIDIA, are you looking into the lockup problem?

I'm getting tired of this fast... it's almost as bad as having a MS-Windows machine.
(this system was ROCK SOLID with the Banshee)

energyman76b
03-28-03, 03:55 AM
Hi,

you DO NOT need to put v4l in XF86Config. In fact, it will make it worse.

Load the v4l-modules (modprobe bttv is afaik enough) and let xawtv or your tv-app do the rest!

If you have constant lockups, try to disable dga and select 'grabdisplay' in the xawtv 'capture' menu.

Glück Auf
Volker

AutoPilot
03-28-03, 10:38 AM
You DO have to put v4l in XF86Config if you want to use a bttv based capture card to watch TV... check my other thread about the problems titled GeForce + bttv = garbage (or something like that). This is where I found out that you had to have the module loaded for this card (which was not the case with my Banshee).

Adding the module fixed the display garbage problem and finally made vl4 usable on this machine.
Using grabdisplay is a horrible hack, and not something I would even consider an option due to the load it adds to the system (you see, I tend to do more than one thing at a time, which is why I run Linux in the first place).

Oh, and it turns out that the v4l module may not even be a factor, as I've now seen these lockups on _3_ systems, one of which does not have any v4l devices at all (and that machine is single-processor, so SMP isn't an issue either). My friend is trying to convince his wife to switch to Linux, and she doesn't like it so far because it locks up more than MS-Windows! She didn't understand that it's the display driver causing the problems, and that the computer itself is not locked up... from her perspective, the machine appears to have crashed.

It's been 4-1/2 months since a release, and considering that the current driver is the most unstable I've seen on ANY system (including MS-Windows), it appears as though they may have abandoned Linux as a platform (the releases used to be much more frequent).

As I said before, my next card will be a Radeon... due to it's open-sourced drivers.

Nuitari
03-28-03, 08:43 PM
I don't think I can help you much, I still don't own any nvidia hardware.
However I am looking into buying a ti4200 soon.

One of my friend got a Radeon 9700Pro and the drivers are very unstable, dual head works badly and the Linux configuration tool is bad and does not provide the desired results.

However I do plan on buying by ti4200 some time this week and I need the v4l functionality.

AutoPilot
03-28-03, 10:44 PM
I don't doubt it... that's a brand new model, isn't it?

My GeForce is a 2GTS-64MB, an old, well established model that *should* have stable drivers (around the age of a Radeon 7500, isn't it?).

Seems I read the drivers for the Radeon are good to about 9100, your friend's card is probably too new.
I'm thinking about a 9000, since they're only $60 delivered (cheaper than an 8500 model) via pricewatch.

Nuitari
03-28-03, 10:53 PM
Yes it's one of their newest cards.
The graphics are nice, but too pricey and the drivers are crap.

Did you try removing the acpi from the kernel ?
I found it to be a cause of a lot of problems on my motherboard.

energyman76b
03-30-03, 09:22 AM
Originally posted by AutoPilot
You DO have to put v4l in XF86Config if you want to use a bttv based capture card to watch TV... check my other thread about the problems titled GeForce + bttv = garbage (or something like that). This is where I found out that you had to have the module loaded for this card (which was not the case with my Banshee).

Adding the module fixed the display garbage problem and finally made vl4 usable on this machine.

Using grabdisplay is a horrible hack, and not something I would even consider an option due to the load it adds to the system (you see, I tend to do more than one thing at a time, which is why I run Linux in the first place)

I am using a bttv based TV-Card (Terratec TV+) for YEARS.
I used it together with a Rage128, together with a gf-2 mx 400 and now wit ha gf4-mx 440

I know what I say.
v4l in XF86Config is not needed!
dga is needed (comment out 'omit dga-xfree ' or so)

Until I changed my mainboard (Thursday) I was able to enjoy dga, but my new board is not recognized by the driver and enabling dga locks my box up.

AutoPilot
03-30-03, 01:25 PM
Like I said... read the other thread I started about bttv and the geforce driver.

I found 3 ways to get v4l to work with this video chip:
1: Reduce the v4l resolution to less than 1/4 of its capability (1/2X & 1/2Y).
2: Use the "nv" driver that comes with XFree86.
3: Add the v4l module to XFree86.

#1 is not acceptable for obvious reasons.
#2 is not acceptable due to the lack of 3D support.
#3 works, and adds scaling.

As I stated before, the v4l module is apparently not the cause of the lockups, as I've seen it in systems that DID NOT HAVE this module or even a bttv card installed.
Telling me to remove this module is pointless for this reason.

Again, READ THE OTHER THREAD.
If you have any other way to get around the problem, I'd love to hear it... I've seen the problem outlined in detail IN THE OTHER THREAD on every machine I've installed a bttv card in (bt848 and bt878 chips, multiple vendors) that had a geforce card.

Also, if you've used these cards for years, you should be well aware that just adding the bttv module alone (as you suggested in your previous posting) is _nowhere_near_ enough to get it working. There are many modules that need to be loaded, and many options that must be configured that are card-specific, as there are many implementations of these cards.

The following is from my primary system (with an 878 card installed):

alias char-major-81 videodev
alias char-major-81-0 bttv
post-install bttv /sbin/modprobe -k tvmixer ; /sbin/modprobe -k btaudio
post-install tvmixer /bin/aumix-minimal -f /etc/.aumixrc-bttv -d /dev/mixer1 -L
pre-remove tvmixer /bin/aumix-minimal -f /etc/.aumixrc-bttv -d /dev/mixer1 -S
options bttv card=40 radio=1
options tuner type=2
options tvaudio tea6420=1 tda9850=1 tda9855=0 debug=0

The following is from one of my other systems (with an 848 card installed):

alias char-major-81 videodev
alias char-major-81-0 bttv
post-install bttv /sbin/modprobe -k tvmixer
post-install tvmixer /bin/aumix-minimal -f /etc/.aumixrc-bttv -d /dev/mixer1 -L
pre-remove tvmixer /bin/aumix-minimal -f /etc/.aumixrc-bttv -d /dev/mixer1 -S
options bttv card=3 radio=1
options tuner type=2
options tvaudio tea6300=1 tda9850=1 tda9855=0 debug=0

If you really want to compare how long we've used these cards, I was using them for years before your rage128 chip was ever released, on a "high end" (at the time) 486 based system. I've also been using Linux as my primary O/S since mid-'92.

Arguing in this fashion is pointless, as it does not solve anyone's problems. If you have a _resolution_ to either problem I've posted, please tell us all what it is... but please read the other thread before continuing to tell me that the only thing that anyone has come up with that does work, doesn't.

Andy Mecham
03-30-03, 03:06 PM
Can you please try disabling ACPI?

--andy

AutoPilot
04-02-03, 01:35 AM
Originally posted by Andy Mecham
Can you please try disabling ACPI?

--andy

Yup, did... and tried the newly released driver.
Same problem... X locks, taking all available CPU, and strace against the process shows the following:

sigreturn() = ? (mask now [])
--- SIGALRM (Alarm clock) ---
sigreturn() = ? (mask now [])
--- SIGALRM (Alarm clock) ---
...endlessly.

Thanks anyways. :(

Nuitari
04-02-03, 03:55 AM
I'm going to buy a Ti 4200 today and see what happens.

AutoPilot
05-10-03, 01:19 PM
Please see my new thread titled: OpenOffice triggered NVidia X lockup isolated!!

http://www.nvnews.net/vbulletin/sho...&threadid=11568

Quick solution: remove the following line from XF86Config
Option "RenderAccel" "True"

extace
05-30-04, 02:45 PM
Yup, did... and tried the newly released driver.
Same problem... X locks, taking all available CPU, and strace against the process shows the following:

sigreturn() = ? (mask now [])
--- SIGALRM (Alarm clock) ---
sigreturn() = ? (mask now [])
--- SIGALRM (Alarm clock) ---
...endlessly.

Thanks anyways. :(


I get this same issue on gentoo 1.4.10 (kernel 2.4.16 vanilla) on a Tyan Tiger MP (and an MPX (S2460 and S2466 respectively)) with both a GeForce 4 MX 440 and a GeForce FX 5200. Usually happens in KDE 3.2.2, when the cursor is being changed. (i.e. clicking on a button, new wnidows pops up, etc..) X11 stops updating all windows except the mouse cursor which can still be moved around on screen, X is using 100% of the CPU with the same info as above when using an strace. The problem seemed to be getting progressively worse on the original Tyan MP with GF4 MX440 (suspected hardware, but all tests said things were A-OK), so I bought a new card, the FX5200, problem was just as bad (if not worse), and showed up under gnome and Xfce within moments of starting X, (drag a window around and it would freeze X). So I bought the newer board (S2466, Tyan Tiger MP) which would take my existing CPU's/RAM (768Megs Registered ECC). After that the system seemed stable, but still freezes in X11 under kde occasionaly under the same circumstances above. Not sure why the new board seemed to improve things, as it passed the memtest86 run, and various benchmark tools, figured the AGP bus on the old board was flakey.

Tried all combinations of NvAGP, RenderAccel, kernel options of mem=nopentium, noapic, etc and all had ZERO EFFECT.

As a side note, the 4496 drivers ran glxgears to about 2200 fps with the GF4 MX440, the 5336 drivers run only around 240fps.

currently using 5336 drivers. Sent a bug report directly to linux-bugs@nvidia.com with no response as well :(

Nuitari
05-30-04, 07:56 PM
For me everything seems to be fine since I got a ti4600 in exchange for the ti4200.

Both time it appears I got cards that eventually went defective.

rednuht
06-01-04, 08:10 AM
I only get the lockups with openGL and then infrequently, but before I removed ACPI things were 10 times worse.
same repeating trace telneted in from another machine.
I have tried;
kernels 2.4 and 2.6,
all drivers since 4496
all the different nvidia config tags
some random XFree86 config tags
(and I ended up having to replace both the processor and the motherboard, but still VIA and AMD)
nothing makes any difference.
only solution i have is: no openGL, makes my nice machine a file server/web console :(

When i last tried to get more info on this issue i found ATi owners have the same problem (well same trace)

Wolfman [TWP]
06-01-04, 08:35 AM
I get this same issue on gentoo 1.4.10 (kernel 2.4.16 vanilla) on a Tyan Tiger MP (and an MPX (S2460 and S2466 respectively)) with both a GeForce 4 MX 440 and a GeForce FX 5200. Usually happens in KDE 3.2.2, when the cursor is being changed. (i.e. clicking on a button, new wnidows pops up, etc..) X11 stops updating all windows except the mouse cursor which can still be moved around on screen, X is using 100% of the CPU with the same info as above when using an strace. The problem seemed to be getting progressively worse on the original Tyan MP with GF4 MX440 (suspected hardware, but all tests said things were A-OK), so I bought a new card, the FX5200, problem was just as bad (if not worse), and showed up under gnome and Xfce within moments of starting X, (drag a window around and it would freeze X). So I bought the newer board (S2466, Tyan Tiger MP) which would take my existing CPU's/RAM (768Megs Registered ECC). After that the system seemed stable, but still freezes in X11 under kde occasionaly under the same circumstances above. Not sure why the new board seemed to improve things, as it passed the memtest86 run, and various benchmark tools, figured the AGP bus on the old board was flakey.

Tried all combinations of NvAGP, RenderAccel, kernel options of mem=nopentium, noapic, etc and all had ZERO EFFECT.

As a side note, the 4496 drivers ran glxgears to about 2200 fps with the GF4 MX440, the 5336 drivers run only around 240fps.

currently using 5336 drivers. Sent a bug report directly to linux-bugs@nvidia.com with no response as well :(

Not sure what the problem might be with your system, but I run a Tyan S2466 and I've not had any problems with the 5336 drivers at all (I'm currently running the 5341 Drivers, again, it all seems stable enough). And I've run the following Nvidia Cards and Linux OS's, GF3 Ti500, GF4Ti4600/4800, GF FX5900/5950, RH8.0, RH9, FC1 and currently RHEL3.

So basically I've given the drivers heaps, by running Quake 3 (GL mode) and UT2K4 for many hours without an issue (And a few other GL games).

So it may be possible that it may be mother board related or some strange stuff in the OS. Also it might also be possible that you need to update the BIOS. I run (3) three of these mother boards with Nvidia cards and the latest drivers without a problem. I have not gone to the 2.6.x kernel yet, until all the problems get ironed out.

Wolf

Norman
06-01-04, 10:55 AM
I definitly can say that you can watch tv at full resolution with a bttv tuner card without the X11 v4l module being loaded - at least with tvtime & xawdecode. I had problems with xawtv, which may be related, so you may want to get rid of the v4l module and use a different tv app instead.