Nouveau/pl

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Nouveau and the translation is 2% complete.
Outdated translations are marked like this.

nouveau is the open source driver for NVIDIA graphic cards. It is maintained under the umbrella of the FreeDesktop project.

Being an open source project running on what is largely proprietary hardware, there are some limitations inherent to Nouveau that are not applicable to the closed-source nvidia-drivers. That said, Nouveau is constantly evolving, so these limitations are subject to change over time.

Those interested in using this driver should verify support has been added for the card (and features) in question by referencing upstream's feature matrix. Upstream also keeps a list of card code names to cross reference from the feature matrix.

Installation

Kernel

Activate the following kernel options:

KERNEL Enabling nouveau
Device Drivers  --->
   Graphics support  --->
      <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
      [*] Enable legacy fbdev support for your modesetting driver
      <M/*> Nouveau (NVIDIA) cards

Oprogramowanie Układowe

Niektóre karty, począwszy od kart Kepler, potrzebują oprogramowania układowego (tak zwanego firmware). Wsparcie można uzykać poprzez instalację sys-kernel/linux-firmware oraz konfigurację nouveau jako modułu (M) w jądrze.

See upstream's list of codenames to determine what firmware is necessary.

Firmware for nouveau cards are distributed in the sys-firmware/nvidia-firmware package. Be sure it has been installed before defining firmware in the kernel:

root #emerge --ask sys-firmware/nvidia-firmware

Driver

FILE /etc/portage/make.confSet VIDEO_CARDS to nouveau
VIDEO_CARDS="... nouveau ..."

After setting or altering VIDEO_CARDS values remember to update the system using the following command so the changes take effect:

root #emerge --ask --changed-use --deep @world

Udev

If NVIDIA's proprietary driver has been installed, it will have installed a udev rules file in /lib/udev/rules.d/99-nvidia.rules. When attempting to use the nouveau driver without disabling that rule file, the X11 log file fill up with a block of messages like this repeating every 10ms:

FILE /var/log/Xorg.0.logResults of obsolete udev rule for nvidia-drivers
 [   180.669] (II) NOUVEAU(0): EDID vendor "SAM", prod id 430
 [   180.669] (II) NOUVEAU(0): Using hsync ranges from config file
 [   180.669] (II) NOUVEAU(0): Using vrefresh ranges from config file
 [   180.669] (II) NOUVEAU(0): Printing DDC gathered Modelines:
 [   180.669] (II) NOUVEAU(0): Modeline "1600x1200"x0.0  162.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (75.0 kHz eP)
 [   180.669] (II) NOUVEAU(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
 [   180.669] (II) NOUVEAU(0): Modeline "800x600"x0.0   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz e)
 [...]
 [   180.669] (II) NOUVEAU(0): Modeline "1152x864"x0.0  108.00  1152 1216 1344 1600  864 865 868 900 +hsync +vsync (67.5 kHz e)
 [   180.669] (II) NOUVEAU(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
 [   180.669] (II) NOUVEAU(0): Modeline "1280x960"x0.0  108.00  1280 1376 1488 1800  960 961 964 1000 +hsync +vsync (60.0 kHz e)
 [   180.669] removing GPU device /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card2 /dev/dri/card2

To prevent this (without uninstalling the x11-drivers/nvidia-drivers package), simply remove/move/rename the udev file /lib/udev/rules.d/99-nvidia.rules so that is no longer taken up by udev (see Advanced Configuration of udev). Note that the next time nvidia-drivers is updated, that file will be re-installed, so consider unmerging nvidia-drivers.

Configuration

Permissions

If the acl USE flag is enabled globally and elogind is being used (default for desktop profiles) permissions to video cards will be handled automatically. It is possible to check the permissions using getfacl:

user $getfacl /dev/dri/card0 | grep larry
user:larry:rw-

A broader solution is to add the user(s) needing access the video card to the video group:

root #gpasswd -a larry video

Note that users will be able to run X without permission to the DRI subsystem, but hardware acceleration will be disabled.

xorg.conf

The X server is designed to work out-of-the-box, with no need to manually edit X.Org's configuration files. It should detect and configure devices such as displays, keyboards, and mice.

However, the main configuration file of the X server is the xorg.conf file.

Switching between Intel GPU and Nouveau

Sometimes users may want to switch between two drivers. One way this matter is handled is through initramfs and early Kernel Mode Setting.

For example, if initramfs is built using dracut, and nouveau is meant to be used, the following adjustments must take place:

FILE /etc/dracut.conf
#add_drivers+=" i915 " # Note leading and trailing spaces
add_drivers+=" nouveau " # Note leading and trailing spaces
#force_drivers+=" i915 " # Note leading and trailing spaces
force_drivers+=" nouveau " # Note leading and trailing spaces

In kernel mode setting method using GRUB, the variable GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub can be changed to enable or disable either of GPUs by taking the right values.

For instance, to disable i915 and enable nouveau, we will add the following to GRUB_CMDLINE_LINUX_DEFAULT variable: i915.modeset=0 nouveau.modeset=1.

Limitations

Some of the current issues or draw-backs compared to the closed-source x11-drivers/nvidia-drivers are stated below:

  • Performance (especially 3D performance) on the same card/chipset may be significantly worse than using nvidia-drivers.
  • Attempts to run at higher refresh rates (i.e. above 60 Hz) may fail.
  • Using advanced features from various NVIDIA cards (e.g. multiple-display capabilities of Quadro cards without SLI) may not function correctly.


Troubleshooting

Multi-monitor problems

When the screen freezes often with possible EDID probes while using dual monitors/displays, try adding video=VGA-1:e or video=VGA-1:d (enable or disable respectively) to the GRUB_CMDLINE_LINUX_DEFAULT variable in the /etc/default/grub file for GRUB or the respective kernel command-line option for other loaders. Make sure to substitute the name of the monitor listed within dmesg or /var/log/Xorg.0.log (i.e. CRT-1, VGA-1, LVDS-1, DVI-1, ...)

For instance, on a Dell Inspiron 8100 laptop with a connected external display connected via the laptop's external VGA port, a possible command line is: video=LVDS-1:1280x1024@60 video=VGA-1:1280x1024@60. The EDID (DRM) probe on the external VGA connected display is still causing freezing during nouveau/DRM load for the author, but at least it's usable if the display is connected after GRUB is loaded and prior to the nouveau/DRM modules loading. And with the prior mentioned command line LVDS/VGA resolutions, the displays are cloned and centred with somewhat correct resolutions for cloned displays.

NVIDIA Optimus

When using a laptop with NVIDIA's Optimus technology (usually found in laptops built in 2010 and later), everything will be passed through the integrated graphics controller (usually Intel) before it gets to the discrete video card (NVIDIA), which can cause a lot of otherwise unexplained problems when enabled. There are a few ways to handle this, but the simplest is to disable Optimus through the BIOS (normally accessed by pressing F12 during boot). This will result in increased power consumption (decreased battery life, increased running temperature), as the NVIDIA card will now be handling all of the work all of the time.

See also

External resources