Nouveau linux driver ubuntu

Свободный драйвер Nouveau для видеокарт Nvidia

Содержание

Nouveаu – свободный драйвер для видеокарт Nvidiа с поддержкой 3D. Драйвер Nouveau по умолчанию уже установлен в Ubuntu. Драйвер содержится в пакете xserver-xorg-video-nouveau .

Обновление драйвера

Существует несколько способов обновления драйвера:

Обновление из PPA

Открыть терминал и ввести следующие команды:

Обновить список пакетов:

Теперь, обновить систему:

Установка из исходных кодов

Для начала следует установить необходимые пакеты для сборки ПО из исходных текстов, для этого в терминале выполняем команду:

Шаг 1. Подготовка

Вам понадобятся исходные тексты последней версии ядра Linux, библиотек Mesа и DRM, а также самого драйвера Nouveau. Также, если вы используете Ubuntu 10.04 или более старый релиз, вам необходимо установить Х-server версии 1.8.0 и новее. Можете установить его из ppa:xorg-edgers.

Шаг 2. Компиляция нового ядра

После скачивания исходников ядра, необходимо его скомпилировать и установить, как это сделать можно узнать в статье HOW-TO: Сборка ядра Linux, не забудьте в разделе «Stаging drivers» включить Nouveаu.

Шаг 3. Компиляция и установка libdrm

Далее нужно скомпилировать и установить libdrm, для этого в терминале:

Шаг 4. Компиляция и установка драйвера Nouveau

Для сборки драйвера выполните в терминале:

Шаг 5. Компиляция и установка Mesa

Теперь необходимо собрать новую версию Mesа. Это необходимо для поддержки 3D в драйвере.

Шаг 6. Настройка Xorg

Открываем файл xorg.conf:

И добавляем следующие строки:

Обязательно: Устанавливает верные права на устройство /dev/cards/card0 :

Рекомендуется: Запрещает самому X-серверу использовать 3D-ускорение. Рекомендуется разработчиками Nouveau. Вы не сможете использовать эффекты Compiz (KWin в KDE может работать через движок XRender):

Шаг 7. Проверка работоспособности драйвера

Проверяем работает ли драйвер, для этого в терминале выполняем:

Вы должны увидеть что-то вроде:

Это означает, что драйвер работает и все выполнено правильно.

Источник

How to Install Nvidia Driver on Ubuntu 20.04

As Linux getting more user friendly, game developers are adding more support thanks to Steam. The performance of graphics processing units (GPUs) mainly depends on drivers. Ubuntu by default use open source video driver Nouveau which has limited support and features when compared with proprietary Nvidia drivers.

The proprietary Nvidia driver is essential to Ubuntu users looking to play games. However, if you are a basic user, there is no need to have this driver installed, as the open-source one works just fine.

In this tutorial, we are going to learn different ways to install Nvidia drivers on Ubuntu 20.04 LTS.

Check hardware Information of GPU

Before installing Nvidia drivers on Ubuntu, ensure that you have Nvidia GPU in your system. There are lots of commands available to get Linux hardware details.

To confirm this, simply run the following hwinfo command.

You can check which card is being used by the prime-select command:

The lshw command can display hardware and driver details of the currently used Nvidia card.

The lspci command is another option to get the GPU hardware details.

If you have installed inxi tool, run the following command.

Install Nvidia drivers using from GUI

Lets first check how to install Nvidia driver from the graphical user interface. On the main menu, type «software update manager» and click on it to open.

Читайте также:  Как записать windows zver с флешки

On the software updater pop-up, click on the ‘Settings & Livepatch‘ button as shown.

This will launch the ‘Software and Updates‘ window as shown below:

At the top-most section of the ‘Software and updates’ windows, be sure to find a couple of options displayed which include Ubuntu software, other software, updates e.t.c. In this case, click on Additional Drivers, you can see there, the ‘Nvidia — driver -435’ (proprietary, tested) is set up as default driver used for Nvidia card, along with some proprietary divers listed.

Both, ‘Nvidia — drivers 430’ (proprietary) and ‘Nvidia — drivers 390’ (proprietary) are available for GeForce GTX 1080 Ti card. Select the first option to install Nvidia driver 430. When you are done, click on the Apply changes button to install the driver.

Then wait for the download to complete from the internet and click on the close button.

Reboot your computer for the changes to take effect. Run the following to reboot your PC.

Install Nvidia driver from the command line (CLI)

Then, run the following commands to check the list of driver devices available for the Nvidia card from the default Ubuntu repository.

