Arch linux обновление драйверов

NVIDIA (Русский)

Данная статья описывает процесс установки и настройки проприетарного драйвера графических карт NVIDIA. Для получения информации о драйверах с открытым исходным кодом обратитесь к статье Nouveau (Русский). Также есть отдельная статья для обладателей ноутбуков с гибридной графикой Intel и NVIDIA, см. NVIDIA Optimus (Русский).

Contents

Установка

Данные инструкции предназначены для предоставляемых в дистрибутиве пакетов ядра linux и linux-lts . Пользователи других пакетов ядра могут сразу перейти к следующему подразделу.

1. Если вы не знаете модель установленной графической карты, воспользуйтесь следующей командой:

2. Определите версию драйвера, необходимую для вашей видеокарты:

  • Используя поиск по кодовому имени (например, NV50, NVC0 и т.д.) на странице Nouveau с кодовыми именами
  • Просмотрев модели в списке устаревших графических карт NVIDIA: если вашей карты нет в списке, используйте последний доступный драйвер
  • Посетив страницу загрузки драйверов NVIDIA

3. Установите подходящий драйвер для своей карты:

  • Для карт GeForce 630-900, 10-20 и Quadro/Tesla/Tegra серии K и новее [семейства NVE0, NV110 и NV130 примерно из 2010-2020], установите пакет nvidia или nvidia-lts .
  • Если эти пакеты не работают, в nvidia-betaAUR может быть более новый драйвер с поддержкой вашего оборудования.
  • Также существует nvidia-llb-dkmsAUR , собранный из ветки NVIDIA с длительным сроком поддержки.
  • Для видеокарт серии GeForce 400/500/600 [NVCx и NVDx] примерно из 2010-2011, установите пакет nvidia-390xx-dkmsAUR
  • Для установки драйвера более старых моделей(выпущеных в 2010 или раньше), обратитесь к разделу #Не поддерживаемые драйвера.

4. Для поддержки 32-разрядных приложений также необходимо установить соответствующий пакет nvidia lib32 из репозитория multilib (например, lib32-nvidia-utils или lib32-nvidia-390xx-utils AUR ).

5. Перезагрузите систему. Пакет nvidia содержит файл, который добавляет модуль nouveau в чёрный список, поэтому перезагрузка необходима.

После того, как драйвер был установлен, можно перейти к разделу #Настройка.

Не поддерживаемые драйвера

Если у вас установлена видеокарта серии GeForce 300 или старее (выпущенная в 2010 или раньше), Nvidia больше не поддерживает драйвера для данной карты. Это означает, что указанные драйвера не поддерживают текущую версию Xorg. В таком случае проще использовать драйвер Nouveau, который поддерживает старые видеокарты с текущей версией Xorg.

Однако устаревшие драйверы Nvidia ещё доступны и могут предоставлять лучшую стабильность или 3D-производительность, если вы готовы откатить версию Xorg (Русский):

  • Для карт серий GeForce 8/9, ION и 100-300 [NV5x, NV8x, NV9x and NVAx], установите пакет nvidia-340xx-dkmsAUR . Последняя поддерживаемая версия Xorg 1.20.
  • Карты GeForce 7 series и более старые [NV6x, NV4x и ниже] не имеют пакетов для Arch Linux.

Собственное ядро

Если вы используете собственной ядро, то сборка модулей Nvidia может быть автоматизированна при помощи DKMS.

Установите пакет nvidia-dkms (или специфичную ветку, например, nvidia-340xx-dkms AUR ). Модуль будет пересобираться после каждого обновления драйвера или ядра благодаря DKMS Pacman Hook.

DRM kernel mode setting

nvidia 364.16 добавляет поддержку DRM (Direct Rendering Manager) Kernel mode setting. Для активации добавьте nvidia-drm.modeset=1 в параметры ядра, а также добавьте nvidia , nvidia_modeset , nvidia_uvm и nvidia_drm в initramfs в соответствии с mkinitcpio#MODULES.

Не забывайте запускать mkinitcpio каждый раз после обновления драйвера. См. раздел #Pacman hook для автоматизации данных действий.

Pacman hook

Для того, чтобы не забывать обновлять initramfs после обновления nvidia, вы можете использовать pacman hook следующим образом:

Убедитесь, что Target это тот пакет который вы установили в шагах выше (т.е. nvidia , nvidia-dkms , nvidia-lts or nvidia-ck-something ).

Так же измените Target=linux если используется другое ядро.

