NVIDIA GeForce Go 6150 on Nouveau video driver HOW TO

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

NVIDIA GeForce Go 6150 on Nouveau video driver HOW TO

Postby Favux on Tue Sep 04, 2012 4:01 pm

NVIDIA Corporation C51 GeForce Go 6150 chipset (NV40 family)

Last Updated: September 24, 2012

Sources
The nouveau kernel module loading bug (2 GB limitation): freedesktop.org bug report.
freedesktop.org wiki's nouveau Ubuntu Packages page.
Ubuntu Precise [b]nouveau manpage.
gnome-settings-daemon xrandr plug-in bug: Setting up dual monitors system-wide with XRandR on Debian Lenny


Mint/Ubuntu Release Specific Notes
Maya (Mint 13)/Precise Pangolin (12.04):
The nouveau 2 GB memory limitation is still present in the default nouveau driver (xserver-xorg-video-nouveau_1.0.0.16+git20111201+b5534a1-build2) derived from the nouveau git repository on 12-1-11.


Summary
For quite a while now when installing Mint/Ubuntu on a laptop using the NVIDIA GeForce Go 6150 chipset a black screen is the result. The customary way to deal with this is to do a one time edit adding to the kernel boot line the nomodeset parameter before booting the kernel. And then install the Nvidia proprietary driver. What is happening is that by default it is intended the OSS xf86-nouveau video driver be used. However there is a bug that prevents the nouveau kernel module from loading if you have more than 2 GB of system RAM, hence the black screen. By using 'nomodeset' the nouveau driver is disabled and Xorg is forced to use the VESA video driver. With the HP TX2000 tablet PC, used as an example in the HOW TO, X then starts with a usable 1024x768 (instead of 1280x800) resolution. And there is no probem opening Additional Drivers and activating the appropriate Nvidia proprietary driver.

The cause of the nouveau module loading problem is with the NVIDIA GeForce Go 6150 chipset's use of RAM above 2 GB. See the freedesktop.org bug report link in Sources. The cause of the bug isn't clear, it may not actually be in nouveau. The fix is to add a parameter to the kernel's bootline limiting available RAM to 2 GB. This has the obvious drawback. You'll have to weigh that against the advantage of using an OSS driver that in some ways works better than the Nvidia proprietary driver. For example your xrandr output will now contain more useful information. Since the bug report and default nouveau in Maya/Precise are both over 6 months old perhaps this has already been fixed in the nouveau git repository.

Unfortunately even with the nouveau module loading you still end up with a black screen if you use the recommended minimal xorg.conf. So for the nouvea driver's X component more configuration is needed. The xorg.conf in part II does the trick. Your system will then load the Desktop using xf86-nouveau.


Preliminaries
To determine your video chipset enter in a terminal lspci |grep VGA, e.g. output:
Code: Select all
00:05.0 VGA compatible controller: NVIDIA Corporation C51 [GeForce Go 6150] (rev a2)

Notice 00:05.0 is the pci BusID.

For the following the Nvidia proprietary driver was deactivated through Additional Drivers. This may not be necessary.


I. The nouveau kernel module/driver loading bug work around.
a) Use mem=2g kernel parameter one time. On the live CD choose F6 (other) or when booting with Grub2 press the e key while on the intended boot kernel. Arrow to the kernel parameter line (has "quiet splash") and add mem=2g, e.g.: "quiet splash mem=2g". Then continue with the boot. This only applies to the current boot and you would need to redo it if you reboot.

b) Use mem=2g kernel parameter permanently.
To add the mem=2g boot parameter permanently edit the grub file with:
Code: Select all
gksudo gedit /etc/default/grub

Change, as an example:
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem=2g"

You may already have parameters other than 'quiet splash'. Then be sure to update grub2 so the new boot parameter is applied.
Code: Select all
sudo update-grub

* It is possible you could set the RAM limit higher than 2 GB but apparently the higher you go over 2 GB the more likely you are to run into the bug.

Now when you run lsmod |grep nouveau in a terminal instead of no output you'll see:
Code: Select all
nouveau               774641  2
ttm                    76949  1 nouveau
drm_kms_helper         46978  1 nouveau
drm                   242038  4 nouveau,ttm,drm_kms_helper
i2c_algo_bit           13423  1 nouveau
mxm_wmi                12979  1 nouveau
video                  19596  1 nouveau

c) mem=RAM amount tests.
mem=2112M: appears to work. But the gain of 64 Mb is not too exciting.
mem=2176M: now horizontal black lines appear in the background at login and in the Desktop. An opened gedit looks normal. Stability?
mem=2304M: going over 2 GB by 256 Mb results in fairly large horizontal lines. But you can still see things well enough to navigate around in the Desktop.
mem=2560M: 512 Mb results in a jagged colored blur at login. Useless.


II. Configure Xorg.
a) xorg.conf
i) minimum
The recommended minimal xorg.conf:
Code: Select all
Section "Device"
    Identifier "n"
    Driver "nouveau"
EndSection

