# Nivida 660M

## itshotinhere

Has anyone had any luck getting the Nvidia 259.59 drivers working? It seems like the 660M is supported in the .59 driver, but I am getting a black screen on kernel boot.

----------

## Jaglover

 *itshotinhere wrote:*   

> Has anyone had any luck getting the Nvidia 259.59 drivers working? It seems like the 660M is supported in the .59 driver, but I am getting a black screen on kernel boot.

 

GNU/Linux is not using nVidia proprietary drivers, thus black screen on kernel boot has not much to do with nVidia drivers.

Please describe your problem in more detail and provide relevant logs.

----------

## itshotinhere

I'm using gentoo. 

When I change /etc/make.conf to use the nvidia driver and update package.keywords to unmask the latest version (259.59):

emerge -DNu world 

Pulls in the x11-drivers/nvidia-drivers 259.59 package which is a proprietary Nvidia driver. Then, I run eselect to set the opengl implementation to nvidia.

Reboot....

Kernel begins booting and then the screen goes black. As far as a log file goes, I don't know how I would output the result of dmesg since the kernel does not successfully boot.

----------

## BillWho

itshotinhere,

Cay you ctl-alt-f2 to a console or is that black too   :Question: 

----------

## Jaglover

Gentoo is [DIY] GNU/Linux. Gentoo is not using nVidia drivers. nVidia are providing their proprietary drivers for X environment.

----------

## itshotinhere

 *Quote:*   

> "Gentoo is [DIY] GNU/Linux. Gentoo is not using nVidia drivers. nVidia are providing their proprietary drivers for X environment."

 

Uh what? We've already established that what you are saying isn't true, so why do you keep parroting it? The Nvidia proprietary drivers are in the portage package tree. Specifically, the package called "x11-drivers/nvidia-drivers" the open source nvidia drivers are called nouveau (i.e. "x11-drivers/xf86-video-nouveau"). 

So here's my question:

If you don't have anything that is even factual to say, let alone helpful, why are you posting? Please stop spreading lies. It's obvious that you don't know what you are talking about. And if you don't know what you are talking about, you shouldn't be speaking.

In response to the useful comment:

Switching to another terminal via ctrl + alt + f2 does nothing. The screen is still black.

----------

## gerard27

You give us very little to go by itshotinhere.

Judging by your join date you're new to Gentoo,welcome.

Before you emerged the nvidia-drivers could you boot the system?

Gerard.

----------

## Jaglover

 *itshotinhere wrote:*   

>  *Quote:*   "Gentoo is [DIY] GNU/Linux. Gentoo is not using nVidia drivers. nVidia are providing their proprietary drivers for X environment." 
> 
> Uh what? We've already established that what you are saying isn't true, so why do you keep parroting it? The Nvidia proprietary drivers are in the portage package tree. Specifically, the package called "x11-drivers/nvidia-drivers" the open source nvidia drivers are called nouveau (i.e. "x11-drivers/xf86-video-nouveau"). 
> 
> So here's my question:
> ...

 

To diagnose the problem you have to understand how stuff works. You have to understand what is Linux and what kind of applications run on it. Xorg is an application that runs on Linux.

When kernel boots it has nothing to do with X environment, thus it has nothing to do with nVidia drivers. Consequently, your problem has nothing to do with nVidia drivers.

But by all means, if you tag this as another lie from me, feel free to do so. You will not see me posting in your support request threads. And don't worry, you cannot insult me, I do not take insults from people I do not have respect for.

Nobody can help you if you do not make it easier for us, where are the details and relevant logs I asked for?

Right now all we can say is: Considering all the information you have provided something is wrong.

Since it appears you get the black screen when kernel boots showing us your kernel conf in pastebin would be a good start.

----------

## BillWho

itshotinhere,

I'm running x11-drivers/nvidia-drivers-295.59 and as far as I know there's no problem with it.

I thought you were booting directly to your DE and that's where it went blank. Since that's not the case and the console is also black, it has nothing to do with the nvidia drivers.

You might want to check these settings:

CONFIG_FB_BOOT_VESA_SUPPORT=y