There are four Nvidia drivers available for the GeForce MX130 model. They include the Nvidia driver -440 non-free (which is recommended for Ubuntu system), Nvidia driver -435, and -390 distro non-free and the nouveau distro free builtin opensource video driver (default). Now you can run the following commands to install the specific driver you want.

After the Nvidia diver has been installed, we have to reboot the computer in order to allow Nvidia prime (which is the technology) to switch in between the Intel Graphics and the Nvidia Graphics card.

Verify using nvidia-smi

The nvidia-smi command line is a utility that is used for providing monitor and management capabilities for each and every devices i.e Nvidia Tesla, GRID, Quadro, and GeForce from Fermi and other higher architect families. Open the Terminal application and run the following command to see the Graphics Processing Unit and the process that is using the Nvidia GPU.

Configure the Nvidia Graphics driver

The Nvidia settings command starts a Graphics User Interface(GUI) tool for configuration of Nvidia Graphics driver. This enables you to have a glance at all the GPU information and configure external monitors that are connected to your system.

Run the command below to launch the ‘Nvidia and Server Settings‘ window.

How to uninstall the proprietary Nvidia driver

From open forums, I have noticed many users end up issues with removing Nvidia drivers and reinstalling. Let me share the steps I have followed to successfully uninstall the Nvidia driver and switch to the nouveau driver.

Step 1: Run the following command to confirm Nvidia drivers are installed in your system.

Step 2: Run the following commands to uninstall the proprietary Nvidia driver.

Note that, the use of purge command will remove Nvidia diver together with all configurations that will be made. Run the flowing command to reinstall the Ubuntu desktop package.

Step 3: Run these commands to switch back to the nouveau driver.

Step 3: Remove the Xorg configuration file

Run the rm command to remove the Xorg configuration file

Step 4: After that, reboot your system.

Uninstall Nvidia Driver through GUI

Uninstalling the Nvidia driver using a GUI is quite easy. First, locate the ‘software & Updates’ app then click on it to open. Once it has opened, select on the Additional Drivers tab.

This will display all the Nvidia drivers that are available on Ubuntu. On the list under the ‘Nvidia Corporation,’ select » using X.Org X server — Nouveau display.» This option will pass up the Nvidia graphics diver and it will install Nouveau display driver. For changes to take effect, click on the Apply changes button, and wait for some minutes.

Читайте также:  Graphic editors in linux

Once Nvidia driver is uninstalled, a message will display saying, «No proprietary drivers are in use» Now close the Software & Updates application and then reboot your computer.

Conclusion

In this tutorial, we have covered two ways that you can use to install Nvidia drivers on Ubuntu 20.04 LTS.

With that said, Nvidia is bringing Vulkan which is intended to offer higher performance and more balanced CPU/GPU usage driver to Linux, a replacement for OpenGL.

In recent years Redhat developers are adding extra code to Nouveau improve opensource code to make it much better, let’s hope the near future we could use it for the modern game.

From Ubuntu 19.10, proprietary Nvidia drivers are available on install media (ie in ISO), which will bring a better fresh install experience for ubuntu users.

If you have any questions or feedback, feel free to leave a comment.

Источник

Installing Nouveau on your Linux computer

There are two ways of installing Nouveau on your Linux computer. The most recommended way is to use your distribution-provided packages. If those are outdated or buggy, you may also recompile Nouveau from source.

Nouveau is incompatible with NVIDIA’s proprietary driver. If you want to use Nouveau, you first need to remove the proprietary driver from your system.

Using your distribution’s packages

The following information are provided to the best of our knowledge. Please seek help on your distribution’s wiki if you have any problem installing or uninstalling Nouveau.

Compiling Nouveau from source

Instead of using the distribution-provided binaries, you can also recompile Nouveau yourself. There are several reasons to want to compile Nouveau from source, here are the most common ones:

  • Testing the latest version on Nouveau;
  • Bug fixing — checking if a bug in a stable version is still present in the development branches or testing a patch;
  • Contributing code — Developers are expected to test and implement new code on the development branches.

Whatever your reason is, the development team thanks you for living on the edge. Please tell us as soon as possible when you encounter a bug!

Nouveau is split into 4 main parts:

  • Nouveau DRM : The privileged part of Nouveau, running in the kernel;
  • Libdrm : A library that wraps the DRM & Nouveau IOCTLs, it simplifies memory management and command submission;
  • xf86-video-nouveau : The device-dependent part of X (DDX) for NVIDIA cards whose role is to provide 2D acceleration (EXA) and some simple video acceleration (XV);
  • Mesa : It provides 3D, GPGPU and video acceleration to open source drivers. For more information, please read MesaDrivers.

Kernel

