Ubuntu nvidia как настроить

Как установить драйверы Nvidia на Ubuntu 20.04

В этой статье описывается, как установить драйверы NVIDIA в Ubuntu 20.04.

Если ваша машина Ubuntu оснащена графическим процессором NVIDIA, вы можете выбрать между драйвером Nouveau с открытым исходным кодом и проприетарными драйверами NVIDIA. По умолчанию Ubuntu использует драйверы Nouveau, которые, как правило, намного медленнее, чем проприетарные драйверы, и не имеют поддержки новейших аппаратных и программных технологий.

Установка драйверов NVIDIA на Ubuntu — простая задача, которую можно выполнить менее чем за минуту. Ubuntu включает инструмент, который может определять модель видеокарты и устанавливать соответствующие драйверы NVIDIA. Кроме того, вы можете загрузить и установить драйверы с сайта NVIDIA.

Установка драйверов NVIDIA с помощью графического интерфейса

Это самый простой и рекомендуемый способ установки драйверов NVIDIA в настольных системах Ubuntu.

На экране «Действия» найдите «драйвер» и щелкните значок «Дополнительные драйверы».

Откроется окно «Программное обеспечение и обновления», в котором вы увидите все доступные драйверы для вашей видеокарты.

В зависимости от установленной карты вам будет представлен список из одного или нескольких драйверов NVIDIA.

Выберите дайвер NVIDIA, который хотите установить, и нажмите кнопку «Применить изменения».

Процесс установки может занять несколько минут.

Новый драйвер NVIDIA будет активен после загрузки системы. Если вы хотите просмотреть или изменить настройки драйвера, запустите утилиту nvidia-settings :

Позже, если вы захотите обновить или изменить драйвер, просто повторите те же шаги.

Установка драйверов NVIDIA из командной строки

Если вы предпочитаете интерфейс командной строки, вы можете использовать инструмент ubuntu-drivers .

Откройте свой терминал ( Ctrl+Alt+T ) и выполните следующую команду, чтобы получить информацию о вашей видеокарте и доступных драйверах:

Приведенный ниже вывод показывает, что в этой системе установлена «GeForce GTX 1650», а рекомендуемый драйвер — «nvidia-driver-440». Вы можете увидеть другой результат в зависимости от вашей системы.

Обычно лучше всего установить рекомендуемый драйвер. Для этого используйте менеджер пакетов apt :

После завершения установки перезагрузите систему:

Когда система вернется, вы можете просмотреть состояние графической карты с помощью инструмента мониторинга nvidia-smi :

Команда отобразит версию используемого драйвера и другую информацию о карте NVIDIA:

Установка последних драйверов NVIDIA

Большинству пользователей следует придерживаться стабильных драйверов NVIDIA, которые доступны в репозиториях Ubuntu по умолчанию. Если вы хотите оставаться на связи, вы можете установить последние версии драйверов либо с сайта NVIDIA, либо из PPA «Драйверы графики» .

Мы будем использовать метод PPA, так как это проще устанавливать и обновлять драйверы.

Используйте инструмент ubuntu-drivers для просмотра доступных драйверов:

Установите желаемый драйвер:

Перезагрузите систему, чтобы активировать новый драйвер.

Выводы

Мы показали вам, как установить драйвер NVIDIA в Ubuntu 20.04. Если вы столкнулись с какой-либо проблемой, проверьте страницу Ubuntu Nvidia .

Если у вас две графические карты, и вы хотите переключаться между NVIDIA и интегрированной картой, проверьте расширение System76 Power .

Источник

Включение гибридной графики в Ubuntu на ноутбуках Nvidia + Intel (OpenGL, Vulkan)

Введение

Это простая инструкция как включить гибридную графику intel-nvidia на ноутбуке. Чтобы определенные приложения запускались на дискретном чипе, а другие на встроенном. На свое удивление в интернете не нашел простую инструкцию того, как запускать определенные приложения, используя дискретную графику. Так что напишу так просто, на сколько считаю нужным

У меня система KDE Neon 5.21 — по большому счету — Ubuntu LTS с окружением рабочего стола KDE Plasma 5.21, видеочип GeForce MX150

1. Устанавливаем драйвер