Аппаратное ускорение видео

NVDEC and VDPAU

Ускоренное декодирование видео с помощью VDPAU поддерживается на картах GeForce 8 series и более поздних версиях. Ускоренное декодирование видео с помощью NVDEC поддерживается на картах Fermi и более новых. Дополнительная информация Hardware video acceleration (Русский).

Ускоренное декодирование видео MPEG-1 и MPEG-2 с помощью XvMC поддерживается на серии видеокарт GeForce4, GeForce 5 FX, GeForce 6 и GeForce 7. Смотрите XvMC.

Настройка

Эта статья или раздел нуждается в переводе

Вполне возможно, что после установки драйвера, вам будет не нужно создавать конфигурационные файлы для сервера Xorg. Вы можете запустить тест для проверки корректной работы сервера Xorg без файла конфигурации. Однако, может потребоваться создание конфигурационного файла (предпочтительно /etc/X11/xorg.conf.d/20-nvidia.conf поверх /etc/X11/xorg.conf ) для дополнительной настройки. Это конфигурация может быть сгенерирована инструментом конфигурации NVIDIA Xorg или можно создать её вручную. Если создается вручную, это может быть минимальной конфигурацией (в том смысле, что она будет содержать базовые настройки сервера Xorg), либо она может включать в себя ряд настроек, которые могут обоходить автоматически обнаруженные настройки Xorg или предварительно заданные настройки.

Минимальная настройка

Базовый блок конфигурации в 20-nvidia.conf (или устаревший блок в xorg.conf ) должен выглядеть так:

Автоматическая настройка

Пакет NVIDIA, включает в себя автоматический инструмент для создания файла конфигурации сервера Xorg ( xorg.conf ) и может быть запущен путем выполнения:

Данная команда автоматически обнаруживает и создает (или изменяет, если было уже создано) конфигурацию /etc/X11/xorg.conf , в соответствии с текущим аппаратным обеспечением.

Читайте также:  Command alias command linux

Если есть строка с указанием загрузки DRI, убедитесь, что она закомментирована:

Проверьте ещё раз /etc/X11/xorg.conf , убедитесь, что глубина по умолчанию, горизонтальная синхронизация, частота кадров и разрешение допустимы.

NVIDIA Settings

Пакет nvidia-settings позволяет редактировать большинство опций через графическую оболочку. Запустите nvidia-settings c правами суперпользователя, отредактируйте, и сохраните в /etc/X11/xorg.conf.d/ .

Также, вы можете запустить настройки от обычного пользователя и сохранить в

/.nvidia-settings-rc . Затем, вы сможете загружать настройки используя команду $ nvidia-settings —load-config-only (для примера, в ваш файл xinitrc).

Несколько мониторов

Использование NVIDIA Settings

Используйте nvidia-settings для настройки мультимониторной конфигурации.

ConnectedMonitor

Если драйвер не определил второй монитор, вы можете принудительно указать его с помощью опции ConnectedMonitor

Дублирование устройств с опцией Screen описывает использование сервером Xorg двух мониторов на одной карте без технологии TwinView . Учтите, что nvidia-settings будет вырезать любое упоминание опции ConnectedMonitor .

TwinView

Вы хотите только один большой экран вместо двух. Установите значение опции TwinView в 1 . Эта опция должна использоваться если вы хотите композитинга. Технология TwinView работает только на базе одной карты, когда все мониторы подключены к одной карте.

Если вы имеете несколько карт, которые совместимы с технологией SLI, вы можете использовать несколько мониторов присоединённых к разным картам (пример: две карты в режиме SLI с подключением монитора на каждой карте). Опция «MetaModes» совместно с режимом SLI Mosaic позволяет это. Ниже указана конфигурация, которая работает для вышеупомянутого примера и безупречно запускает GNOME.

Ручная конфигурация из командной строки с использованием xrandr

Эта статья или раздел нуждается в переводе

Если вышеуказанные решения не сработали, вы можете использовать автозапуск вашего менеджера окон совместно с пакетом xorg-xrandr .

Некоторые примеры работы с командой xrandr :

  • —output используется для указания «монитора», к которому применяются опции.
  • DVI-I-1 имя второго монитора.
  • —pos позиция второго монитора относительно первого.
  • —mode разрешение второго монитора.
  • —rate частота обновления (в Гц).
Vsync при использовании TwinView

