Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trouble starting X with nvidia graphics card
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
g4c9z
Apprentice
Apprentice


Joined: 03 Jun 2004
Posts: 178

PostPosted: Tue Feb 23, 2010 10:37 pm    Post subject: Trouble starting X with nvidia graphics card Reply with quote

I've installed my Gentoo base system with stage3-i686-20100126.tar.bz2, and now I'm trying to get X working, following the The X Server Configuration HOWTO. When I try to run startx, I get a black screen, which I can only get out of by pressing Ctrl+Alt+F1 to go back to the other virtual terminal. There, I see errors about being unable to load modules:

First I tried with the default open source nv module (I have an NVidia GEForce4 MX400 SE graphics card), and got these errors:

    (EE) Failed to load module "vesa" (module does not exist, 0)
    (EE) Failed to load module "fbdev" (module does not exist, 0)

Then I tried setting up the nvidia-drivers module according to the Gentoo Linux nVidia Guide, and the above errors went away, to be replaced with being unable to load dri and dri2. From my Xorg.0.log:

    ...
    (II) LoadModule: "dri"
    (WW) Warning, couldn't open module dri
    (II) UnloadModule: "dri"
    (EE) Failed to load module "dri" (module does not exist, 0)
    (II) LoadModule: "dri2"
    (WW) Warning, couldn't open module dri2
    (II) UnloadModule: "dri2"
    (EE) Failed to load module "dri2" (module does not exist, 0)
    (II) LoadModule: "nvidia"
    (II) Loading /usr/lib/xorg/modules/drivers//nvidia_drv.so
    ...

I don't understand why it would be trying to load these modules, because I have them both commented out in the Xorg.conf I'm using:

Code:
Section "Module"
        Load  "record"
#       Load  "dri2"
#       Load  "dri"
        Load  "glx"
        Load  "dbe"
        Load  "extmod"
EndSection

Also, whether or not I use the nvidia-drivers package, I get this note repeated 4 times:

expected keysym, got XF86Touchpad Toggle : line 122 of inet

That's also confusing, because I don't have a touchpad, or even a laptop.

At first I just tried just using startx without an xorg.conf, like the Xorg guide suggests, but then the NVidia guide suggested modifying it, so I modified the one I had generated with:

Code:
Xorg -configure


I haven't installed a window manager or display manager or configured my /etc/rc.conf for that, because the guide didn't say I need to to test it. I thought that might be explaining the black screen, but it doesn't explain the errors.

I have hal installed and it runs (it wasn't installed at first, because I didn't set USE=hal until I realized it wasn't), and I rebuilt xorg-server with hal support. That removed several other "Failed to load module" errors, but not these ones.

Does anyone have any clues about what I can try next? I suspect the problem is specific to my graphics card... but I did have Gentoo installed years ago with the same hardware, and I have Ubuntu working on it currently.

This might be a bug in Gentoo, so if no one can figure out what's wrong, I guess I'll report it. But I thought there might be something I'm doing wrong that I don't know enough about to debug.
Back to top
View user's profile Send private message
kevstar31
Guru
Guru


Joined: 22 Nov 2006
Posts: 449
Location: Ohio

PostPosted: Tue Feb 23, 2010 11:39 pm    Post subject: Reply with quote

Post your make.conf, full xorg.conf, the output of lspci and your kernel config in a paste bin.
http://pastebin.com/
_________________
while(true) std::cout << "Jesus I trust in you." << std::endl;
My Political Compass
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Tue Feb 23, 2010 11:46 pm    Post subject: Reply with quote

With the newer versions of X, you don't want to have a full xorg.conf. For instance, the only thing in my xorg.conf is:

Code:

Section "Device"
  Identifier "nVidia Inc. GeForce 6800 GT OC"
  Driver     "nvidia"
  VideoRam   262144
EndSection

_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
g4c9z
Apprentice
Apprentice


Joined: 03 Jun 2004
Posts: 178

PostPosted: Wed Feb 24, 2010 12:45 am    Post subject: Reply with quote

kevstar31: I put the info you requested here:

http://pastebin.com/KD6fZB38

NathanZachary: I tried booting with a simpler xorg.conf, removing from it all but the following:

Code:
Section "Device"
   Identifier  "Card0"
   Driver      "nvidia"
   VendorName  "nVidia Corporation"
   BoardName   "NV17 [GeForce4 MX 440]"
   BusID       "PCI:2:0:0"
EndSection

I got exactly the same errors. I'm not sure why my generated file doesn't specify the video ram, or why it says "Card0" instead of a full identifier. Could that be a clue?
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Wed Feb 24, 2010 12:58 am    Post subject: Reply with quote

Could you try this?

Code:
$ X &
<switch back to the console and press enter>
$ DISPLAY=:0 xterm

For me, if I just run "X", nothing is shown until I actually run an applications on it - maybe your startx isn't starting any applications?
Back to top
View user's profile Send private message
kevstar31
Guru
Guru


Joined: 22 Nov 2006
Posts: 449
Location: Ohio

PostPosted: Wed Feb 24, 2010 3:21 am    Post subject: Reply with quote

In make.conf
Change
Quote:
INPUT_DEVICES="evdev vesa"
VIDEO_CARDS="nvidia nv"

To

Quote:
INPUT_DEVICES="evdev keyboard mouse"
VIDEO_CARDS="nvidia nv vesa"


Disable all the configuration options below:
Quote:

CONFIG_FB_VESA=y
CONFIG_FB_EFI=y
CONFIG_FRAMEBUFFER_CONSOLE=y

Use make menuconfig or genkernel --menuconfig and hit / to search for these configuration options
The frame buffer does not work with the nvidia drivers.
_________________
while(true) std::cout << "Jesus I trust in you." << std::endl;
My Political Compass
Back to top
View user's profile Send private message
g4c9z
Apprentice
Apprentice


Joined: 03 Jun 2004
Posts: 178

PostPosted: Wed Feb 24, 2010 6:10 pm    Post subject: Reply with quote

AM088: That worked! I didn't have xterm installed at first, though, because the guide didn't say I needed it - I just did emerge xorg-server. Once I emerged xterm and did as you suggested, I got an xterm.

However, that still doesn't explain the aforementioned error messages I'm still getting. kevstar31, I tried your suggestion, and the dri and touchpad error messages were still there. Also, the Nvidia guide mentions compiling a framebuffer in your kernel - why would it do that if you aren't supposed to? Also, in order to disable CONFIG_FRAMEBUFFER_CONSOLE, I also had to deselect Direct Rendering Manager (DRI) from Device Drivers -> Graphics Support in my kernel - I'm not sure if that's relevant.

I ran emerge --newuse --update --deep -a world after making the changes you suggested, to recompile X with the new drivers. And yes, I copied the new kernel to /boot.

What causes these dri drivers to attempt to load? It seems that the fact that they're not in xorg.conf is not enough to prevent them from being loaded...
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Wed Feb 24, 2010 8:06 pm    Post subject: Reply with quote

I just used xterm as an example, you could have used any other graphical program.

As for the dri modules, don't worry about them - you don't need it - nvidia has all the necessary stuff in its own module. The reason you get this is that it is usually supposed to start by default, but because you don't have any drivers that actually use it, it didn't get compiled. Just be sure you ran "eselect opengl set nvidia" to take advantage of the nvidia driver.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Thu Feb 25, 2010 3:54 am    Post subject: Reply with quote

Oh, that portion of the X HOWTO certainly needs to be updated. One needs to have a graphical environment of some type installed if one used xorg-server instead of xorg-x11. Otherwise, there is essentially nothing to start.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1932

PostPosted: Thu Feb 25, 2010 4:03 am    Post subject: Reply with quote

NathanZachary wrote:
Oh, that portion of the X HOWTO certainly needs to be updated. One needs to have a graphical environment of some type installed if one used xorg-server instead of xorg-x11. Otherwise, there is essentially nothing to start.


Yeah, it used to be that xterm, twm and friends were pulled in with xorg-x11, but that changed a few months ago.
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Thu Feb 25, 2010 5:22 pm    Post subject: Reply with quote

I will look into updating that guide sometime in the very near future to have a warning about this issue. Thanks for bringing it to my attention. :)
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
BigAl
n00b
n00b


