Bug 29810 - Blank screen on nouveau module load
Summary: Blank screen on nouveau module load
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: PowerPC Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-25 23:23 UTC by Zoltan Varnagy
Modified: 2010-09-09 05:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
lspci output (629 bytes, text/plain)
2010-08-25 23:23 UTC, Zoltan Varnagy
no flags Details
dmesg output (26.72 KB, text/plain)
2010-08-25 23:24 UTC, Zoltan Varnagy
no flags Details
xorg.conf (3.26 KB, application/octet-stream)
2010-08-25 23:26 UTC, Zoltan Varnagy
no flags Details
Xorg log (7.51 KB, application/octet-stream)
2010-08-25 23:26 UTC, Zoltan Varnagy
no flags Details
tvdump output (17.02 KB, text/plain)
2010-08-26 05:09 UTC, Zoltan Varnagy
no flags Details
second dmesg output (27.22 KB, text/plain)
2010-08-26 07:34 UTC, Zoltan Varnagy
no flags Details
second tvdump output (18.23 KB, text/plain)
2010-08-26 07:58 UTC, Zoltan Varnagy
no flags Details
fix for OFfb unload (589 bytes, patch)
2010-08-26 09:21 UTC, Marcin Slusarz
no flags Details | Splinter Review
nv11_emac_kms.patch (2.40 KB, patch)
2010-08-26 12:08 UTC, Francisco Jerez
no flags Details | Splinter Review
device tree archive (26.32 KB, application/gzip)
2010-09-06 07:34 UTC, Zoltan Varnagy
no flags Details
nv11_emac_kms_2.patch (2.46 KB, patch)
2010-09-06 08:23 UTC, Francisco Jerez
no flags Details | Splinter Review
nouveau_edid_from_of.patch (1.76 KB, patch)
2010-09-07 07:29 UTC, Francisco Jerez
no flags Details | Splinter Review
fourth dmesg output (24.31 KB, text/plain)
2010-09-07 11:37 UTC, Zoltan Varnagy
no flags Details
nouveau_edid_from_of_dbg.patch (1.95 KB, patch)
2010-09-08 07:43 UTC, Francisco Jerez
no flags Details | Splinter Review
fifth demsg output (24.43 KB, text/plain)
2010-09-08 12:02 UTC, Zoltan Varnagy
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltan Varnagy 2010-08-25 23:23:11 UTC
Created attachment 38169 [details]
lspci output

I have an old CRT eMac with an Nvidia GeForce2 MX card. I try to make it work with the packaged debian nouveau modules. When the system loads the nouveau kernel module the screen goes blank. I can log into the computer with ssh and get the console back with unloading the nouveau module. The X display does not start at all.

