Bug 32959

Summary: 2.6.37 - NV11 goes into GPU hang
Product: xorg Reporter: Alex Buell <alex.buell>
Component: Driver/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 6.7.0   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg
none
Xorg.0.log
none
dmesg
none
Xorg.0.log
none
dmesg with kernel parameter video=LVDS-1:d added
none
2.6.37 dmesg
none
2.6.37 Xorg.0.log
none
xorg.conf used with 2.6.37
none
GPU hang with 2.6.37's xorg.conf
none
GPU hang in 2.6.37 - Xorg.0.log
none
w/ range patch and kernel args - dmesg
none
w/ range patch and kernel args - Xorg.0.log
none
w/ newrange patch and drm.debug kernel args - dmesg
none
w/ newrange patch and drm.debug kernel args - Xorg.0.log
none
w/ newer range patch, dmesg output
none
w/ newer range patch, Xorg.0.log
none
drm.debug=6 output via netconsole.
none
nv04_lvds_no_native_mode.patch
none
dell-inspiron-8100-vbios.rom
none
drm.debug=6 output via netconsole w/ nv04 lvds no native mode patch none

Description Alex Buell 2011-01-10 05:30:12 UTC
Created attachment 41836 [details]
dmesg

Using Gentoo.

Hardware: Dell Inspiron 8100 w/ NV11 chipset
Kernel: gentoo-sources-2.6.36-r5 (nouveaufb)
Xorg: 1.9.3.901
xf86-video-nouveau: 0.0.16_pre20101130
libdrm: 2.4.23

Xorg.0.log and dmesg provided as attachments.

Xorg fails to start as it can't set mode. 

This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.9.3.901 (1.9.4 RC 1)
Release Date: 2011-01-07
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.36-gentoo-r5 i686 Gentoo
Current Operating System: Linux hydrogen 2.6.36-gentoo-r5 #5 SMP PREEMPT Mon Jan 10 01:42:57 GMT 2011 i686
Kernel command line: root=/dev/ram0 real_root=UUID=1b6432ff-e01f-4b70-942b-f03e1707717c udev vga=791 video=1600x1200 lapic apic=verbose splash=verbose
Build Date: 09 January 2011  04:44:53PM
 
Current version of pixman: 0.20.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Jan 10 13:29:12 2011
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) Failed to load module "vesa" (module does not exist, 0)
(EE) Failed to load module "fbdev" (module does not exist, 0)
(EE) NOUVEAU(0): failed to set mode: Invalid argument
Fatal server error:
failed to create screen resources

Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
Please also check the log file at "/var/log/Xorg.0.log" for additional information.
Comment 1 Alex Buell 2011-01-10 05:30:42 UTC
Created attachment 41837 [details]
Xorg.0.log
Comment 2 Alex Buell 2011-01-10 05:32:12 UTC
I'd like to add that I have experienced the same problem with Fedora 15 and Ubuntu Natty with the same hardware. 

Also, I have a newer laptop with NV34 chipset, the above distributions and Gentoo works perfectly on that.
Comment 3 Alex Buell 2011-01-10 05:40:20 UTC
Is there anything I can do to help get this sorted for the NV11 chipset?
Comment 4 Alex Buell 2011-01-10 06:16:44 UTC
I have some newer logs, with VESA_FB and PRINTK timings enable attached to this report.
Comment 5 Alex Buell 2011-01-10 06:17:11 UTC
Created attachment 41838 [details]
dmesg
Comment 6 Alex Buell 2011-01-10 06:17:48 UTC
Created attachment 41839 [details]
Xorg.0.log
Comment 7 Alex Buell 2011-01-11 02:58:58 UTC
Created attachment 41872 [details]
dmesg with kernel parameter video=LVDS-1:d added
Comment 8 Alex Buell 2011-01-11 05:47:51 UTC
Just been doing some additional work on this. Apparently disabling LVDS-1 got X working.

I am now building 2.6.37 and testing again to see if the fixes applied to that kernel solves the issue entirely.
Comment 9 Alex Buell 2011-01-11 06:23:48 UTC
Ok, 2.6.37 is a total disaster. 

Booting w/o video=LVDS-1:d resulted in a solid kernel lockup. Not able to ssh in and look for myself what was wrong.

Booting /w video=LVDS-1:d, resulted in a booting 2.6.37 kernel, looks OK but X wouldn't start. 

(==) Log file: "/var/log/Xorg.0.log", Time: Tue Jan 11 14:23:10 2011
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE) Failed to load module "vesa" (module does not exist, 0)
(EE) Failed to load module "fbdev" (module does not exist, 0)
(EE) NOUVEAU(0): Error allocating scanout buffer: 0

Fatal server error:
AddScreen/ScreenInit failed for driver 0

dmesg and Xorg.0.log attached.
Comment 10 Alex Buell 2011-01-11 06:24:43 UTC
Created attachment 41875 [details]
2.6.37 dmesg
Comment 11 Alex Buell 2011-01-11 06:25:57 UTC
Created attachment 41876 [details]
2.6.37 Xorg.0.log
Comment 12 Marcin Slusarz 2011-01-11 08:47:55 UTC
what happens if you remove "vga=791" from 2.6.37 kernel command line?
Comment 13 Alex Buell 2011-01-11 09:39:58 UTC
Makes no real difference,the problem is with X trying to start up but not getting what it needs. Console working perfectly OK. 