CONFIG_FB_CFB_FILLRECT=y

CONFIG_FB_CFB_COPYAREA=y

CONFIG_FB_CFB_IMAGEBLIT=y

CONFIG_FB_MODE_HELPERS=y

CONFIG_FB_TILEBLITTING=y

CONFIG_FB_VESA=y

# CONFIG_NET_VENDOR_NVIDIA is not set

# CONFIG_FB_NVIDIA is not set

Good luck   :Wink: 

----------

## itshotinhere

 *Quote:*   

> 
> 
> But by all means, if you tag this as another lie from me, feel free to do so. You will not see me posting in your support request threads.

 

All I did was enumerate the facts. If you're offended by reality, that's your problem.

Your original posts claimed (twice) that Gentoo does not use the proprietary Nvidia drivers. There's nothing to debate about. Anyone who is not a complete psychotic can scan the package tree and verify that it contains the closed source Nvidia drivers that I mentioned in my original post. Now you want to pull a schizoid mind wipe, pretend that didn't happen and make the conversation about something else entirely...so let's address that.

 *Quote:*   

> When kernel boots it has nothing to do with X environment, thus it has nothing to do with nVidia drivers. Consequently, your problem has nothing to do with nVidia drivers.

 

Maybe I am wrong here then. It is odd though that when I run "equery files nvidia-drivers | grep .ko" I get the following result:

/lib/modules/3.2.12-gentoo/video/nvidia.ko

I always thought that was a kernel module, but maybe I am the one hallucinating.

----------

## itshotinhere

Hi Bill,

I don't have any of those settings in my .config file. Kernel version: 3.2.12. When it goes black on boot up, the last message is "Waiting for uevents to be processed...."

----------

## gerard27

That means the system is conking out long before loading X.

If you have a live cd/dvd,preferably with "mc" you could browse the /var directory.

Gerard.

----------

## BillWho

 *Quote:*   

> I don't have any of those settings in my .config file.

 

What does this return   :Question:  

```
grep "CONFIG_FB\|FRAMEBUFFER\|NVID" /usr/src/linux/.config|grep "=m\|=y"
```

----------

## Jaglover

 *itshotinhere wrote:*   

>  *Quote:*   
> 
> But by all means, if you tag this as another lie from me, feel free to do so. You will not see me posting in your support request threads. 
> 
> All I did was enumerate the facts. If you're offended by reality, that's your problem.
> ...

 

If you do not understand Gentoo does not use everything what's in portage how is this my problem? There are thousands of applications in the portage, Gentoo does not use them, they use Gentoo. Of course Gentoo does not use nVidia drivers.  Gentoo will work just fine without any video output. These drivers are for Xorg, and Xorg is not even Linux. As I said before, to successfully troubleshoot you need to understand how stuff works. You probably think if you feed a cow with milk it will give you grass?  :Wink:  What is it, itshotinhere, got stuck on Windows land for too long and can't get out of the box?

----------

## itshotinhere

 *Quote:*   

> That means the system is conking out long before loading X. 

 

Yep, which is what I have been saying in every post since the very first one. X11 has nothing to do with it. When I install x11-drivers/nvidia-drivers package-259.59, the kernel gets to the point where it says "Waiting for uevents to be processed..." and then the screen goes black and I cannot switch to another terminal. If I uninstall the drivers, everything works fine, except that the only alternative for x that works with the 660M seems to be vesa and the resolution is 1024x768.

Please ignore jaglovers illogical, fatuous and irrelevant comments.

 *Quote:*   

> 
> 
> What does this return 
> 
> Code:
> ...

 

It returns 1, but it doesn't print anything to the standard out   :Wink:  . It was my understanding that framebuffer support was supposed to be turned off in the kernel. Maybe that's the problem.

----------

## Jaglover

I've been trying to help you from very beginning, and I still do despite your illogical, fatuous and irrelevant comments.

Had you put your kernel conf in pastebin as I requested it would be all over by now. Can you do that?

Are you following some guide? Like this: http://www.gentoo.org/doc/en/nvidia-guide.xml ?