Если вы используете TwinView и вертикальную синхронизацию (опция «Sync to VBlank» в nvidia-settings), вы заметите, что только один экран корректно использует синхронизацию, если у вас два идентичных монитора. Несмотря на то, что nvidia-settings имеет необходимую опцию для выбора, какой именно экран синхронизировать (опция «Sync to this display device»), это не всегда работает. Решением будет добавить следующие переменные окружения при запуске, например в /etc/profile :

Вы можете изменить DFP-0 на ваш используемый монитор ( DFP-0 это DVI порт, а CRT-0 — VGA порт). Идентификатор для вашего монитора можно найти с помощью nvidia-settings в секции «X Server XVideoSettings».

Gaming using TwinView

Если вы захотите сыграть в полноэкранные игры при использовании TwinView, вероятно вы заметите, что игры распознают два экрана как один большой экран. Хотя это технически правильно (виртуальный экран X в действительности соответствует размеру ваших экранов вместе), вы, вероятно, не захотите так играть.

Чтобы исправить это для SDL, попробуйте:

Для OpenGL, добавьте Metamodes в свой xorg.conf в секции Device и перезапустите X:

Еще один метод, который может работать самостоятельно, или в сочетании с упомянутыми выше: Запуск игр в отдельном X сервере [ссылка недействительна: раздел не найден] .

Режим Mosaic

Режим Mosaic единственный способ использовать более чем два монитора через несколько видеокарт с использованием композитинга. Ваш оконный менджер может распознать, а может и не распознать различия между мониторами.

Base Mosaic

Режим Base Mosaic работает с картами Geforce 8000 series или выше. Его нельзя включить через графический интерфейс nvidia-setting. Вы должны использовать команду nvidia-xconfig , либо отредактировать xorg.conf самостоятельно. Опция Metamodes должна быть указана. Следующий пример для четырёх DFP мониторов в конфигурации 2х2, каждый запущен в разрешении 1920×1024, по два подключенных DFP монитора на две карты:

SLI Mosaic

Если вы имеете конфигурацию SLI и все графические ускорители серии Quadro FX 5800, Quadro Fermi или новее, тогда вы можете использовать режим SLI Mosaic. он можеть быть включен из графического интерфейса nvidia-settings или из командной строки:

Драйвер Persistence

Начиная с версии 319, Nvidia изменила порядок работы драйвера persistence, теперь он запускается как демон при загрузке. Смотрите раздел драйвер Persistence (англ.) документации Nvidia, для получения детальной информации.

Источник

NVIDIA

This article covers the proprietary NVIDIA graphics card driver. For the open-source driver, see Nouveau. If you have a laptop with hybrid Intel/NVIDIA graphics, see NVIDIA Optimus instead.

Contents

Installation

These instructions are for those using the stock linux or linux-lts packages. For custom kernel setup, skip to the next subsection.

1. If you do not know what graphics card you have, find out by issuing:

2. Determine the necessary driver version for your card by:

  • Finding the code name (e.g. NV50, NVC0, etc.) on Nouveau wiki’s code names page or [1].
  • Looking up the name in NVIDIA’s legacy card list: if your card is not there you can use the latest driver.
  • Visiting NVIDIA’s driver download site.

3. Install the appropriate driver for your card:

  • For GeForce 630-900, 10-20, and Quadro/Tesla/Tegra K-series cards and newer [NVE0, NV110 and newer family cards from around 2010 and later], install the nvidia package (for use with the linux kernel) or nvidia-lts (for use with the linux-lts kernel) package.
  • If these packages do not work, nvidia-betaAUR may have a newer driver version that offers support.
  • For GeForce 400/500/600 series cards [NVCx and NVDx] from around 2010-2011, install the nvidia-390xx-dkmsAUR package.
  • For even older cards (released in 2010 or earlier), have a look at #Unsupported drivers.
Читайте также:  Linux рабочая станция без сохранения файлов

4. For 32-bit application support, also install the corresponding lib32 nvidia package from the multilib repository (e.g. lib32-nvidia-utils ).

5. Reboot. The nvidia package contains a file which blacklists the nouveau module, so rebooting is necessary.

Once the driver has been installed, continue to #Xorg configuration.

Unsupported drivers

If you have a GeForce 300 series card or older (released in 2010 or earlier), Nvidia no longer supports drivers for your card. This means that these drivers do not support the current Xorg version. It thus might be easier if you use the Nouveau driver, which supports the old cards with the current Xorg.

