You are not logged in.

#1 2012-10-01 09:07:18

narrakan
Member
From: Italy
Registered: 2012-02-06
Posts: 15

ATI/Intel setup and vga_switcheroo not working

Hi guys, I'm having a tough time trying to make my Radeon HD6490m work with my current (Radeon / Intel HD3000) setup. I've followed this guide to enable the discrete graphics card:

  1. Installed xf86-video-ati and xf86-video-intel

  2. Blacklisted radeon module

  3. Enabled radeon module at startup with rc.local

However, my Radeon is still not being used, as confirmed by:

$ cat /sys/kernel/debug/vgaswitcheroo/switch 
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Pwr:0000:01:00.0

and by the Xorg log (it's quite huge, and I don't think it's worth posting it, but feel free to ask if necessary).

So I tried to use vga_switcheroo at startup (via rc.local), to explicitly enable the discrete graphics card:

#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#

modprobe radeon
echo "DDIS" > /sys/kernel/debug/vgaswitcheroo/switch

but the result is that the boot sequence hangs just after having started all the deamons listed in rc.conf, leaving me with a hard shutdown as the only possibility.

This is the /var/log/everything.log section from the first time the radeon module is mentioned, to the point where the i915 module is disabled:

Oct  1 11:47:13 narra-arch kernel: [    6.104463] [drm] radeon defaulting to kernel modesetting.
Oct  1 11:47:13 narra-arch kernel: [    6.104465] [drm] radeon kernel modesetting enabled.
Oct  1 11:47:13 narra-arch kernel: [    6.104476] VGA switcheroo: detected switching method \_SB_.PCI0.GFX0.ATPX handle
Oct  1 11:47:13 narra-arch kernel: [    6.104498] checking generic (b0000000 300000) vs hw (a0000000 10000000)
Oct  1 11:47:13 narra-arch kernel: [    6.104507] radeon 0000:01:00.0: enabling device (0000 -> 0003)
Oct  1 11:47:13 narra-arch kernel: [    6.104625] [drm] initializing kernel modesetting (CAICOS 0x1002:0x6760 0x103C:0x3581).
Oct  1 11:47:13 narra-arch kernel: [    6.104659] [drm] register mmio base: 0xC6400000
Oct  1 11:47:13 narra-arch kernel: [    6.104660] [drm] register mmio size: 131072
Oct  1 11:47:13 narra-arch kernel: [    6.109397] sdhci-pci 0000:13:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
Oct  1 11:47:13 narra-arch kernel: [    6.121118] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x25
Oct  1 11:47:13 narra-arch kernel: [    6.139423] sdhci-pci 0000:13:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
Oct  1 11:47:13 narra-arch kernel: [    6.153580] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
Oct  1 11:47:13 narra-arch kernel: [    6.153723] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
Oct  1 11:47:13 narra-arch kernel: [    6.153781] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
Oct  1 11:47:13 narra-arch kernel: [    6.154061] ACPI Warning: 0x0000000000000428-0x000000000000042f SystemIO conflicts with Region \PMIO 1 (20120320/utaddress-251)
Oct  1 11:47:13 narra-arch kernel: [    6.154066] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
Oct  1 11:47:13 narra-arch kernel: [    6.154069] ACPI Warning: 0x0000000000000500-0x000000000000057f SystemIO conflicts with Region \GPIO 1 (20120320/utaddress-251)
Oct  1 11:47:13 narra-arch kernel: [    6.154073] ACPI Warning: 0x0000000000000500-0x000000000000057f SystemIO conflicts with Region \_SB_.PCI0.PEG0.PEGP.GPIO 2 (20120320/utaddress-251)
Oct  1 11:47:13 narra-arch kernel: [    6.154075] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
Oct  1 11:47:13 narra-arch kernel: [    6.154076] lpc_ich: Resource conflict(s) found affecting gpio_ich
Oct  1 11:47:13 narra-arch kernel: [    6.154127] ACPI Warning: 0x0000000000006040-0x000000000000605f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 1 (20120320/utaddress-251)
Oct  1 11:47:13 narra-arch kernel: [    6.154131] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
Oct  1 11:47:13 narra-arch kernel: [    6.155175] uvcvideo: Found UVC 1.00 device HP TrueVision HD (064e:d281)
Oct  1 11:47:13 narra-arch kernel: [    6.158985] input: HP TrueVision HD as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/input/input12
Oct  1 11:47:13 narra-arch kernel: [    6.159117] usbcore: registered new interface driver uvcvideo
Oct  1 11:47:13 narra-arch kernel: [    6.159120] USB Video Class driver (1.1.1)
Oct  1 11:47:13 narra-arch kernel: [    6.169343] sdhci-pci 0000:13:00.1: Will use DMA mode even though HW doesn't fully claim to support it.
Oct  1 11:47:13 narra-arch kernel: [    6.203103] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x25
Oct  1 11:47:13 narra-arch kernel: [    6.203713] microcode: CPU2 sig=0x206a7, pf=0x10, revision=0x25
Oct  1 11:47:13 narra-arch kernel: [    6.204433] microcode: CPU3 sig=0x206a7, pf=0x10, revision=0x25
Oct  1 11:47:13 narra-arch kernel: [    6.205183] microcode: CPU4 sig=0x206a7, pf=0x10, revision=0x25
Oct  1 11:47:13 narra-arch kernel: [    6.206019] microcode: CPU5 sig=0x206a7, pf=0x10, revision=0x25
Oct  1 11:47:13 narra-arch kernel: [    6.206515] microcode: CPU6 sig=0x206a7, pf=0x10, revision=0x25
Oct  1 11:47:13 narra-arch kernel: [    6.206758] microcode: CPU7 sig=0x206a7, pf=0x10, revision=0x25
Oct  1 11:47:13 narra-arch kernel: [    6.207396] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
Oct  1 11:47:13 narra-arch kernel: [    6.219666] scsi 7:0:0:0: Direct-Access     Generic- xD/SD/M.S.       1.00 PQ: 0 ANSI: 0 CCS
Oct  1 11:47:13 narra-arch kernel: [    6.220255] rts_pstor: device scan complete
Oct  1 11:47:13 narra-arch kernel: [    6.220328] sd 7:0:0:0: [sdc] Attached SCSI removable disk
Oct  1 11:47:13 narra-arch kernel: [    6.228714] cfg80211: Calling CRDA to update world regulatory domain
Oct  1 11:47:13 narra-arch kernel: [    6.231695] iTCO_vendor_support: vendor-support=0
Oct  1 11:47:13 narra-arch kernel: [    6.251135] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.07
Oct  1 11:47:13 narra-arch kernel: [    6.251197] iTCO_wdt: Found a Cougar Point TCO device (Version=2, TCOBASE=0x0460)
Oct  1 11:47:13 narra-arch kernel: [    6.251266] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
Oct  1 11:47:13 narra-arch kernel: [    6.305416] ATOM BIOS: HP/Flex
Oct  1 11:47:13 narra-arch kernel: [    6.305785] radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)
Oct  1 11:47:13 narra-arch kernel: [    6.305788] radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF
Oct  1 11:47:13 narra-arch kernel: [    6.310467] [drm] Detected VRAM RAM=1024M, BAR=256M
Oct  1 11:47:13 narra-arch kernel: [    6.310470] [drm] RAM width 64bits DDR
Oct  1 11:47:13 narra-arch kernel: [    6.310528] [TTM] Zone  kernel: Available graphics memory: 1999996 kiB
Oct  1 11:47:13 narra-arch kernel: [    6.310529] [TTM] Initializing pool allocator
Oct  1 11:47:13 narra-arch kernel: [    6.310533] [TTM] Initializing DMA pool allocator
Oct  1 11:47:13 narra-arch kernel: [    6.310554] [drm] radeon: 1024M of VRAM memory ready
Oct  1 11:47:13 narra-arch kernel: [    6.310555] [drm] radeon: 512M of GTT memory ready.
Oct  1 11:47:13 narra-arch kernel: [    6.310572] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
Oct  1 11:47:13 narra-arch kernel: [    6.310573] [drm] Driver supports precise vblank timestamp query.
Oct  1 11:47:13 narra-arch kernel: [    6.310618] radeon 0000:01:00.0: irq 45 for MSI/MSI-X
Oct  1 11:47:13 narra-arch kernel: [    6.310627] radeon 0000:01:00.0: radeon: using MSI.
Oct  1 11:47:13 narra-arch kernel: [    6.310683] [drm] radeon: irq initialized.
Oct  1 11:47:13 narra-arch kernel: [    6.310686] [drm] GART: num cpu pages 131072, num gpu pages 131072
Oct  1 11:47:13 narra-arch kernel: [    6.310996] [drm] Loading CAICOS Microcode
Oct  1 11:47:13 narra-arch kernel: [    6.371244] brcmsmac bcma0:0: mfg 4bf core 812 rev 24 class 0 irq 17
Oct  1 11:47:13 narra-arch kernel: [    6.600392] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Oct  1 11:47:13 narra-arch kernel: [    6.627128] [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
Oct  1 11:47:13 narra-arch kernel: [    6.627345] radeon 0000:01:00.0: WB enabled
Oct  1 11:47:13 narra-arch kernel: [    6.627354] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000040000c00 and cpu addr 0xffff880150cfec00
Oct  1 11:47:13 narra-arch kernel: [    6.644525] [drm] ring test on 0 succeeded in 3 usecs
Oct  1 11:47:13 narra-arch kernel: [    6.644738] [drm] ib test on ring 0 succeeded in 0 usecs
Oct  1 11:47:13 narra-arch kernel: [    6.644892] [drm] Radeon Display Connectors
Oct  1 11:47:13 narra-arch kernel: [    6.649223] [drm] Internal thermal controller with fan control
Oct  1 11:47:13 narra-arch kernel: [    6.650273] [drm] radeon: power management initialized
Oct  1 11:47:13 narra-arch kernel: [    6.650336] No connectors reported connected with modes
Oct  1 11:47:13 narra-arch kernel: [    6.650338] [drm] Cannot find any crtc or sizes - going 1024x768
Oct  1 11:47:13 narra-arch kernel: [    6.651777] [drm] fb mappable at 0xA0142000
Oct  1 11:47:13 narra-arch kernel: [    6.651779] [drm] vram apper at 0xA0000000
Oct  1 11:47:13 narra-arch kernel: [    6.651780] [drm] size 3145728
Oct  1 11:47:13 narra-arch kernel: [    6.651781] [drm] fb depth is 24
Oct  1 11:47:13 narra-arch kernel: [    6.651782] [drm]    pitch is 4096
Oct  1 11:47:13 narra-arch kernel: [    6.651785] checking generic (b0000000 300000) vs hw (a0000000 10000000)
Oct  1 11:47:13 narra-arch kernel: [    6.652027] fb1: radeondrmfb frame buffer device
Oct  1 11:47:13 narra-arch kernel: [    6.652029] drm: registered panic notifier
Oct  1 11:47:13 narra-arch kernel: [    6.652033] [drm] Initialized radeon 2.18.0 20080528 for 0000:01:00.0 on minor 0
Oct  1 11:47:13 narra-arch kernel: [    6.653033] checking generic (b0000000 300000) vs hw (b0000000 10000000)
Oct  1 11:47:13 narra-arch kernel: [    6.653036] fb: conflicting fb hw usage inteldrmfb vs VESA VGA - removing generic driver
Oct  1 11:47:13 narra-arch kernel: [    6.653054] Console: switching to colour dummy device 80x25
Oct  1 11:47:13 narra-arch kernel: [    6.653760] i915 0000:00:02.0: setting latency timer to 64
Oct  1 11:47:13 narra-arch kernel: [    6.678502] i915 0000:00:02.0: irq 46 for MSI/MSI-X
Oct  1 11:47:13 narra-arch kernel: [    6.678508] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
Oct  1 11:47:13 narra-arch kernel: [    6.678509] [drm] Driver supports precise vblank timestamp query.
Oct  1 11:47:13 narra-arch kernel: [    6.679227] vga_switcheroo: enabled
Oct  1 11:47:13 narra-arch kernel: [    6.679267] radeon atpx: version is 1
Oct  1 11:47:13 narra-arch kernel: [    6.679287] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
Oct  1 11:47:13 narra-arch kernel: [    6.679289] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=none:owns=io+mem
Oct  1 11:47:13 narra-arch kernel: [    7.151215] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
Oct  1 11:47:13 narra-arch kernel: [    7.267369] fbcon: inteldrmfb (fb0) is primary device
Oct  1 11:47:13 narra-arch kernel: [    7.504860] Console: switching to colour frame buffer device 170x48
Oct  1 11:47:13 narra-arch kernel: [    7.513472] fb0: inteldrmfb frame buffer device
Oct  1 11:47:13 narra-arch kernel: [    7.513909] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS
Oct  1 11:47:13 narra-arch kernel: [    7.530274] acpi device:2f: registered as cooling_device8
Oct  1 11:47:13 narra-arch kernel: [    7.530696] ACPI: Video Device [PEGP] (multi-head: yes  rom: no  post: no)
Oct  1 11:47:13 narra-arch kernel: [    7.531186] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:2d/LNXVIDEO:00/input/input13
Oct  1 11:47:13 narra-arch kernel: [    7.547531] acpi device:3c: registered as cooling_device9
Oct  1 11:47:13 narra-arch kernel: [    7.548058] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
Oct  1 11:47:13 narra-arch kernel: [    7.548211] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:01/input/input14
Oct  1 11:47:13 narra-arch kernel: [    7.548558] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 1
Oct  1 11:47:13 narra-arch kernel: [    8.095377] EXT4-fs (sda5): re-mounted. Opts: data=ordered
Oct  1 11:47:13 narra-arch kernel: [    8.175847] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: data=ordered
Oct  1 11:47:13 narra-arch kernel: [    8.206288] Adding 3903756k swap on /dev/sda6.  Priority:-1 extents:1 across:3903756k 
Oct  1 11:47:14 narra-arch kernel: [   10.623888] fbcon: Remapping primary device, fb1, to tty 1-63
Oct  1 11:47:14 narra-arch kernel: [   10.624242] i915: switched off

Any ideas? It's more of an experiment than a real necessity, but it could be useful for those who struggle to make their dual GPU setup working.

Offline

#2 2012-10-10 17:08:05

astex
Member
Registered: 2012-06-25
Posts: 37

Re: ATI/Intel setup and vga_switcheroo not working

I have had the same problem.  I'm able to reproduce the problem after boot by:

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

Then, because I use gnome:

# /etc/rc.d/gdm restart

At this point, the system hangs.  A console login pops up that does not accept any input (and the cursor does not blink).

I'm not quite sure of what log I should look in to find any necessary information, but I can give you my hardware:

$ lspci -k

...

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
	Subsystem: Hewlett-Packard Company Device 1853
	Kernel driver in use: i915

...

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Device 6827 (rev ff)
	Kernel driver in use: radeon

...

Offline

#3 2012-10-16 07:57:09

OOFscr
Member
Registered: 2012-10-06
Posts: 27

Re: ATI/Intel setup and vga_switcheroo not working

The way it works for me is switching to tty1, logging in as root and doing it step by step:

systemctl stop gdm
echo DIS > /sys/kernel/debug/vgaswitcheroo/switch
systemctl start gdm; logout

Maybe this is a hint where the problem may come from: After stopping gdm, it often needs several times until the switch is done. Several times client refused switch, then in the 3rd or 4th try i915: switched off. I don't know the difference between DIS and DDIS by the way, is the 2nd D for delayed? I wonder why after stopping gdm, the system seems to take a lot of time until realizing the IGD isn't in use anymore. Any help appreciated, I would love a solution that allows switching from the desktop without using the tty. Even a reliable script would be better. My components, by the way:

00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 18)
    Subsystem: Acer Incorporated [ALI] Device 0359
    Kernel driver in use: i915

