[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Це стара версія документу!


TRANSLATING…

Пропрієтарні графічні драйвери

Графічна підсистема X.Org X11, надає велику кількість драйверів, принаймні прискорювачі 2D для більшості відео карт, якщо система поставляється з GPU від AMD (ATI) чи nVIDIA, то до них можна завантажити та встановити бінарні пропрієтарні драйвери, з офіційного сайту виробника.

Ціль цієї статті, визначити різні методи встановлення та налаштування цих пропрієтарних драйверів, в системі Slackware.

Встановлення та налаштування драйвера AMD (ATI) Catalyst

AMD лишили підтримку старих відео карток (серії 4xxx та нижче) в поточних (12.6), так і в наступних версіях пропієтарних драйверів, так що майте це на увазі та впевніться що ваша відео картка підтримується драйвером. Якщо ваша картка не підтримується, відкритий драйвер xf86-video-ati може стати у нагоді, але він значно повільнішій.

Завантаження

Зазначте, що встановлювач (installer) збере драйвер (fglrx), та йому потрібні встановлені модулі ядра (kernel-modules) та джерельний код ядра (kernel-source). Наступні кроки підходять як для графічного (UI), так і для консольної версії(CLI) користувальницького інтерфейсу встановлювача.

Встановлення

Наступні інструкції описують як створити та встановити пакунок сумісний з Slackware. Він генерується автоматично встановлювачем і за звичай працює добре. Існує ще метод 'автоматичного' встановлення.

Catalyst з драйверами для Linux, можна завантажити з цього посилання. Цей файл сумісний для двох архітектур 32 та 64 біт.

Після завантаження, розпакуйте (unzip) файли командою:

$ unzip amd-driver-installer-VERSION-x86.x86_64.zip

Наступний крок, перекричіться на користувача root:

$ su -

Перейдіть до директорії яка містить файл 'run', та запустіть встановлювач командою:

# sh amd-driver-installer-VERSION-x86.x86_64.run

Встановлювач збере інформацію про вашу систему, та запропонує обрати один з двох методів, автоматично встановити чи створити пакунок для цільової системи (дистрибутив). Тут оберіть створення пакунку, так як такий пакунок в майбутньому можна керувати в системному менеджері пакунків Slackware.

Коли вибір зроблено як пакунок, будь ласка оберіть “Detected OS: Slackware/Slackware”.

Після того як збірка завершена, встановлювач згенерує пакунок в ту саму директорію, де був файл 'run', та ви можете виконати команду:

# installpkg fglrx-VERSION-x86-1.tgz

Якщо будь-які помилки будуть знайдені під час встановлення, ви можете побачити їх у файлі журналі /usr/share/ati/fglrx-install.log.

Налаштування

Щоб користуватись новими драйверами, вам необхідно перезавантажити систему. Перед цим, відредагуйте файл /etc/modprobe.d/blacklist.conf (чи створіть йього /etc/modprobe.d/radeon_blacklist.conf), та додайте в нього рядки:

blacklist radeon
blacklist radeonhd

Далі ви можете створити новий файл налаштувань для X.Org, виконавши:

# aticonfig --initial -f

Зазвичай X.Org не потребує файл /etc/X11/xorg.conf, але в деяких випадках (зазвичай для старих карт) необхідні наступні рядки у fglrx секції 'Device':

Option "SWCursor" "true"

Якщо помилок не трапилось, та драйвер нормально встановився, ви повинні перезавантажити систему, щоб почати користуватись драйвером.

Тестування

Після перезавантаження, ви можете зробити тест драйверу, запустивши:

$ fgl_glxgears

Повинні з’явитись обертові шестерні, які обертаються повільно та без глюків.

Також ви можете виконати:

$ glxinfo

Перегляньте перші декілька рядків щоб дізнатись, чи увімкнена функція DRI. Якщо ні, тоді вам потрібно зробити набагато більше дій, тому, що процес створення пакунка, який вмонтовано у встановлювач ati, дуже старий (до офіційної версії Slackware з архітектурою 64біт), та деякі файли треба пересунути в інше місце, щоб воно запрацювало на версії Slackware 14.1. Пакунок для slackbuilds.org який виправляє цю проблему, працює, але в той же час, ви можете самостійно та вручну виконати це рішення (з форуму linuxquestions), чи якщо все інше закінчилось з помилкою, опція автоматичного встановлювання повинна працювати.

Автоматичне видалення

Якщо ви до цього обрали встановлення пакунку автоматично, та вам стало необхідним вилучити драйвер, ви можете запустити встановлювач з додатковим аргументом uninstall, як наприклад:

# sh amd-driver-installer-VERSION-x86.x86_64.run --uninstall

Чи викликати скрипт видалення напряму командою

#/usr/share/ati/amd-uninstall.sh
Не має значення як він був встановлений, видалення драйверу fglrx, “зламає” підсистему mesa як тільки файли будуть пересунуті. Встановлювач попередить про перевстановлення mesa. Також, пам’ятайте, що якщо ви захочете повернути заводські “ядерні” драйвери radeon/radeonhd, ви повинні будете видалити рядки з blacklist, які раніше були додані у файл налаштувань модулів ядра.

Встановлення та налаштування драйвера nVIDIA

Встановлення через SlackBuilds.org

Едвард Коініг (Edward Koenig) обслуговує пакунки libvdpau, nvidia-driver та nvidia-kernel на SlackBuilds.org

Щоб працював драйвер nVIDIA, необхідні усі ці пакунки. Пакунок nvidia-kernel, збирає модуль ядра, nvidia-driver збирає драйвер для X.Org та містить у собі реалізацію OpenGL та сумісні COMPAT32 бібліотеки, для використання у мультибібліотечній системі Slackware64. Для nvidia-driver необхіден пакунок libvdpau.

Видалення модуля ''nouveau''

Перший крок під час встановлення драйверу, це внесення до чорного списку (blacklist) драйвер nouveau. Невиконання цього кроку, призводить до помилок у startx як на приклад: “ERROR: could not insert 'nvidia': No such device”.

Внесення драйверу nouveau до чорного списку, виконується встановленням пакунка xf86-video-nouveau-blacklist з директорії “extra”, яка знаходиться на носії з встановлювачем системи Slackware. Це може бути зроблено використавши встановлювальні CD чи DVD диски, завантаження файлів з одного з багатьох дзеркал Slackware, чи використовуючи утиліту slackpkg.

Встановлення пакунка

На цей час є два способи встановлення пакунків з SlackBuilds.org:

  • завантаження відповідних скриптів з SBo, та дотримання процедури встановлення SlackBuild
  • використання інструменту sbopkg, який автоматизує завантаження сирцевого коду, та зробить послідовність збірки та встановлення декількох пакунків.

Як тільки пакунок було встановлено згідно з інструкцію яка поставляється з кожним SlackBuild, сервер X11 може бути запущено з повноцінною підтримкою GPU (модуль графічний процесор).
Для налаштування X11 на автоматичний запуск, подивіться в наступному розділі “Запуск X11 з підтримкою GPU nvidia”.

Вирішення проблем

FIXME

Встановлення через бінарний встановлювач від nVIDIA

Встановлення бінарного драйверу nVIDIA, включає в себе наступні кроки:

  • Завантаження відповідного пакунку встановлювача драйверу nvidia
  • Вимкнення та вивантаження драйверу nouveau
  • Встановлення драйверу nvidia
  • За бажанням, налаштування системи для автоматичного старту графічного інтерфейсу

Наступний лист містить у собі ключові кроки по встановленню драйверу nvidia. Повний текст статті далі.

For those who just want the appropriate commands, here is a summary of the following:
  • Go to the nVIDIA Unix Drivers website and download the appropriate driver. The name of the driver package will be something like “NVIDIA-Linux-ARCH-VERSION.run” where ARCH is the computer's processor architecture and VERSION is the driver version.
  • Ensure that X11 is not running; if it is, exit it and login to the text console
  • Logged in as root, run the nVIDIA installer with
    # sh /path/to/NVIDIA-Linux-ARCH-VERSION.run
  • If prompted to blacklist nouveau, do so and restart
  • Launch the installer with root permissions once more after restarting
  • At a minimum, choose to accept the license and install the driver. Please consult the nVIDIA Installer Options section for automatic installer options.

If nvidia-xconfig is not run by the installer, then it can either be run upon exiting the installation and before launching the X11 server or the “/etc/X11/xorg.conf” file should be edited manually.

Downloading the Appropriate nVIDIA Driver Binary Installer

The first step is to download the appropriate driver from the nVIDIA Unix Drivers website . For 64-bit Slackware (including multilib systems) you should download the “Linux x86_64/AMD64/EM64T” driver package, while 32-bit Slackware needs the “Linux x86/IA32” driver. Your safest bet for picking the correct version is to use the “Latest Long Lived Branch version” but in some cases (very new graphics card, or display issues which you are trying to resolve) you might want to choose “Latest Short Lived Branch version” instead.
Older legacy drivers are available as well for graphics cards which are no longer current. When you select a driver, a list of compatible GPUs will be displayed. Once you have determined the correct driver, the license will need to be accepted and the file saved in an accessible location. Before running the installer, there are some other actions that must be taken.

Disabling the nouveau Module

In general, an nVIDIA GPU will be detected by the Slackware system, and the “nouveauOSS graphics driver will be enabled on the system. This will allow 3D video acceleration on many cards. The nouveau and nvidia modules are incompatible; thus, before proceeding with the installation of the nvidia module, the nouveau module must be removed and kept from being loaded automatically on boot by the kernel.

To accomplish this, a file must be created in the “/etc/modprobe.d/” directory containing the text

blacklist nouveau
options nouveau modeset=0

and named appropriately; for instance, “disable_nouveau.conf

The first line will block the nouveau module from being loaded automatically during start-up. The module will still be able to be loaded manually by a user or by the X server. Thus, the second line is added, so that should the nouveau module be loaded, it will be prevented from doing a kernel modeset, allowing the module to be unloaded.1)