The kernel modules required by Nouveau ( drm.ko , drm_kms_helper.ko , ttm.ko and nouveau.ko ) are built from a Linux kernel tree. You have several options on how to download the source code (subsections of Section 1) and how to compile it (subsections of Section 2). See also KernelModeSetting for important KMS notes. Please, read carefully.

The Nouveau kernel git repository contains one recommended branch: linux-5.5 .

You may not be able to compile the DRM modules against your current kernel, if it is too old (might need an -rc kernel or even Linus’ git kernel). The possible errors include build failure and kernel modules that cannot be loaded. It is recommended to build your whole kernel from this branch (Section 2.1).

Since the DRM code is part of the kernel since 2.6.33, you can also use Linus’ git kernel for Nouveau. However, the code in Linus’ kernel will always be older than Nouveau’s own git, and because there are no official Nouveau releases, you may encounter compatibility issues with user space parts (libdrm, DDX, Mesa).

Getting the source code

You have multiple choices when it comes to downloading the source code:

  • Get the full Nouveau kernel tree, with full history : Best for developers and people willing to bisect regressions;
  • Get the full Nouveau kernel tree, without history: For continuous testers with a data cap on their internet plan;
  • Get a snapshot: For occasional testers with an internet data cap (out-of-the-tree compilation only).
Читайте также:  Подготовка hdd для установки mac os

In order to download the full Nouveau kernel tree, please run the following command (un-comment —depth=1 if you don’t want the full history):

There is also an out-of-tree version of the module that you can get at:

Full kernel compilation

This method cannot be applied if you only downloaded a snapshot of Nouveau. Please download a complete version of the Nouveau tree.

The configuration and installation parts are distribution-dependent. You can find some instructions for ArchLinux, Debian, Gentoo, Ubuntu or Fedora.

Please make sure CONFIG_DRM_NOUVEAU=m, otherwise Nouveau won’t be compiled in the kernel.

Out-of-the-tree compilation

The out-of-the-tree builds are mostly used by developers or testers who recompile their kernel often with some custom patches. The out-of-the-tree build will only recompile the nouveau driver, which should be orders of magnitude faster than a full kernel recompilation. However it has to be done against a compatible kernel, since it relies on a lot of internal kernel APIs

In order to use the out-of-the-tree compilation, clone the out-of-tree module and run the following commands:

Then, you should insmod the nouveau.ko module which is compiled (make sure to also modprobe its deps). It is also possible to install them but this isn’t recommended.

WARNING: To use this technique, you will be required to be running at least the same major version of the kernel as one you want to compile out of the tree. If the kernel hasn’t been released yet, please compile, install and reboot a kernel compiled from the full Nouveau tree before attempting again.

Run-time configuration

Userspace

The following tutorial will help you compile and install Nouveau in a user directory. This will lower your chances of messing up your whole system. Each package’s instructions assume that you have the proper header files installed. If you’re on a Debian-based distro (including Ubuntu), you can run apt-get build-dep mesa to make sure that this happens.

However, if you need to recompile xf86-video-nouveau and your distribution-provided libdrm isn’t sufficient, you will need to set NVD to /usr and install libdrm, mesa and xf86-video-nouveau.

If you are not in this case, please source the following script (nouveau-env.sh) in every console where you need to do Nouveau development:

Sourcing the file can be done by running command:

Libdrm

Here are the commands to compile libdrm from git:

Xf86-video-nouveau

Let’s now recompile Nouveau’s X.org driver (DDX) from git:

You’ll then need to tell the X-server where to look for nouveau_drv.so. To do so, please create a configuration file at /etc/X11/xorg.conf.d/01-module-path.conf containing:

WARNING: Please replace /same/path/as/NVD/ by the path you set for $NVD.

WARNING2: If you managed to break your graphical interface. You can revert back to the previous ddx by deleting 01-module-path.conf.

Mesa can be compiled by running the following commands:

LibVDPAU (optional, only useful for video decoding)

The libvdpau will look for libvdpau_nouveau.so in the same prefix as it was installed (regardless of LD_LIBRARY_PATH). We thus need to recompile libvdpau and install it to the same prefix as mesa in order for it to use the right libvdpau_nouveau.so.

Configuring the X server

When using Nouveau, the X-Server doesn’t need configuration, the Nouveau driver should be loaded automatically. If it wasn’t the case, you may want to try to force the X-server to load the Nouveau driver. To do so, please create the file /etc/X11/xorg.conf.d/20-nouveau.conf and write the following:

It is possible to give some options to the Nouveau DDX. Please have a look at our man page (man 4 nouveau). For more information, please follow the instructions found in the distribution-specific section.

Источник

Оцените статью