a) Если у вас система на Qt (Как правило окружение KDE или LXQt), то с помощью данной команды через терминал загрузим программу для установки драйверов:

Если у вас система на GTK то с помощью это команды:

Хотя разницы принципиальной нет

b) Затем запускаем ее с правами root

Можно так же добавить ярлык для запуска в меню приложений

Инструкция для KDE

/.local/share/applications/ создадим файл software properties qt.desktop с таким содержанием

И файл software properties qt.sh в той же папке:

После перезагрузки ярлык появится в меню

Но это далеко не обязательно, вполне достаточно запустить из консоли для наших целей настройки гибридной графики

c) Переходим на последнюю вкладку Additional drivers и устанавливаем нужный драйвер. Я выбрал самой последней версии, который не tested и не server

d) После установки перезагружаем устройство

2. Настраиваем видеокарту

a) Загружаем следующую программу:

b) Переходим в PRIME Profiles Здесь мы видим три пункта:

NVIDIA (Performance Mode) — работать только на дискретной графике. Сильно потребляет батарею в несложных задачах, а так же ноутбук начинает греться. Зато система работает намного быстрее, но это того не стоит. У меня после установки драйвера этот пункт включился автоматически

Читайте также:  Пионер не работает рса

NVIDIA On-Demand — некоторые приложения будут использовать дискретную графику nvidia, но по-умолчанию встроенная intel. Как запустить конкретное приложение с дискретной графикой напишу дальше

NVIDIA (Power Saving Mode) — отключение дискретной графики

Выбираем второй вариант — NVIDIA On-Demand , и перезагружаем систему

3. Запуск приложения с использованием дискретной графики

Это то, что сложнее всего гуглилось.

Для запуска приложения с использованием графики nvidia нужно задать для OpenGL две переменные среды:

для Vulkan только:

Делать это надо перед командой для запуска приложения. Например, нам нужно запустить из терминала приложение program с использованием дискретной графики. Нужно вызвать его так:

Соответственно, если у приложения есть ярлык (.desktop) в меню приложений, то надо изменить команду запуска в ярлыке. В KDE Plasma нужно нажать на него ПКМ, открыть свойства (или «изменить приложение. «), перейти во вкладку «приложение» и перед командой приписать данную приставку. В других средах похожего стола примерно так же

Пример: ярлык игры Wolfenstein — Blade of Agony

Можно сделать это же действие через текстовый редактор. Открываем ярлык, находим Exec= , и приписываем перед коммандой данную приставку __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia

Заключение

Данный метод, как я понял, точно работают для программ, использующих библиотеки OpenGL и Vulkan. У меня, к сожалению, не получилось запустить так Windows приложение через Wine, которое использует DirectX, но это уже совсем другая история. (OpenGL приложения под Wine работают)

Источник

Ubuntu nvidia как настроить

This edition of Quickstart guide describes the installation process of NVIDIAВ® Drivers for supported Linux distributions.

Introduction

The purpose of this document is to provide some quick start notes for installing NVIDIA drivers on Linux distributions for servers. For more comprehensive information on installing CUDA Toolkit and drivers on various Linux distributions (for both workstation and server variants), refer to the CUDA Installation Guide for Linux.

1.1. Pre-Installation Requirements

For more detailed steps on completing each of these pre-installation steps, refer to the pre-installation actions in the CUDA Installation Guide for Linux.

1.2. Installer Formats

2. Runfile Installers

NVIDIA drivers are available as .run installer packages for use with Linux distributions from the NVIDIA driver downloads site. Select the .run package for your GPU product.

This page also includes links to all the current and previous driver releases: https://www.nvidia.com/en-us/drivers/unix.

The .run can also be downloaded using wget or curl as shown in the example below:

Once the .run installer has been downloaded, the NVIDIA driver can be installed:

Follow the prompts on the screen during the installation. For more advanced options on using the .run installer, see the —help option or refer to the README.

3. Package Managers

The Package Manager installation interfaces with your system’s package management system. When using RPM or Deb, the downloaded package is a repository package. Such a package only informs the package manager where to find the actual installation packages, but will not install them.

3.1. Ubuntu LTS

This section includes instructions for installing the NVIDIA driver on Ubuntu 16.04 LTS and Ubuntu 18.04 LTS distributions using the package manager.

    The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed.