01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Manhattan [Mobility Radeon HD 5400 Series] (rev ff)
    Kernel driver in use: radeon

Offline

#4 2012-10-16 14:52:59

astex
Member
Registered: 2012-06-25
Posts: 37

Re: ATI/Intel setup and vga_switcheroo not working

DDIS simply means wait until X restarts.

I just attempted to switch from tty1, but the issue persists: the system hangs when it activates the radeon card.  I waited for about ten minutes before sending a ctrl+alt+del.

I catted the output of 'echo DIS > /.../switch' into a file (because the screen hangs) and it has no output.

Offline

#5 2012-10-16 15:31:10

OOFscr
Member
Registered: 2012-10-06
Posts: 27

Re: ATI/Intel setup and vga_switcheroo not working

When I was on the IGD, I echoed DDIS to switch and logged out. After the immediate gdm restart, the laptop correctly used the radeon card. The other way around (echoing DIGD and quitting the session) did not work on the other hand, gdm did not start, and since I had a black screen with a non-blinking cursor, I supposed my laptop crashed. In fact, it had not, and I could switch to tty1, but had to wait about 15 seconds before switching to IGD was accepted (before, i had to stop gdm again because it seemed to hang in some kind of undefined state). Dmesg isn't very helpful either. Weird.

Any ideas?

