Bug 1047276

Summary: vgaswitcheroo not working on kernel 3.12
Product: [Fedora] Fedora Reporter: lapseofreason0
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: gansalmon, itamar, jonathan, kernel-maint, lapseofreason0, madhu.chinakonda, michele, michele
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-19 08:28:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch from https://lkml.org/lkml/2013/12/31/162 changed for kernel 3.12.6 none

Description lapseofreason0 2013-12-30 09:50:21 UTC
vgaswitcheroo is not working on kernel 3.12 because /sys/kernel/debug/vgaswitcheroo is missing. As a consequence, it is not possible to control the discrete graphics card.

This seems to be due to a driver conflict between shpchp and another pci acpi hotplug driver (which is compiled into the kernel by default). Recompiling the kernel with 
# CONFIG_HOTPLUG_PCI_ACPI is not set
fixes the issue (see comment 13 in linked bug report).

Affected packages: kernel-3.12.5-302.fc20.x86_64 and earlier 3.12 kernels

Was working fine on 2.11 kernel (Fedora 19).

Comment 1 Michele Baldessari 2014-01-01 09:13:45 UTC
At least this patch seems to be needed. Although I am not 100% sure it will be enough:
http://marc.info/?l=linux-acpi&m=138852365828642&w=2

Can you give the patch a try and report back?

Comment 2 lapseofreason0 2014-01-02 13:08:26 UTC
I'm away for a couple of days, I'll test the patch when I'm back. Thanks!

Comment 3 lapseofreason0 2014-01-05 21:56:36 UTC
Created attachment 845836 [details]
patch from https://lkml.org/lkml/2013/12/31/162 changed for kernel 3.12.6

I patched kernel 3.12.6 with the patch you provided and /sys/kernel/debug/vgaswitcheroo is now present and works as expected.

I had to slightly change the patch so it would apply to 3.12.6 so I attached the new patch.

Comment 4 Michele Baldessari 2014-01-05 22:16:56 UTC
Perfect. Thanks for testing. I'll let the kernel team see if it makes
sense picking it up before it trickles down via linux-stable.

Comment 5 Josh Boyer 2014-01-06 18:56:36 UTC
Greg is working on importing patches for 3.12.7 right now.  Let's wait for a couple days and see if he grabs this one and includes it.  If not, we can apply it ourselves.

Comment 6 Josh Boyer 2014-01-12 14:19:38 UTC
3.12.7 is in updates-testing now.

Comment 7 lapseofreason0 2014-01-19 08:28:41 UTC
Works with kernel 3.12.7 which is now available through updates.