How to switch between free and non-free video drivers

amdgpu-pro
amdgpu
nvidia
amd

(Robert Griffiths) #1

Contents

  1. Steps to switch from radeonhd to Catalyst/fglrx - only for HD5xxx series and newer Radeons
  2. Steps to switch from Catalyst/fglrx to radeonhd
  3. Steps to switch from Nouveau to NVIDIA
  4. Steps to switch from NVIDIA to Nouveau
  5. Use the fall-back driver, if all else fails
  6. Tip for hybrid cards not booting
  7. Common issues

    7.1. Black bars over the scren / undersized or oversized picture using AMD cards

    7.2. Conflicts between libgl and nvidia-utils or catalyst-utils

    7.3. Error: failed to prepare transaction (could not satisfy dependencies)
      7.3.1. Catalyst
      7.3.2. NVIDIA

    7.4. Installing the first lib32 package after driver update

Switching Between Free and Non-free Video-Drivers

Chakra gives you the option during the startup of the LiveCD to choose between using and installing the free or non-free (proprietary) graphics card drivers. There are several reasons why it would be nice to be able to switch graphics card drivers anytime after you have installed Chakra. Some users don’t realize that when the LiveCD starts the default option is for free drivers, but would have preferred to use non-free. Or that the driver currently in use is causing problems and you need to switch to the other one.
To go from free graphic card drivers to either NVIDIA or Catalyst proprietary drivers, also means going to a different libgl. Because the Catalyst and NVIDIA drivers both provide their own, it is not just a simple “pacman -S <new_driver>”. Used drivers need to be removed first!

1. Steps to switch from radeonhd to Catalyst/fglrx - only for HD5xxx series and newer Radeons

THIS SESSION IS OUT OF DATE: Catalyst has been dropped by Chakra, read this post for more information.

note: very likely you will experience worse performance in KDE’s KWIN window manager compared to the radeonHD driver. This can mean sensable lag with desktop effects and lower overall performance of the desktop. (This issue does not affects performance in 3D apps and games).

sudo pacman -Syu
sudo pacman -Rdd mesa-libgl lib32-mesa-libgl
sudo pacman -R xf86-video-ati


If lib32-mesa-libgl are not installed, then just leave it out from the commands above.

Most cards don’t need this, but if you know that yours does, disable (Kernel-based Mode-Setting) KMS. Look for this line in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"
and at the end of this line add nomodeset so it looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
Remember to update grub after this:

sudo update-grub

Now install Catalyst:

sudo pacman -S catalyst
sudo pacman -S catalyst-libgl lib32-catalyst-libgl
sudo modprobe fglrx


If you have a /etc/X11/xorg.conf file, then the best to do is to remove it (and backup, just in case) before the next step. Catalyst will generate a new /etc/X11/xorg.conf for itself.

sudo aticonfig --initial

note: For Multiple Monitors
However, if you have two monitors and want to use both of them, you can run the command stated below. Note that this example will generate a dual head configuration with the second screen located above the first screen.

sudo aticonfig --initial=dual-head --screen-layout=above --input=/etc/X11/xorg.conf

For more options of aticonfig see
sudo aticonfig --help | less

sudo reboot

After a reboot, you can launch Catalyst Control Center with the needed rights using this command

kdesu amdcccle

To eliminate image and video tearing, go to Display settings -> Tear free desktop, where check Enable tear free desktop option on the conrtol center.

If you want to use the Video Acceleration API (VA-API) for HW acceleration of videos, then install the needed package

sudo pacman -S xvba-video

Then you can use VA-API output in programs like VLC, or vaapi enabled mplayer (SMPlayer with mplayer-vaapi) but it may not work due to the lack of VA-API support.

If you want to monitor your card’s propertys like core and memory speeds or temperature, then you can install and put to your desktop the pyCatalystmonitor plasmoid from KDE’s plasmoid downloader.

2. Steps to switch from Catalyst/fglrx to radeonhd

Remove the Catalyst/fglrx driver:

sudo pacman -Syu
sudo pacman -Rdd catalyst catalyst-libgl catalyst-utils lib32-catalyst-libgl lib32-catalyst-utils

If lib32-catalyst… packages are not installed, then just leave it out from the command above.

Install the radeonhd driver:

sudo pacman -S xf86-video-ati mesa-libgl lib32-mesa-libgl

Nowadays, manual editing of xorg.conf are no more required.
Instead, please remove (and backup, just in case) the /etc/X11/xorg.conf file from the X11 folder, because the system will handle everything by itself.

Remove nomodeset from your kernel line in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset"
or
GRUB_CMDLINE_LINUX_DEFAULT="quiet radeon.modeset=0"
and at the end of this line remove either nomodeset or radeon.modeset=0 so it looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
Remember to update grub after this, and reboot:

sudo update-grub
sudo reboot

If you want to use hardware acceleration for video playback, then install VDPAU related packages. VDPAU is an open source library and API to offload portions of the video decoding process and video post-processing to the GPU video-hardware.