2.6.37 could not even boot with all vga/video related parameters removed, needed just LVDS-1:-d to even boot. 

I suspect something has substantially changed for the worse with 2.6.37.
Comment 14 Alex Buell 2011-01-12 02:59:29 UTC
I added a xorg.conf to the 2.6.37 kernel, and got a GPU hang. Eep!

Added xorg,conf and relevant logs.
Comment 15 Alex Buell 2011-01-12 03:00:48 UTC
Created attachment 41905 [details]
xorg.conf used with 2.6.37
Comment 16 Alex Buell 2011-01-12 03:01:37 UTC
Created attachment 41906 [details]
GPU hang with 2.6.37's xorg.conf
Comment 17 Alex Buell 2011-01-12 03:02:33 UTC
Created attachment 41907 [details]
GPU hang in 2.6.37 - Xorg.0.log
Comment 18 Alex Buell 2011-01-12 04:06:17 UTC
With diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index cfb8a3c..97de9e1 100644 (nv10_invalid_placement_range.patch), and same kernel parameter arguments, it boots just fine but X still exhibits problem. New logs added. 

Next thing to do is to test kernel without these parameters.
Comment 19 Alex Buell 2011-01-12 04:06:56 UTC
Created attachment 41910 [details]
w/ range patch and kernel args - dmesg
Comment 20 Alex Buell 2011-01-12 04:07:27 UTC
Created attachment 41911 [details]
w/ range patch and kernel args - Xorg.0.log
Comment 21 Alex Buell 2011-01-12 04:23:54 UTC
Additonal debugging added to kernel parameters, new logs to follow.
Comment 22 Alex Buell 2011-01-12 04:24:42 UTC
Created attachment 41913 [details]
w/ newrange patch and drm.debug kernel args - dmesg
Comment 23 Alex Buell 2011-01-12 04:25:16 UTC
Created attachment 41915 [details]
w/ newrange patch and drm.debug kernel args - Xorg.0.log
Comment 24 Alex Buell 2011-01-12 05:33:51 UTC
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index c41e1c2..30fe6f7 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c

The above latest patch fixes the problems with NV11 chipset completely, X nows starts properly. Congratulations, it all works now. Thank you so much!

New logs provided.
Comment 25 Alex Buell 2011-01-12 05:34:26 UTC
Created attachment 41919 [details]
w/ newer range patch, dmesg output
Comment 26 Alex Buell 2011-01-12 05:35:05 UTC
Created attachment 41920 [details]
w/ newer range patch, Xorg.0.log
Comment 27 Alex Buell 2011-01-31 03:54:47 UTC
At long last. I've managed to get debugging w/ drm.debug=6. Attached is the log output.
Comment 28 Alex Buell 2011-01-31 03:55:27 UTC
Created attachment 42744 [details]
drm.debug=6 output via netconsole.
Comment 29 Alex Buell 2011-01-31 14:33:57 UTC
Here's some extra information.

Apparently if I add 'video=LVDS:d' to the kernel parameter line, the hang with 2.6.37 doesn't happen. This definitely was not needed with 2.6.36.
Comment 30 Alex Buell 2011-01-31 14:43:29 UTC
Some more experiments w/ the video=LVDS-1:d parameter on 2.6.36

Without creates a 1600x1200 display but console thinks it is 1024x768
With it creates a 1600x1200 display and console thinks it is 1600x1200. 

I hope this is of use!
Comment 31 Francisco Jerez 2011-02-02 08:38:19 UTC
Created attachment 42858 [details] [review]
nv04_lvds_no_native_mode.patch

(In reply to comment #29)
> Here's some extra information.
> 
> Apparently if I add 'video=LVDS:d' to the kernel parameter line, the hang with
> 2.6.37 doesn't happen. This definitely was not needed with 2.6.36.

The attached patch should help with that crash. To find out why we can't find a native mode for your LVDS panel, can you get me a BIOS dump? (see [1])

[1] http://nouveau.freedesktop.org/wiki/DumpingVideoBios
Comment 32 Alex Buell 2011-02-02 09:15:51 UTC
Created attachment 42860 [details]
dell-inspiron-8100-vbios.rom
Comment 33 Alex Buell 2011-02-02 09:22:40 UTC
Created attachment 42861 [details]
drm.debug=6 output via netconsole w/ nv04 lvds no native mode patch
Comment 34 Alex Buell 2011-02-02 15:37:42 UTC
http://annarchy.freedesktop.org/~currojerez/nv10_invalid_placement_range.patch

This patch is also required to prevent X crashes.
Comment 35 Alex Buell 2011-02-02 16:12:56 UTC
Thank you, the two patches given above fixed the problem entirely for me, no more X or kernel hangs with 2.6.37. I now consider this report closed. Until the next time :)
Comment 36 Francisco Jerez 2011-02-02 17:48:38 UTC
(In reply to comment #35)
> Thank you, the two patches given above fixed the problem entirely for me, no
> more X or kernel hangs with 2.6.37. I now consider this report closed. Until
> the next time :)

This should be fixed in nouveau/master now, marking as resolved.

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.