Howto: radeon driver tweaking

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
eanfrid
Level 7
Level 7
Posts: 1865
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Howto: radeon driver tweaking

Postby eanfrid » Wed Jun 26, 2013 6:05 am

Xorg hardware auto-setting chooses sometimes wrong defaults for your GPU. Here are the basics to overcome some common troubles with AMD GPUs using the open-source radeon driver (package "xserver-xorg-video-radeon"). Depending on your actual GPU model, some options may have different default values and/or options may have no effect at all.

1/ Create a device.conf file under the "/etc/X11/xorg.conf.d" folder

Code: Select all

sudo touch /etc/X11/xorg.conf.d/device.conf


2/ Add the basic content

Code: Select all

sudo nano /etc/X11/xorg.conf.d/device.conf

and then add

Code: Select all

Section "Device"
   Identifier   "my_device"
   Driver   "radeon"
EndSection


3/ Add the configuration options that will override Xorg auto-detection by editing once again the "device.conf" file

Code: Select all

sudo nano /etc/X11/xorg.conf.d/device.conf


disable unnecessary video sync for performance (tearing will probably appear though)

Code: Select all

   Option      "SwapbuffersWait"   "off"

circumvent the dreaded "black screen with mouse pointer" once logged in your DE

Code: Select all

   Option      "ColorTiling2D"      "off"

force your GPU to use the best adaptative powersaving mode

Code: Select all

   Option      "DynamicPM"      "on"

if you enabled these 3 lines you will have now something like:

Code: Select all

Section "Device"
   Identifier   "HD6770"
   Driver   "radeon"
   Option      "SwapbuffersWait"   "off"
   Option      "ColorTiling2D"      "off"
   Option      "DynamicPM"      "on"
EndSection


4/ Read the manual: "man radeon.conf" for many more tweaking options that can make your GPU work the way you want.

5/ Check what is going on:

Code: Select all

cat /var/log/Xorg.0.log

will actually show you which options were loaded and which features were applied or auto-detected

Additional information about the radeon open-source driver features and available settings can be found on Xorg website:
http://www.x.org/wiki/RadeonFeature
Main desktop: Debian GNU/Linux Jessie 64bit - MATE
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox

User avatar
eanfrid
Level 7
Level 7
Posts: 1865
Joined: Mon Apr 30, 2012 2:49 am
Location: FR

Re: Howto: radeon driver tweaking

Postby eanfrid » Mon Jul 08, 2013 6:18 am

Regarding overheating while using this driver, you can create a script to switch to more appropriate parameters.

1/ Create and store this "radeonclk" script in "/usr/local/bin"

Code: Select all

#!/bin/bash
# radeonclk

case $1 in

    dyn)
   echo "dynpm" > /sys/class/drm/card0/device/power_method
        ;;
    low)
        echo "profile" > /sys/class/drm/card0/device/power_method && echo "low" > /sys/class/drm/card0/device/power_profile
   ;;
    mid)
        echo "profile" > /sys/class/drm/card0/device/power_method && echo "mid" > /sys/class/drm/card0/device/power_profile
   ;;
    auto)
        echo "profile" > /sys/class/drm/card0/device/power_method && echo "auto" > /sys/class/drm/card0/device/power_profile
   ;;
    *)
   echo "Usage: radeonclk (dyn|low|mid|auto)"
   exit 1
   ;;
esac
echo "Mode radeon: $(cat /sys/class/drm/card0/device/power_method) $(cat /sys/class/drm/card0/device/power_profile)"
then make it executable with

Code: Select all

sudo chmod +x /usr/local/bin/radeonclk


2/ Usage

The script can be used manually with (for example):

Code: Select all

sudo radeonclk dyn

The script will output the new profile you just chose and if you don't pass any parameter, the command will return its usage syntax instead.

The "dynamic" (dyn param) power method is the most efficient performance/powersaving mix but the less compatible with special configs. The "low" option of the "profile" power method is the most efficient powersaving mode, at the expense of performance. None of these two modes is the default running state (default is "auto") of the radeon driver, so users complaining of overheating should try one of these two modes. For example, on my HD6770 I get these average temperatures in common desktop use:

dyn (aka "dynamic" power method): 60°C - 66°C in summer / best overall performances
auto (aka "profile" power method, auto profile): 66°C - 70°C in summer
mid (aka "profile" power method, medium profile): 63°C / good performances
low (aka "profile" power method, low power profile): 45°C - 48°C in summer / slowest performance

I never use the "high" profile method since the GPU will unnecessarily always run at full speed.
Main desktop: Debian GNU/Linux Jessie 64bit - MATE
(i5 2400@3.7GHz - 16GB DDR3 - HD6770 w/radeon driver - SSD+RAID1)
Safer than Dropbox


Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 3 guests