[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

Ово је стара верзија документа!


Овај превод је у изради! (sinisa)
This translation is work in progress! (sinisa)

Власнички Драјвери Графичких картица

X.Org X11 графички систем обезбеђује много драјвера, снабдевајући их са најмање 2Д видео убрзањем за већину графичких картица; ипак, ако је систем опремљен са AMD (ATI) или nVIDIA GPU (Графичким процесором), власнички бинарни драјвери могу се преузети са веб сајтова оба произвођача и инсталирати.

Циљ овог чланка је да прикаже разне методе инсталирања и конфигурације ових власничких драјвера на Слакверу.

AMD (ATI) Catalyst Драјвери Инсталација и Конфигурација

AMD је напустио подршку за старије картице (од серије 4xxx па наниже) у актуелној (12.6) и будућим верзијама власничких драјвера, зато Вас молим да проверите да ли је Ваша картица и даље подржана. Aко није, онда ће драјвер xf86-video-ati отвореног кода бити довољан, истина биће мало спорији од власничке верзије.

Преузимање

Имајте на уму да ће инсталер направити (компајлирати) драјвер (fglrx) а да би се он направио потребно је да имате инсталиране kernel-modules и kernel-source пакете. Наредни кораци важе и за УИ (енг. User Interface) и за ЦЛИ (енг. Command-Line Interface) верзије инсталера.

Инсталација

Следеће инструкције су везане са прављење одговарајућих пакета за Слеквер. Они се генеришу/стварају аутоматски од стране инсталера и чини се да у већини случајева раде. Такође постоји и 'аутоматизовани' инсталациони начин.

Каталист и пакет драјвера за Линукс може се преузети са следећег линка. Датотека је погодна и за 32 бит-не и за 64 бит-не архитектуре.

Након преузимања распакујте пакет командом:

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

Следеће, пребаците се на root налог командом:

$ su -

Командом CD пребаците се у фолдер где се налази 'run' фајл и покрените инсталер командом:

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

Инсталер ће прикупити информације о вашем систему и затражити од Вас да одаберете између аутоматске инсталације и креирања пакета. Одаберите 'креирање пакета', јер касније можете њиме управљати Слеквер менаџером пакета.

Када будете упитани да одаберете дистрибуцију, молим одаберите „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' (fglrx 'Уређај') секцију:

Option "SWCursor" "true"

Ако није било грешака и драјвер се успешно инсталирао, рестартујете систем да би исти могли користити.

Тестирање

Након рестарта, можете тестирати драјвер командом:

$ fgl_glxgears

Ово би требало да прикаже зупчанике који се окрећу без сметњи.

Аутоматска де-инсталација

Ако сте одабрали да инсталирате пакет аутоматски и потребно Вам је да уклоните (деинсталрате) драјвере, можете покренути инсталер са додатним uninstall (деинсталација) коментаром, овако:

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

Или позвати скрипту за деинсталацију директно командом:

#/usr/share/ati/amd-uninstall.sh
Без обзира како је инсталиран, деинсталација fglrx драјвера ће „помешати“ mesa drajvere и испремештати неке фајлове. Препоручено је да реинсталрате меса drajvere. Такође ако желите да вратите кернелове radeon/radeonhd драјвере, мораћете уклонити блеклистоване линије које сте додали раније у /etc/modprobe.d/blacklist.conf.

nVIDIA Драјвери Инсталација и Конфигурација

Инсталација путем SlackBuilds.org

Edward Koenig одржава libvdpau, nvidia-driver и nvidia-kernel пакете на SlackBuilds.org

Сва три пакета су потребна за функционисање nVIDIA драјвера. Пакет nVidia-kernel изграђује кернел модул, nvidia-driver пакет изграђује X.Org драјвер и садржи OpenGL инплементацију, као и COMPAT32 библиотеке за употербу на multilib Слеквер64 систему.

''nouveau'' Модул Уклањање

Први корак при инсталацији драјвера је да се блеклистују nouveau драјвери. Не учинивши то може резултирати стартикс грешком „ERROR: could not insert 'nvidia': No such device“.

Блеклистовање nouveau драјвера се врши инсталирањем xf86-video-nouveau-blacklist пекета из „extra“ директоријума верзије Слеквера. Ово можете урадити користећи инсталациои ЦД или ДВД, прибављањем фајла са једног од Слеквер мирор сервера, или користећи slackpkg услужни програм.

Инсталација Пакета

Тренутно потоје два начина инсталирања пакета путем SlackBuilds.org:

  • преузимајући одговарајућу скрипту за изградњу пакета са SBo, пратећи SlackBuild инсталациону процедуру.
  • користећи алат sbopkg који аутоматизује процес преузимања изворног кода и директне компилације/инсталације више пакета.

Када су сви пакети инсталирани пратећи упутства за сваки SlackBuild, X11 сервер може бити стартован са пуном GPU подршком.
За конфогурисање аутоматског стартовања X11, молим Вас погледајте „Стартовање X11 са nvidia GPU подршком“ у следећем одељку.

Отклањање проблема

FIXME

Инсталација помоћу Бинарних nVIDIA драјвера

Инсталација бинарних nVIDIA драјвера подразумева следеће кораке:

  • Преузимање одговарајућих nvidia пакета инсталационих драјвера
  • Онемогућавање и nouveau драјвера
  • Инсталирање nvidia драјвера
  • Опционо, конфигурација система да се аутоматски покреће графичко окружење

Следи листа кључних савета за инсталацију nvidia драјвера. Слади чланак у целости.

За оне који желе само одговарајуе команде, следи кратак преглед истих:
  • Идите на следећу страницу nVIDIA сајт за Јуникс Драјвере</notе> и преузмите одговарајући драјвер. Назив драјвера ће бити нешто налик на следеће „NVIDIA-Linux-ARCH-VERSION.run“ где ARCH означава архитектуру процесора, а VERSION означава верзију драјвера.
  • Уверите се да X11 не ради; ако је све тако изађите и улогујте се у текст конзолу (не графички мод).
  • Улоговани као root, покрените nVIDIA инсталер с командом
    # sh /path/to/NVIDIA-Linux-ARCH-VERSION.run
  • Ако будете упитани да блеклистујете (забраните покретање) nouveau, урадите то и рестартујте рачунар.
  • Покрените инсталер као root још једном после рестарта.
  • Минимум, прихватите услове услове лиценце и инсталирате драјвер. Молим Вас погледајте секцију Опције nVIDIA инсталера за аутоматске опције инсталера.

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

 sr:howtos:hardware:proprietary_graphics_drivers ()
This translation is older than the original page and might be outdated. See what has changed.