As mentioned in the modprobe.d README file, the monolithic module blacklist file has been split into smaller files and stored under /lib/modprobe.d/ However, a .conf file in the /etc/modprobe.d/ directory will override one in /lib/modprobe.d/ This is thus a more sure way to block the loading of the nouveau driver.

After displaying an error to the effect that the nouveau and nVIDIA proprietary drivers are incompatible, newer nVIDIA installers will prompt for permission to create a .conf file to blacklist nouveau in /etc/modprobe.d/ which will be named nvidia-installer-disable-nouveau.conf By default, the contents of this file will be:

# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0

The installer will then state that it has failed and request that the system be restarted to put changes into effect. Once the system has been restarted, the nouveau driver will no longer be loaded, and installation of the binary driver can continue.

Alternately, the package xf86-video-nouveau-blacklist from the “/extra” directory of the Slackware installation media should be installed. Once installed, the system should be restarted, at which point driver installation can continue.

nVIDIA Binary Driver Installation

nVIDIA binary driver installation can not be completed while the X11 Window System is active.

The default behavior of Slackware is to boot into a text-only terminal. In this case, the nVIDIA installer can simply be run. However, if the graphical environment was already launched, it must be exited. If lunched with the “startx” command, closing the graphical environment can be accomplished by logging out or, and only if necessary, pressing Ctrl+Atl+Bksp.