----------

## itshotinhere

 *Quote:*   

> As I said before, to successfully troubleshoot you need to understand how stuff works. You probably think if you feed a cow with milk it will give you grass?

 

Delusion #4. I never said anything about gentoo using x or x using gentoo. You said that. What I said was the kernel doesn't boot after emerging the nvidia drivers. Your tilting at windmills. Your tirades are against objects that are purely the product of your schizophrenic fantasies.

----------

## Jaglover

 *itshotinhere wrote:*   

>  *Quote:*   As I said before, to successfully troubleshoot you need to understand how stuff works. You probably think if you feed a cow with milk it will give you grass? 
> 
> Delusion #4. I never said anything about gentoo using x or x using gentoo. You said that. What I said was the kernel doesn't boot after emerging the nvidia drivers. Your tilting at windmills. Your tirades are against objects that are purely the product of your schizophrenic fantasies.

 

Alright, I'm giving up.   :Sad: 

Best luck with your Gentoo adventure.

Hint: You may want to open a new thread, old hands on these forums are unlikely to help you after reading your outbursts.

----------

## itshotinhere

So I rebuilt the kernel to include frame buffer support, but it's still not working.

grep "CONFIG_FB\|FRAMEBUFFER\|NVID" /usr/src/linux/.config|grep "=m\|=y"

CONFIG_FB=y

CONFIG_FB_BOOT_VESA_SUPPORT=y

CONFIG_FB_CFB_FILLRECT=y

CONFIG_FB_CFB_COPYAREA=y

CONFIG_FB_CFB_IMAGEBLIT=y

CONFIG_FB_SYS_FILLRECT=m

CONFIG_FB_SYS_COPYAREA=m

CONFIG_FB_SYS_IMAGEBLIT=m

CONFIG_FB_SYS_FOPS=m

CONFIG_FB_DEFERRED_IO=y

CONFIG_FB_VESA=y

----------

## BillWho

itshotinhere,

If you're still not getting any video then it's time to chroot and take a look at the Xorg. and messages log for some clues.

Also, you might want to enable rc_logger in rc.conf which will produce an rc.log. I'm not sure if it will help any, but it can't hurt

Just as an aside FYI, the nvidia drivers were just upgraded to nvidia-drivers-302.17

Good luck   :Wink: 

----------

## r.osmanov

Hi.

I can't get X working for 3-4 days. Recompiled the kernel about 20 times:

* with DRM + nouveau built-in

* with DRM and nvidia-drivers package(excluding nouveau)

* without both DRM and nouveau + nvidia-drivers package

* without DRM, nvidia-drivers and x11-drivers/xf86-video-vesa

In all cases I get whether "Fatal error: no screens found", or blank screen(sometimes with cursor).

First time I tried to install nvidia-drivers and lauch those 3 xterm windows. It failed as now X(gdm) fails to start.

```
X -configure && X -config /root/xorg.conf.new
```

failed either.

Configuration:

```
lspci -nn
```

https://gist.github.com/2944627

```
cat /etc/X11/xorg.conf
```

https://gist.github.com/2944617

```
cat /var/log/Xorg.0.log
```

https://gist.github.com/2944618

```
cat /usr/src/linux/.config
```

https://gist.github.com/2944625

```
cat /home/ruslan/.xinitrc
```

https://gist.github.com/2944658

```
cat /etc/conf.d/xdm
```

https://gist.github.com/2944659

```
cat /etc/make.conf
```

https://gist.github.com/2944669

It is HP Pavilion dv7 7003er laptop, nVidia GeForce GT 630M video card, Intel core i7 CPU.

But I've just managed to start X without keyboard and mice working though. The problem is really in Optimus techology, which is still not supported by nvidia-drivers. /usr/share/doc/nvidia-drivers-295.59/README.bz2 has some notes about it. I also got Optimus running on openSUSE box by means of bumblebee package. In Gentoo I made the following:

* unmasked and emerged x11-misc/bumblebee and x11-misc/virtualgl

* /etc/bumblebee/xorg.conf.nvidia: https://gist.github.com/06e7ea462b423ecfedfb