does not work. Amazingly I found that all I needed was the following xorg.conf section. I decided to use GeForce_Go_6150 as the identifier rather than the more generic Device0 or similar that I see in examples.
Minimum xorg.conf for nouveau
Code: Select all
## HP TX2000 tablet PC xf86-nouveau driver minimum xorg.conf
## 00:05.0 VGA compatible controller: NVIDIA Corporation C51 [GeForce Go 6150] (rev a2)

Section "Device"
    Identifier     "GeForce_Go_6150"
    Driver         "nouveau"
    VendorName     "NVIDIA Corporation"
    Option         "RandRRotation" "on"      # enable rotation
EndSection

This works with or without the "RandRRotation" option. What the functional difference is I do not know. Maybe my system does not consider a one letter identifier valid? Now when you run the xrandr command in a terminal you get more information in the output.
Code: Select all
~$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096
LVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800       60.1*+
   1024x768       59.9 
   800x600        59.9 
   640x480        59.4 
   720x400        59.6 
   640x400        60.0 
   640x350        59.8 
VGA-1 disconnected (normal left inverted right x axis y axis)
TV-1 disconnected (normal left inverted right x axis y axis)

I noticed that xrandr supplies descriptive names for the monitor and screen Identifiers and they make more sense to me than the monitor0 or monitor1 I see in the examples I've looked at. Less confusing to keep everything consistent.

ii) labeled monitor and screen sections
The current rule of thumb is to do the minimum configuration necessary and let Xorg handle the rest. So we could call the xorg.conf done with the above. But if you want to add a monitor and screen section and label them you could use:
Code: Select all
## HP TX2000 tablet PC xf86-nouveau driver minimum xorg.conf
## 00:05.0 VGA compatible controller: NVIDIA Corporation C51 [GeForce Go 6150] (rev a2)

Section "Device"
    Identifier     "GeForce_Go_6150"
    Driver         "nouveau"
    VendorName     "NVIDIA Corporation"
    Option         "RandRRotation" "on"      # enable rotation
EndSection

Section "Monitor"
    Identifier     "LVDS-1"
    VendorName     "HP"
    ModelName      "Unknown"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "GeForce_Go_6150"
    Monitor        "LVDS-1"
EndSection

You can connect a monitor using either of the above working xorg.conf's with the result being the tablet PC screen mirrored on the monitor. Unfortunately here we seem to run into a limitation of nouveau because the tablet PC resolution is dropped to 1024x768 from 1280x800. And the monitor has the same lower resolution as the tablet PC. With nvidia and TwinView the tablet PC keeps its 1280x800 resolution and the monitor gets to keep its 1920x1024. Neither lists the correct x and y offsets in the xrandr output though. But it turns out this is being caused by the Display applet in the gnome-control-center (System Settings in Ubuntu). Because the Nvidia proprietary driver uses its own settings gui rather than the GNOME supplied one it side steps this. If instead you run a xrandr command such as:
Code: Select all
xrandr --output LVDS-1 --auto --mode 1280x800  --output VGA-1 --auto --mode 1920x1080 --right-of LVDS-1

you are able to get the correct resolutions and offsets. See appendix 1.

iii) add configuration
And if you decided to specify some configuration the following would serve:
Code: Select all
## HP TX2000 tablet PC xf86-video-nouveau driver xorg.conf
## 00:05.0 VGA compatible controller: NVIDIA Corporation C51 [GeForce Go 6150] (rev a2)

Section "Device"
    Identifier     "GeForce_Go_6150"
    Driver         "nouveau"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:0:5:0"
#    Option         "HWcursor"      "on"      # default "on"
#    Option         "NoAccel"       "on"      # default "on"
#    Option         "ShadowFB"      "off"     # default "off"
#    Option         "WrappedFB"     "off"     # default "off"
#    Option         "GLXVBlank"     "off"     # default "off"
#    Option         "ZaphodHeads"   "string"  # see manpage
#    Option         "PageFlip"      "on"      # default "on"
    Option         "RandRRotation" "on"      # enable rotation
EndSection

Section "Monitor"
    Identifier     "LVDS-1"
    VendorName     "HP"
    ModelName      "Unknown"
    HorizSync       24.0 - 94.0
    VertRefresh     50.0 - 76.0
    Option         "DPMS"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "GeForce_Go_6150"
    Monitor        "LVDS-1"
    DefaultDepth    24
    SubSection     "Display"
        Depth           24
    EndSubSection
EndSection

The listed options are from the nouveau manual (man nouveau entered in a terminal). I have not really tested any of the Options other than "RandRRotation". You could remove the commented out Options from your xorg.conf if you don't intend to use or investigate them.

Two additional options are seen when generating a xorg.conf with sudo X :1 -configure:
Code: Select all
#Option     "SWcursor"              # [<bool>]
#Option     "VideoKey"              # <i>

I have no idea if they are still valid or deprecated.
Note: interestingly using either the "HWcursor" or "SWcursor" options appears to break things.

b) dual monitor xorg.conf or xorg.conf.d
For a static dual monitor setup this xorg.conf works. Supposedly you could also use the same sections in a custom .conf file in /etc/X11/xorg.conf.d. But I haven't tested that yet.
Code: Select all
## HP TX2000 tablet PC xf86-video-nouveau driver dual monitor xorg.conf
## 00:05.0 VGA compatible controller: NVIDIA Corporation C51 [GeForce Go 6150] (rev a2)