sudo pacman -S libvdpau mesa-vdpau

After this step, you can set players like VLC, Bomi and SMPlayer to use VDPAU for video output and video decode. If you experience problems in video players with VDPAU output, then try to set it to R600 mode. Add the necessary enviromental variables to your bashrc file, then reboot.

printf ‘\nexport LIBVA_DRIVER_NAME=vdpau\nexport VDPAU_DRIVER=r600’ >> ~/.bashrc

It will needs a logout -> login to activate the new variables.

3. Steps to switch from Nouveau to NVIDIA

THIS SESSION IS OUT OF DATE: For GeForce 400/500 series cards [NVCx and NVDx] from around 2010-2011, install the nvidia-390xx package. For GeForce 8/9, ION and 100-300 series cards [NV5x, NV8x, NV9x and NVAx] from around 2006-2010, install the nvidia-340xx package.

Update your system and remove entries related to nouveau:

sudo pacman -Syu
sudo pacman -Rdd mesa-libgl
sudo pacman -R xf86-video-nouveau

Most NVIDIA graphics cards need these packages:

sudo pacman -S nvidia
sudo pacman -S nvidia-utils

7xxx and below graphics cards:

sudo pacman -S nvidia-304xx
sudo pacman -S nvidia-304xx-utils

This step only needed for 304xx: To create the correct entries in /etc/x11/xorg.conf:

sudo nvidia-xconfig

4. Steps to switch from NVIDIA to Nouveau

Remove the NVIDIA driver:

If you have a newer NVIDIA graphics card:

sudo pacman -Syu
sudo pacman -Rdd nvidia
sudo pacman -Rdd nvidia-utils

If you have a GeForce FX series graphics card:

sudo pacman -Syu
sudo pacman -Rdd nvidia-173xx
sudo pacman -Rdd nvidia-173xx-utils

If you have a 7xxx and below graphics card:

sudo pacman -Syu
sudo pacman -Rdd nvidia-304xx
sudo pacman -Rdd nvidia-304xx-utils

Install the Nouveau driver:

sudo pacman -Syu
sudo pacman -S xf86-video-nouveau
sudo modprobe nouveau

There is no automatic way of editing xorg.conf for the Nouveau driver, so:

kdesu kate /etc/X11/xorg.conf

