Bug 23212 - oops on rmmod nouveau with nv31m
Summary: oops on rmmod nouveau with nv31m
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-08 00:58 UTC by prg
Modified: 2009-10-05 10:30 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
dmesg after rmmod nouveau (58.66 KB, text/plain)
2009-08-08 00:58 UTC, prg
no flags Details
dmesg on 2.6.31 after modprobe without modeset=1 (48.76 KB, text/plain)
2009-10-01 20:48 UTC, prg
no flags Details
patch0.diff (691 bytes, patch)
2009-10-03 08:06 UTC, Francisco Jerez
no flags Details | Splinter Review
patch1.diff (1.68 KB, patch)
2009-10-03 15:42 UTC, Francisco Jerez
no flags Details | Splinter Review
patch2.diff (614 bytes, patch)
2009-10-03 15:42 UTC, Francisco Jerez
no flags Details | Splinter Review
dmesg with patch1 (23.96 KB, text/plain)
2009-10-03 17:10 UTC, prg
no flags Details
patch3.diff (1.36 KB, patch)
2009-10-04 13:10 UTC, Francisco Jerez
no flags Details | Splinter Review
dmesg with KMS and a TV connected (24.41 KB, text/plain)
2009-10-04 17:42 UTC, prg
no flags Details
Xorg.0.log with KMS and a TV connected (14.20 KB, text/plain)
2009-10-04 17:43 UTC, prg
no flags Details
patch4.diff (665 bytes, patch)
2009-10-04 18:24 UTC, Francisco Jerez
no flags Details | Splinter Review

Description prg 2009-08-08 00:58:57 UTC
Created attachment 28436 [details]
dmesg after rmmod nouveau

i'm trying to get kms working on my nv31m on gentoo using the x11 overlay, when i do modprobe nouveau modeset=1 the screen still stays the same resolution (80x25 chars) and the cursor freezes in place though i'm still able to type stuff.
when i rmmod nouveau i get an oops (attached)
everything from the overlay is up to date.

i'm using nouveau-drm instead of x11-drm
i have FRAMEBUFFER_CONSOLE=y
Comment 1 Marcin Kościelnicki 2009-10-01 12:59:12 UTC
You seem to be using old kernel with serious bugs, see http://nouveau.freedesktop.org/wiki/UpstreamKernelIssues for more details. You should try building the whole kernel from nouveau/linux-2.6 repository if possible, otherwise upgrade to 2.6.31.

Also, a memory corruption bug was squashed recently in nouveau drm, can you verify this issue still happens with current git?
Comment 2 prg 2009-10-01 20:48:00 UTC
Created attachment 29990 [details]
dmesg on 2.6.31 after modprobe without modeset=1

