# Problems with the famous NVIDIA driver 195.22 on 8.0-RELEASE/amd64



## yks (Jan 21, 2010)

(In short) The system is: 8.0-RELEASE-p2/amd64, NVIDIA GT 240, Intel Core i5, 4GB RAM. The problem is: lockups with `x11/nvidia-driver'.

As soon as the famous nvidia driver with amd64 support was out, I've upgraded from 7.2-RELEASE/i386 to 8.0-RELEASE/amd64. I'd been using the system happily until... until I don't know what but suddenly (yesterday) it produced a kernel panic when shutting down (unfortunately no dump device was configured). And then still worse: on any switching from X to console or shutting down X, the system just locks up, with a black screen, without any messages to log or wherever. While in X, it usually works, but it's impossible to shut down the system cleanly which results in dirty fs and lost files. First I thought this issue to be related to virtualbox kernel modules, I removed them but no success, as well nothing improved after replacing the video card by another nvidia on a different chipset. It's all happening on my work PC, so I unluckily don't have lots of time to test, and I temporarily switched to `nouveau' which is slow and doesn't support chip clock management, but at least doesn't crash. The current version of `nv' driver doesn't yet support my card.
The strangest thing is that all worked for a really long time and there's no obvious cause of the sudden failure.  ( Didn't install or update anything major )
Thanks in advance for any comments.


----------



## crsd (Jan 21, 2010)

Try reporting it on nvnews.net forums:
http://www.nvnews.net/vbulletin/showthread.php?t=46678


----------



## Daisuke_Aramaki (Jan 21, 2010)

yks said:
			
		

> (In short) The system is: 8.0-RELEASE-p2/amd64, NVIDIA GT 240, Intel Core i5, 4GB RAM. The problem is: lockups with `x11/nvidia-driver'.



The driver is beta right. I put amd64 on my new laptop and i had kernel panics upon exiting X. It was also one of the widely reported error reports at nv forums as far as amd64 was concerned. Someone suggested disabling smp, which i did and the driver worked fine for a while, but eventually after a long session, resulted in kernel panic again. 

I use i386 now, and though of giving amd64 a shot after a couple of months or so.

Read this from zander

http://www.nvnews.net/vbulletin/showthread.php?t=142776


----------



## yks (Jan 21, 2010)

Thanks for the advice Mr. crsd, offtopic: the forum there doesn't let me register due to 'banned email address' =) as soon as I manage to register I'll try. But it really seems the problem is rather common.


----------



## DutchDaemon (Jan 21, 2010)

This must be down to specific types of cards, I guess. My current NVIDIA card (Quadro FX 570M) with the beta 64-bit driver from ports (nvidia-driver-195.22) works fine on an SMP kernel (8.0-STABLE, core2duo T7500).


----------



## Daisuke_Aramaki (Jan 21, 2010)

May be I should have mentioned it earlier. Yes it seems to affect only a few cards, mine being G105M. Thanks for that DD.


----------



## volatilevoid (Mar 21, 2010)

I'm experiencing serious performance trouble with 195.22 on 9.0-CURRENT/amd64.

With Compiz Fusion disabled, drawing windows may take several seconds while the whole system is unresponsive. With Compiz Fusion enabled, I think this problem is gone, still the performance is very low. When moving around windows, the frame rate is so low that the movement isn't smooth. May 195.36.15 help? Anyone tried this one?

I already tried different configs of the port. ACPI on/off, WBINVD on/off, but there wasn't really a difference between them. Or may I have better luck with 8.0-STABLE (I need TRIM support, so RELEASE isn't for me)?


----------



## DutchDaemon (Mar 21, 2010)

Are you sure your xorg.conf is actually using nvidia, and not nv? E.g. reinstalling X (or parts of it) may simply reinstate nv for nvidia again. A [cmd=]grep nv /etc/X11/xorg.conf[/cmd] should only give you nvidia.


----------



## volatilevoid (Mar 21, 2010)

Absolutely sure as I didn't install nv at all. 
Additionally, nvidia-settings shows no errors. It also takes several seconds from startx to the desktop.


----------



## DavidMarec (Mar 21, 2010)

volatilevoid said:
			
		

> Absolutely sure as I didn't install nv at all.
> Additionally, nvidia-settings shows no errors. It also takes several seconds from startx to the desktop.



What about /var/log/Xorg.0.log ?

Is Xorg running the GLX modules from NVIDIA?


----------



## volatilevoid (Mar 21, 2010)

Here is my Xorg.0.log.

Edit: I tried the 195.36.15 beta and it doesn't work on 9.0-CURRENT at all...


----------



## volatilevoid (Mar 22, 2010)

Any additional information I could give?

Edit: I'm trying with 8.0-STABLE right now as CURRENT was a bit unstable here... :x
It also might be a better choice when using the closed source driver (although I'm not afraid of debugging problems ). As soon as the system is ready, I'll get back with an update.


----------



## volatilevoid (Mar 24, 2010)

I'm getting there...

/var/log/messages shows

```
Mar 24 18:13:16 odyssey kernel: interrupt storm detected on "irq16:"; throttling interrupt source
```
when the system gets unresponsive.

Here is the output of `# dmesg | grep "irq 16"`

```
pcib4: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0
pcib5: <ACPI PCI-PCI bridge> irq 16 at device 28.4 on pci0
uhci3: <Intel 82801JI (ICH10) USB controller USB-A> port 0x4080-0x409f irq 16 at device 29.0 on pci0
uhci4: <Intel 82801JI (ICH10) USB controller USB-B> port 0x4060-0x407f irq 16 at device 29.1 on pci0
uhci5: <Intel 82801JI (ICH10) USB controller USB-C> port 0x4040-0x405f irq 16 at device 29.2 on pci0
ehci1: <Intel 82801JI (ICH10) USB 2.0 controller USB-A> mem 0xc4b25000-0xc4b253ff irq 16 at device 29.7 on pci0
```
My graphics card is on IRQ 24.

You might also want the whole dmesg as well.

Any hints?

Thomas


----------



## yks (May 6, 2010)

Upgraded to Xorg 7.5 and nvidia-driver 195.36.15. Hangs, crashes, all remain. Xorg.log has no information. 
Hangs always on switching to a ttyvX from X, sometimes on exiting X, sometimes on starting applications, sometimes just hangs without any activity. What the hell may this be? I have to use nouveau as replacement, but it is so quite slow...
My system is: Core-i5, GeForce GT 240, FreeBSD 8.0-RELEASE-p2 #0 amd64.


----------



## SirDice (May 7, 2010)

Problems with the binary nvidia driver are best reported on the nvnews forum. Nvidia developers monitor that one.

http://www.nvnews.net/vbulletin/forumdisplay.php?f=47


----------



## expl (May 7, 2010)

yks said:
			
		

> Upgraded to Xorg 7.5 and nvidia-driver 195.36.15. Hangs, crashes, all remain. Xorg.log has no information.
> Hangs always on switching to a ttyvX from X, sometimes on exiting X, sometimes on starting applications, sometimes just hangs without any activity. What the hell may this be? I have to use nouveau as replacement, but it is so quite slow...
> My system is: Core-i5, GeForce GT 240, FreeBSD 8.0-RELEASE-p2 #0 amd64.



Using 195.36.15 and also GT240(DDR5 edition). Had crashes and general slowness with 195.22 but 195.36 fixed all problems for me.


----------



## yks (May 7, 2010)

SirDice said:
			
		

> Problems with the binary nvidia driver are best reported on the nvnews forum. Nvidia developers monitor that one.
> 
> http://www.nvnews.net/vbulletin/forumdisplay.php?f=47



Of course yes. But by whom? How can one report anything if he is not registered on the forum, and when trying to register it only informs that one has got a banned e-mail address whatever address one enters. Admins do not reply either. A very useful forum, nothing to say. 
I'm really getting annoyed by this - already 5 months vainly trying to make the blob work - just downloaded and installed 195.36.24 but still getting a lockup on switching to a text console. Options like disable_mtrrs or linux ABI don't help either.
Well, it all is a problem of nvidia, but to my mind, it IS a problem of FreeBSD, too. So I don't feel alien to write here if I have no opportunity to write there.


----------



## harishankar (May 9, 2010)

What games actually work on FreeBSD to require 3d acceleration? AFAIK most of the SDL games work fine on nv driver.

This is not meant to deprive you of 3d, but merely asking. I am also using nvidia chipset but I hardly play games these days (growing older, you see) and the ones I play don't need 3d.


----------



## Ghirai (May 9, 2010)

It's not just games.
Ever tried to play a 720p or 1080p movie with the nv driver? Resize transparent terminal windows?


----------



## expl (May 10, 2010)

harishankar said:
			
		

> What games actually work on FreeBSD to require 3d acceleration?



Most games that run on Linux can run on FreeBSD and that is alot of games (most new ones aswell)


----------



## yks (May 10, 2010)

Looks like the FreeBSD gods have finally heard me! Today I noticed the updated NV driver (2.1.17) in ports, installed it, and it seems to work! And much, much faster than nouveau, at the level of nvidia's blob (both startup and 2D rendering). Haven't yet tested it thoroughly, but switching to text consoles doesn't lock up the system after a dozen times, nor does exiting Xorg. 
Unfortunately, nvidia doesn't want to support neither nv nor nouveau development, so when we will see full support of 2D and 3D in FreeBSD is apparently a matter of centuries (considering the frequency of releases of the open drivers). Hope that at least until next upgrade, this driver will provide comfortable speed... And then I'll think 8times whether to buy nvidia's products again...


----------



## expl (May 10, 2010)

Well NVidia is the only corporation providing mid/highend GPUs with 3D acceleration for FreeBSD. If you will stop buying nvidia products then the only alternative are intel lowends. I personally love NVidia gpus on FreeBSD just made a mistake buying so new product like 240GT that didnt have much support on linux/freebsd. But now it runs perfectly smooth with 195.36.24 BETA official driver.


----------



## yks (May 11, 2010)

expl said:
			
		

> Well NVidia is the only corporation providing mid/highend GPUs with 3D acceleration for FreeBSD. If you will stop buying nvidia products then the only alternative are intel lowends.



Probably. The AMD/ATi stuff is far from perfect on *nix. But the point is the policy of nvidia versus AMD, the former doesn't have open source in favor, and the future is uncertain, while with the latter there are chances we'll some time get a stable open driver.
Of course, I will not give up my nvidia card right now, and continue trying any new blobs that will be released, as we in Russia say "avos'" (which means, just in a sudden case) it will work. But times are changing.


----------



## adamk (May 11, 2010)

expl said:
			
		

> Well NVidia is the only corporation providing mid/highend GPUs with 3D acceleration for FreeBSD. If you will stop buying nvidia products then the only alternative are intel lowends.



So I must have imagined playing ut2004 on FreeBSD with my HD4850 the other day.

Adam


----------



## expl (May 11, 2010)

adamk said:
			
		

> So I must have imagined playing ut2004 on FreeBSD with my HD4850 the other day.
> 
> Adam



Quality of the ATi drivers is a big issue, but sure you have some support.


----------



## adamk (May 11, 2010)

The quality of the ATI driver (for supported GPUs) is better than the intel drivers, but you still mentioned those 

Adam


----------



## carlton_draught (May 29, 2010)

yks said:
			
		

> Upgraded to Xorg 7.5 and nvidia-driver 195.36.15. Hangs, crashes, all remain. Xorg.log has no information.
> Hangs always on switching to a ttyvX from X, sometimes on exiting X, sometimes on starting applications, sometimes just hangs without any activity. What the hell may this be? I have to use nouveau as replacement, but it is so quite slow...
> My system is: Core-i5, GeForce GT 240, FreeBSD 8.0-RELEASE-p2 #0 amd64.


This is interesting. I'm running something very similar to you... Xeon 3450 (basically i5-750),  geforce 210, FreeBSD 8.0-RELEASE, amd64. Asus p7f-e mobo. Nvidia driver is 195.22. I'm also running two of those graphics cards, outputting to 4 screens. Cooling should not be a problem as I have rigged up a fan to blow directly on the two cards.