Look for information below. Comment the “nvidia” line out by adding the hash (#) symbol in front and add the line below it listed here:

Section "Device"

Identifier “Card0”
#Driver “nvidia”
Driver “nouveau”
VendorName “nVidia Corporation”
BoardName “G96-GeForce 9400 GT”
BusID “PCI:1:0:0”
Option “DRI” “true”
EndSection

5. Use the fall-back driver, if all else fails

Unfortunately there are cases neither free or non-free drivers will produce a working desktop. In those cases, it is recommended to start the LiveCD with the vesa driver (same driver for all video cards).

To use the vesa driver, start the LiveCD like normal, select your language on the first screen. Next screen use the “Tab” key, an editable line will show at the bottom of your screen. At the end of that line, switch “xdriver=no” to “xdriver=vesa”. Editing will start at the end of this line, so using ‘backspace’ will remove text, normal typing will enter text.

6. Tip for hybrid cards not booting

Chakra is working on fully supporting hybrid graphics cards, but unfortunately, not all are working yet. To still be able to boot into a live-CD, it is needed to turn of one of the cards. Some can do this in the BIOS. For those who can’t, follow these steps:

  • select your language on the first screen
  • next screen use the "Tab" key
  • editable line will show at the bottom of your screen at the end of that line, add "edd=off"

    7. Common issues

    Are you trying to switch from Intel to Nvidia or Catalyst and you can’t? Are you trying to change your graphics card driver but you can’t? Are you trying to install a lib32 package but you can’t? Don’t worry.

    7.1. Black bars over the scren / undersized or oversized picture using AMD cards

    This is a hardware related issue, mostly when using an LcdTV as a monitor. Switching Radeon cards in your pc may alter this situation, so proper settings may be card dependent. With catalyst/fglrx driver, you can use the driver to adjust the overcan / underscan value in the Catalyst Control Center. With the free driver, you can try this solution: related arch wiki page

    7.2. Conflicts between libgl and nvidia-utils or catalyst-utils

    libgl and catalyst-utils are in conflict. Remove libgl? [y/N] Y

    libgl and nvidia-utils are in conflict. Remove libgl? [y/N] Y

    There is nothing wrong. libgl is also provided by catalyst-utils or nvidia-utils. You can replace libgl by nvidia-utils or catalyst-utils without problem (just install the correct one for your graphics card.)

    7.3. Error: failed to prepare transaction (could not satisfy dependencies)

    If you answer yes and pacman is still showing an error related to dependencies would be because you have lib32 packages installed in your system. Your new error should look like:

    error: failed to prepare transaction (could not satisfy dependencies)
    :: catalyst: requires catalyst-utils

    error: failed to prepare transaction (could not satisfy dependencies)
    :: nvidia: requires nvidia-utils

    You just need to install the lib32 equivalent to your graphics card:

    7.3.1. Catalyst

    If you are trying to install catalyst-utils you will need lib32-catalyst-utils too:

    sudo pacman -S catalyst-utils lib32-catalyst-utils

    7.3.2. NVIDIA

    If you are trying to install nvidia-utils you will need lib32-nvidia-utils too:

    sudo pacman -S nvidia-utils lib32-nvidia-utils

    7.4. Installing the first lib32 package after driver update

    The last scenario with libgl error could come with the first lib32-package installation. Imagine you installed nvidia-utils without problems and now you want to install Skype. You will see an error related to libgl, asking to remove nvidia-utils. You only need to install lib32-nvidia-utils before doing it. Of course, this is the same scenario for catalyst-utils, also for other lib32-packages.


  • How do I switch to proprietary nvidia drivers?
    Chakra 2017.10 "Goedel" released
    Rilasciata Chakra 2017.10 "Goedel"
    Linux 與 systemd 更新,同時還有 Plasma 5.13.5、Applications 18.08.1、Frameworks 5.50 已經可用
    Linux and systemd updates, with Plasma 5.13.5, Applications 18.08.1 and Frameworks 5.50 by KDE now available to all Chakra users
    Aggiornamenti per linux e systemd, KDE Plasma 5.13.5, Applications 18.08.1 e Frameworks 5.50
    Chakra 2017.10 “Goedel” 釋出
    Liberada Chakra 2017.10 “Goedel”
    Actualizaciones de Linux y systemd, con Plasma 5.13.5, Aplicaciones 18.08.1 y Frameworks 5.50 de KDE ahora disponibles para todos los usuarios de Chakra
    (Neofytos Kolokotronis) #2

    Thanks for posting this here @robgriff444! :+1: I made it a wiki entry so everyone can edit it, hoping it will gradually get into a better shape. :smiley:


    (Robert Griffiths) #3

    What’s a wiki entry? I can only find FAQs and Tutorials…


    (Hans Tovetjärn) #4

    Everything posted in the #tutorials category are automatically made wiki entries, which means that everyone can edit them, as explained above. This means that the instructions can be maintained by the community, even if the original poster is absent.


    Upgrades for xorg, kernel and graphics drivers include important changes and might require manual intervention
    (Robert Griffiths) #5

    So when you say wiki entry you mean a type of a forum post, not a copy of a forum post into a wiki elsewhere?

    I just want to be clear because I already put it in Tutorials so I don’t understand what tetris4 did that I hadn’t already done, and I only ask this so that next time I find something useful like this, I can put it in the right place.


    (Hans Tovetjärn) #6

    You posted this in #help, so it wasn’t made a wiki entry because that category is for asking and answering questions. I updated the category description to reflect this.


    (Robert Griffiths) #7

    Yes, I know… I first posted it in help, but then I changed it to tutorials before tetris4 looked at it so that is why I was confused - and it was marked as in tutorials in the main menu before anyone edited it, so I had to assume he had done something more than moving it to tutorials because I had already done that. Maybe there’s a bug with the forum software?

    But, whatever, I understand that all I need do in future is put it in tutorials.


    (Neofytos Kolokotronis) #8

    Discourse allows for forum posts that can be edited and maintained by everyone, this is what I meant by wiki entry earlier. So yeah, nothing to do with it being copy pasted from the wiki in this case.

    I wasn’t aware that all posts under #tutorials are automatically turned into wikis, and for some reason Discourse gave me that option when I was looking to enabled it. It was probably just a matter of timing. It’s great to know that this is automated for all posts in this section, @totte one step ahead! :slight_smile:

    The idea is for discourse to replace our old wiki in the long term. So yes, feel free to add additional content to things you find useful or missing (e.g. the bumblebee/hybrid cards instructions come to mind).


    (Robert Griffiths) #9

    Lol, so @tetris4 you DID make a change to the post type so it can be edited by anyone, and @totte this happens automatically in tutorials!

    Anyway, round and round in circles, but I’m no longer confused :stuck_out_tongue_winking_eye::sunglasses:


    (Hans Tovetjärn) #10

    I assume that topics recategorized to #tutorials aren’t also automatically made wikis, unlike topics initially created here. If you check the history of your initial post you will see that it was then made a wiki manually.


    (Robert Griffiths) #11

    Ok I looked at the post and I can see it… thanks


    (Robert Griffiths) #12

    I can’t find a link to the hybrid wiki page on google - do you know what it was called, or any words I can use to search?


    (Neofytos Kolokotronis) #13

    Thanks for looking into it! I searched around a bit, duckduckgo says the page was called Bumblebee and had this link:
    https://chakralinux.org/wiki/index.php?title=Bumblebee
    I can’t seem to find it on google though, hopefully you can do better.

    In any case, let’s keep the thread relevant to the initial post as we are getting off topic. Feel free to start another thread if you want to further discuss on this.


    (system) #14

    This topic was automatically closed 170 days after the last reply. New replies are no longer allowed.


    (Hans Tovetjärn) #15