In this tutorial I am going to show you how to configure two graphic card Intel and Amd on most laptops using proprietary and open source drivers and how to switch between them.
OverviewMost of current laptops include two graphic cards with different abilities and power consumptions often known as hybrid graphic.
The fist one IDG integrated graphic allow power save to safe our battery and low-end 3D rendering. Often it is using for daily work.
The second one DDG dedicated graphic -major power consumption with high 3D rendering performance, ussually suitable for playing games, 3D graphic, rendering etc.
This model gives to user the possibility of choice the graphic card he need. …. doplnit
In this article I will show you how to successfully install INTEL/ATI proprietary and open-source drivers.
Open-source driversThe best and easy way is to use open-source drivers. It need not any invention. Only if you want to specify some device details.So install ati and intel drivers and you are done
# pacman -Sy xf86-video-ati xf86-video-intelBy default, without any xorg.conf file the system starts with intel driver. To use radeon card you have two possibilities:
1. Using conf fileIf you want manual configuration, create /etc/X11/xorg.conf.d/20-radeon.conf , and add the following:
Section "Device" Identifier "Radeon" Driver "radeon" EndSectionTo this file you can specify more options of course.
2. Using PRIMEPRIME is one of the method to switch between IDG and DDG. For me it works fine so this is my choice.Firstly we need to find our graphic card:
$ xrandr --listprovidersyou can see two graphic card
Providers: number : 2 Provider 0: id: 0x7d cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 1 name:Intel Provider 1: id: 0x56 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 1 associated providers: 1 name:radeonThe command xrandr --setprovideroffloadsink provider sink can be used to make a render offload provider send its output to the sink provider (the provider which has a display connected). The provider and sink identifiers can be numeric (0x7d, 0x56) or a case-sensitive name (Intel, radeon).
$ xrandr --setprovideroutputsource radeon Intel or $ xrandr --setprovideroutputsource 0x7d 0x56Now, you can choose your discrete card for the applications who need it the most ( 3D modellers, games …) by prepending the DRI_PRIME=1 environment variable:
$ DRI_PRIME=1 your_progamFor example:
$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"gives the output:
OpenGL renderer string: Gallium 0.4 on AMD TURKScompare with
$ glxinfo | grep "OpenGL renderer" OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile I suppose it is trivial to runxrandr setprovideroutputsource radeon Intel
during the DE starts KDE, GNOME, XFCE4 …. Proprietary driversThis method is more difficult and need more user inventions. The catalyst drivers, because of their slow development, are not at official repository, we have to build it form AUR.The best way is to install catalyst-total package which include the driver, the kernel utilities and the 32 bit kernel utilities.
$ yaourt -S catalyst-totalThe second problem we have to solve catalyst drivers needs xorg up to version 1.17, so we have to downgrade xorg server.
Using Vi0L0’s repository it is easy. Add the repository above all other repositories in pacman.conf
[xorg117] Server = http://catalyst.wirephire.com/repo/xorg117/$arch ## Mirrors, if the primary server does not work or is too slow: #Server = http://mirror.hactar.bz/Vi0L0/xorg117/$archUpgrade system, dont afraid to remove all conflict packages
# pacman -SyuuAfter this it is necessary to configure Xorg create /etc/X11/xorg.conf file. For this we can use aticonfig:
# aticonfig --initialWe can check and correct the config file . For example:
Section "ServerLayout" Identifier "aticonfig Layout" Screen 0 "aticonfig-Screen[0]-0" 0 0 EndSection Section "Module" # This loads the DRI/GLX modules Load "glx" Load "dri" Load "dri3" Load "GLcore" Load "dbe" Load "extmod" EndSection Section "ServerFlags" # Option "AutoAddDevices" "False" Option "AllowEmptyInput" "no" EndSection Section "Monitor" Identifier "aticonfig-Monitor[0]-0" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" EndSection Section "Device" Identifier "aticonfig-Device[0]-0" Driver "fglrx" Option "TexturedXrender" "true" Option "UseFastTLS" "0" Option "OpenGLOverlay" "0" Option "XaaNoOffscreenPixmaps" "false" BusID "PCI:1:0:0" // sometimes this parametr need to be corrected - try check with lspci EndSection Section "Screen" Identifier "aticonfig-Screen[0]-0" Device "aticonfig-Device[0]-0" Monitor "aticonfig-Monitor[0]-0" DefaultDepth 24 EndSection Section "DRI" Mode 0666 # May help enable direct rendering. EndSection To switch between graphical cards we can usePowerXpress support.
PowerXpress technology allows switching notebooks with dual-graphic capability from integrated graphics (IGP) to discrete graphics either to increase battery life or to achieve better 3D rendering capabilities.The easiest way is to use pxp_switch_catalyst switching script that will perform some additional usefull operations:
Switching xorg.conf it will rename xorg.conf into xorg.conf.cat (if there is fglrx inside) or xorg.conf.oth (if there is intel inside) and then it will create a symlink to xorg.conf , depending on what you chose. Running aticonfig --px-Xgpu . Running switchlibGL . Adding/removing fglrx into/from /etc/modules-load.d/catalyst.conf .Usage:
# pxp_switch_catalyst amd # pxp_switch_catalyst inteland restart the X server
Another posibility is to have one X server runnig with IDG (Intel) and more consumable programs runs at second X server. Boot your DE with ATI config then rename xorg.conf
# mv /etc/X11/xorg.xonf /etc/X11/xorg.conf.atiand restart X server. Tt will use the Intel driver by default instead of fglrx. To start the second X server with fglrx (ATI) driver:
method To start the second X server using fglrx, simply move xorg.conf back to the proper place ( /etc/X11/xorg.conf ) before starting second X session. # mv /etc/X11/xorg.xonf.ati /etc/X11/xorg.confThis method even allows you to switch between running X sessions. When you are done using fglrx, move xorg.conf again.
method using xrun xcriptthis method is almost the same as the first one, but instead of copying xorg.conf back to proper place it is possible to run script and inside it specify the location of