Ubuntu

제조사에서 재공하는 그래픽 드라이버 설치했을 경우,

mind10 2014. 5. 10. 00:52

우분투는 커널이나 X Window 중요 라이브러리 업데이트시, 그래픽 드라이버도 재설치가 되어야 한다.


자체 패키지에 포함된 그래픽 드라이버를 설치했을 경우, dkms를 이용하여 자동으로 그래픽 드라이버를 재설치 해주나,


제조사에서 제공하는 그래픽 드라이버를 설치했을 경우, 수동으로 터미널모드로 들어가서 그래픽 드라이버를 재설치 해주어야 한다.


만약 검은 화면만 출력되고, 마우스 커서만 보이는 경우,


Ctrl+Alt+F4 를 눌러서 터미널 모드로 들어가 


로그인 한후, 


다운 받은 제조사 배포 드라이버를 재설치 해준다.


AMD의 경우,


$ sudo sh amd-XXXXX.sh





출처 : http://wiki.cchtml.com/index.php/Ubuntu_Saucy_Installation_Guide



제조사 드라이버를 설치시 .run으로 설치하지 말고 .deb패키지로 바꿔서 설치해주는것이 좋다.

.run은 우분투/데비안 파일시스템과 호환이 떨어진다.

만약 이전에 제조사 드라이버를 설치 한 경우, 제거 한 후 진행한다.

Removing Catalyst/fglrx

The uninstall script in the first command will only exist if you downloaded the drivers and installed them directly (rather than building packages as this guide does). Skip the first command if it does not exist.

sudo sh /usr/share/ati/fglrx-uninstall.sh
sudo apt-get remove --purge fglrx*

If you plan on using open-source drivers, you will need to reinstall some packages because Catalyst overwrites or diverts some key 3D libraries with proprietary versions. For more information on this issue, see this Ubuntu wiki page

sudo apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
sudo rm -f /etc/ati

If you receive

$ E: Internal Error, No file name for libgl1-mesa-dri

Change the third command above to:

sudo apt-get install --reinstall libgl1-mesa-glx:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:i386 libgl1-mesa-dri:amd64 xserver-xorg-core

Before you start

If you have previously attempted installing Catalyst, remove any leftover files by following the Removing the Driver section. Make sure universe andmultiverse are enabled in your repository sources (System -> Administration -> Software Sources). or Applications->Ubuntu Software Center->Edit->Software sources->Other software: check canonical partners.

Install the prerequisite packages:

sudo apt-get install cdbs dh-make dkms execstack dh-modaliases linux-headers-generic libqtgui4

If you are using the x86_64 architecture (64 bit):

sudo apt-get install lib32gcc1

[edit]Installing Catalyst Manually (from AMD/ATI's site) STABLE

[edit]Download the latest Catalyst package

This package contains both the 32-bit and 64-bit driver.

mkdir catalyst14-4 && cd catalyst14-4
wget --referer='http://support.amd.com/en-us/download/desktop?os=Linux+x86' http://www2.ati.com/drivers/linux/amd-catalyst-14-4-linux-x86-x86-64.zip
unzip amd-catalyst-14-4-linux-x86-x86-64.zip
chmod +x fglrx-14.10.1006/amd-driver-installer-14.10.1006-x86.x86_64.run

[edit]Install additional dependencies

sudo apt-get install -y xserver-xorg-dev

[edit]Create and install .deb packages

sudo ./fglrx-14.10.1006/amd-driver-installer-14.10.1006-x86.x86_64.run --buildpkg Ubuntu/saucy
sudo dpkg -i fglrx*.deb

If building .deb packages fails you can try an Alternative Manual Installation which does NOT create deb packages and might cause some trouble when trying to uninstall.

[edit]Installing Catalyst Manually (from AMD/ATI's site) BETA/EXPERIMENTAL

[edit]Download the latest Catalyst package

This package contains both the 32-bit and 64-bit driver.

mkdir catalyst-14.3beta1.0 && cd catalyst-14.3beta1.0
wget --referer='http://support.amd.com/en-us/download/desktop?os=Linux+x86' http://www2.ati.com/drivers/beta/Linux_AMD_Catalyst_14.3_Beta_V1.0_B22_March12_2014.zip
unzip Linux_AMD_Catalyst_14.3_Beta_V1.0_B22_March12_2014.zip
cd fglrx-13.35.1005

[edit]Create and install .deb packages

sudo ./amd-driver-installer-13.35.1005-x86.x86_64.run --buildpkg Ubuntu/saucy
sudo dpkg -i fglrx*.deb

If building .deb packages fails, there is also an Alternative Manual Installation

[edit]In case of failure

Remember these steps before you reboot your computer.

If the X server fails to start, switch to a new TTY using ctrl+alt+F2. Log in, and attempt to start the X server.

sudo startx

If it fails to start, you will likely see a stacktrace, and immediately above it will be something along the lines of "Could not stat /usr/lib64/fglrx/switchlibGL" which means that you failed to copy the executables properly. Ctrl+c, and immediately copy the switchlibGL and switchlibglx executables to the fglrx folder in /usr/lib64/ or /usr/lib32/.

If all else fails, revert your xorg.conf and reboot.

sudo cp /etc/X11/xorg.conf.orig /etc/X11/xorg.conf

This should return your original display.

[edit]Generate a new /etc/X11/xorg.conf file

Unfortunately, there is no sure way to generate the ATI version of the Xorg.conf file. It is entirely dependent on your configuration. The following subsections will attempt to address possible (and tested) variations for their respective configurations.

[edit]Generic Config

This will work for most people:

sudo amdconfig --initial -f

[edit]Minimal Config

A very basic /etc/X11/xorg.conf file might be what you need if you have a new card that's not fully supported by amdconfig. Here follows the entirety of a minimal xorg.conf file for the Radeon HD 6870:

Section "Device"
 Identifier "ATI radeon 6870"
 Driver "fglrx"
EndSection

[edit]X2/Dual GPU Cards

If you have an X2 card (e.g. 5970), use... !!Do not use for two separate cards in crossfire!!

sudo amdconfig --initial -f --adapter=all

[edit]Dual/Multi Monitors

If you have a dual monitor display (also known as "Big Desktop"), use:

sudo amdconfig --initial -f
sudo amdconfig --set-pcs-str="DDX,EnableRandR12,FALSE"

This was confirmed in http://phoronix.com/forums/showthread.php?t=18553. Be advised that you may need to manually set the correct refresh rate for your second monitor through catalyst.

[edit]Force use of the new xorg.conf (if necessary)

Some people find that changes to xorg.conf don't get used by the driver. To force the ATI driver to adopt changes made to xorg.conf, use the following command:

sudo amdconfig --input=/etc/X11/xorg.conf --tls=1

[edit]Test your installation

NOTE: if you don't reboot first, fglrxinfo gives an error message. Reboot the computer and type

fglrxinfo

into the terminal. If the vendor string contains ATI, you have installed the driver successfully. Using fglrxinfo on a system with Catalyst 12-3 and a RadeonHD 4550 returns:

display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 4550 (This line may be different depending on what graphics card you are using.)
OpenGL version string: 3.3.11566 Compatibility Profile Context (This line may be different depending on what graphics card and 
Catalyst version you are using.)

Now, try:

fgl_glxgears

If you experience issues or a hang, you may need to disable fast TLS.

sudo amdconfig --tls=0

[edit]Just in case

Write down or remember this series of Alt+PrntScr key combinations, just in case your screen should go black and Ctrl+Alt+F1 and Ctrl+Alt+Backspace doesn't work.

Alt+PrntScr+r, Alt+PrntScr+s, Alt+PrntScr+e, Alt+PrntScr+i, Alt+PrntScr+n, Alt+PrntScr+u, Alt+PrntScr+b

These key-presses will reboot the system safely. To remember the key-presses, remember this nonsensical phrase: "Raising Skinny Elephants Is Never Utterly Boring".

An alternative would be to hold down Ctrl+Alt+SysRq (SysRq is usually the same key as PrintScreen) and type very slowly R E I S U B. A way to remember this is by inverting the word: "BUSIER" or remembering a phrase: "Restart Even If System Utterly Broken". This would also safely shutdown the system.

[edit]Hardware Video Decode Acceleration (EXPERIMENTAL)

[edit]Using XBMC player (XvBA)

XBMC has added support for accelerating video using XvBA/libxvba directly, but the support is currently not in the xbmc package in Ubuntu's repositories. To install the XvBA-enabled version of xbmc:

sudo apt-add-repository ppa:wsnipex/xbmc-xvba
sudo apt-get update
sudo apt-get install xbmc

NOTE: deprecated as of october 2013. Moved to ppa:wsnipex/xbmc-fernetmenta-master

[edit]Using the xvba-va driver (VA-API)

NOTE: The VA-API wrapper for XvBA has been dead code for a while now. It will probably give you some acceleration of HD formats, but using the previously mentioned xbmc PPA is a better solution.

This is confirmed to work for newer RadeonHD GPU's (those with UVD2). If you have a RadeonHD 4000-series or newer, you have UVD2. To see the complete list: http://en.wikipedia.org/wiki/Unified_Video_Decoder#UVD_enabled_GPUs

sudo apt-get install xvba-va-driver

A good player the utilizes va-api is VLC. You can enable va-api in Tools -> Preferences -> Input and Codecs. Check the box named "Use GPU accelerated decoding" and then restart VLC.

[edit]Test the xvba-va driver (VA-API)

The tool "vainfo" allows you to test the proper functioning of the xvba-va driver.

sudo apt-get install libva-glx1 libva-x11-1 vainfo
vainfo

vainfo should return something like the following (and no errors):

     libva: libva version 0.32.0
     Xlib:  extension "XFree86-DRI" missing on display ":0.0".
     libva: va_getDriverName() returns 0
     libva: Trying to open /usr/lib/dri/fglrx_drv_video.so
     libva: va_openDriver() returns 0
     vainfo: VA API version: 0.32
     vainfo: Driver version: Splitted-Desktop Systems XvBA backend for VA-API - 0.7.8
     vainfo: Supported profile and entrypoints
     VAProfileH264High               :	VAEntrypointVLD
     VAProfileVC1Advanced            :	VAEntrypointVLD

If vainfo returns an error, you may need to create a symlink:

sudo ln -s /usr/lib/va/drivers/fglrx_drv_video.so /usr/lib/x86_64-linux-gnu/dri/fglrx_drv_video.so  #for 64-bit
sudo ln -s /usr/lib/va/drivers/fglrx_drv_video.so /usr/lib/dri/fglrx_drv_video.so  #for 32-bit

[edit]Other

There is possibility to enable > H.264 Level 5.1 decoding in the driver which "has been in the driver for some time but not enabled by default". This only applies for pre-12.11 beta releases of the drivers. Since 12.11 beta the setting is enabled by default [1]

sudo amdconfig --set-pcs-u32=MCIL,HWUVD_H264Level51Support,1

or

sudo service lightdm stop
sudo cp -p  /etc/ati/amdpcsdb  /etc/ati/amdpcsdb.bak
sudo sed -i '/UvdEnabled=V1/ a HWUVD_H264Level51Support=V1' /etc/ati/amdpcsdb
sudo reboot

[edit]Updating Catalyst/fglrx

DO NOT try to install a new version over an old one. Follow the 'Removing Catalyst/fglrx' section below to remove your existing driver, and then you can start at 'Downloading the latest Catalyst' to install the new one.