Using 2.6.31 now, rebuilt everything from the x11 overlay, but when I do modprobe nouveau modeset=1 the screen turns off and the system freezes (sysrq doesn't work anymore), nothing in the log about that after reboot.

Attached the dmesg without modeset=1, but I guess it won't help much.
Comment 3 Pekka Paalanen 2009-10-02 06:28:18 UTC
Nouveau-drm package from x11 overlay is still using master-compat, which is not up-to-date, and does not contain the fix.

I updated the master-compat right now, it will propagate into the snapshot nouveau-drm uses within six hours, IIRC. I do not intend to update master-compat anymore.
Comment 4 prg 2009-10-02 07:52:12 UTC
I'm using nouveau/linux-2.6 now, the system freezes here too with the latest commit (4e9caac6c3f7888848e1614bca0b4551fa196ce6), doing a bisect to find out when the freeze was introduced but compiling a kernel takes about half an eternity on this notebook. 756 revisions left to test after this (roughly 10 steps). Getting the old behaviour with 3f4f9a450f602251839f986f8785a78803c7d8da from 2009-08-08.
Comment 5 prg 2009-10-02 11:38:47 UTC
66960bf357b134b46044f46f5e80ed4d8ed86220 is first bad commit
drm/nouveau: Import >=nv17 TV-out support.

With the commit before that (b07297c4d302c8b1bb476cf8f4b67171dd1b6d38) I get the old behaviour.
Comment 6 Francisco Jerez 2009-10-03 08:06:33 UTC
Created attachment 30013 [details] [review]
patch0.diff

Your bios tables seem a little bit misleading, does the attached patch change anything? (please attach some logs if it works around the hard lockup).
Comment 7 prg 2009-10-03 13:30:49 UTC
The patch didn't help.
Comment 8 Francisco Jerez 2009-10-03 15:42:20 UTC
Created attachment 30026 [details] [review]
patch1.diff

I'm attaching a couple of patches more that would be interesting to try...
Comment 9 Francisco Jerez 2009-10-03 15:42:52 UTC
Created attachment 30027 [details] [review]
patch2.diff
Comment 10 prg 2009-10-03 17:10:31 UTC
Created attachment 30029 [details]
dmesg with patch1

KMS seems to be working fine with patch1.
With patch2 I still get the freeze.
Comment 11 Francisco Jerez 2009-10-03 17:33:27 UTC
(In reply to comment #10)
> Created an attachment (id=30029) [details]
> dmesg with patch1
> 
> KMS seems to be working fine with patch1.
> With patch2 I still get the freeze.
> 

So your card probably needs something to be done differently for TV-out load detection... An mmiotrace is likely to be very useful (see http://nouveau.freedesktop.org/wiki/MmioTraceHowto).
Comment 12 prg 2009-10-04 11:24:44 UTC
I got a trace of modprobing nvidia, starting and exiting X, it's about 1.1MB lzma compressed, should I attach it here or send to that gmail adress?
Comment 13 Francisco Jerez 2009-10-04 11:37:04 UTC
(In reply to comment #12)
> I got a trace of modprobing nvidia, starting and exiting X, it's about 1.1MB
> lzma compressed, should I attach it here or send to that gmail adress?
> 

Yeah, you'd better send it to mmio.dumps at gmail.com.
Comment 14 prg 2009-10-04 12:02:51 UTC
Done.
Comment 15 Francisco Jerez 2009-10-04 13:10:33 UTC
Created attachment 30042 [details] [review]
patch3.diff

The attached patch should do the trick, nv31 TV load detection seems to be more like nv17 than other newer nv3x. I probably did some other untested assumptions about nv31 TV-out, so it would be nice if you tried it (Note that you'll surely need patch2 for it to work), but don't worry too much about it :-)
Comment 16 prg 2009-10-04 17:42:51 UTC
Created attachment 30056 [details]
dmesg with KMS and a TV connected

KMS is working with patch2+3. Not sure how to enable TV out though. Running xrandr just returns "Output TV-0 is not disconnected but has no modes", no matter what I pass to xrandr. TV out is working fine if I set it up with the blob and nvidia-settings.
Comment 17 prg 2009-10-04 17:43:20 UTC
Created attachment 30057 [details]
Xorg.0.log with KMS and a TV connected
Comment 18 Francisco Jerez 2009-10-04 18:24:48 UTC
Created attachment 30058 [details] [review]
patch4.diff

Hm, that seems to be because of some recent DRM changes... the attached patch should fix it.
Comment 19 prg 2009-10-04 18:30:52 UTC
(In reply to comment #18)
> Created an attachment (id=30058) [details]
> patch4.diff
> 
> Hm, that seems to be because of some recent DRM changes... the attached patch
> should fix it.
> 

Actually no need for that, just updated xrandr from 1.2.3 to latest git, working fine now.
Comment 20 Francisco Jerez 2009-10-05 10:30:05 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > Created an attachment (id=30058) [details] [details]
> > patch4.diff
> > 
> > Hm, that seems to be because of some recent DRM changes... the attached patch
> > should fix it.
> > 
> 
> Actually no need for that, just updated xrandr from 1.2.3 to latest git,
> working fine now.
> 

Weird, it really shouldn't have worked without it. Pekka has pushed the fixes so I'm marking this as closed.

Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.