Offline

#6 2012-11-03 16:31:02

msx
Member
From: solar.system/earth/ar/bue/mdp
Registered: 2010-08-08
Posts: 184
Website

Re: ATI/Intel setup and vga_switcheroo not working

Hi, tl;dr, just the topic.
I own a hybrid video laptop featuring a Intel/ATi combo, Intel being the power saving video card and ATi the high performance card; so far I was able to switch forth and back and use any of both GPU at will however with some constraints:
a) I can use either of them one at a time.
b) I need to log out, kill X, do some tweak in order to maximize graphic card performance and then start X again.
So far I allways did this with the old initscripts system so please note that there might be a difference with new systemd - since I use Intel's GPU most of the time I didn't used the ATi GPU since I switched to systemd, you're warned smile

Now, these are my config files that enable the use of both cards:

/etc/mkinitcpio.conf

~ $ head /etc/mkinitcpio.conf 
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES="radeon i915"

- Intel GPU optimized files -
/etc/tmpfiles/optimized.conf

~ $ cat /etc/tmpfiles.d/optimized.conf 
w /sys/kernel/debug/vgaswitcheroo/switch - - - - OFF

#w /sys/class/drm/card0/device/power_profile - - - - low
w /sys/class/drm/card0/device/power_method - - - - dynpm

