Bug 798254

Summary: vgaswitcheroo broken on Tumbleweed update to Linux Kernel 3.7.1-17-desktop January 9th 2013
Product: [openSUSE] openSUSE 12.2 Reporter: Trent Hawkins <trent.hawkins83>
Component: KernelAssignee: E-mail List <xorg-maintainer-bugs>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P3 - Medium CC: forgotten_m4H6SeH0_b
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Trent Hawkins 2013-01-12 09:19:36 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Firefox/17.0

Just zypper dupped to Linux Kernel: 3.7.1-17-desktop.

Running openSUSE 12.2 Tumbleweed.

Tried my usual trick of running vgaswitcheroo to turn off my second graphics card (hybrid graphics i915 + AMD Radeon HD 6400M), but it didn't work.

This is the usual command: # echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

System Monitor plasma widget gives me a temperature reading that would normally indicate the AMD card has been switched off (-127.9DegC), but the fan is still going hard and my power usage is half what it should be - powertop says power consumption is 25W, usually 10-13W with AMD card off.

Running
# grep -i switcheroo /boot/config-*
Gives me:
CONFIG_VGA_SWITCHEROO=y

So the kernel has been properly compiled with this option.

Note that output of:
# cat /sys/kernel/debug/vgaswitcheroo/switch
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :Off:0000:01:00.0

Indicates that the Discrete (AMD) card is actually off, but this is not the case.

Reproducible: Always

Steps to Reproduce:
1. Open terminal
2. Enter echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

Actual Results:  
Nothing happens. 

Expected Results:  
Should hear Discrete graphics card fan turn off and experience doubling in battery performance.

# 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: Advanced Micro Devices [AMD] nee ATI Caicos [Radeon HD 6400M/7400M Series]

Also note I have found an old Arch bug report that may be related: https://bbs.archlinux.org/viewtopic.php?pid=1122998
Comment 1 Forgotten User m4H6SeH0_b 2013-01-18 17:06:07 UTC
vgaswitcheroo seems to be working for me with 3.7.1-17-desktop, the difference in consumption with and without discrete card is about 8W

I have a slightly different config though

# lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV710 [Mobility Radeon HD 4300 Series] (rev ff)
Comment 2 Trent Hawkins 2013-01-29 00:59:40 UTC
(In reply to comment #1)
> vgaswitcheroo seems to be working for me with 3.7.1-17-desktop, the difference
> in consumption with and without discrete card is about 8W

Hi Valery Valery,

I updated my kernel to the 3.7.4-20 and tried all three kernels - desktop, default, and vanilla. This problem still remains for me.

In fact it seems that my power consumption rate goes up, when i use 

echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

I wonder if the problem crept in with this change by David Airlie - http://www.phoronix.com/scan.php?page=news_item&px=MTE4MDM

In terms of my hybrid graphics set up - i have a "muxless" AMD set up. This means the AMD GPU is not actually connected to the display driver, and instead is only called on to do rendering work to assist the Intel GPU when required. It is now the more common system, but prior to 2011 was mostly unheard of. I suspect your VGA config is one of these earlier systems.
Comment 3 Trent Hawkins 2013-02-03 22:48:28 UTC
Any movement here?

I installed the latest proprietary driver AMD Catalyst 13.1 (fglrx). I was then able to use the command # aticonfig --px-igpu, to switch off the AMD discrete GPU. 

Afterwards my battery use dropped significantly.

# acpi
Battery 0: Discharging, 87%, 07:25:26 remaining

Seems a bit ironic that i have to install the proprietary driver in order to switch off the AMD GPU ;)

Anyway clearly this is a kernel regression and not a hardware fault or another change in the openSUSE base.
Comment 4 Stefan Dirsch 2014-06-10 10:00:06 UTC
Unfortunately we cannot work on bugs for no longer maintained products. In
case you can still reproduce the issue with a still maintained product
(openSUSE 12.3/13.1 at the moment) or openSUSE:Factory, feel free to reopen. 
Thanks.