Jump to content

# Nouveau

7 languages

- Deutsch
- Español
- Français
- 日本語
- Русский
- Українська
- 中文（简体）

From ArchWiki

Related articles

- NVIDIA
- Xorg
- Bumblebee

This article covers the reverse-engineered open-source Nouveau driver for NVIDIA graphics cards. For information about the upstream proprietary nvidia and open-source nvidia-open drivers, see NVIDIA.

Find your card's code name (a more detailed list is available on Wikipedia), and compare it with the feature matrix for supported features.

## Installation

This article or section is out of date.

Reason: Recent cards (GTX 16xx and all RTX cards) will also need the vulkan-nouveau package. (Discuss in Talk:Nouveau)

Install the mesa package, which provides the DRI driver for 3D acceleration.

- For 32-bit application support, also install the lib32-mesa package from the multilib repository.
- For the DDX driver (which provides 2D acceleration in Xorg), install the xf86-video-nouveau package.

Note: It has been suggested that not installing the xf86-video-nouveau driver, and instead falling back on the modesetting driver for NV50 (G80) and newer hardware is beneficial. For example see a user report from 2021.

See also Hardware video acceleration.

### Using the Mesa NVK Vulkan Driver

Warning: This driver is still a work in progress and as such, regressions should be expected. Some stuff (mostly games) that worked on the open-source and proprietary drivers will probably not work as well (or even at all) using NVK. If playing games is an important workload then you should probably avoid using NVK until it matures a little.

NVK is an open-source Vulkan driver based on Nouveau for Maxwell and newer NVIDIA cards.

Using NVK requires Kernel version 6.7 or newer and mesa version 24.1 or newer.

Before enabling NVK you must uninstall any of the following packages (and/or their `lib32` and DKMS variants):

- nvidia, nvidia-open, nvidia-lts, nvidia-betaAUR
- nvidia-settings, nvidia-utils
- egl-wayland

If you are using a hybrid laptop or a dual GPU system ensure you do not have Nouveau blacklisted by a GPU manager in `/etc/modprobe.d/`.

Note: You should also probably uninstall any GPU managers on your system as most of them work by blacklisting modules which might interfere with NVK.

Then install vulkan-nouveau (and if it is required, lib32-vulkan-nouveau).

Add `nouveau.config=NvGspRm=1` as a kernel parameter if required. It is enabled by default on Ada Lovelace and newer cards. See note in the documentation.

Finally reboot your system.

To verify everything is working `vulkaninfo` from vulkan-tools can be used. It should report the NVIDIA GPU in your system as using the NVK driver.

    $ vulkaninfo

    ...
    GPU id : 0 (NVIDIA GeForce RTX 3050 Ti Laptop GPU (NVK GA107)):
           Surface type = VK_KHR_wayland_surface
           Formats: count = 8
    ...

## Loading

The Nouveau kernel module should load automatically on system boot. If it does not happen, then:

- Make sure you do not have `nomodeset` or `vga=` as a kernel parameter, since Nouveau requires kernel mode-setting.
- Also, check that you do not have Nouveau disabled using any modprobe blacklisting technique within `/etc/modprobe.d/` or `/usr/lib/modprobe.d/`.
- If everything above still fails to load nouveau, check dmesg for an opcode error. Add `nouveau.config=NvBios=PRAMIN` to your kernel parameters to prevent module unloading.[1]
- Check if `/etc/X11/xorg.conf` or any file in `/etc/X11/xorg.conf.d/` exists and is referencing the `nvidia` driver. It is probably a good idea to rename the file.

### Early KMS

Kernel mode setting (KMS) is supported by the `nouveau` driver and is enabled early since mkinitcpio v32, as the `kms` hook is included by default. For other setups, see Kernel mode setting#Early KMS start for instructions on how to enable KMS as soon as possible at the boot process.

Tip: If you have problems with the resolution, check Kernel mode setting#Forcing modes and EDID.