w /sys/devices/system/cpu/cpu[0-3]/cpufreq/scaling_governor - - - - ondemand
w /sys/devices/system/cpu/cpufreq/ondemand/up_threshold - - - - 85
w /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor - - - - 20

#w /sys/module/snd_hda_intel/parameters/power_save - - - - 1

w /sys/kernel/mm/transparent_hugepage/enabled - - - - madvise
w /sys/kernel/mm/transparent_hugepage/defrag - - - - madvise
w /sys/kernel/mm/transparent_hugepage/khugepaged/defrag - - - - 0

w /proc/sys/kernel/watchdog - - - - 0
w /sys/class/scsi_host/host[0-5]/link_power_management_policy - - - - min_power
w /sys/bus/pci/devices/*/power/control - - - - auto

w /proc/sys/vm/dirty_writeback_centisecs - - - - 1500

As you will note, I configured a default setup to use the Intel GPU and completely turn off the ATi GPU.
Now, this is my /etc/X11/xorg.conf. Please note that it includes a series of tweaks and optimizations I found over time that works pretty well with most newer Intel and ATi GPUs.

/etc/X11/xorg.conf

~ $ cat /etc/X11/xorg.conf
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF/"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
        Load  "dri"
        Load  "record"
        Load  "extmod"
        Load  "dri2"
        Load  "dbe"
        Load  "glx"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        Option       "DPMS" "on"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
         Option     "MigrationHeuristic" "greedy"
         Option     "AccelMethod"               "SNA"
         Option     "DRI"                       "on"# [<bool>]
         #Option     "ColorKey"                 # <i>
         #Option     "VideoKey"                 # <i>
         #Option     "FallbackDebug"            # [<bool>]
         Option     "Tiling"                    "on"# [<bool>]
         Option     "LinearFramebuffer"         "on"# [<bool>]
        Option     "Shadow"                     "off"# [<bool>]
        Option     "SwapbuffersWait"            "off"# [<bool>]
        #Option     "TripleBuffer"              "on"# [<bool>]
         Option     "XvMC"                      "on"# [<bool>]
         Option     "XvPreferOverlay"           "on"# [<bool>]
         #Option     "DebugFlushBatches"        # [<bool>]
         #Option     "DebugFlushCaches"         # [<bool>]
         #Option     "DebugWait"                # [<bool>]
         Option     "HotPlug"                   "on"# [<bool>]
         Option     "RelaxedFencing"            "on"# [<bool>]
         Option     "BufferCache"               "on"# [<bool>]
         Option     "DPMS"                       "on"
         Option     "AGPMode"                   "8"             # <i>
         Option     "AGPFastWrite"              "on"            # [<bool>]
         Option     "AGPSize"                   "32"                    # <i>
         Option     "GARTSize"                  "256"                   # <i>
        # Option     "EnablePageFlip"           "on"            # [<bool>]
        # Option     "DMAForXv"                 "on"            # [<bool>]
        # Option     "DepthBits"                        "24"            # <i>
        # Option     "AccelDFS"                 "on"            # [<bool>]
        # Option     "ColorTiling"              "on"            # [<bool>]
        # Option     "RenderAccel"              "on"            # [<bool>]
        # Option     "ClockGating"              "on"            # [<bool>]
        # Option     "VGAAccess"                        "on"            # [<bool>]
        # Option     "ReverseDDC"               "on"            # [<bool>]
         Option     "LVDSProbePLL"              "on"            # [<bool>]
        # Option     "EXAVSync"                 "on"            # [<bool>]
        # Option     "EXAPixmaps"                       "on"
        # Option     "ForceLowPowerMode"                "on"    # [<bool>]
         Option     "DynamicPM"                 "on"            # [<bool>]
         Option     "NewPLL"                    "on"                    # [<bool>]

        Identifier  "IntelGPU"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        Identifier  "ATiGPU"
        Driver      "radeon"
        BusID       "PCI:1:0:0"
        Option      "DPMS"                      "on"
        #Option     "NoAccel"                   # [<bool>]
        Option     "SWcursor"                   "off"                   # [<bool>]
        #Option     "Dac6Bit"                   # [<bool>]
        #Option     "Dac8Bit"                   # [<bool>]
        #Option     "BusType"                   # [<str>]
        #Option     "CPPIOMode"                 # [<bool>]
        #Option     "CPusecTimeout"             # <i>
        Option     "MigrationHeuristic"         "greedy"
        Option     "AGPMode"                    "8"             # <i>
        Option     "AGPFastWrite"               "on"            # [<bool>]
        Option     "AGPSize"                    "32"                    # <i>
        Option     "GARTSize"                   "256"                   # <i>
        #Option     "RingSize"                  # <i>
        #Option     "BufferSize"                # <i>
        Option     "EnableDepthMoves"           "on"    # [<bool>]
        Option     "EnablePageFlip"             "on"            # [<bool>]
        #Option     "NoBackBuffer"              # [<bool>]
        Option     "DMAForXv"                   "on"            # [<bool>]
        #Option     "FBTexPercent"              "0"             # <i>
        Option     "DepthBits"                  "24"            # <i>
        #Option     "PCIAPERSize"               # <i>
        Option     "AccelDFS"                   "on"            # [<bool>]
        #Option     "IgnoreEDID"                # [<bool>]
        #Option     "CustomEDID"                # [<str>]
        Option     "DisplayPriority"            "AUTO"          # [<str>]
        #Option     "PanelSize"                 # [<str>]
        #Option     "ForceMinDotClock"          # <freq>
        Option     "ColorTiling"                "on"            # [<bool>]
        #Option     "VideoKey"                  # <i>
        #Option     "RageTheatreCrystal"        # <i>
        #Option     "RageTheatreTunerPort"      # <i>
        #Option     "RageTheatreCompositePort"  # <i>
        #Option     "RageTheatreSVideoPort"     # <i>
        #Option     "TunerType"                 # <i>
        #Option     "RageTheatreMicrocPath"     # <str>
        #Option     "RageTheatreMicrocType"     # <str>
        #Option     "ScalerWidth"               # <i>
        Option     "RenderAccel"                "on"            # [<bool>]
        #Option     "SubPixelOrder"             "NONE"          # [<str>]
        #Option     "ClockGating"               "on"            # [<bool>]
        Option     "VGAAccess"                  "on"            # [<bool>]
        Option     "ReverseDDC"                 "on"            # [<bool>]
        Option     "LVDSProbePLL"               "on"            # [<bool>]
        Option     "AccelMethod"                "EXA"           # <str>
        Option     "DRI"                        "on"                    # [<bool>]
        #Option     "ConnectorTable"            # <str>
        #Option     "DefaultConnectorTable"     # [<bool>]
        #Option     "DefaultTMDSPLL"            # [<bool>]
        #Option     "TVDACLoadDetect"           # [<bool>]
        #Option     "ForceTVOut"                # [<bool>]
        #Option     "TVStandard"                # <str>
        #Option     "IgnoreLidStatus"           # [<bool>]
        #Option     "DefaultTVDACAdj"           # [<bool>]
        #Option     "Int10"                     # [<bool>]
        Option     "EXAVSync"                   "on"            # [<bool>]
        Option     "EXAPixmaps"                 "on"
        #Option     "ATOMTVOut"                 # [<bool>]
        #Option     "R4xxATOM"                  # [<bool>]
        Option     "ForceLowPowerMode"          "on"    # [<bool>]
        Option     "DynamicPM"                  "on"            # [<bool>]
        Option     "NewPLL"                     "on"                    # [<bool>]
        #Option     "ZaphodHeads"               # <str>
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "IntelGPU"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

# Section "Screen"
#       Identifier "Screen1"
#       Device     "Card1"
#       Monitor    "Monitor1"
#       SubSection "Display"
#               Viewport   0 0
#               Depth     1
#       EndSubSection
#       SubSection "Display"
#               Viewport   0 0
#               Depth     4
#       EndSubSection
#       SubSection "Display"
#               Viewport   0 0
#               Depth     8
#       EndSubSection
#       SubSection "Display"
#               Viewport   0 0
#               Depth     15
#       EndSubSection
#       SubSection "Display"
#               Viewport   0 0
#               Depth     16
#       EndSubSection/sys/kernel/debug/vgaswitcheroo/switch
#       SubSection "Display"
#               Viewport   0 0
#               Depth     24
#       EndSubSection
# EndSection

Then, to switch to the ATi card I do this:
1. /etc/X11 # echo DIS >> /sys/kernel/debug/vgaswitcheroo/switch  [this will turn the discrete card on]
2. cp xorg.conf.ATi_enabled xorg.conf
and I'm ready to launch X again using the discrete card. Note that I copy a ATi-enabled xorg.conf over the Intel-enabled xorg.conf (and backwards!) to avoid editing the xorg.conf file everytime I want to switch the VGA cards.

Last, this additional kernel-line flags will help you get out the most of your battery: rootfstype=ext4 hpet=force i915.i915_enable_rc6=1 pcie_aspm=force i915.lvds_downclock=1 radeon.pcie_gen2=1 i915.semaphores=1 security=tomoyo resume=/dev/sda3 acpi_backlight=vendor i915.modeset=1 usbcore.autosuspend=1 radeon.agpmode=-1 ipv6.disable=1 apparmor=0 nmi_watchdog=0 libahci.ignore_sss=1 elevator=bfs
(use what applies to your case)

Be sure to follow the wiki and to install both intel-dri and ati-dri packages.

Last edited by msx (2012-11-03 16:38:40)


Enjoying i3wm w/ lifebar + j4-dmenu-desktop + tab_windows / fish shell / Emacs / tmux / Konsole / KDE apps
Arch + Linux-libre kernel: ParabolaGNULinux.org

Offline

Board footer

Powered by FluxBB