If using a graphical login manager, such as KDM, simply exiting via the menu or pressing Ctrl+Alt+Bksp will not work because the graphical login manager will be restarted automatically.
The best way to shut down X gracefully is by logging off, switching to a conole terminal by pressing Alt+F2, logging into the console as root and running:
telinit 3

Another method to return to the console, crude and thus not recommended but effective if necessary, is to stop/kill the DM and then exit the X Server by pressing Ctrl+Atl+Bksp. For example, KDM can be killed by issuing the command

killall -9 kdm

Again, this should only be used if other methods fail.

Once X11 is no longer running, the nVIDIA installer can be launched as root. Either log in as root or issue the “su -” command, then run the installer. Sometimes, it is advantageous to run the installer using some of the available command-line options. For more information, consult “nVIDIA Installer Options” at the end of this section.

$ su -
Password:
# sh /path/to/NVIDIA-Linux-ARCH-VERSION.run

When the installer is launched without any command line options and excepting any errors, the installation will proceed as follows:

  • The installer will extract itself and start an ncurses interface. The first step is to accept the license terms.
  • When installing the module for a system that has no previous version, the installer will begin to build the module. If, however, a previous nVIDIA driver was found, the installer will prompt for permission to remove the previous driver as part of the new installation. To proceed with the installation, permission should be granted to remove the previous installation.
  • After building the module on x86_64 systems, the installer will prompt about installing nVIDIA's 32-bit compatibility OpenGL libraries. You will only need the 32-bit compatibility libraries if your Slackware is 64-bit multilib.
  • Next, in the case of a previous version, the installer will uninstall the module.
  • Once no conflicting X and (should this option be chosen) OpenGL files are found, the module will be installed.
  • The program will then offer to use the nvidia-xconfig utility to modify the xorg.conf file to reflect the change in video drivers. This utility often works, but could possibly change other values in xorg.conf. It does, however, back-up the original file to “/etc/X11/xorg.conf.nvidia-xconfig-original
  • A prompt confirms that the driver installation is complete and was a success, at which point the program exits to the console.