Section "Device"
    Identifier     "GeForce_Go_6150"
    Driver         "nouveau"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:0:5:0"
    Option         "RandRRotation" "on"      # enable rotation
EndSection

Section "Monitor"
    Identifier     "LVDS-1"
    VendorName     "HP"
    ModelName      "Unknown"
    HorizSync       24.0 - 94.0
    VertRefresh     50.0 - 76.0
    Option         "PreferredMode" "1280x800"
EndSection

Section "Monitor"
    Identifier     "VGA-1"
    VendorName     "HP"
    ModelName      "HP_2310m"
    Option         "RightOf"       "LVDS-1"
#    Option         "LeftOf"        "LVDS-1"
#    Option         "Above"         "LVDS-1"
#    Option         "Below"         "LVDS-1"
    Option         "PreferredMode" "1920x1080"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "GeForce_Go_6150"
    Monitor        "LVDS-1"
    DefaultDepth    24
    SubSection     "Display"
        Depth           24
        Virtual         3200 1080
#        Virtual         4096 4096            # GeForce Go 6150 max.
    EndSubSection
EndSection

In order for this to work you first have to deal with the xrandr plug-in for the gnome-settings-daemon issue. See appendix 1.


III. XRandR commands
Rather than a static xorg.conf or xorg.conf.d setup you could use runtime XRandR commands while using just the minimum xorg.conf configuration, i.e. the "Device" section above. This does allow you to avoid the gnome-settings-daemon's xrandr plug-in issue.

Connect the monitor and then start it in the correct resolution with:
Code: Select all
xrandr --output VGA-1 --auto --mode 1920x1080 --right-of LVDS-1

The "complete" command for both displays:
Code: Select all
xrandr --output LVDS-1 --auto --mode 1280x800  --output VGA-1 --auto --mode 1920x1080 --right-of LVDS-1



Conclusion
I am not a video guru and I haven't tested nouveau too much yet so take what I say with a grain of salt. But it seems to be working OK. For example with the introduction of Unity with Ubuntu's Natty when I have more than a few windows open opening new ones can resulted in a white out of the new window. This is apparently some sort of bug with the Nvidia proprietary driver and Unity. I have to go through gyrations to see the windows contents including starting over by logging out and back in. Quite annoying, and is a reason to use Mint. While this has improved with Precise it still happens and the nouveau driver does not seem to have this issue. Also compare the xrandr output from nvidia:
Code: Select all
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1024 x 768, maximum 1024 x 768
default connected 1024x768+0+0 0mm x 0mm
   1024x768       61.0*
   800x600        61.0 
   640x480        60.0 

to nouveau's:
Code: Select all
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 4096 x 4096
LVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800       60.1*+
   1024x768       59.9 
   800x600        59.9 
   640x480        59.4 
   720x400        59.6 
   640x400        60.0 
VGA-1 disconnected (normal left inverted right x axis y axis)
TV-1 disconnected (normal left inverted right x axis y axis)

With nouveau you get significantly more relevant video information because nvidia TwinView is not compatible with RandR. Allegedly the nvidia 302, which came out in May 2012, is compatible with RandR 1.2/1.3. Supposedly compatibility was coming with RandR 1.4 but that has been delayed. It looks like Nvidia has beaten RandR 1.4 to the punch. So it will be interesting to see what the next release brings.


Appendix 1: stop GNOME from overriding your static XRandR configuration
Despite setting up your dual monitor configuration correctly in xorg.conf or xorg.conf.d with a GNOME Desktop when you boot up you will end up with a mirrored display and the resolution of the tablet PC lowered to 1024x768 with the monitor resolution matching that lower resolution. This is ultimately being caused by the XRandR plugin for the gnome-settings-daemon. You need to turn it off.

First install dconf-editor:
Code: Select all
sudo apt-get install dconf-editor

then open it. Now navigate to org.gnome.settings-daemon.plugins.xrandr and uncheck the active box for the xrandr plug-in. Your xrandr static configuration should no longer be overwritten when you restart.

Sander Marechal, jm_ , and enouf on #debian figured out the solution to this issue. See "Setting up dual monitors system-wide with XRandR on Debian Lenny". It appears that the Displays applet in the gnome-control-center is the only thing using the xrandr plug-in. If there is another application using the plug-in then perhaps modifying the ~/.config/monitors.xml file would work. It does seem that the Displays applet can directly query xrandr even with the plug-in disabled. So best not to start it. Also since XRandR run time commands run after everything else they'll control configuration. Again unless you then start Displays.


TODO
1) Allegedly starting with Lisa/Oneiric nvidia and nouveau can coexist simultaneously. Need to test that and see if having nvidia set up in the xorg.conf and nouveau set up in xorg.conf.d works as the Arch wiki claims.
Favux
Level 3
Level 3
 
Posts: 199
Joined: Fri Jul 01, 2011 1:20 am

Linux Mint is funded by ads and donations.
 

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 5 guests