* /etc/bumblebee/xorg.conf.vesa: https://gist.github.com/d719c19310d6569efa42

* removed /etc/X11/xorg.conf (not sure, bumblebee seems to not use this file)

I'm thinking of using nouveau instead of vesa. But chances are they'll conflict.

EDIT:

 *Quote:*   

> Just as an aside FYI, the nvidia drivers were just upgraded to nvidia-drivers-302.17 

 

Good news!

I'd really like to set up Gentoo on this laptop. Please, help us.

Regards.

----------

## itshotinhere

Well, hey at least the kernel boots for you, which is farther than I've gotten. Making changes to rc logs is not going to work for me, since I don't even get to the point where open rc starts. From everything I can tell searching the web, this seems to be a common problem and the black screen appears to be the result of the nvidia kernel module conflicting with another video driver. No clue how to fix it though.

----------

## BillWho

guys,

Here's my .config for sys-kernel/gentoo-sources-3.4.3 with x11-drivers/nvidia-drivers-302.17

http://paste.lugons.org/show/2301/

r.osmanov,

You might want to add -march=native or core2 to your CFLAGS line

Good luck   :Wink: 

----------

## itshotinhere

I think that pastebin site is down right now, but I'm running the 3.4.3 kernel and the 302.17 so I will copy your config and see if I can get it working.

----------

## r.osmanov

I hope I have eventually solved it  :Smile: 

```
-> Device Drivers    

  -> Graphics support

    [*] Laptop Hybrid Graphics - GPU switching support

    <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->

        <*>   Intel 8xx/9xx/G3x/G4x/HD Graphics       

        [*]     Enable modesetting on intel by default

  -> Support for frame buffer devices (FB [=y])

    [*]   Enable firmware EDID

    < >   Userspace VESA VGA graphics support 

    [ ]   VESA VGA graphics support           

    < >   nVidia Framebuffer Support       

    < >   nVidia Riva support              

    < >   Intel LE80578 (Vermilion) support 

  -> /dev/agpgart (AGP Support) (AGP [=y])

    <*>   Intel 440LX/BX/GX, I8xx and E7x05 chipset support

  -> Staging drivers (STAGING [=y])

    < >   Nouveau (nVidia) cards

    < >   Intel GMA5/600 KMS Framebuffer

    (and all others in this section)
```

Entire .config: https://gist.github.com/2961202

/etc/make.conf:

```

CFLAGS="-O2 -march=native -pipe"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j5"

CHOST="x86_64-pc-linux-gnu"

USE="mmx sse sse2 X dbus gtk gnome udev -kde -qt4"

# ...

INPUT_DEVICES="evdev synaptics"

VIDEO_CARDS="nvidia intel"

```

Other settings:

```

pavilion linux # eselect opengl show

xorg-x11

pavilion linux # eselect opencl show 

nvidia

```

What I've (re-)emerged:

```

xf86-video-intel

xf86-input-evdev

xf86-video-fbdev

x11-misc/virtualgl

x11-drivers/nvidia-drivers

xorg-server

```

```

# revdep-rebuild

# emerge --changed-use -Duva world

# emerge --depclean

```

After rebuilding the kernel don't forget to 

```

# module-rebuild populate && module-rebuild rebuild

```

It works. But sometimes everything hung(I had to reboot). Not sure what it was exactly. Not sure if the configuration is correct. However, I have X working now:

```

$ glxinfo | grep OpenGL

OpenGL vendor string: Tungsten Graphics, Inc

OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 

OpenGL version string: 2.1 Mesa 7.11.2

OpenGL shading language version string: 1.20

OpenGL extensions:

$ optirun glxinfo | grep OpenGL

OpenGL vendor string: NVIDIA Corporation

OpenGL renderer string: GeForce GT 630M/PCIe/SSE2

OpenGL version string: 4.2.0 NVIDIA 302.17

OpenGL shading language version string: 4.20 NVIDIA via Cg compiler

OpenGL extensions:

```

I hope it helps people having a laptop with Optimus nVidia card.

----------

## BillWho

