view all posts by Greg Lehey

X hang problems: solved!

Greg Lehey Posted by Greg Lehey | Sun, 30 Sep 2012
see the original posting from Greg's diary

For well over a year I've been complaining about sporadic hangs with X, where the mouse cursor would get stuck bouncing between two screens. I've suspected blame on the part of the nVidia driver, the mouse driver, and even the FreeBSD USB stack. Today I got a message from Andrew Hout telling me that the bug had been identified and fixed. Only two weeks ago, as shown by this bug report, which includes a very good summary of the problem, which was in the nVidia driver after all. The latest version was released only earlier this week. And of course it had nothing to do with FreeBSD, as evidenced by the other reports on the web.

So: installed the new driver with portupgrade, which conveniently didn't load the new driver. There's an issue there: since this is a kernel module, it's difficult to know which version is loaded. The information is there, but you need to know where. In my case, after loading the new driver, it reports (at line 100):

(II) NVIDIA GLX Module  304.51  Tue Sep 18 17:33:56 PDT 2012

The other way to check is with kldstat, which isn't very informative at that level:

=== root@eureka (/dev/pts/10) /usr/ports/x11/nvidia-driver 16 -> kldstat
Id Refs Address            Size     Name
 1   68 0xffffffff80200000 1150028  kernel
 2    3 0xffffffff81351000 48498    linux.ko
 3    1 0xffffffff8139a000 3cc40    snd_hda.ko
 4    2 0xffffffff813d7000 76c90    sound.ko
 5    1 0xffffffff8144e000 17d0     accf_http.ko
 6    1 0xffffffff81450000 122f0    ahci.ko
 7    1 0xffffffff81463000 b088     siis.ko
 8    1 0xffffffff8146f000 10ae540  nvidia.ko
 9    3 0xffffffff8251e000 4f068    vboxdrv.ko
10    1 0xffffffff8256e000 5570     atapicam.ko
11    1 0xffffffff82612000 3dfa     linprocfs.ko
12    2 0xffffffff82616000 2931     vboxnetflt.ko
13    2 0xffffffff82619000 87b2     netgraph.ko
14    1 0xffffffff82622000 1579     ng_ether.ko
15    1 0xffffffff82624000 3f8a     vboxnetadp.ko
16    1 0xffffffff82628000 2a369    nfsd.ko
17    3 0xffffffff82653000 10ce7    nfscommon.ko
18    1 0xffffffff82664000 31d3d    nfscl.ko

After unloading and reloading the driver, however, the size changes, and it moves to the end of the list, leaving the previous slot (8) empty:

 7    1 0xffffffff81463000 b088     siis.ko
 9    3 0xffffffff8251e000 4f068    vboxdrv.ko
...
19    1 0xffffffff82696000 a0fb17   nvidia.ko

It's interesting that it's smaller than the old version.


see the original posting from Greg's diary

Back to top