Joined: 07 Dec 2009
Posts: 7

PostPosted: Sat Feb 27, 2010 4:05 pm    Post subject: Reply with quote

Hi,

I'm having similar problems to the OP - installed gentoo as normal, but startx & the like don't work. nvidia-drivers-190.53-r1 are installed without problem with gentoo-sources-2.6.32-r7.

VIDEO_CARDS="nvidia vesa":
Everything (startx, xdm, kde, etc) works perfectly, except xorg uses the vesa driver -> poor graphics

VIDEO_CARDS="nvidia nv":
- startx kills the computer -> physical reboot needed, though you can see + move the mouse cursor (which looks to be of the right screen resolution)
- running xdm semi-works; the screen is mostly black with a few blue lines vaguely resembling the desired kdm login screen, and the mouse is usable.
- Xorg log file: http://paste.pocoo.org/show/183492/

VIDEO_CARDS="nvidia":
- startx just prints out the Xorg log to the screen, nothing else works.
- Xorg log file: http://paste.pocoo.org/show/183508/

Other information:
- http://paste.pocoo.org/show/183490/ - emerge --info
- http://paste.pocoo.org/show/183495/ - output of 'cat .config | egrep -i 'vesa|nv' | wgetpaste'
- The nvidia driver is modprobed fine and working, opengl has been set ot use it.

Not sure what I'm doing wrong - never had issues with xorg/nvidia for many a year since I used to enter panic mode everytime I went into xorg.conf.

I assume my problem is simply to force xorg to use the nvidia driver somehow instead of vesa/nv/nothing? If I put my own xorg.conf into /etc/X11/ will it be used by xorg? In the past I've used far fewer USE flags than I have this time, could that be causing issues? Tempted to reinstall with only necessary use flags... Or shall I try to use older versions of nvidia-drivers or xorg?
_________________
Linux alan 2.6.32-gentoo #2 SMP Mon Dec 7 02:56:57 GMT 2009 x86_64 Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz GenuineIntel GNU/Linux
MemTotal: 4056688 kB
Back to top
View user's profile Send private message
BigAl
n00b
n00b


Joined: 07 Dec 2009
Posts: 7

PostPosted: Sat Feb 27, 2010 4:10 pm    Post subject: Reply with quote

Actually nevermind, hmm seems a potential problem is that desptie using gentoo-sources-2.6.32-r7, Xorg and prolly other things still thinks I'm using 2.6.33 (downgraded) - despite eselect showing the correct kernel is being used. Weird!
_________________
Linux alan 2.6.32-gentoo #2 SMP Mon Dec 7 02:56:57 GMT 2009 x86_64 Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz GenuineIntel GNU/Linux
MemTotal: 4056688 kB
Back to top
View user's profile Send private message
NathanZachary
Moderator
Moderator


Joined: 30 Jan 2007
Posts: 2609

PostPosted: Sat Feb 27, 2010 4:56 pm    Post subject: Reply with quote

I have submitted a bug report with the proposed changes made to the X Server Configuration guide.
_________________
“Truth, like infinity, is to be forever approached but never reached.” --Jean Ayres (1972)
---avatar cropped from =AimanStudio---
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum