[Pkg-fglrx-devel] Bug#643773: fglrx-driver: Include script for switching between integrated and discrete graphics

Carlos Alberto Lopez Perez clopez at igalia.com
Thu Sep 29 14:25:08 UTC 2011


Package: fglrx-driver
Version: 1:11-8-3
Severity: wishlist


The new version of the tool aticonfig includes a new function for switching the graphic card in computers with two GPUs (these are usually sandybridge based laptops)



# Select ATI (discrete GPU)
aticonfig --px-dgpu
# Select Intel (integrated GPU)
aticonfig --px-igpu
# List which one is activated
aticonfig --px-list


See test example:


For this to work, the aticonfig executes a script ( /usr/lib/fglrx/switchlibGL and /usr/lib/fglrx/switchlibglx ) that is not available at Debian, so the tool fails to switch graphics properly.


The wiki of Gentoo has more information about this scripts:
http://en.gentoo-wiki.com/wiki/Fglrx-hybrid-graphics


I have implemented this script for Debian, it uses update-alternatives to switch between the GL libraries, and also updates the xorg.conf file for each GPU creating symlinks. The configuration for the ATI card (xorg.dgpu.conf) is generated with "aticonfig --initial" and for the integrated one, it is simply a very basic skeleton configuration, so the X server is able to auto-detect the devices.


I also created a Debian package for it. Here is it:

http://people.igalia.com/clopez/fglrx-hybrid-switch_1.0.tar.gz


Simply untar and do the debuild to generate the package. Feel free to improve and/or modify as you desire.


I wish see this included in Debian. Thanks!


Here is some test:

# echo "xhost local:" > /etc/X11/Xsession.d/999-xhost
# aticonfig --px-igpu
PowerXpress: Integrated GPU is selected (Power-Saving mode), please restart Xserver(s) for changes to take effect!
# /etc/init.d/gdm3 restart
Stopping GNOME Display Manager: gdm3.
Starting GNOME Display Manager: gdm3.
# DISPLAY=:0.0 glxgears 
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
296 frames in 5.0 seconds = 59.011 FPS

# aticonfig --px-dgpu
PowerXpress: Discrete GPU is selected (High-Performance mode), please restart Xserver(s) for changes to take effect!
# /etc/init.d/gdm3 restart
Stopping GNOME Display Manager: gdm3.
Starting GNOME Display Manager: gdm3.
# DISPLAY=:0.0 glxgears 
20585 frames in 5.0 seconds = 4116.958 FP

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-fglrx-devel/attachments/20110929/b3b4a553/attachment.pgp>


More information about the Pkg-fglrx-devel mailing list