The kernel headers and development packages for the currently running kernel can be installed with:

Ensure packages on the CUDA network repository have priority over the Canonical repository.

Install the CUDA repository public GPG key. Note that on Ubuntu 16.04, replace https with http in the command below.

Setup the CUDA network repository.

Update the APT repository cache and install the driver using the cuda-drivers meta-package. Use the —no-install-recommends option for a lean driver install without any dependencies on X packages. This is particularly useful for headless installations on cloud instances.

  • Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.
  • 3.2. Red Hat Enterprise Linux 8

    This section includes instructions for installing the NVIDIA driver on RHEL 8 using the package manager.

      If not done already (for example when using RHEL on cloud instances), register the system using subscription-manager . For more information, refer to this KB article on the Red Hat Customer Portal.

    Satisfy the external dependency on EPEL for DKMS and enable any optional repos for RHEL 8 only.

    Install the CUDA repository public GPG key.

    Setup the CUDA network repository.

    The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed.

    Читайте также:  Счетчик sunstrike инвокер не работает

    For RHEL 8, ensure that the system has the correct Linux kernel sources from the Red Hat repositories:

    The choice of the driver package depends on the stream and profile to be used as shown below:

    stream depends on the driver branch and type (e.g. precompiled). To install the latest driver, choose the latest-dkms driver stream. For more information on the supported streams, refer to the support matrix.

    profile by default is «default» and does not need to be specified. Supported profiles can be chosen based on the use-case:

    Table 1. List of driver profiles available
    Stream Profile Use-case
    Default /default Installs all the driver packages in a stream.
    Kickstart /ks Performs unattended Linux OS installation using a config file.
    NVSwitch Fabric /fm Installs all the driver packages and components required for bootstrapping an NVSwitch system.

    Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.

    Optionally, if tearing down a cloud instance with RHEL, remove and unregister entitlements from Red Hat if the instance is no longer required.

    3.3. CentOS 8

    This section includes instructions for installing the NVIDIA driver on CentOS 8 using the package manager.

      In some cases, you may need to install some additional dependencies that are required for installing the NVIDIA drivers.

    Enable the PowerTools repo and set up the external dependency on EPEL for DKMS.

    Install the CUDA repository public GPG key.

    Setup the CUDA network repository.

    The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed.

    For CentOS 8, ensure that the system has the correct Linux kernel sources from the CentOS repositories:

    Note that in some cases, you may have to update the running kernel as a pre-requisite:

    The choice of the driver package depends on the stream and profile to be used as shown below:

    stream depends on the driver branch and type (e.g. precompiled). To install the latest driver, choose the latest-dkms driver stream. For more information on the supported streams, refer to the support matrix.

    profile by default is «default» and does not need to be specified. Supported profiles can be chosen based on the use-case:

    Table 2. List of driver profiles available
    Stream Profile Use-case
    Default /default Installs all the driver packages in a stream.
    Kickstart /ks Performs unattended Linux OS installation using a config file.
    NVSwitch Fabric /fm Installs all the driver packages and components required for bootstrapping an NVSwitch system.

    Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.

    3.4. Red Hat Enterprise Linux 7

    This section includes instructions for installing the NVIDIA driver on RHEL 7 using the package manager.

      If not done already (for example when using RHEL on cloud instances), register the system using subscription-manager . For more information, refer to this KB article on the Red Hat Customer Portal.

    Satisfy the external dependency on EPEL for DKMS and enable any optional repos for RHEL 7.

    Install the CUDA repository public GPG key.

    Setup the CUDA network repository.

    The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed.

    For RHEL 7, ensure that the system has the correct Linux kernel sources from the Red Hat repositories:

    Update the repository cache and install the driver using the nvidia-driver-latest-dkms meta-package.

    Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.

    Optionally, if tearing down a cloud instance with RHEL, remove and unregister entitlements from Red Hat if the instance is no longer required.

    3.5. CentOS 7

    This section includes instructions for installing the NVIDIA driver on CentOS 7 using the package manager.

      In some cases, you may need to install some additional dependencies that are required for installing the NVIDIA drivers.

    Satisfy the external dependency on EPEL for DKMS.

    Install the CUDA repository public GPG key.

    Setup the CUDA network repository.

    The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed.

    For CentOS 7, ensure that the system has the correct Linux kernel sources from the CentOS repositories:

    Update the repository cache and install the driver using the nvidia-driver-latest-dkms meta-package.

    Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.

    3.6. SUSE Linux Enterprise Server 15

    This section includes instructions for installing the NVIDIA driver on SLES 15 using the package manager.

      Install the CUDA repository public GPG key.

    Setup the CUDA network repository.

    If not already done, activate the SUSE Package Hub with SUSEConnect . On OpenSUSE systems, this step can be skipped.

    Update the repository cache.

    The NVIDIA driver requires that the kernel headers and development packages for the running version of the kernel be installed at the time of the driver installation, as well whenever the driver is rebuilt. For example, if your system is running kernel version 4.4.0, the 4.4.0 kernel headers and development packages must also be installed.

    For SUSE, ensure that the system has the correct Linux kernel sources from the SUSE repositories.

    Use the output of the uname command to determine the running kernel’s version and variant:

    Proceed to install the driver using the cuda-drivers meta-package.

    On SUSE systems, add the user to the video group.

    A reboot of the system may be required to verify that the NVIDIA driver modules are loaded and the devices visible under /dev .

    Follow the post-installation steps in the CUDA Installation Guide for Linux to setup environment variables, NVIDIA persistence daemon (recommended) and to verify the successful installation of the driver.

    Notices

    Notice

    THE INFORMATION IN THIS GUIDE AND ALL OTHER INFORMATION CONTAINED IN NVIDIA DOCUMENTATION REFERENCED IN THIS GUIDE IS PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO THE INFORMATION FOR THE PRODUCT, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Notwithstanding any damages that customer might incur for any reason whatsoever, NVIDIA’s aggregate and cumulative liability towards customer for the product described in this guide shall be limited in accordance with the NVIDIA terms and conditions of sale for the product.

    THE NVIDIA PRODUCT DESCRIBED IN THIS GUIDE IS NOT FAULT TOLERANT AND IS NOT DESIGNED, MANUFACTURED OR INTENDED FOR USE IN CONNECTION WITH THE DESIGN, CONSTRUCTION, MAINTENANCE, AND/OR OPERATION OF ANY SYSTEM WHERE THE USE OR A FAILURE OF SUCH SYSTEM COULD RESULT IN A SITUATION THAT THREATENS THE SAFETY OF HUMAN LIFE OR SEVERE PHYSICAL HARM OR PROPERTY DAMAGE (INCLUDING, FOR EXAMPLE, USE IN CONNECTION WITH ANY NUCLEAR, AVIONICS, LIFE SUPPORT OR OTHER LIFE CRITICAL APPLICATION). NVIDIA EXPRESSLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR SUCH HIGH RISK USES. NVIDIA SHALL NOT BE LIABLE TO CUSTOMER OR ANY THIRD PARTY, IN WHOLE OR IN PART, FOR ANY CLAIMS OR DAMAGES ARISING FROM SUCH HIGH RISK USES.

    NVIDIA makes no representation or warranty that the product described in this guide will be suitable for any specified use without further testing or modification. Testing of all parameters of each product is not necessarily performed by NVIDIA. It is customer’s sole responsibility to ensure the product is suitable and fit for the application planned by customer and to do the necessary testing for the application in order to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect the quality and reliability of the NVIDIA product and may result in additional or different conditions and/or requirements beyond those contained in this guide. NVIDIA does not accept any liability related to any default, damage, costs or problem which may be based on or attributable to: (i) the use of the NVIDIA product in any manner that is contrary to this guide, or (ii) customer product designs.

    Other than the right for customer to use the information in this guide with the product, no other license, either expressed or implied, is hereby granted by NVIDIA under this guide. Reproduction of information in this guide is permissible only if reproduction is approved by NVIDIA in writing, is reproduced without alteration, and is accompanied by all associated conditions, limitations, and notices.

    Trademarks

    NVIDIA and the NVIDIA logo are trademarks and/or registered trademarks of NVIDIA Corporation in the Unites States and other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

    В© 2020 NVIDIA Corporation. All rights reserved.

    Источник

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