The nvidia module should now be installed for the currently running kernel.

You must create an X.Org configuration file which loads the binary Nvidia driver if you decided not to let the nvidia-xconfig utility modify your computer's xorg.conf file. The X.Org of Slackware supports individial “*.conf” files in a directory /etc/X11/xorg.conf.d. Any file with a .conf extension will be included together with the main /etc/X11/xorg.conf file.
You could create for instance a file named /etc/X11/xorg.conf.d/10-nvidia.conf with the following content:

Section "Device"
    Identifier  "Device0"
    Driver  "nvidia"
    VendorName "Nvidia Corporation"
    BoardName ""
EndSection

Without this definition, you will not get accelerated Nvidia GPU support! X.Org would fall-back to VESA mode because the nouveau driver has been blacklisted. The kernel will not auto-detect the binary driver as opposed to the nouveau driver.

Starting X11 with nvidia GPU Support

All that remains is to start the X.org server. This can be accomplished by configuring Slackware to start in runlevel 4, which will start a graphical login manager, such as KDM or XDM, on boot. If you want this, then you need to edit the file “/etc/inittab” and change the line

id:3:initdefault:

to

id:4:initdefault:

Otherwise you can login to a user account and issue the “startx” command to start an X session.

By default, startx will start the window manager which was chosen during installation. To change this behavior, the file “.xinitrc” in the user's home directory can be edited to start a different WM.
Alternatively, the default WM can be altered on a per-user basis by using the command “xwmconfig” and selecting one of the available WM's.
nVIDIA Installer Options

The nVIDIA Installer has many options available to the system maintainer which can be accessed by running the installer with the -A option:

# sh ./NVIDIA-Linux-ARCH-VERSION.run -A

Some common options are

  • -a, --accept-license : bypasses the nVIDIA license screen. By doing so, the license is accepted.
  • --update : check for an updated driver on the nVIDIA website; if it exists, automatically download and install the new version.
  • --uninstall : removes the nVIDIA driver and other files installed previously.
  • -q, --no-questions : assumes default answers to all questions. Note: does not automatically accept the license.
  • -s, --silent : runs the binary installer without a curses UI, automatically accepts the license and uses the default answers for all questions.

Troubleshooting

FIXME

Sources

  • nVidia section originally written by rinias

 uk:howtos:hardware:proprietary_graphics_drivers ()
Цей переклад старіший ніж оригінальна сторінка і може бути не актуальним. Дивіться що було змінено.
Переклад цієї сторінки?: