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

2011-10-05 Thread Patrick Matthäi
On 29.09.2011 17:02, Carlos Alberto Lopez Perez wrote:
 On 29/09/11 16:44, Patrick Matthäi wrote:
 Hi,

 we are using the alternatives system for it as per Debian policy

 
 Sorry.. what do you mean with this? Which is the Debian way for switching 
 from the integrated to the discrete GPU? Executing update-alternatives 
 manually?
 
 
 If I execute aticonfig --px-dgpu or aticonfig --px-igpu I simply get:
 PowerXpress error: Cannot stat '/usr/lib/fglrx/switchlibGL': No such file or 
 directory
 
 
 The Ubuntu folks have implemented a python script for this task. Just 
 download the last package from their web and checkout it out
 
 See:
 
 ./debian/pxpress/switchlibGL
 ./debian/pxpress/switchlibglx

@Andreas:
What do you think of writing a similar script, which returns the status
and also switches between mesa/fglrx (about alternatives)?

-- 
/*
Mit freundlichem Gruß / With kind regards,
 Patrick Matthäi
 GNU/Linux Debian Developer

E-Mail: pmatth...@debian.org
patr...@linux-dev.org
*/



signature.asc
Description: OpenPGP digital signature


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

2011-09-29 Thread Patrick Matthäi

Hi,

we are using the alternatives system for it as per Debian policy

Am 29.09.2011 16:25, schrieb Carlos Alberto Lopez Perez:

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




___
Pkg-fglrx-devel mailing list
pkg-fglrx-de...@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-fglrx-devel





--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2011-09-29 Thread Carlos Alberto Lopez Perez
On 29/09/11 16:44, Patrick Matthäi wrote:
 Hi,
 
 we are using the alternatives system for it as per Debian policy
 

Sorry.. what do you mean with this? Which is the Debian way for switching from 
the integrated to the discrete GPU? Executing update-alternatives manually?


If I execute aticonfig --px-dgpu or aticonfig --px-igpu I simply get:
PowerXpress error: Cannot stat '/usr/lib/fglrx/switchlibGL': No such file or 
directory


The Ubuntu folks have implemented a python script for this task. Just download 
the last package from their web and checkout it out

See:

./debian/pxpress/switchlibGL
./debian/pxpress/switchlibglx

From: http://packages.ubuntu.com/oneiric/fglrx [1]



I tried first with their script but I was not able to get it working so I ended 
cooking this solution based on Gentoo's suggested one.



[1] 
http://archive.ubuntu.com/ubuntu/pool/restricted/f/fglrx-installer/fglrx-installer_8.881-0ubuntu2.diff.gz



signature.asc
Description: OpenPGP digital signature