Disabling discrete AMD Graphics card in linux

This article is posted to show how to disable the discrete AMD graphics card in a switchable graphics setup in laptops. The integrated graphics card can be an AMD or an Intel. Disabling the discrete graphics card will save your laptop from overheating and will save considerable amount of power.

This article is intended for those who are ready to have only the integrated card enabled. If you can configure both cards correctly, then you probably don’t need this. If you would like to have both cards running and want to switch between them, you need to look elsewhere.

The Problem:

I’ve a Dell Inspiron 15R model with HD 7670M discrete graphics and Ivy Bridge Intel 4000 integrated graphics card. All the distributions I’ve tried so far ran too hot with a lot of fan noise. In some cases, the laptop would turn off all of a sudden as it reached the maximum temperature it can handle!! The integrated card is capable enough to play 1080p video and desktops effects and hence I prefer the dedicated card turned off all the time.

The Solution:

  • Check if you have two graphics cards

Open ‘terminal’ and type the following command.

$lspci | grep VGA

If you see more than one graphics card, then you have a switchable graphics setup.

  • Check if both the cards are powered on

To check this, we need be able to view the file /sys/kernel/debug/vgaswitcheroo/switch. Type the following in terminal.

$cat /sys/kernel/debug/vgaswitcheroo/switch 

If you get  ‘Permission Denied’ error, then type,

$sudo chown <your user name> /sys/kernel/debug/

and then, type

$sudo chown <your user name>  /sys/kernel/debug/vgaswitcheroo/switch

Now you should be able to view the file using the ‘cat’ command given above.

If you get ‘No such file or directory’ error when trying the command ‘cat /sys/kernel/debug/vgaswitcheroo/switch’, then type

$sudo mount -t debugfs none /sys/kernel/debug

and follow the above ‘cat’ command to view the ‘switch’ file.

The result of the ‘cat /sys/kernel/debug/vgaswitcheroo/switch’ will have ‘Pwr’ in both lines (for integrated card which is denoted using the string “IGD”  and“DIS” for discrete card)  indicating both cards are powered on.

  • Disable the discrete graphics card

To disable the discrete card, type

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

and if you check the ‘switch’ file using the ‘cat’ command given before, you can see that the ‘Pwr’ has been changed to ‘off’.

You can use a temperature or power monitoring tool to compare the power usages before and after disabling the discrete graphics card.

To have the discrete card disabled at system start-up so that you won’t have to do all these steps at every time you boot your system, you may use rc.local file.

Notes:

  • I’ve tested the above method only using the ATI/Intel available in my laptop
  • Distributions tested : Ubuntu 12.10 and Fedora 18
Disabling discrete AMD Graphics card in linux

3 thoughts on “Disabling discrete AMD Graphics card in linux

  1. Ranganath says:

    when typing the command ‘$sudo mount debugfs none /sys/kernel/debug ‘
    i am getting the result as :

    Usage:
    mount [-lhV]
    mount -a [options]
    mount [options] [–source] | [–target]
    mount [options]
    mount []

    Options:
    -a, –all mount all filesystems mentioned in fstab
    -c, –no-canonicalize don’t canonicalize paths
    -f, –fake dry run; skip the mount(2) syscall
    -F, –fork fork off for each device (use with -a)
    -T, –fstab alternative file to /etc/fstab
    -h, –help display this help text and exit
    -i, –internal-only don’t call the mount. helpers
    -l, –show-labels lists all mounts with LABELs
    -n, –no-mtab don’t write to /etc/mtab
    -o, –options comma-separated list of mount options
    -O, –test-opts limit the set of filesystems (use with -a)
    -r, –read-only mount the filesystem read-only (same as -o ro)
    -t, –types limit the set of filesystem types
    –source explicitly specifies source (path, label, uuid)
    –target explicitly specifies mountpoint
    -v, –verbose say what is being done
    -V, –version display version information and exit
    -w, –rw, –read-write mount the filesystem read-write (default)

    -h, –help display this help and exit
    -V, –version output version information and exit

    Source:
    -L, –label synonym for LABEL=
    -U, –uuid synonym for UUID=
    LABEL= specifies device by filesystem label
    UUID= specifies device by filesystem UUID
    PARTLABEL= specifies device by partition label
    PARTUUID= specifies device by partition UUID
    specifies device by path
    mountpoint for bind mounts (see –bind/rbind)
    regular file for loopdev setup

    Operations:
    -B, –bind mount a subtree somewhere else (same as -o bind)
    -M, –move move a subtree to some other place
    -R, –rbind mount a subtree and all submounts somewhere else
    –make-shared mark a subtree as shared
    –make-slave mark a subtree as slave
    –make-private mark a subtree as private
    –make-unbindable mark a subtree as unbindable
    –make-rshared recursively mark a whole subtree as shared
    –make-rslave recursively mark a whole subtree as slave
    –make-rprivate recursively mark a whole subtree as private
    –make-runbindable recursively mark a whole subtree as unbindable

    For more details see mount(8).
    ——
    so i guess the command is not mounting anything

    so can you help me with this ???
    P.S. i am using fedora19

  2. oh my god, you saved my life… I was about to throw my laptop since radeon card is not working.

    steps 1 : In this file you can add the option radeon.runpm=0 in the call to the current kernel (usually after ro quiet splash).
    Step 2 : $echo OFF >/sys/kernel/debug/vgaswitcheroo/switch

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s