SwitherWHAT?kkspeed wrote:VGA switheroo stuffs
Sorry, it's switcheroo... I mean I can switch graphics cards with the opensource driver now.audiodef wrote:SwitherWHAT?kkspeed wrote:VGA switheroo stuffs![]()
![]()
![]()
Yep, but it is said that ATI Catalyst 11.4 or later supports PowerXpress, which can make switching graphics possible. I've got no idea how to do this, since if I run aticonfig to generate an xorg.conf and startx with embeded graphic card enabled, the X won't start and will give me a list of errors.tclover wrote:VGASWITCHEROO IS AVAILABLE ONLy FOR RADEON/i915(or i820? or i960?).

Code: Select all
#!/bin/bash
# switchlibGL
#
# Copyright (c) 2011 Advanced Micro Devices, Inc.
#
# Purpose:
# For switch between AMD and Intel graphic driver library.
#
# Usage:
# switchlibGL amd|intel|query
# amd: switches to the AMD version of libGL.
# intel: switches to the open-source version of libGL .
# query: checks, which version is currently active and prints either "amd"
# or "intel" or "unknown" on the standard output.
# must be root to execute this script
ARCH=`uname -m`
E_ERR=1
# Check if root
if [ "`whoami`" != "root" ]; then
echo "Must be root to run this script." 1>&2
exit $E_ERR
fi
# One parameter
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` amd|intel|query " 1>&2
echo "Please choose one parameter " 1>&2
exit $E_ERR
fi
# Switch to right mode
case "$1" in
"amd" )
eselect opengl set ati
;;
"intel" )
eselect opengl set xorg-x11
;;
"query" )
current=`eselect opengl show`
case "$current" in
"ati" )
echo "amd"
;;
"xorg-x11" )
echo "intel"
;;
esac
;;
* ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;;
# other than amd|intel|query parameter report an error
esac
# A zero return value from the script upon exit indicates success.
exit 0Code: Select all
Section "Device"
Identifier "ATI"
Driver "fglrx"
Busid "PCI:1:0:0:0"
EndSectionCode: Select all
34c34
< PX_ACTIVEGPU=SDISCRETEED
---
> PX_ACTIVEGPU=SINTEGRATED
35a36,37
> PX_GPUDOWN=R00010000
> PCICONFIG=R021060670700100000000003100000000C0000A000000000040050C600000000015000000000000000000000000000000000FEFF500000000000000003010000
44c46
< RebootTimeStamp=S0111/06/06 19:24:01
---
> RebootTimeStamp=S0111/06/06 06:29:08
nVidia outright refuses to support it on Linux. You'll be buying a very expensive, very hot piece of silicon you aren't allowed to even use.ad_meis wrote:Ant P., what is the issue with NVdia Optimus?
I am planning to buy a thinkpad that comes with that card, is it bad? Could please give me some reference to get informed?
many thanks
m
gdbalbuzard wrote:hello gentoo users,
I managed to use the switchable capabilities of the ati driver within gentoo (amd64). Below are some explanation. If someone want to update the gentoo wiki based on these explanation, correct my english errors or to extend what I did, I see no objection.
The explanation below worked on my laptop with the ati-drivers version 11.5 and 11.6 (I have not tested for older version).
preliminaries : I have one hp pavilion dv6-6080 laptop with a core i7-2630M processor and a ati radeon 6470M discrete graphic card.
lspci | grep -i vga
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
01:00.0 VGA compatible controller: ATI Technologies Inc NI Seymour [AMD Radeon HD 6470M] (rev ff)
The configuration is done in two step :
step 1 : install the ati driver with emerge. In order to have switchable capabilities, you need to add two scripts that are not install by the ebuild.
These two script are named switchlibGL and switchlibglx and should be located in the /usr/lib64/fglrx/ folder.
Some scripts are shipped with the ati-drivers but they do not work for gentoo so don't blame any gentoo developpers for them being absent. Basicly the purpose of this scripts is to manage symlinks between the libGL and libglx dynamic library. This is exactly (I guess) what eselect opengl set does.
For the sake of simplicity I am using the same script for both switchlibGL and switchlibglx. Below is that script. As one can notice it is based on one AMD script (in fact the one you could find in the driver distro and I modify it in order to reflect the gentoo way of doing things) so I don't know if there is any legal issue in modifying the script and then using it.
Code: Select all
#!/bin/bash # switchlibGL # # Copyright (c) 2011 Advanced Micro Devices, Inc. # # Purpose: # For switch between AMD and Intel graphic driver library. # # Usage: # switchlibGL amd|intel|query # amd: switches to the AMD version of libGL. # intel: switches to the open-source version of libGL . # query: checks, which version is currently active and prints either "amd" # or "intel" or "unknown" on the standard output. # must be root to execute this script ARCH=`uname -m` E_ERR=1 # Check if root if [ "`whoami`" != "root" ]; then echo "Must be root to run this script." 1>&2 exit $E_ERR fi # One parameter if [ $# -ne 1 ]; then echo "Usage: `basename $0` amd|intel|query " 1>&2 echo "Please choose one parameter " 1>&2 exit $E_ERR fi # Switch to right mode case "$1" in "amd" ) eselect opengl set ati ;; "intel" ) eselect opengl set xorg-x11 ;; "query" ) current=`eselect opengl show` case "$current" in "ati" ) echo "amd" ;; "xorg-x11" ) echo "intel" ;; esac ;; * ) echo "Usage: `basename $0` amd|intel|query" 1>&2; exit $E_ERR;; # other than amd|intel|query parameter report an error esac # A zero return value from the script upon exit indicates success. exit 0
Step 2 : configure Xorg
I find out that Xorg was always using the integrated card instead of the discrete one. I guess this behavior is due to the fact that the integrated card come first in the list of device. So I created this basic xorg.conf file in /etc/X11/
It tells Xorg to use the device located on the busid PCI:1:0:0:0 with the ati driver.Code: Select all
Section "Device" Identifier "ATI" Driver "fglrx" Busid "PCI:1:0:0:0" EndSection
If you relaunch the Xorg server, you should now use the discrete graphic card instead of the integrated one. This ends the configuration.
Usage (ie how to switch between discrete and integrated graphic card):
In order to switch between the integrated and discrete card, you need to run the ati catalyst control center as user root. This free the tab switchable graphic. Select the graphic card you want and quit. The application should tell you, you need to reset your computer before the change to take effect but in my case I only need to logout (I am using the gnome desktop and GDM). You do not need to modify or delete the xorg.conf file. It seems the ati driver take of everything for you.
It could be a good idea that all users belonging to the group video be able to switch between graphic card but I do not know how to allow this.
For hprofile user : it seems that the behavior of the driver is controlled by the file /etc/ati/amdpcsdb (at least). The difference between this file in ati mode (ie usint the ATI GPU) and intel mode is :
diff amdpcsdb_ati amdpcsdb_intelSo it could be a way of managing "on the fly" which graphic card is used. However I have not tested if this works or not.Code: Select all
34c34 < PX_ACTIVEGPU=SDISCRETEED --- > PX_ACTIVEGPU=SINTEGRATED 35a36,37 > PX_GPUDOWN=R00010000 > PCICONFIG=R021060670700100000000003100000000C0000A000000000040050C600000000015000000000000000000000000000000000FEFF500000000000000003010000 44c46 < RebootTimeStamp=S0111/06/06 19:24:01 --- > RebootTimeStamp=S0111/06/06 06:29:08
troubleshooting :
I encountered some trouble with virtual console and framebuffer. it seems this is rather common with ati drivers.
Conclusion : I hope these explanations will be helpfull to the gentoo users. I think it is far from being perfect but it is a good starting point (at least it works on my laptop). Especially the scripts switchlibGL and switchlibglx could be rewritten and integrated in the ebuild or contibuted to ATI.


Ok, now I have neither radeon neither ati. I'll install only ati-drivers and I will try to use the "vga-switch". Wish my good luckEnrico Tagliavini wrote:radeon and ati-drivers shares nothing at all. ati-drivers is the propietary driver for AMD HD graphic cards, radeon is the open source one. You can add fglrx to VIDEO_CARDS if you want (it is not mandatory), but radeon is not needed. I suggest to you to not mix, and always enable one driver at a time to be sure to not use some piece from one and some piece from the other. You can have both installed at the same time and be sure to not mix them once you are used to them.





Code: Select all
[ 117.090]
X.Org X Server 1.12.2
Release Date: 2012-05-29
[ 117.091] X Protocol Version 11, Revision 0
[ 117.091] Build Operating System: Linux 3.2.12-gentoo x86_64 Gentoo
[ 117.091] Current Operating System: Linux blackstar 3.2.12-gentoo #17 SMP PREEMPT Sat Jun 9 14:20:02 CEST 2012 x86_64
[ 117.091] Kernel command line: root=/dev/sda2 acpi_osi=Linux nomodeset
[ 117.091] Build Date: 29 June 2012 11:22:48AM
[ 117.092]
[ 117.092] Current version of pixman: 0.26.0
[ 117.093] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 117.093] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 117.094] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Jul 5 13:06:15 2012
[ 117.094] (==) Using config file: "/etc/X11/xorg.conf"
[ 117.094] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 117.095] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 117.095] (==) ServerLayout "aticonfig Layout"
[ 117.095] (**) |-->Screen "aticonfig-Screen[0]-0" (0)
[ 117.095] (**) | |-->Monitor "aticonfig-Monitor[0]-0"
[ 117.095] (**) | |-->Device "aticonfig-Device[0]-0"
[ 117.095] (==) Automatically adding devices
[ 117.095] (==) Automatically enabling devices
[ 117.096] (==) FontPath set to:
/usr/share/fonts/misc/,
/usr/share/fonts/TTF/,
/usr/share/fonts/OTF/,
/usr/share/fonts/Type1/,
/usr/share/fonts/100dpi/,
/usr/share/fonts/75dpi/
[ 117.096] (==) ModulePath set to "/usr/lib64/xorg/modules"
[ 117.096] (**) Extension "Composite" is enabled
[ 117.096] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 117.096] (II) Loader magic: 0x7d5ae0
[ 117.096] (II) Module ABI versions:
[ 117.096] X.Org ANSI C Emulation: 0.4
[ 117.096] X.Org Video Driver: 12.0
[ 117.096] X.Org XInput driver : 16.0
[ 117.096] X.Org Server Extension : 6.0
[ 117.097] (--) PCI:*(0:0:2:0) 8086:0046:1025:0365 rev 18, Mem @ 0xf0000000/4194304, 0xd0000000/268435456, I/O @ 0x00001800/8
[ 117.097] (--) PCI: (0:2:0:0) 1002:68c1:1025:0365 rev 0, Mem @ 0xb0000000/268435456, 0xafee0000/131072, I/O @ 0x00002000/256, BIOS @ 0x????????/131072
[ 117.097] (II) Open ACPI successful (/var/run/acpid.socket)
[ 117.097] (II) "extmod" will be loaded by default.
[ 117.097] (II) "dbe" will be loaded by default.
[ 117.097] (II) "glx" will be loaded by default.
[ 117.097] (II) "record" will be loaded by default.
[ 117.097] (II) "dri" will be loaded by default.
[ 117.097] (II) "dri2" will be loaded by default.
[ 117.097] (II) LoadModule: "extmod"
[ 117.098] (II) Loading /usr/lib64/xorg/modules/extensions/libextmod.so
[ 117.098] (II) Module extmod: vendor="X.Org Foundation"
[ 117.098] compiled for 1.12.2, module version = 1.0.0
[ 117.098] Module class: X.Org Server Extension
[ 117.098] ABI class: X.Org Server Extension, version 6.0
[ 117.098] (II) Loading extension MIT-SCREEN-SAVER
[ 117.098] (II) Loading extension XFree86-VidModeExtension
[ 117.098] (II) Loading extension XFree86-DGA
[ 117.098] (II) Loading extension DPMS
[ 117.098] (II) Loading extension XVideo
[ 117.098] (II) Loading extension XVideo-MotionCompensation
[ 117.098] (II) Loading extension X-Resource
[ 117.098] (II) LoadModule: "dbe"
[ 117.098] (II) Loading /usr/lib64/xorg/modules/extensions/libdbe.so
[ 117.098] (II) Module dbe: vendor="X.Org Foundation"
[ 117.098] compiled for 1.12.2, module version = 1.0.0
[ 117.098] Module class: X.Org Server Extension
[ 117.098] ABI class: X.Org Server Extension, version 6.0
[ 117.098] (II) Loading extension DOUBLE-BUFFER
[ 117.098] (II) LoadModule: "glx"
[ 117.098] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
[ 117.136] (II) Module glx: vendor="Advanced Micro Devices, Inc."
[ 117.136] compiled for 6.9.0, module version = 1.0.0
[ 117.136] (II) Loading extension GLX
[ 117.136] (II) LoadModule: "record"
[ 117.136] (II) Loading /usr/lib64/xorg/modules/extensions/librecord.so
[ 117.136] (II) Module record: vendor="X.Org Foundation"
[ 117.136] compiled for 1.12.2, module version = 1.13.0
[ 117.136] Module class: X.Org Server Extension
[ 117.136] ABI class: X.Org Server Extension, version 6.0
[ 117.136] (II) Loading extension RECORD
[ 117.136] (II) LoadModule: "dri"
[ 117.155] (WW) Warning, couldn't open module dri
[ 117.155] (II) UnloadModule: "dri"
[ 117.155] (II) Unloading dri
[ 117.155] (EE) Failed to load module "dri" (module does not exist, 0)
[ 117.155] (II) LoadModule: "dri2"
[ 117.155] (WW) Warning, couldn't open module dri2
[ 117.155] (II) UnloadModule: "dri2"
[ 117.155] (II) Unloading dri2
[ 117.155] (EE) Failed to load module "dri2" (module does not exist, 0)
[ 117.155] (II) LoadModule: "fglrx"
[ 117.155] (II) Loading /usr/lib64/xorg/modules/drivers/fglrx_drv.so
[ 117.187] (II) Module fglrx: vendor="FireGL - AMD Technologies Inc."
[ 117.187] compiled for 1.4.99.906, module version = 8.98.2
[ 117.187] Module class: X.Org Video Driver
[ 117.188] (II) Loading sub module "fglrxdrm"
[ 117.188] (II) LoadModule: "fglrxdrm"
[ 117.188] (II) Loading /usr/lib64/xorg/modules/linux/libfglrxdrm.so
[ 117.188] (II) Module fglrxdrm: vendor="FireGL - AMD Technologies Inc."
[ 117.188] compiled for 1.4.99.906, module version = 8.98.2
[ 117.188] (II) AMD Proprietary Linux Driver Version Identifier:8.98.2
[ 117.188] (II) AMD Proprietary Linux Driver Release Identifier: 8.98
[ 117.188] (II) AMD Proprietary Linux Driver Build Date: Jun 11 2012 11:57:59
[ 117.188] (--) using VT number 7
[ 117.190] (WW) Falling back to old probe method for fglrx
[ 117.207] (II) Loading PCS database from /etc/ati/amdpcsdb
[ 117.208] (--) Chipset Supported AMD Graphics Processor (0x68C1) found
[ 117.209] (WW) fglrx: No matching Device section for instance (BusID PCI:0@2:0:1) found
[ 117.209] (II) fglrx: intel VGA device detected, load intel driver.
[ 117.209] (II) LoadModule: "intel"
[ 117.209] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[ 117.209] (II) Module intel: vendor="X.Org Foundation"
[ 117.209] compiled for 1.12.2, module version = 2.19.0
[ 117.209] Module class: X.Org Video Driver
[ 117.209] ABI class: X.Org Video Driver, version 12.0
[ 117.212] ukiDynamicMajor: found major device number 249
[ 117.212] ukiDynamicMajor: found major device number 249
[ 117.212] ukiOpenByBusid: Searching for BusID PCI:2:0:0
[ 117.212] ukiOpenDevice: node name is /dev/ati/card0
[ 117.212] ukiOpenDevice: open result is 8, (OK)
[ 117.212] ukiOpenByBusid: ukiOpenMinor returns 8
[ 117.212] ukiOpenByBusid: ukiGetBusid reports PCI:2:0:0
[ 117.213] (WW) PowerXpress feature is not supported on A+I Mux platform. Please uninstall fglrx driver.
[ 117.213] (EE) No devices detected.
[ 117.213]
Fatal server error:
[ 117.213] no screens found
[ 117.213]
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 117.213] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 117.213]