However, Nvidia’s legacy drivers are still available and might provide better 3D performance/stability.

  • For GeForce 8/9, ION and 100-300 series cards [NV5x, NV8x, NV9x and NVAx], install the nvidia-340xx-dkmsAUR package.
  • GeForce 7 series cards and older [NV6x, NV4x and lower] do not have a driver packaged for Arch Linux.

Custom kernel

If you are using a custom kernel, compilation of the Nvidia kernel modules can be automated with DKMS.

Install the nvidia-dkms package (or a specific branch). The Nvidia module will be rebuilt after every Nvidia or kernel update thanks to the DKMS pacman hook.

DRM kernel mode setting

Early loading

For basic functionality, just adding the kernel parameter should suffice. If you want to ensure it’s loaded at the earliest possible occasion, or are noticing startup issues (such as the nvidia kernel module being loaded after the display manager) you can add nvidia , nvidia_modeset , nvidia_uvm and nvidia_drm to the initramfs according to Mkinitcpio#MODULES.

If added to the initramfs, do not forget to run mkinitcpio every time there is a nvidia driver update. See #Pacman hook to automate these steps.

Pacman hook

To avoid the possibility of forgetting to update initramfs after an NVIDIA driver upgrade, you may want to use a pacman hook:

Make sure the Target package set in this hook is the one you have installed in steps above (e.g. nvidia , nvidia-dkms , nvidia-lts or nvidia-ck-something ).

Hardware accelerated video decoding

Accelerated video decoding with VDPAU is supported on GeForce 8 series cards and newer. Accelerated video decoding with NVDEC is supported on Fermi (

400 series) cards and newer. See Hardware video acceleration for details.

Hardware accelerated video encoding with NVENC

NVENC requires the nvidia_uvm module and the creation of related device nodes under /dev . Manually loading the nvidia_uvm module will not create the device nodes, but invoking the nvidia-modprobe utility will. Create /etc/udev/rules.d/70-nvidia.rules :

Xorg configuration

The proprietary NVIDIA graphics card driver does not need any Xorg server configuration file. You can start X to see if the Xorg server will function correctly without a configuration file. However, it may be required to create a configuration file (prefer /etc/X11/xorg.conf.d/20-nvidia.conf over /etc/X11/xorg.conf ) in order to adjust various settings. This configuration can be generated by the NVIDIA Xorg configuration tool, or it can be created manually. If created manually, it can be a minimal configuration (in the sense that it will only pass the basic options to the Xorg server), or it can include a number of settings that can bypass Xorg’s auto-discovered or pre-configured options.

Automatic configuration

The NVIDIA package includes an automatic configuration tool to create an Xorg server configuration file ( xorg.conf ) and can be run by:

This command will auto-detect and create (or edit, if already present) the /etc/X11/xorg.conf configuration according to present hardware.

If there are instances of DRI, ensure they are commented out:

Double check your /etc/X11/xorg.conf to make sure your default depth, horizontal sync, vertical refresh, and resolutions are acceptable.

nvidia-settings

The nvidia-settings tool lets you configure many options using either CLI or GUI. Running nvidia-settings without any options launches the GUI, for CLI options see nvidia-settings(1) .

You can run the CLI/GUI as a non-root user and save the settings to

/.nvidia-settings-rc or save it as xorg.conf by using the option Save to X configuration File for a multi-user environment.

/.nvidia-settings-rc for the current user:

See Autostarting to start this command on every boot.

/.nvidia-settings-rc and/or Xorg file(s) should recover normal startup.

Manual configuration

Several tweaks (which cannot be enabled automatically or with nvidia-settings) can be performed by editing your configuration file. The Xorg server will need to be restarted before any changes are applied.

Minimal configuration

A basic configuration block in 20-nvidia.conf (or deprecated in xorg.conf ) would look like this:

Disabling the logo on startup

Add the «NoLogo» option under section Device :

Overriding monitor detection

The «ConnectedMonitor» option under section Device allows to override monitor detection when X server starts, which may save a significant amount of time at start up. The available options are: «CRT» for analog connections, «DFP» for digital monitors and «TV» for televisions.

The following statement forces the NVIDIA driver to bypass startup checks and recognize the monitor as DFP:

Enabling brightness control

This article or section is out of date.

Add to kernel paremeters:

Alternatively, add the following under section Device :

If brightness control still does not work with this option, try installing nvidia-bl-dkms AUR .

Читайте также:  The following packages have been kept back linux image amd64

Enabling SLI

