Configure Hybrid Graphics and reduce Temperature in Arch Linux

This Post contains the instructions to correctly configure Hybrid Graphics, either Intel / ATI or INTEL / Nvidia, as well as the temperature reduction in computers with Core iX Processor in Arch Linux

Instructions

Supported Drivers:
xf86-video-nouveau
xf86-video-ati
xf86-video-intel

Step 1:

Get the list of graphic providers:
$ xrandr --listproviders

If the output is similar to the following, we carry out step 2:
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:radeon

Step 2:

We download the Script to enable the Discrete Graphics card:
$ wget https://www.dropbox.com/s/p2kbq7mrg30cimy/ATI_Enable.sh

Step 3

We edit the Script:
$ nano ATI_Enable.sh

Original:
#!/bin/bash
xrandr --setprovideroffloadsink ID_ATI ID_INTEL
sleep 1
echo "Habilitando..."
glxinfo | grep "OpenGL renderer"
DRI_PRIME=1 glxinfo | grep "OpenGL renderer"

Edited:
#!/bin/bash
xrandr --setprovideroffloadsink 0x55 0x7c
echo "Habilitando..."
sleep 1
echo "Proveedor Grafico: "
glxinfo | grep "OpenGL renderer"
echo "Proveedor Grafico Discreto: "
DRI_PRIME=1 glxinfo | grep "OpenGL renderer"

Step 4:

We give execution permissions and execute:
$ sudo chmod +x ATI_Enable.sh && ./ATI_Enable

** IMPORTANT: Add script to system startup Info: Learn How To Do It

Download Scripts for Discrete Card Power On and Off:
$ sudo su
# cd /usr/bin
# wget https://www.dropbox.com/s/rcvbvl081gt059x/ATI_Off
# wget https://www.dropbox.com/s/9l44p2l75nertr9/ATI_On
# chmod +x ATI_Off
# chmod +x ATI_On

By default both cards turn on when the kernel is loaded and from now on to turn off the discrete card it will be enough to open a terminal and type $ sudo ATI_Off if required we can turn it on with $ sudo ATI_On

** I recommend turning off the discrete card when not in use to improve the working temperatures of the equipment (reduces approximately 10 ~ 20 ºC).

The temperature can be checked Installed lm_sensors package (We give YES to everything that asks)
$ sudo pacman -S lm_sensors && sudo sensors-detect

Now it is only necessary to execute «sensors» to obtain temperature info:
$ sensors

Extra Step

Run the frequency monitor (stopped with Ctrl + C):
$ watch grep "cpu MHz" /proc/cpuinfo

CPU information and frequency scaling:
$ cpupower frequency-info

If you have problem with the controller intel_pstate or you notice that the frequencies of your processor are high despite not being performing tasks that demand it:

We are going to disable the kernel's intel_pstate and we are going to load acpi-cpufreq which is the driver used in kernels prior to 3.9

$ sudo nano /etc/default/grub

We look for the line similar to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet "

And we add intel_pstate=disable

So:

GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_pstate=disable"
We save (Ctrl + O)

We reconfigure the Grub:
grub-mkconfig -o /boot/grub/grub.cfg

** This will take effect until the next reboot, remember that the discrete card turns on automatically.

We're done!!


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   manuelperez said

    great post, does anyone adapt it for Debian or Ubuntu?

    1.    genzodany said

      In Debian and Ubuuntu it is enough to install the Intel drivers and then the proprietary ones of ATI Catalyst, after that from the Catalyst administration panel it is possible to do the switching, the extra step works the same in Debian or Ubuntu, greetings!

  2.   let's use linux said

    Good contribution! I was looking for something like this. 🙂

    1.    genzodany said

      Thanks = D

  3.   geronimo said

    interesting ,,, luckily I have intel ,,

  4.   telpalbrox said

    First very good post. I wanted to ask one thing. I have a hp laptop with an intel HD 3000 card and an AMD Radeon HD 6490M. Why do I get this output when I run the command "xrandr –listproviders":
    Providers: number: 1
    Provider 0: id: 0x45 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 4 associated providers: 0 name: Intel

    In "Providers: number: 1" shouldn't they be 2?
    In windows and ubuntu with the proprietary driver if the AMD graphics works for me, but I have not been able to make it work in Arch. I have also tried to install catalyst following the instructions in the wiki, but I have not succeeded. Add that the Intel card if that works.

    1.    genzodany said

      do you have the xf86-video-intel driver and xf86-video-ati installed?

  5.   Leper_Ivan said

    I got lost in the Intel / ATI and Intel / nVidia pass. I have an nVidia 8200M G? Will it be useful to apply this guide?

    1.    x11tete11x said

      if you have a discrete intel board and a dedicated nvidia then yes

  6.   majority said

    Good post… Thanks for sharing…

  7.   eliotime3000 said

    WTF ?!

    How did you go about putting the old Youtube player?

    1.    genzodany said

      the same blog when adding the video gives you the tool to create swf that will play your video, it really is not native to youtube it is a built-in player

  8.   Phew said

    Good post! I've been having temperature issues with Arch Linux for the past few weeks. I have Arch Linux in Dual Boot with Windows 7 and it happened to me that as soon as Arch started the temperature soared and not only of the CPU but also of the USB port plates and the HDD which did not happen with Windows. Arch Linux has been saved from being uninstalled from my notebook thanks to your post! 🙂 Greetings