zoukankan      html  css  js  c++  java
  • Fix catalyst driver in Ubuntu 13.04 / 13.10

    Fix catalyst driver in Ubuntu 13.04 / 13.10(墙外文章备份)

    1. Introduction

    I found lots of people struggling to get catalyst driver work in Ubuntu 13.04. This issue has been persistent for some laptops, ever since Ubuntu 13.04 came out, specially for Intel, AMD dual graphics setup. For people, who have been looking at catalyst drivers ever since http://ubuntuforums.org/showthread.php?t=1930450 post was published, should not be that hard to find the solution, but for those who are new to Linux, or don’t have time for these kinds of issues, this might be a show stopper bug.

    2. Installation

    I removed the downgrading libudev and xserver-xorg-video section. Therefore, if you want to install 13.4 stable follow this link. For this tutorial, I will be using 13.11 beta 1 driver. I recommend you download the beta driver from here. I don’t always test the newer versions (let me know if there is some problem installing the newer versions). Unless AMD changes compatibility with xorg, kernel and xserver-xorg-video-intel it should be fine.

    If possible, always use latest drivers. Before downloading the driver, make sure to read the release note (found in the download page) to find out the supported kernel and xorg versions and bug fixes. Download catalyst driver from here and unzip it in a directory. Using command line and building packages is the preferred method of installing the driver.

    i. Using a GUI method

    Using a terminal go to the directory, where you have unzipped the file and run following command.

    sudo sh ./amd*.run

    Screenshot from 2013-07-25 19:32:32

    It should open up a GUI, which you can use to easily install the driver. After reboot, you can follow from Step 4 of this tutorial. However, If you want to play 32-bit games as well, install necessary library using following command and then follow Step 4. If you are on ubuntu 13.10, ia32-libs is not available (see 32-bit library installation problem).

    sudo apt-get install ia32-libs lib32gcc1 libc6-i386

    Note: Many people have reported lots of problems (graphics and library) using above method. If you have graphics related errors, make sure you follow following option. However, make sure you properly remove this package (5. Reset Everything), before going with following option.

    32-bit library installation problem: In ubuntu 13.10, ia32-libs meta package is not present. If you get error while playing some 32-bit games, you need to install the 32-bit counter part of the package that provides the library with :i386 suffix. E.g If the error mentions libGLU.so.1, you need to install libglu1-mesa:i386 and so on. You can inspect necessary packages from this link or if you want to install the packages I installed (after inspecting ia32-libs dependency in ubuntu 13.04), install them from this link.

    ii. Using command line and building the packages

    a. Install the packages you need to compile the driver

    sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases linux-headers-generic xserver-xorg-core libgcc1

    b. Fix 64-bit dependency issue (ia32-libs is not available for ubuntu 13.10, see above)

    sudo apt-get install ia32-libs lib32gcc1 libc6-i386

    c. Remove old fglrx driver ( if installed already), and reboot. If you have used GUI method to install, see 5. Reset Everything below instead.

    sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
    sudo rm /etc/X11/xorg.conf
    sudo apt-get install --reinstall xserver-xorg-core xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-glx:i386 libgl1-mesa-dri:i386
    sudo dpkg-reconfigure xserver-xorg
    sudo reboot

    d. Build and install the downloaded driver. Using a terminal go to the directory, where you have unzipped the file and run following commands.

    sudo sh ./amd-*.run --buildpkg Ubuntu/raring
    sudo dpkg -i fglrx*.deb
    sudo aticonfig --initial -f
    sudo reboot

    For ubuntu 13.10, use Ubuntu/saucy. You can find out the string using following command.

    sh ./amd-*.run --listpkg

    e. If second last command does not execute (say it complains about not having any graphics card installed), you might have turned off AMD graphics card using vgaswitcheroo switch, which you can enable using following command and then will be able to execute above command (before reboot). If you have already rebooted, go to a virtual terminal (Ctrl + Alt + F1), before login, and run above command (second last) to create xorg.conf file.

    sudo su
    echo ON > /sys/kernel/debug/vgaswitcheroo/switch

    Also, if you later plan to remove catalyst and go with open source only option, you can copy following line into /etc/rc.local file (before exit 0) and this will turn off your AMD graphics card at boot and fix the heating caused by AMD graphics card.

    echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

    3. Other Errors

    a. Fix unity, if it broke during installation (this will reset your Desktop)
    cd ~/.config
    rm -rf compiz-1 dconf gnome-session

    You can also install compizconfig-settings-manager (cccsm) and enable OpenGL and Ubuntu Unity Plugin to get back the dash and other visual components.

    b. TF2, Dota 2, Steam OpenGL or networking error

    i. If other applications runs, but steam fails to start  with proper OpenGL support while using AMD drivers, you may choose to follow the command line and building the packages option, and if that does not fix the problem, you might have to clean up and re-install Steam.

    Screenshot from 2013-07-25 21:56:19

    Move SteamApps directory to some other place (it will be very fast, if you don’t change the drive), and re-install steam. You can move back that directory, after first login.

    ii. If you get following error while playing TF2 or Dota 2

    Required OpenGL extension “GL_EXT_texture_sRGB_decode” is not supported. Please update your OpenGL driver

    It is probably because of a file in your home directory called .drirc. To fix this error, delete this hidden file logout login back and start the game in Steam. If it still does not work, make sure libtxc-dxtn-s2tc0 is installed. Also, you can create another user, copy or link steam related files and directories (~/.steam, ~/.local/share/Steam, ~/.steampid, ~/.steampath) and start Steam using this new account, to see if the error exists.

    iii. While using AMD card, if it fails to login, it might be because of this error.

    Adding following text to /etc/hosts might solve the network related error. However, use this text only if it fails due to networking issue.

    87.248.210.253    media.steampowered.com
    c. GPU Hang

    With Intel drivers you might get sudden desktop freeze, or programs may slow down. Let us find out if it is actually a GPU hang issue, that I am talking about.

    While the desktop or some application freezes, go to a virtual terminal (Ctrl + Alt + F1), login and run following command

    tail /var/log/Xorg.0.log
    i915_hangcheck_hung *ERROR* Hangcheck timer elapsed... GPU hung
    capturing error event; look for more information in /debug/dri/0/i915_error_state

    If you get error like this, you could fix this issue temporarily by killing gnome-session using

    sudo killall gnome-session

    Capture values of log files under /var/log directory (at runtime) using following command and report the bug to appropriate project or search online for that error.

    tail -f /var/log/logfile > ~/logfile

    Note: Here logfile could be any file under /var/log directory, specially dmesg, Xorg.0.log, syslog etc.

    Also make sure, you set game settings to lower, if you want to play it using Intel graphics card.

    If you get slow frames per second in wine while using AMD graphics card, it might be because of the input lag that has not been fixed for a long time. For Intel graphics card in wine there is this sudden drop in FPS. I suggest you install software packages called htop (sudo apt-get install htop) and xosd-bin (sudo apt-get install xosd-bin). Run htop in a virtual terminal (Ctrl + Alt + F1) and run game with following command (to show frame per seconds on the screen).

    WINEDEBUG=fps wine yourgame.exe 2>&1 | tee /dev/stderr | grep --line-buffered "^trace:fps:" | osd_cat

    When game starts to lag and frame per seconds drops, switch to the virtual terminal, wait till the cpu percentage for the game process drops to normal (below 100) and switch back to X (Ctrl + Alt + F7) and continue playing. I was experimenting with xf86-video-intel-2.99.903 and the installation process was not seamless. I found this package to be quite good (only  two or three instances of severe lag). Therefore, upgrade to this version (when it releases) and use above method to see how it performs. In my test, I found in one of the games under wine (1.7.1), Intel graphics card to have better frame per seconds than the catalyst driver.

    4. Test

    a. Run fgl_glxgears and check the speed.

    $ fgl_glxgears
    fgl_glxgears

    b. If you have dual graphics cards (Intel and AMD), switch between both and see if they work

    sudo aticonfig --px-igpu # for integrated intel card
    sudo aticonfig --px-dgpu # for discrete amd card
    aticonfig --pxl  # list currently active card

    5. Reset Everything

    If this solution did not work for you, it is time to reset everything and go back to where you were before the installation.

    If you had used GUI method to install the catalyst driver, you can remove catalyst driver using following command.

    sudo sh /usr/share/ati/fglrx-uninstall.sh

    After reboot, it should work as it used to work before the installation.

    If you had used command line and building the packages method, you don’t have to do anything other than repeat commands at 2.c above. I will list them once again anyway.

    sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*
    sudo rm /etc/X11/xorg.conf
    sudo apt-get install --reinstall xserver-xorg-core xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-glx:i386 libgl1-mesa-dri:i386  
    sudo dpkg-reconfigure xserver-xorg 
    sudo reboot

    6. Graphical Card Switcher (Optional)

    As you saw in 4 (above), you can switch between two graphics cards using the command line. Firing up command line each time you want to switch graphics cards is not very intuitive. In that case, you could open Catalyst Control Center using sudo amdcccle and press the appropriate radio button and logout and login back. Since, even that step is not that good, I thought I would share a script that does it for me. Create a file in the bin directory of your home folder called switchamdintel.pl (you can name it anything you like) with following content.

    #!/usr/bin/perl
    $checkGraphicsCommand = ` aticonfig --pxl`;
    chomp $checkGraphicsCommand;
    if ($checkGraphicsCommand eq "PowerXpress: Integrated GPU is active (Power-Saving mode).") {
     # Activate the discrete GPU driver 
     system "pkexec aticonfig --px-dgpu && pkill gnome-session"
    } else {
     # Activate the integrated intel HD driver
     system "pkexec aticonfig --px-igpu && pkill gnome-session"
    }

    Next, create a desktop file called switchamdintel.desktop inside ~/.local/share/applications directory (i.e the hidden folder inside your home directory, press Ctrl + H to show it) with following content.

    [Desktop Entry]
    Name=Switch AMD Intel 
    Comment=Switch to AMD Graphics card
    Exec=/home/username/bin/switchamdintel.pl
    Icon=/home/username/Icons/amd-intel.png
    Terminal=false
    Type=Application
    Categories=System

    As you might have guessed, in above script you should change username to your actual username and place a 256×256 png image of something that says amd and intel inside Icons directory called amd-intel.png. Also, adjust path of Exec and Icon path to locations where these files are located. If string comparison line in above perl script is different, change it to the actual output thrown by aticonfig –pxl command.

    amd-intel

    Make both files executable using chmod +x filename. If you logout and login, from now on you can search switch keyword in unity dash or go to System category in application menu and launch the switcher. It will change the graphics cards and logout.

    Hope it helps. Cheers !!

    23 Comments

    Filed under Uncategorized

    23 Responses to Fix catalyst driver in Ubuntu 13.04 / 13.10

      1. I usually prefer not to login with my facebook account on any sites but I really needed to thank you for this brilliant solution! This worked for me wonderfully! Thank you very much!

        My system:

        Sony Vaio VPCCB
        Intel/AMD Radeon HD 6630M hybrid graphics
        Ubuntu 13.04 64bit

      2. I followed these steps and everything seemed to work fine. Does the AMD Catalyst Control center install in these steps too? I am unable to find it.

        Any idea to install / start it?

      3. cutoverrooster

        Thanks so much. Went through numerous other tutorials, but finally this was the one that worked.

        Cheers.

      4. Thanks for the tutorial. After long time struggling with Catalyst drivers with Linux in my laptop, finally one solution that really helped!

        The driver is working fine. But even though I locked libudev0 and xserver-xorg-video-intel in Synaptic as recommended, every time the system runs an update, I have to reinstall again both of them due “low-graphics mode error”. Last time after the reinstallation of those two files, I was not able to fix Unity, so I moved to Gnome 3.6 which is working fine for the moment.

        Any recommendation to tackle this issue will be appreciated…

        Cheers!!!!

        My system:
        HP Pavilion dv7
        Intel/AMD Radeon HD 6730M/6770M/7690M XT hybrid graphics
        Using Catalyst 13.4
        Ubuntu 13.04 64bit

        • A nice approach, after you have done some graphics related work (that could possibly break the desktop environment) is to login into Guest Session (for test), before login with your actual username.

          Anyways, following commands fixes unity for me (be aware it deletes all browser bookmarks too), if I haven’t broken the graphics drivers.

          cd ~/.config

          rm -rf compiz-1 dconf evolution gnome-session gtk-3.0 ibus libaccounts-glib nautilus Trolltech.conf ubuntuone update-notifier user-dirs.dirs user-dirs.locale

          The beta driver, I have mentioned in this tutorial does not need to lock libudev and xserver-xorg-video-intel in Ubuntu or Linux Mint.

      5. Thanks xpressrazor! I was able fix Unity!

        regarding the beta driver, originally I installed the one available last weekend (ver. 13.15.100.1-linux-x86.x86_64) and didnt worked for me (the screen kept freezing, no bottons at the top of the windows and so on). I downloaded and installed ver. 13.4. (which is working fine until the automatic upgrades).

        I will take my chances with the new beta (ver. 13.8) and keep you informed of the results…

        Thanks again mate!

        cheers!

      6. ^ I just installed the 13.8 beta with this method, works fine.
        My system:
        Asus N56DP running Linux Mint 15 Cinnamon 64bit
        Radeon 7730M

        So should I go ahead and unlock libudev and xserver-xorg-video-intel?

      7. I followed all the steps, but at boot time, instead of taking me to the user login screen, it takes me to a command prompt login (like a server).
        To recover system, I have to manually restore original xorg.conf.

        Kubuntu 13.04
        Catalyst beta 13.8
        Samsung Chronos7, Radeon HD6750M and Intel graphics

        • If it does not work, you should be able to restore back to your original open source drivers using step 5. Installing AMD graphics driver is not always seamless in Linux. After removing the catalyst driver and removing xorg.conf (or restoring to original version), if it still throws you to the command prompt, you need to install the meta package that fixes lots of these issues. In case of ubuntu the command is.

          sudo apt-get install ubuntu-desktop

          and in case of kubuntu it is

          sudo apt-get install kubuntu-desktop

          Having said that, I still wonder, why it did not work for you. I hope you downloaded catalyst 13.8 beta 2, went with the manual installation steps, created the xorg.conf file using “aticonfig –initial -f” command and made sure new /etc/X11/xorg.conf file is created.

          One more thing you could do before catalyst drive installation is run following commands.

          sudo apt-get update
          sudo apt-get dist-upgrade

          In my case, if I only have open source drivers, I always make sure that I have deleted the /etc/X11/xorg.conf file (I don’t know what you meant by restore). On the other hand, when I have installed catalyst driver, I always make sure /etc/X11/xorg.conf file is created with “aticonfig –initial -f” command.

          If this does not work, you might as well give xorg-edger ppa’s fglrx installer a try.

          Thanks for the response.

      8. Reblogged this on Amy's Ramblings and commented:
        This is great and I want to be able to fix my Ubuntu ATI drivers after the kernel updates again.

      9. Works like a charm!! I had almost given up on installing AMD drivers on my Ubuntu 13.04. I had tried like hundreds of different methods but none of them worked. This did. Thanks a lot @xpressrazor.

      10. Ok, I’m gonna say it:

        THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU

        Finally!!! After more than 2 years, my AMD GPU is working on Ubuntu! I tried many thing before.

        Right now all seems to be working fine, Using lastest drivers 13.12 betav1 on Ubuntu 13.10. All seems to be working fie, just the fan a little lousy, but this is great!

        Thanks again!

      11. After installing ATI Catalsyt Driver in Ubuntu 13.10, there is an increase in login time and logout time. I never experienced this in Ubuntu 13.04.

        Is there any solution for this?

      12. Hey, I have a Sony VPCZ2190X which has a removable external card which essentially acts like a dual graphics setup when connected. Whenever i try to start X with the card attached, i get a kernel panic. Im using 13.10 and the latest beta driver at the time of this post (13.11 beta 9.2) Is there something im missing?

      13. Hi, thank you a lot for the tutorial it worked great on my previous system Mint 15 64bits (ubuntu 13.4) but I’m experiencing an odd issue on mint 16 (ubuntu 13.10).

        Using the manual install I cannot build the debs for saucy, it says something in the lines of “error: distribution not supported”

        Indeed the “–listpkg” option confirmed the lack of support for saucy which doesn’t make sense?!
        Automatic install worked but stopped working after the next reboot.

        This is driving me crazy, even the unofficial amd wiki uses your metthod and don’t aknowledge this issue(http://wiki.cchtml.com/index.php/Ubuntu_Saucy_Installation_Guide).
        I haven’t found anyone else except this german dude encountering the same issue: http://www.computerbase.de/forum/showthread.php?t=1287092&p=14926944
        As a result I am using Xedgers ppa but this is no optimal solution.

        • Just to check, I ran --listpkg against some catalyst versions (even as old as catalyst-12.10) in Ubuntu 13.10 and all show Ubuntu/saucy. I don’t know what to say (I too am confused now, as how can even such an old version of catalyst show Ubuntu/saucy). I used to use Mint (as one of my distros) few months back, but these days I have replaced it with something else as my second distro, therefore whatever I say wouldn’t address your issue.

      14. I ran the –listpkg and got the following packages with Ubuntu:

        Ubuntu/gutsy
        Ubuntu/hardy
        Ubuntu/intrepid
        Ubuntu/jaunty
        Ubuntu/karmic
        Ubuntu/lucid
        Ubuntu/maverick
        Ubuntu/natty
        Ubuntu/oneiric
        Ubuntu/precise
        Ubuntu/quantal
        Ubuntu/raring
        Ubuntu/source

        Is it possible that Ubuntu/source meant to ne Ubuntu/saucy?

        • No, saucy comes up as Ubuntu/saucy in 13.10. Ubuntu/source used to be there all the time. However, when I checked it from non-ubuntu OS (or non 13.10 distro e.g Arch) 13.11beta showed only till Ubuntu/raring (and Ubuntu/source of course).

      15. how to fix slow graphics performances

        i’m using ubuntu 13.04 slow performance then i upgrade the os but graphics card was not starting at low level

        my system config….
        Memory 2.0Gib
        Processor AMD Athlon(tm) 64 X2 Dual Core Processor 4000+ × 2
        Graphics Gallium 0.4 on llvmpipe (LLVM 3.2, 128 bits)
        OS type 32 bit
        Disk 76.5GB

        How to increase the performance….. Any one help me out from this problem

  • 相关阅读:
    C# 基本数据类型
    java二进制,原码、反码、补码、位运算
    .net邮件发送[c#]
    linux软件安装命令
    VB.net实现从ListView控件中异地获取文本内容源代码
    VB获得进程PID
    任意组合指令达到免杀
    免杀之等价替换法
    ASP技巧base64编码、解码函数
    看到一个思路新颖的下载者制作法
  • 原文地址:https://www.cnblogs.com/BigTall/p/3526864.html
Copyright © 2011-2022 走看看