r.osmanov,

Not to confuse things here, but eselect opengl show should be set to nvidia.

Don't change anything unless you're sure the nvidia module is loaded.

Unless you have a reason for the intel and nvidia cards coexisting, I would go with just nvidia given that appears to be your preference.

A shorter emerge --changed-use -Duva world would be emerge -uavDN @world

Also it's good to pretend with depclean just to be safe emerge --depclean -p. If all looks OK then remove the -p.

Good luck   :Wink: 

----------

## kurly

 *BillWho wrote:*   

> 
> 
> A shorter emerge --changed-use -Duva world would be emerge -uavDN @world
> 
> Also it's good to pretend with depclean just to be safe emerge --depclean -p. If all looks OK then remove the -p.

 

And a shorter emerge --depclean -p would be emerge -cp -- I only recently discovered that one, myself.  So many saved keystrokes!  :Wink: 

----------

## r.osmanov

BillWho, thanks.

I chose xorg-x11 because of two things:

1. It is recommended to do so in the Gentoo Wiki for bumblebee: http://en.gentoo-wiki.com/wiki/X.Org/nVidia_Optimus

2. X randomly hung. I'm still not sure it solved :/

3. I hadn't OpenGL in the output of

```
$ glxinfo | grep OpenGL
```

But the following shown that OpenGL loaded:

```
$ optirun glxinfo | OpenGL
```

Should I eselect opengl set nvidia with bumblebee?

EDIT:

Yes, and do I really need this in kernel:

```
-> Device Drivers   

  -> Graphics support

    [*] Laptop Hybrid Graphics - GPU switching support 
```

?

----------

## BillWho

 *r.osmanov wrote:*   

> BillWho, thanks.
> 
> I chose xorg-x11 because of two things:
> 
> 1. It is recommended to do so in the Gentoo Wiki for bumblebee: http://en.gentoo-wiki.com/wiki/X.Org/nVidia_Optimus
> ...

 

I would definitely follow the settings according to the documentation. This thread became somewhat convoluted and I got a little confused at this end   :Embarassed:  It appears that you have everything straightened out or at least you're well on your way   :Smile: 

Good luck   :Wink: 

 *kurly wrote:*   

> 
> 
> And a shorter emerge --depclean -p would be emerge -cp -- I only recently discovered that one, myself. So many saved keystrokes! 
> 
> 

 

Thanks for the abbreviated depclean pretend   :Very Happy: 

----------

## itshotinhere

WOOT WOOT!!! I copied your config and now it's working. Thanks Bill!!!

----------

## r.osmanov

I have the only problem with this setup: everything(X, keyboard, mice etc.) hangs when I compile something in gnome-terminal :/

I can do everything except to compile stuff in gnome-terminal. What's wrong with it and how do I diagnose it?

Please help.

EDIT: But it's okay when I switch to another window or even tab in the same gnome-terminal. It also goes well in another tty(Ctrl + Alt + F[1234...]). But when the tab with compilation process is focused, it all hangs on line ~3000. 

I tried to encrease buffer size. It seems, it prolonged the time. Have no clue  :Sad: 

----------

## BillWho

 *itshotinhere wrote:*   

> WOOT WOOT!!! I copied your config and now it's working. Thanks Bill!!!

 

Glad to hear that you got it going - the fun has just begun  :Very Happy: 

 *r.osmanov wrote:*   

> I have the only problem with this setup: everything(X, keyboard, mice etc.) hangs when I compile something in gnome-terminal :/ 
> 
> I can do everything except to compile stuff in gnome-terminal. What's wrong with it and how do I diagnose it?

 

On the rare occasions when my mouse and/or  keyboard stops working or act up I usually rebuild all the drivers:

```
emerge -av $(qlist -IC x11-drivers) 
```

This is what I have in /etc/make.conf for input devices:

```
INPUT_DEVICES="evdev mouse keyboard"
```

Maybe try another terminal - this is the one I use:

```
[I] x11-terms/terminator (0.96-r1@03/25/2012): Multiple GNOME terminals in one window
```

Good luck   :Wink: 

----------