Is there a way to make it work?
Comment 1 Zoltan Varnagy 2010-08-25 23:24:12 UTC
Created attachment 38170 [details]
dmesg output
Comment 2 Zoltan Varnagy 2010-08-25 23:26:01 UTC
Created attachment 38171 [details]
xorg.conf
Comment 3 Zoltan Varnagy 2010-08-25 23:26:26 UTC
Created attachment 38172 [details]
Xorg log
Comment 4 Zoltan Varnagy 2010-08-25 23:28:54 UTC
The computer has a CRT display and also a mini vga output on its side which i don't use.
Comment 5 Francisco Jerez 2010-08-26 02:22:53 UTC
(In reply to comment #0)
> Created an attachment (id=38169) [details]
> lspci output
> 
> I have an old CRT eMac with an Nvidia GeForce2 MX card. I try to make it work
> with the packaged debian nouveau modules. When the system loads the nouveau
> kernel module the screen goes blank. I can log into the computer with ssh and
> get the console back with unloading the nouveau module. The X display does not
> start at all.
> 
> Is there a way to make it work?

A register dump with nouveau unloaded would be useful (using [1], it depends on libpciaccess).

[1] http://cgit.freedesktop.org/~currojerez/tvdump
Comment 6 Zoltan Varnagy 2010-08-26 05:09:24 UTC
Created attachment 38176 [details]
tvdump output
Comment 7 Francisco Jerez 2010-08-26 05:31:49 UTC
Does it work when you boot with "video=VGA-1:e" in the kernel command line?
Comment 8 Zoltan Varnagy 2010-08-26 06:36:37 UTC
if i use the video=VGA-1:e switch or no switch at all the system starts with nvidiafb which was not suggested in nouveau wiki. The console comes up, nouveau and drm module are shown in lsmod but noveau lines do not appear in dmesg. 

If i use video=ofonly or video=ofonly,VGA-1:e the system comes up without nvidiafb and the screen goes blank when it tries to load nouveau module.
Comment 9 Francisco Jerez 2010-08-26 07:00:06 UTC
(In reply to comment #8)
> if i use the video=VGA-1:e switch or no switch at all the system starts with
> nvidiafb which was not suggested in nouveau wiki. The console comes up, nouveau
> and drm module are shown in lsmod but noveau lines do not appear in dmesg. 
> 
> If i use video=ofonly or video=ofonly,VGA-1:e the system comes up without
> nvidiafb and the screen goes blank when it tries to load nouveau module.

Try with "video=nvidiafb:off video=VGA-1:e".
Comment 10 Zoltan Varnagy 2010-08-26 07:34:10 UTC
Created attachment 38177 [details]
second dmesg output

Something seems to happen. I get different messages in dmesg. Although the screen goes blank again and this time it does not even allow to remove the nouveau module (module is in use)
Comment 11 Francisco Jerez 2010-08-26 07:51:21 UTC
(In reply to comment #10)
> Created an attachment (id=38177) [details]
> second dmesg output
> 
> Something seems to happen. I get different messages in dmesg. Although the
> screen goes blank again and this time it does not even allow to remove the
> nouveau module (module is in use)

Can you get me another register dump now with nouveau loaded?
Comment 12 Zoltan Varnagy 2010-08-26 07:58:09 UTC
Created attachment 38178 [details]
second tvdump output

Sure. It's a bit different from the last one.
Comment 13 Marcin Slusarz 2010-08-26 09:20:14 UTC
Last dmesg indicates there's second problem - slightly broken OFfb handover:
"Trying to free nonexistent resource <0000000098004000-00000000980c3fff>"

I doubt it's the reason of "blank screen", but it should be fixed anyway.
Comment 14 Marcin Slusarz 2010-08-26 09:21:32 UTC
Created attachment 38182 [details] [review]
fix for OFfb unload
Comment 15 Francisco Jerez 2010-08-26 12:08:55 UTC
Created attachment 38194 [details] [review]
nv11_emac_kms.patch

(In reply to comment #12)
> Created an attachment (id=38178) [details]
> second tvdump output
> 
> Sure. It's a bit different from the last one.

OK, can you give this patch a try?
Comment 16 Zoltan Varnagy 2010-08-26 21:01:14 UTC
Ugh. You mean i should compile a full, at least 2.6.36 kernel with a patched driver and maybe a complete Xorg as well?
Comment 17 Francisco Jerez 2010-08-27 04:02:15 UTC
(In reply to comment #16)
> Ugh. You mean i should compile a full, at least 2.6.36 kernel with a patched
> driver and maybe a complete Xorg as well?

Yes, you'll have to build more recent versions of libdrm and xf86-video-nouveau if the kernel patch I attached does the trick.
Comment 18 Zoltan Varnagy 2010-09-06 01:19:19 UTC
As its a quite old machine that compiling stuff would take many hours so ... i chose an easier way. I appended your patch to the 2.6.33 kernel nouveau driver, and recompiled only the driver. Luckily it worked fine. With the given kernel parameters the new nouveau module loaded fine and i could use the console with nouveaufb loaded. So i thank for your help. My only problem is now the lack of X. xorg still says the same error as last time (failed to open device, no devices detected). Should i open a new bug for that?
Comment 19 Francisco Jerez 2010-09-06 05:59:54 UTC
(In reply to comment #18)
> As its a quite old machine that compiling stuff would take many hours so ... i
> chose an easier way. I appended your patch to the 2.6.33 kernel nouveau driver,
> and recompiled only the driver. Luckily it worked fine. With the given kernel
> parameters the new nouveau module loaded fine and i could use the console with
> nouveaufb loaded. So i thank for your help.

Thanks, to fix this properly I'd be interested in a dump of your OF device tree, can you send me the output from "tar czvf device-tree.tar.gz /proc/device-tree/"?

> My only problem is now the lack of
> X. xorg still says the same error as last time (failed to open device, no
> devices detected). Should i open a new bug for that?

Please, read the trouble shooting guide [1] carefully before opening a new bug.

[1] http://nouveau.freedesktop.org/wiki/TroubleShooting
Comment 20 Zoltan Varnagy 2010-09-06 07:34:58 UTC
Created attachment 38476 [details]
device tree archive

Here you are. Okay i read through the Troubleshoot guide and think over the next step.
Comment 21 Francisco Jerez 2010-09-06 08:23:08 UTC
Created attachment 38477 [details] [review]
nv11_emac_kms_2.patch

(In reply to comment #20)
> Created an attachment (id=38476) [details]
> device tree archive
> 
> Here you are. Okay i read through the Troubleshoot guide and think over the
> next step.

Thanks, can you try this patch instead of the last one and tell me how it goes?
Comment 22 Zoltan Varnagy 2010-09-07 05:52:44 UTC
Well it went worse. This time the screen remains blank and the nouveau module is loaded. So i think i will stay at the previous solution. 

Finally i compiled and tried the 2.6.36 kernel and the DDX driver and managed to start X with nouveau. Although it seems to be slower than the nv driver. glxgears dropped to 50 from 150, it uses software rendering for opengl and hung the machine on video load. I wonder if these can get better.
Comment 23 Francisco Jerez 2010-09-07 06:12:53 UTC
(In reply to comment #22)
> Well it went worse. This time the screen remains blank and the nouveau module
> is loaded. So i think i will stay at the previous solution. 
> 
Did you have "video=VGA-1:e" in your kernel command line? If you did please try without.

> Finally i compiled and tried the 2.6.36 kernel and the DDX driver and managed
> to start X with nouveau.

Where did you get that kernel from? The nouveau kernel tree or Linus' tree?

> Although it seems to be slower than the nv driver.
> glxgears dropped to 50 from 150, it uses software rendering for opengl and hung
> the machine on video load. I wonder if these can get better.

It uses software rendering because you haven't installed the 3D driver (try it at your own risk, it's still unsupported).
Comment 24 Zoltan Varnagy 2010-09-07 06:40:37 UTC
(In reply to comment #23)
> (In reply to comment #22)
> > Well it went worse. This time the screen remains blank and the nouveau module
> > is loaded. So i think i will stay at the previous solution. 
> > 
> Did you have "video=VGA-1:e" in your kernel command line? If you did please try
> without.

I tried without that as well but it still shows black screen. Should i post a register dump? 

> > Finally i compiled and tried the 2.6.36 kernel and the DDX driver and managed
> > to start X with nouveau.
> 
> Where did you get that kernel from? The nouveau kernel tree or Linus' tree?

I did it with git as written at 
http://nouveau.freedesktop.org/wiki/DebianInstall
The only thing i have not compiled was libdrm as the debian 2.4.21 version seemed new enough. 

> > Although it seems to be slower than the nv driver.
> > glxgears dropped to 50 from 150, it uses software rendering for opengl and hung
> > the machine on video load. I wonder if these can get better.
> It uses software rendering because you haven't installed the 3D driver (try it
> at your own risk, it's still unsupported).

Hmm, okay, thanks maybe later. Actually i just expected some speedup on xmoto which does not use 3d as far as i know. I thought it would be faster as fast 2D seems to be present in the nouveau feature matrix at NV10.
Comment 25 Francisco Jerez 2010-09-07 07:29:57 UTC
Created attachment 38515 [details] [review]
nouveau_edid_from_of.patch

(In reply to comment #24)
> (In reply to comment #23)
> > (In reply to comment #22)
> > > Well it went worse. This time the screen remains blank and the nouveau module
> > > is loaded. So i think i will stay at the previous solution. 
> > > 
> > Did you have "video=VGA-1:e" in your kernel command line? If you did please try
> > without.
> 
> I tried without that as well but it still shows black screen. Should i post a
> register dump? 
> 
Sigh... so it seems OF is the only way to get an EDID for your monitor, new patch attached, try it *without* "video=VGA-1:e".

> [...]
> > > Although it seems to be slower than the nv driver.
> > > glxgears dropped to 50 from 150, it uses software rendering for opengl and hung
> > > the machine on video load. I wonder if these can get better.
> > It uses software rendering because you haven't installed the 3D driver (try it
> > at your own risk, it's still unsupported).
> 
> Hmm, okay, thanks maybe later. Actually i just expected some speedup on xmoto
> which does not use 3d as far as i know. I thought it would be faster as fast 2D
> seems to be present in the nouveau feature matrix at NV10.

Xmoto uses OpenGL to draw itself, so yes, it's 3d. And by the way, your card needs the classic mesa drivers instead of gallium, to build them pass "--with-dri-drivers=nouveau" instead of "--enable-gallium-nouveau" to the mesa configure script.
Comment 26 Zoltan Varnagy 2010-09-07 08:58:39 UTC
(In reply to comment #25)
> Sigh... so it seems OF is the only way to get an EDID for your monitor, new
> patch attached, try it *without* "video=VGA-1:e".

I am not sure i am doing the thing you thought about. I appended your third patch to the second and got black screen again. Should i have used only the third? I try these with the 2.6.33 kernel. I hope its not a problem (it went fine with it with your first patch). 

> > seems to be present in the nouveau feature matrix at NV10.
> 
> Xmoto uses OpenGL to draw itself, so yes, it's 3d. And by the way, your card
> needs the classic mesa drivers instead of gallium, to build them pass
> "--with-dri-drivers=nouveau" instead of "--enable-gallium-nouveau" to the mesa
> configure script.

Well ... that means i should compile mesa as well? Check out from git not only the mesa/drm part as written on the page but the whole mesa branch and compile somehow? I feel like it would be really great to have a Makefile somewhere which does all this checkout/compile/package/install stuff. The Xorg log says something about nouveau_vieux_dri.so. The mesa compiling would produce that?
Comment 27 Francisco Jerez 2010-09-07 09:11:11 UTC
(In reply to comment #26)
> (In reply to comment #25)
> > Sigh... so it seems OF is the only way to get an EDID for your monitor, new
> > patch attached, try it *without* "video=VGA-1:e".
> 
> I am not sure i am doing the thing you thought about. I appended your third
> patch to the second and got black screen again. Should i have used only the
> third? I try these with the 2.6.33 kernel. I hope its not a problem (it went
> fine with it with your first patch). 
> 
Yes, try with the last patch alone, and provide full kernel logs if it doesn't work.

> > > seems to be present in the nouveau feature matrix at NV10.
> > 
> > Xmoto uses OpenGL to draw itself, so yes, it's 3d. And by the way, your card
> > needs the classic mesa drivers instead of gallium, to build them pass
> > "--with-dri-drivers=nouveau" instead of "--enable-gallium-nouveau" to the mesa
> > configure script.
> 
> Well ... that means i should compile mesa as well? Check out from git not only
> the mesa/drm part as written on the page but the whole mesa branch and compile
> somehow?

You just have to clone the mesa repository, as described here [1].

> I feel like it would be really great to have a Makefile somewhere
> which does all this checkout/compile/package/install stuff. The Xorg log says
> something about nouveau_vieux_dri.so. The mesa compiling would produce that?

Yup.

[1] http://nouveau.freedesktop.org/wiki/GalliumHowto
Comment 28 Zoltan Varnagy 2010-09-07 11:37:47 UTC
Created attachment 38526 [details]
fourth dmesg output

Unfortunately the same thing happened with the last patch. I hope you meant this by detailed kernel log.
Comment 29 Zoltan Varnagy 2010-09-07 11:40:54 UTC
Okay anyone read comment #22 just forget it. NOUVEAU IS BETTER THAN nv. After compiling the mesa driver and using it xmoto went fine and smooth. Its also possible to run some 3d games. Thanks for your help again.
Comment 30 Francisco Jerez 2010-09-07 12:20:27 UTC
(In reply to comment #28)
> Created an attachment (id=38526) [details]
> fourth dmesg output
> 
> Unfortunately the same thing happened with the last patch. I hope you meant
> this by detailed kernel log.

Are you sure you reverted the previous patches before trying this one? They aren't supposed to work together.
Comment 31 walt 2010-09-07 16:09:14 UTC
(In reply to comment #29)
> After
> compiling the mesa driver and using it xmoto went fine and smooth. Its also
> possible to run some 3d games.

This is a long and complicated bug report, so I'd be grateful for a brief summary of the steps you took to get everything working.  In particular, which git repos did you actually need?

You mention 3d also.  Did you use the --enable-gallium-nouveau config flag or the other one mentioned by Francisco?

I'm confused about the need for gallium to run 3d software -- I read somewhere that it's needed for 3d support, but Francisco told you to use the other flag.

Thanks!
Comment 32 Zoltan Varnagy 2010-09-07 20:38:55 UTC
(In reply to comment #30)
> (In reply to comment #28)
> > Created an attachment (id=38526) [details] [details]
> > fourth dmesg output
> > 
> > Unfortunately the same thing happened with the last patch. I hope you meant
> > this by detailed kernel log.
> 
> Are you sure you reverted the previous patches before trying this one? They
> aren't supposed to work together.

Well i have just checked. All .c files in drivers/gpu/drm/nouveau have modification date feb.24 only the nouveau_connector.c is sept 7. The module is recompiled and put into the /lib directory. I really don't know about this driver details but the fact is it worked when i only applied your first nv04_crtc.c suggestions.
Comment 33 Zoltan Varnagy 2010-09-07 20:54:33 UTC
(In reply to comment #31)
> (In reply to comment #29)
> This is a long and complicated bug report, so I'd be grateful for a brief
> summary of the steps you took to get everything working.  In particular, which
> git repos did you actually need?

Well the way it worked is very close to one written at 
http://nouveau.freedesktop.org/wiki/DebianInstall
In the large frame. Roughly it was:
a) I checked out the nouveau kernel and applied the patch given in comment #15 . I compiled and installed the new kernel.
b) instead of compiling libdrm i used the debian packaged one (2.4.21)
c) i also checked out the mesa driver
git://anongit.freedesktop.org/git/mesa/mesa
configured with 
./configure --enable-debug --enable-glx-tls --disable-asm --with-dri-drivers=nouveau --disable-gallium-i915 --disable-gallium-i965 --disable-gallium-radeon --disable-gallium-r600 --disable-gallium-svga --with-state-trackers=glx,dri
and put the resulting lib/nouveau_vieux_dri.so to /usr/lib/dri
d) Checked out the ddx and installed as written

> I'm confused about the need for gallium to run 3d software -- I read somewhere
> that it's needed for 3d support, but Francisco told you to use the other flag.

Yes as far as i know for this card the nouveau_vieux_dri driver is needed instead, which was created in step c)

> Thanks!
Comment 34 Francisco Jerez 2010-09-08 07:43:35 UTC
Created attachment 38552 [details] [review]
nouveau_edid_from_of_dbg.patch

(In reply to comment #32)
> (In reply to comment #30)
> > (In reply to comment #28)
> > > Created an attachment (id=38526) [details] [details] [details]
> > > fourth dmesg output
> > > 
> > > Unfortunately the same thing happened with the last patch. I hope you meant
> > > this by detailed kernel log.
> > 
> > Are you sure you reverted the previous patches before trying this one? They
> > aren't supposed to work together.
> 
> Well i have just checked. All .c files in drivers/gpu/drm/nouveau have
> modification date feb.24 only the nouveau_connector.c is sept 7. The module is
> recompiled and put into the /lib directory. I really don't know about this
> driver details but the fact is it worked when i only applied your first
> nv04_crtc.c suggestions.

Not sure what's going on then, can you show me the kernel logs you get after running it with this patch applied and the previous ones reverted?
Comment 35 Zoltan Varnagy 2010-09-08 12:02:18 UTC
Created attachment 38563 [details]
fifth demsg output

Here you are. Debian kernel, video=nvidiafb:off argument. Your last patch only.
Comment 36 Francisco Jerez 2010-09-08 12:22:28 UTC
(In reply to comment #35)
> Created an attachment (id=38563) [details]
> fifth demsg output
> 
> Here you are. Debian kernel, video=nvidiafb:off argument. Your last patch only.

> [   15.741618] 216: NVDA,Display-A NVDA,Display-A c27813bc 0 1
                                                              ^^^

Man, that definitely means you have "nv11_emac_kms_2.patch" applied, try "git reset --hard" to get a clean tree before going forward.
Comment 37 Zoltan Varnagy 2010-09-08 21:53:39 UTC
(In reply to comment #36)
> (In reply to comment #35)
> > Created an attachment (id=38563) [details] [details]
> > fifth demsg output
> > 
> > Here you are. Debian kernel, video=nvidiafb:off argument. Your last patch only.
> 
> > [   15.741618] 216: NVDA,Display-A NVDA,Display-A c27813bc 0 1
>                                                               ^^^
> 
> Man, that definitely means you have "nv11_emac_kms_2.patch" applied, try "git
> reset --hard" to get a clean tree before going forward.

Hmm yes, something close to that, sorry. I reverted the patch by copying back the older nv04_crtc.c file and as it was older than the nv04_crtc.o the compiler did not recompile the object file. I did it again and the system started fine. It chose some funny 158x60 text mode on nouveau module load with tiny letters. 

So the configuration is which was intended last time. Debian experimental kernel, video=nvidiafb:off argument. Your last patch only.

Do you need any kernel or register dumps?
Comment 38 Francisco Jerez 2010-09-09 05:44:53 UTC
(In reply to comment #37)
> (In reply to comment #36)
> > (In reply to comment #35)
> > > Created an attachment (id=38563) [details] [details] [details]
> > > fifth demsg output
> > > 
> > > Here you are. Debian kernel, video=nvidiafb:off argument. Your last patch only.
> > 
> > > [   15.741618] 216: NVDA,Display-A NVDA,Display-A c27813bc 0 1
> >                                                               ^^^
> > 
> > Man, that definitely means you have "nv11_emac_kms_2.patch" applied, try "git
> > reset --hard" to get a clean tree before going forward.
> 
> Hmm yes, something close to that, sorry. I reverted the patch by copying back
> the older nv04_crtc.c file and as it was older than the nv04_crtc.o the
> compiler did not recompile the object file. I did it again and the system
> started fine. It chose some funny 158x60 text mode on nouveau module load with
> tiny letters. 
> 
> So the configuration is which was intended last time. Debian experimental
> kernel, video=nvidiafb:off argument. Your last patch only.
> 
> Do you need any kernel or register dumps?

No, thanks, I've pushed the fix to master. Feel free to open a new bug about the video crash you said you are seeing.


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.