I have a laptop (Dell Inspiron N4110) with a switchable graphic.
$ lspci | grep 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 Whistler [AMD Radeon HD 6600M Series] (rev ff)
Normally, my laptop starts with both graphic cards enabled, which caused the laptop to turn very hot and the fan to become very noisy. I have been using a small script to disable the Radeon card. For some time, I'm quite happy with this arrangement.
However, I have been having some issues with the Intel card (IGD), the Intel card often randomly hang when running OpenGL apps; and so I want to give the Radeon card (DIS) another chance.
I have never been able to switch to the Radeon card, but recently, I found out that if I do a "delayed switching" (DDIS):
# echo "DDIS" > /sys/kernel/debug/vgaswitcheroo/switch
root@lieryan-dell-ubuntu:/sys/kernel/debug/vgaswitcheroo# cat switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Pwr:0000:01:00.0
then I logoff (i.e. to restart X), the screen switch to pseudo-tty and then it stuck there freezing. At this situation, mouse and keyboard stops working so I can't switch to another ptty. I tried ssh-ing from another computer to salvage logs (dmesg at that point) and whatnot; I found out that when freezing, the active graphic card is the AMD card:
-- this is from ssh --
# cat switch
0:IGD: :Off:0000:00:02.0
1:DIS:+:Pwr:0000:01:00.0
but the GPU is apparently hung, looking at dmesg gives:
...
[ 1411.649974] vga_switcheroo: client 0 refused switch
[ 1411.649985] vga_switcheroo: setting delayed switch to client 1
[ 1423.911759] vga_switcheroo: processing delayed switch to 1
[ 1424.006564] fbcon: Remapping primary device, fb1, to tty 1-63
[ 1424.006799] i915: switched off
[ 1424.840351] [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
[ 1425.718088] [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
[ 1426.622377] [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
[ 1427.355683] [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
[ 1428.193549] [drm:drm_mode_getfb] *ERROR* invalid framebuffer id
... the invalid framebuffer id error is repeated for many times over ...
I were able to successfully recover by switching back to the Intel card and restarting X from ssh; indicating that only the Radeon card has problems switching.
System info:
$ uname -a
Linux lieryan-dell-ubuntu 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
The laptop also do not have the option to set graphic card at BIOS and the proprietary driver, fglrx, also have never worked; when I installed it through jockey ("Additional Drivers"), glxinfo showed that it still being rendered by Mesa, the /sys/kernel/debug/vgaswitcheroo directory has gone missing, and the driver crashes with a traceback if I use xorg.conf to tell X to use fglrx.
Anyone had any idea if it is possible to use this AMD card either with the radeon or the fglrx driver?
logs:
dmesg