- NVIDIA (Русский)/Tips and tricks (Русский)
- Contents
- Исправление разрешения терминала
- Использование ТВ-выхода
- X with a TV (DFP) as the only display
- Проверьте источник питания
- Прослушивание ACPI-событий
- Отображение температуры графического процессора в оболочке
- Method 1 — nvidia-settings
- Method 2 — nvidia-smi
- Method 3 — nvclock
- Установка скорости вентилятора при входе
- Переключение драйверов NVIDIA и nouveau
- Как избежать разрывов/тиринга на картах GeForce серий 500/600/700/900
- Ручная конфигурация
- Отключение логотипа при загрузке
- Переопределение обнаружения монитора
- Включение SLI
- Включение разгона
- Настройка статического 2D/3D разгона
- Nvidia-xrun
- Contents
- Installation
- Configuration
- Setting the right bus id
- eGPU setup
- Automatically run window manager
- Use bbswitch to manage nvidia
- Usage
- Start at boot
- Troubleshooting
- NVIDIA GPU fails to switch off or is set to be default
- NVIDIA
- Contents
- Installation
- Unsupported drivers
- Custom kernel
- DRM kernel mode setting
- Early loading
- Hardware accelerated video decoding
- Hardware accelerated video encoding with NVENC
- Xorg configuration
- Automatic configuration
- nvidia-settings
- Manual configuration
- Minimal configuration
- Disabling the logo on startup
- Overriding monitor detection
- Enabling brightness control
- Enabling SLI
- Multiple monitors
- Using nvidia-settings
- ConnectedMonitor
- TwinView
- Mosaic mode
- Wayland
NVIDIA (Русский)/Tips and tricks (Русский)
Смотрите главную статью NVIDIA.
Contents
Исправление разрешения терминала
Переход с драйвера nouveau будет сопровождаться низким разрешением экрана терминала при загрузке. Для загрузчика GRUB, обратитесь к GRUB/Tips and tricks#Setting the framebuffer resolution, чтобы увеличить разрешение.
Использование ТВ-выхода
Хорошая статья об этом есть тут.
X with a TV (DFP) as the only display
Сервер X откатывается к CRT-0, если нет автоматически определённого монитора. Это может стать проблемой при использовании подключения ТВ через DVI как основной монитор, и сервер X был запущен при выключенном ТВ или он был не подключен.
Для принудительного использования DFP драйвером NVIDIA, сохраните копию EDID в файловой системе там, где его сможет прочитать сервер X, вместо чтения EDID с ТВ/DFP.
Для получения EDID запустите nvidia-settings. Появится различная информация в древовидном формате, игнорируя все настройки выберите графический процессор (соответствующее поле должно называться «GPU-0» или быть похожим на него), щелкните по DFP секции (также возможно DFP-0 или что-то похожее), нажмите на кнопку Acquire Edid и сохраните куда-нибудь, например в /etc/X11/dfp0.edid .
Если у вас не подключена мышь и клавиатура, EDID может быть получен из командной строки. Запустите сервер X с нужным логированием для вывода блока EDID:
После окончания иницализации сервера X закройте его, ваш лог файл сохранится в /var/log/Xorg.0.log . Извлеките блок EDID используя nvidia-xconfig:
Отредактируйте xorg.conf добавив в секцию Device строки:
Опция ConnectedMonitor принуждает драйвер распознавать DFP так, как буд-то он подключен. CustomEDID предоставляет данные EDID для устройства и говорит, что при загрузке ТВ/DFP как бы был подключен во время процесса запуска X.
Таким образом, можно автоматически запускать менеджер экрана при загрузке, иметь рабочий и настроенный экран для X до включения питания ТВ.
Если вышеуказанные изменения не работают, в xorg.conf в секции Device вы можете попробовать удалить строку Option «ConnectedMonitor» «DFP» и добавить следующие строки:
Опция драйвера NVIDIA NoDFPNativeResolutionCheck предотвращает отключение всех режимов, которые не подходят к основному разрешению.
Проверьте источник питания
С помощью драйвера NVIDIA можно выяснить текущий источник питания видеокарты. Для этого нужно получить значение параметра ‘GPUPowerSource’ с помощью утилиты nvidia-settings (0 — питание от сети переменного напряжения, 1 — питание от батареи):
Прослушивание ACPI-событий
Драйверы NVIDIA автоматически пытаются подключиться к демону acpid и получать уведомления о ACPI событиях (подключение/отключение источника питания, некоторые горячие клавиши и т.д.). Если соединение завершается неудачей, то X сервер выведет следующее предупреждение:
Вы можете запретить вывод этого сообщения, отключив опцию ConnectToAcpid в вашем конфигурационном файле:
Однако если вы пользователь ноутбука, возможно более грамотным решением проблемы станет установка и запуск acpid демона.
Отображение температуры графического процессора в оболочке
Method 1 — nvidia-settings
Для отображения температуры графического ядра в оболочке используйте nvidia-settings как указано ниже:
Вывод должен быть примерно такой:
Температура графического процессора этой платы 41 °C.
Пример того, как получить значение температуры для использования в утилитах rrdtool или conky и др.:
Method 2 — nvidia-smi
nvidia-smi может читать температуру прямо с графического процессора без использования сервера X. Это важно для небольшой группы пользователей, которые не имеют запущенного сервера X, те, кто используют ОС для серверных приложений. Отображение температуры графического процессора с использованием nvidia-smi:
Пример вывода результата работы программы:
Пример того, как получить значение температуры для использования в утилитах rrdtool или conky и др.:
Method 3 — nvclock
Используйте nvclock AUR , который доступен в AUR.
Могут быть расхождения значений температуры между nvclock и nvidia-settings/nv-control. В соответствии с этим сообщением от автора (thunderbird) nvclock, значения выдаваемые nvclock более точные.
Установка скорости вентилятора при входе
Эта статья или раздел нуждается в переводе
Вы можете выставить скорость вентилятора вашей графической карты с помощью консольного интерфейса nvidia-settings. Сначала убедитесь в том, что в вашем конфигурационом файле Xorg значения опции Coolbits установлены в 4 , 5 или 12 для архитектуры Ферми и выше в секции Device для включения управления скоростью вентилятора.
Поместите следующую строку в ваш файл xinitrc для управления вентилятором при запуске Xorg. Замените n на значение скорости вентилятора нужное вам в процентах.
Также вы можете указать и второй графический процессор, путем увеличения счетчика графического процесора и вентилятора.
Если вы ипользуете менеджер входа такой как GDM или KDM, вы можете создать файл настроек. Создайте
/.config/autostart/nvidia-fan-speed.desktop и вставьте следующий текст.Снова измените n на значение скорости вентилятора нужное вам в процентах.
Переключение драйверов NVIDIA и nouveau
Если вам необходимо переключиться между драйверами, вы можете воспользоваться следующим скриптом (запускайте с правами суперпользователя и пишите yes во всех подтверждениях) :
Как избежать разрывов/тиринга на картах GeForce серий 500/600/700/900
Разрывов можно избежать принудительным включением цепочки полного композитинга, независимо от используего вами композитора. Для проверки работоспособности опции, выполните
Вам будет сообщено, что производительность некоторых приложений OpenGL может быть снижена.
Для постоянного использования сделанных изменений, вам необходимо добавить следующую строку в секцию «Screen» вашего конфигурационного файла Xorg, например /etc/X11/xorg.conf.d/20-nvidia.conf :
Если у вас нет конфигурационного файла Xorg, вы можете создать его для текущей видеокарты исполльзуя nvidia-xconfig (смотрите #Автоматическая настройка [ссылка недействительна: раздел не найден] ) и переместить его из /etc/X11/xorg.conf в более удобное место /etc/X11/xorg.conf.d/20-nvidia.conf .
Ручная конфигурация
Некоторые настройки (которые не могут быть настроены автоматически [ссылка недействительна: раздел не найден] или с помощью GUI) можно выполнить с помощью редактирования конфигурационного файла. Для вступления изменений в силу перезапустите X сервер.
Отключение логотипа при загрузке
Добавьте опцию «NoLogo» внутри секции Device :
Переопределение обнаружения монитора
Опция «ConnectedMonitor» в секции Device позволяет переопределить обнаружение монитора при старте Х сервера, что может сэкономить значительное время при запуске системы. Возможные значения: «CRT» для аналоговых соединений, «DFP» для цифровых соединений и «TV» для телевизоров.
Следующее выражение заставляет драйвер NVIDIA пропустить стартовые проверки и распознать монитор как DFP:
Включение SLI
Выдержка из README драйвера NVIDIA Приложение B: Данная опция контролирует рендеринг SLI в поддерживаемых конфигурациях. Другими словами, в «поддерживаемых конфигурациях» обозначены компьютеры оборудованные материнской платой c сертифицированной поддержкой SLI и 2 или 3 графических процессора GeForce, также с сертифицированной поддержкой SLI. Смотрите Зона SLI (англ.) [устаревшая ссылка 2020-08-04] для получения подробной информации.
Найдем первый PCI Bus ID графического процессора, используя lspci :
Добавим BusID (3 в нашем случае) в секцию Device :
Добавьте желаемое значение режима рендеринга SLI в секцию Screen :
Следущая таблица описывает доступные режимы рендеринга.
Значение | Описание |
---|---|
0, no, off, false, Single | Использовать только один графический процессор для рендеринга. |
1, yes, on, true, Auto | Включить SLI и позволить драйверу автоматически выбрать режим рендеринга. |
AFR | Включить SLI и использовать режим поочередного рендеринга кадров. |
SFR | Включить SLI и использовать режим разделённого рендеринга кадров. |
AA | Включить SLI и использовать сглаживание SLI. Используйте в сочетании с полным сглаживанием сцены, для улучшения качества визуализации. |
Другой вариант, вы можете использовать утилиту nvidia-xconfig для вставки изменений в xorg.conf одной командой:
Для проверки работы режима SLI в консольном режиме:
Включение разгона
Разгон контролируется через опцию Coolbits в секции Device , позволяя использовать различные неподдерживаемые свойства:
Значение Coolbits — сумма его составляющих битов в двоичной системе исчисления. Типы битов:
- 1 (bit 0) — Включает возможность разгона для старых (до архитектуры Fermi) ядер, вкладка Clock Frequencies в nvidia-settings.
- 2 (bit 1) — Когда бит установлен, драйвер «будет пытаться инициализировать режим SLI, когда используются два графических процессора с разным количеством видеопамяти».
- 4 (bit 2) — Включает ручное управление охлаждением графического процессора вкладка Thermal Monitor в nvidia-settings.
- 8 (bit 3) — Включает возможность разгона на вкладке PowerMizer в nvidia-settings. Доступна с версии 337.12 для архитектур Fermi и новее. [2]
- 16 (bit 4) — Включает возможность повышения напряжения через параметры командной строки nvidia-settings. Доступна с версии 337.12 для архитектур Fermi и новее.[3]
Чтобы включить несколько свойств, сложите значения Coolbits. Например, чтобы включить возможности разгона и повышения напряжения для архитектуры Fermi, установите значение Option «Coolbits» «24» .
Документация по Coolbits находится в /usr/share/doc/nvidia/html/xconfigoptions.html . Последния онлайн-версия документации по Coolbits (версия драйвера 355.11) находится тут (англ.).
Настройка статического 2D/3D разгона
Установите следующую строку в секции Device для включения PowerMizer на максимальную производительность (VSync не будет работать без этой строки):
Источник
Nvidia-xrun
Nvidia-xrun is a utility to allow Nvidia optimus enabled laptops run X server with discrete nvidia graphics on demand. This solution offers full GPU utilization, compatibility and better performance than Bumblebee.
X server can only be used with integrated graphics or discrete Nvidia graphics, but not both, so user might want to switch to separate virtual console and start another X server using different graphics from what was used for the first X server.
Contents
Installation
- nvidia — if using nvidia-390xx — you have to edit nvidia-xrun*’s PKGBUILD and remove the nvidia depend
- nvidia-xrun-gitAUR (recommended) or nvidia-xrunAUR (old method, uses bumblebee to switch off the dGPU)
- Any Window manager, since running application directly like so nvidia-xrun is not recommended.
Configuration
Setting the right bus id
Find your display device bus id:
It might return something similar to 01:00.0 . Then create a file (for example /etc/X11/nvidia-xorg.conf.d/30-nvidia.conf ) to set the proper bus id:
Also this way you can adjust some nvidia settings if you encounter issues:
eGPU setup
You can also use this in an eGPU setup. Make sure to load the nvidia-modeset and nvidia-drm modules and add the option Option «AllowExternalGpus» «true» to the «Device» section.
Change the auto-generated configuration to use the internal display on devices with multiple NVIDIA cards:
Remember to set the bus id to the correct graphics card.
Automatically run window manager
For convenience you can create an $XDG_CONFIG_HOME/X11/nvidia-xinitrc file with your favourite window manager. (if using nvidia-xrun $HOME/.nvidia-xinitrc )
With it you do not need to specify the app and can simply execute:
Since this method starts an isolated X server, it is also a good idea to get a copy of all the other configurations files that you have located at /etc/X11/xorg.conf.d/ , except for your prior standard iGPU configurations.
Use bbswitch to manage nvidia
When the nvidia card is not needed, bbswitch can be used to turn it off. The nvidia-xrun script will automatically take care of running a window manager and waking up the nvidia card. To achieve that, you need to:
- Load the bbswitch module on boot
- Disable the nvidia module on boot:
After a reboot, the nvidia card will be off. This can be seen by querying bbswitch ‘s status:
To force the card to turn on/off respectively run:
Usage
Start at boot
Enable nvidia-xrun-pm.service — this shuts down the nvidia card during boot.
Once the system boots, from the virtual console, login to your user, and run nvidia-xrun application .
If above does not work, switch to unused virtual console and try again.
As mentioned before, running apps directly with nvidia-xrun application does not work well, so it is best to create an nvidia-xinitrc file as outlined earlier, and use nvidia-xrun to launch your window manager.
Troubleshooting
NVIDIA GPU fails to switch off or is set to be default
If Nvidia GPU still fails to switch off, or is somehow set to be default whenever you use or not nvidia-xrun , then you might likely need to blacklist specific modules (which were previously blacklisted by Bumblebee). Create this file and restart your system:
Make sure DRM kernel mode setting is disabled see NVIDIA#DRM kernel mode setting
Источник
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.
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 .
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
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.
Источник