Taken from the NVIDIA driver’s README Appendix B: This option controls the configuration of SLI rendering in supported configurations. A «supported configuration» is a computer equipped with an SLI-Certified Motherboard and 2 or 3 SLI-Certified GeForce GPUs.

Find the first GPU’s PCI Bus ID using lspci :

Add the BusID (3 in the previous example) under section Device :

Add the desired SLI rendering mode value under section Screen :

The following table presents the available rendering modes.

Value Behavior
0, no, off, false, Single Use only a single GPU when rendering.
1, yes, on, true, Auto Enable SLI and allow the driver to automatically select the appropriate rendering mode.
AFR Enable SLI and use the alternate frame rendering mode.
SFR Enable SLI and use the split frame rendering mode.
AA Enable SLI and use SLI antialiasing. Use this in conjunction with full scene antialiasing to improve visual quality.

Alternatively, you can use the nvidia-xconfig utility to insert these changes into xorg.conf with a single command:

To verify that SLI mode is enabled from a shell:

If this configuration does not work, you may need to use the PCI Bus ID provided by nvidia-settings ,

and comment out the PrimaryGPU option in your xorg.d configuration,

Using this configuration may also solve any graphical boot issues.

Multiple monitors

See Multihead for more general information.

Using nvidia-settings

The nvidia-settings tool can configure multiple monitors.

For CLI configuration, first get the CurrentMetaMode by running:

Save everything after the :: to the end of the attribute (in this case: DPY-1: 2880×1620 @2880×1620 +0+0 ) and use to reconfigure your displays with nvidia-settings —assign «CurrentMetaMode=your_meta_mode» .

ConnectedMonitor

If the driver does not properly detect a second monitor, you can force it to do so with ConnectedMonitor.

The duplicated device with Screen is how you get X to use two monitors on one card without TwinView . Note that nvidia-settings will strip out any ConnectedMonitor options you have added.

TwinView

You want only one big screen instead of two. Set the TwinView argument to 1 . This option should be used if you desire compositing. TwinView only works on a per card basis, when all participating monitors are connected to the same card.

If you have multiple cards that are SLI capable, it is possible to run more than one monitor attached to separate cards (for example: two cards in SLI with one monitor attached to each). The «MetaModes» option in conjunction with SLI Mosaic mode enables this. Below is a configuration which works for the aforementioned example and runs GNOME flawlessly.

Vertical sync using TwinView

If you are using TwinView and vertical sync (the «Sync to VBlank» option in nvidia-settings), you will notice that only one screen is being properly synced, unless you have two identical monitors. Although nvidia-settings does offer an option to change which screen is being synced (the «Sync to this display device» option), this does not always work. A solution is to add the following environment variables at startup, for example append in /etc/profile :

You can change DFP-0 with your preferred screen ( DFP-0 is the DVI port and CRT-0 is the VGA port). You can find the identifier for your display from nvidia-settings in the «X Server XVideoSettings» section.

Gaming using TwinView

In case you want to play fullscreen games when using TwinView, you will notice that games recognize the two screens as being one big screen. While this is technically correct (the virtual X screen really is the size of your screens combined), you probably do not want to play on both screens at the same time.

To correct this behavior for SDL, try:

For OpenGL, add the appropriate Metamodes to your xorg.conf in section Device and restart X:

Another method that may either work alone or in conjunction with those mentioned above is starting games in a separate X server.

Mosaic mode

Mosaic mode is the only way to use more than 2 monitors across multiple graphics cards with compositing. Your window manager may or may not recognize the distinction between each monitor. Mosaic mode requires a valid SLI configuration. Even if using Base mode without SLI, the GPUs must still be SLI capable/compatible.

Base Mosaic

Base Mosaic mode works on any set of Geforce 8000 series or higher GPUs. It cannot be enabled from within the nvidia-setting GUI. You must either use the nvidia-xconfig command line program or edit xorg.conf by hand. Metamodes must be specified. The following is an example for four DFPs in a 2×2 configuration, each running at 1920×1024, with two DFPs connected to two cards:

SLI Mosaic

If you have an SLI configuration and each GPU is a Quadro FX 5800, Quadro Fermi or newer then you can use SLI Mosaic mode. It can be enabled from within the nvidia-settings GUI or from the command line with:

Wayland

For now only a few Wayland compositors support NVIDIA’s buffer API, see Wayland#Requirements for more information.

For further configuration options, take a look at the wiki pages or documentation of the respective compositor.

Regarding XWayland take a look at Wayland#XWayland.

Источник

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