I get crashes usually once every 4 days or so, but may be as little as 12 hours after or 6 days after the last reboot. Every screen is as it was, but I usually can't seem to find where the mouse cursor was. Other than that, looks fine, but can't move the mouse or see any output from tapped keys. I have a cron job set to output the current date and time to a log, and this is also stopped at the last moment that the machine was working. There is nothing to indicate anything is wrong in /var/log/messages when I reboot.

Not sure whether it is nvidia or not to be honest, but it's difficult to troubleshoot as I can only try something different and see if the machine dies 4 days later. Kind of tearing my hair out thinking what the issue is exactly. I run ZFS but the crashes are not occuring at IO intensive periods or when issuing zfs commands. I note that when I run X the HDD light flashes every 1-3 seconds which it does not do when X is not running. I can't figure that one out either.

Edit: the latter IS nvidia related, and I'm getting the following in my ~/.xsession-errors:

```
Xlib: extension "RANDR" mission on display :"0.0".
```


----------



## carlton_draught (May 30, 2010)

I think I've traced the source of the HDD flashing at least. Using
`# find /home /var/tmp -mmin -1`
I noted that ~/.xsession-errors, and ~/.gconfd/ and ~/.gconfd/savedstate were changing all the time. IIRC, a mention of metacity in the .xsession-errors file made me remember that metacity wasn't suppose to be running, and by doing
[CMD="ps ax | grep metacity"][/CMD]
and trying to kill it without success I realized that the PID was changing all the time, so something was trying to spawn it all the time without success (I think gnome-session, from memory).

Since metacity wasn't supposed to be running anyway (running compiz with emerald), and I couldn't find anyone else who had solved it despite other people having similar issues, I decided to do the following:
`# cd /usr/local/bin
mv metacity metacity.old
vim metacity`
Then changed the contents to an empty script.

```
#!/bin/sh
```
`# chmod 700 metacity`
Now I'm still getting the HDD light every second or so, but CPU usage is down to under 10% for all cores and I'm not getting the modifications to .xsession-errors etc. I'll upgrade the nvidia driver as well and see if that helps with the system stability. I am still getting notifications in .xsession-errors about extension "RANDR" missing, but this time only when I launch a new application.


----------



## yks (Jun 7, 2010)

Well, in my case there didn't seem to be any system activity after hangs. In some cases, everything just stopped and the system didn't respond, but the HDD I/O seemed to stop as well, at least when I rebooted (reset) the PC, I didn't notice any files modified after the hang, even after waiting pretty long in vain hope that the system would 'get through'...
As to RANDR, I personally don't use it, but don't think it can contribute to that kind of faults.
If you still face the hangs&crashes problem, maybe the nv driver could solve these, as it did for me. Of course, if you can do without 3D. (That compiz stuff...) Or, at least, consider giving it a try to determine the cause of the problem.


----------



## carlton_draught (Jun 7, 2010)

yks said:
			
		

> Well, in my case there didn't seem to be any system activity after hangs. In some cases, everything just stopped and the system didn't respond, but the HDD I/O seemed to stop as well, at least when I rebooted (reset) the PC, I didn't notice any files modified after the hang, even after waiting pretty long in vain hope that the system would 'get through'...
> As to RANDR, I personally don't use it, but don't think it can contribute to that kind of faults.
> If you still face the hangs&crashes problem, maybe the nv driver could solve these, as it did for me. Of course, if you can do without 3D. (That compiz stuff...) Or, at least, consider giving it a try to determine the cause of the problem.


Thanks for the help. So far it is 8 days of uptime and no hang. That's a record. Things I've changed since then:

Instead of using USB wireless (that was dropping out every couple minutes and clogging up /var/log/messages) I connect via ethernet to a WRAP box as a wireless bridge. I suspect that this may have been the main impetus behind the hanging.
The above mentioned fix (e.g. renaming metacity)
disabling virtually everything in my crontab that was zfs related. I've since done a couple zpool scrubs in order to give that a bit of a prod.
I want to try getting rid of compiz anyway, since it is crashing out every so often and produces those messages. I think the video cards might draw less power too. I can do the same thing (grid) using other methods I believe. I certainly do want to try some other WMs. Thanks for your info.


----------