## Tips and tricks

### Keep NVIDIA driver installed

The factual accuracy of this article or section is disputed.

Reason: Editing files in `/usr/lib/` is not persistent, they will be overwritten when a package gets upgraded. (Discuss in Talk:Nouveau)

If you want to keep the proprietary NVIDIA driver installed (and are not using OpenGL), but want to use the Nouveau driver, follow the steps below:

Comment out nouveau blacklisting in `/etc/modprobe.d/nouveau_blacklist.conf` or `/usr/lib/modprobe.d/nvidia-utils.conf`, modifying it as follows:

    #blacklist nouveau

You may also need to comment out other configuration files that prioritize the proprietary driver, e.g. systemd-modules-load's `/usr/lib/modules-load.d/nvidia-utils.conf` and udev's `/usr/lib/udev/rules.d/60-nvidia.rules`. Check what files the driver has installed with the following command:

    $ pacman -Ql nvidia-utils | grep conf

Then, ensure that you have disabled `nvidia-`-prefixed services that might call `nvidia-modprobe` to load the module on boot. For example:

    $ systemctl status nvidia-persistenced.service

And if you are using Xorg, tell Xorg to load nouveau instead of NVIDIA:

    /etc/X11/xorg.conf.d/20-nouveau.conf

    Section "Device"
        Identifier "Nvidia card"
        Driver "nouveau"
    EndSection

Reboot to make effects. And check that it loaded fine by looking at kernel messages:

    # dmesg

### Installing the latest development packages

To get the latest Nouveau improvements

- linux-gitAUR
- libdrm-gitAUR
- lib32-libdrm-gitAUR
- lib32-mesa-gitAUR
- mesa-gitAUR
- xf86-video-nouveau-gitAUR

Note: As mentioned in #Installation, installing xf86-video-nouveau is no longer required nor recommended and in most cases, your GPU will function better without it installed.

### Dual head

Multiple monitors can be setup with RandR, see Multihead#RandR.

### Setting console resolution

You can pass the resolution to nouveau with the `video=` kernel line option (see KMS).

### Power management

The lack of proper power management in the nouveau driver is one of the most important causes of performance issues, since most cards will remain in their lower power state with lower clocks during their use. Experimental support for GPU reclocking is available for some cards (see the Nouveau PowerManagement page) and since kernel 4.5 can be controlled through a debugfs interface located at `/sys/kernel/debug/dri/*/pstate`.

Note: As upstream explained, this debugfs interface is not available on Turing and later cards, but only for Kepler and earlier.

For example, to check the available power states and the current setting for the first card in your system, run:

    # cat /sys/kernel/debug/dri/0/pstate

It is also possible to manually set/force a certain power state by writing to said interface:

    # echo pstate > /sys/kernel/debug/dri/0/pstate

Warning: The support for reclocking is highly experimental. Manually setting the power state may hang your system, cause corruption or overheat your card.

#### Fan control

If it is implemented for your card, you can configure fan control via `/sys`.

    $ find /sys -name pwm1_enable
    /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/hwmon/hwmon1/pwm1_enable
    $ readlink /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/driver
    ../../../../bus/pci/drivers/nouveau

`pwm1_enable` can be set to 0, 1 or 2 meaning NONE, MANUAL and AUTO fan control. If set to manual fan control, you can set `pwm1` manually, for example to 40 for 40%.

Warning: Use at your own risk! Do not overheat your card!

You can also set it by an udev rule:

    /etc/udev/rules.d/50-nouveau-hwmon.rules

    ACTION=="add", SUBSYSTEM=="hwmon", DRIVERS=="nouveau", ATTR{pwm1_enable}="2"

Sources:

- https://floppym.blogspot.de/2013/07/fan-control-with-nouveau.html
- https://web.archive.org/web/20141031191559/https://kalgan.cc/blog/posts/Controlling_nVidia_cards_fans_with_nouveau_in_Debian/

### Optimus

You have two solutions to use Optimus on a laptop (aka hybrid graphics, when you have two GPUs on your laptop): bumblebee and PRIME

### Vertical synchronization

This article or section is out of date.

Reason: `xr_glx_hybrid` is a legacy backend (and seems to be broken). (Discuss in Talk:Nouveau)

Xorg compositors are prone to show issues with Nouveau. Unlike most of them, Picom offers lots of options to tweak for a smoother and tearing free result. A configuration which is expected to deliver a good result would be the following:

    $ picom -b --unredir-if-possible --backend xr_glx_hybrid --vsync --use-damage --glx-no-stencil

Tip: Do not forget to turn off compositing of your DE's window manager like KWin when using a different compositor.

## Troubleshooting

Add `drm.debug=14` and `log_buf_len=16M` to your kernel parameters to turn on video debugging:

Create verbose Xorg log:

    $ startx -- -logverbose 9 -verbose 9

View loaded video module parameters and values:

    $ modinfo -p video

### Disable MSI

If you are still having problems loading the module or starting the X server, append `nouveau.config=NvMSI=0` to your Kernel parameters.

Source: https://bugs.freedesktop.org/show_bug.cgi?id=78441

### Phantom output issue

It is possible for the nouveau driver to detect "phantom" outputs. For example, both VGA-1 and LVDS-1 are shown as connected but only LVDS-1 is present.

This causes display problems and/or prevent suspending on lid closure.

#### Kernel parameters

The problem can be overcome by disabling the phantom output (VGA-1 in the examples given) with Kernel parameters:

    video=VGA-1:d

Where `d` = disable.

The nouveau kernel module also has an option to disable TV-out detection [2]:

    tv_disable=1

#### Xorg configuration

The phantom output can be disabled in Xorg by adding the following to `/etc/X11/xorg.conf.d/20-nouveau.conf`:

    Section "Monitor"
    Identifier "VGA-1"
    Option "Ignore" "1"
    EndSection

Source: https://web.archive.org/web/20170118202740/http://gentoo-en.vfose.ru/wiki/Nouveau#Phantom_and_unpopulated_output_connector_issues

#### Xrandr

Xrandr can disable the output:

    $ xrandr --output VGA-1 --off

This can be added to the xinit configuration.

### Random lockups with kernel error messages

Specific NVIDIA chips with Nouveau may give random system lockups and more commonly throw many kernel messages, seen with dmesg. Try adding the `nouveau.noaccel=1` kernel parameter. See Fedora:Common kernel problems#Systems with nVidia adapters using the nouveau driver lock up randomly for more information.

Note that using `nouveau.noaccel=1` kernel parameter might cause ~%100 CPU usage on Wayland when there is no iGPU or disabled iGPU by factory. You can switch to X11 session or prefer adding `LIBGL_ALWAYS_SOFTWARE=1` environment variable for wayland to disable OpenGL hardware acceleration completely.

As an alternative, you can also use the `QT_XCB_FORCE_SOFTWARE_OPENGL=1` environment variable to disable OpenGL acceleration in Qt applications.

### Pointer to flat panel table invalid

NVIDIA graphics cards with recent chipsets can cause startup issues - this includes X11 being unable to start and lspci freezing indefinitely[3][4][5][6][7].

This can break live distributions/installation media. This can be detected either by running lspci, or checking the systemd journal for the error:

    nouveau E[     DRM]Pointer to flat panel table invalid

The system may start if the Nouveau driver is disabled by passing the following kernel parameters:

    modprobe.blacklist=nouveau

The Nouveau driver can then be loaded using

    # modprobe nouveau

The system should then function correctly. If you have another NVIDIA graphics card, or just want to be safe, you can disable the offending card using:

    # echo 1 > /sys/bus/pci/devices/card-device-id/remove

Categories:

- Graphics
- X server

Hidden categories:

- Pages or sections flagged with Template:Out of date
- Pages or sections flagged with Template:Accuracy