Created attachment 840153 [details] dmesg Description of problem: Several such warnings after issuing: echo OFF > /sys/kernel/debug/vgaswitcheroo/switch with kernel-3.12.5-302.fc20.x86_64. It didn't happen with kernel-3.11.10-301.fc20.x86_64. Version-Release number of selected component (if applicable): kernel-3.12.5-302.fc20.x86_64 How reproducible: Always Steps to Reproduce: 1. Boot into kernel-3.12.5-302.fc20.x86_64 2. echo OFF > /sys/kernel/debug/vgaswitcheroo/switch Actual results: Several WARNINGs, see attached dmesg after 71.110343. Expected results: No-issue disabling of discrete graphic card. With 3.11.10-301.fc20.x86_64 all that goes to the log is: [ 138.569631] ALSA sound/pci/hda/hda_intel.c:3079 0000:01:00.1: Disabling via VGA-switcheroo [ 138.681114] ALSA sound/pci/hda/hda_intel.c:3085 0000:01:00.1: Cannot lock devices! [ 138.681120] radeon: switched off Additional info: lspci -vnn | grep VGA: 00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470] [1002:68e0] (rev ff) (prog-if ff)
Not knowing about bugzilla components and assignments, I won't change it myself, but X is not needed for this to happen. I'm attaching the journal from a session with no X running, booting with systemd.unit=emergency.target. That is: 1.- Boot with systemd.unit=emergency.target 2.- Mount debugfs 3.- Check that Xorg is not running 4.- echo OFF > /sys/kernel/debug/vgaswitcheroo/switch 5.- Watch for WARNING This time the first is at drivers/gpu/drm/drm_mm.c:578 drm_mm_takedown+0x2e/0x30 [drm]() and there's a second one at drivers/gpu/drm/ttm/ttm_page_alloc_dma.c:533 ttm_dma_free_pool+0xea/0xf0 [ttm]()
Created attachment 841480 [details] test without Xorg
I second this issue, but I don't see that much detail. The direct impact of it is I cannot access vgaswitcheroo by echo OFF > /sys/kernel/debug/vgaswitcheroo/switch because there is no such file.
(In reply to Zhiyuan Ma from comment #3) > I second this issue, but I don't see that much detail. > > The direct impact of it is I cannot access vgaswitcheroo by > > echo OFF > /sys/kernel/debug/vgaswitcheroo/switch > > because there is no such file. The file disappears after the WARNINGs, that is, due to the bug. Not being accessible, means I cannot reenable the discrete card, which leads to problems when shutting down. Not disabling the discrete card means a difference of more than 15 ºC in core temperature. Also the tainted flag is raised, I guess with good reason, and some kernel scary messages appear, such as: Userspace still has active objects ! trying to unbind memory from uninitialized GART ! Memory manager not clean during takedown. disabling already-disabled device So this means no new Fedora-issued binary kernel for me until this is fixed.
Also happening with kernel-3.12.6-300.fc20.x86_64, this time at: drivers/gpu/drm/radeon/radeon_gart.c:235 radeon_gart_unbind+0xca/0xe0 [radeon]() drivers/gpu/drm/radeon/radeon_gart.c:235 radeon_gart_unbind+0xca/0xe0 [radeon]() drivers/gpu/drm/radeon/radeon_gart.c:235 radeon_gart_unbind+0xca/0xe0 [radeon]() drivers/gpu/drm/radeon/radeon_gart.c:235 radeon_gart_unbind+0xca/0xe0 [radeon]() drivers/gpu/drm/radeon/radeon_gart.c:235 radeon_gart_unbind+0xca/0xe0 [radeon]() drivers/gpu/drm/radeon/radeon_gart.c:235 radeon_gart_unbind+0xca/0xe0 [radeon]() drivers/gpu/drm/drm_mm.c:578 drm_mm_takedown+0x2e/0x30 [drm]() drivers/gpu/drm/drm_mm.c:578 drm_mm_takedown+0x2e/0x30 [drm]() drivers/gpu/drm/ttm/ttm_page_alloc_dma.c:533 ttm_dma_free_pool+0xea/0xf0 [ttm]() drivers/pci/pci.c:1430 pci_disable_device+0x84/0x90() I'm attaching those WARNINGs, and separately later BUG: soft lockup in Xorg and INFO: rcu_sched self-detected stall when trying to shutdown, in case they are of any use.
Created attachment 845557 [details] WARNINGs with kernel 3.12.6-300
Created attachment 845558 [details] Later X soft lockup
Similar problem here with 3.12.6-300.fc20.x86_64 echo OFF > /sys/kernel/debug/vgaswitcheroo/switch triggers a kernel panic with reason "WARNING: CPU: 0 PID: 2602 at drivers/pci/pci.c:1430 pci_disable_device+0x84/0x90()". Maybe this is related to https://bugzilla.redhat.com/show_bug.cgi?id=994438 I attached the abrt stuff there.
JannikV's comment got me thinking I hadn't tried disabling the integrated graphics instead of the discrete one. I've tried now, and the issue didn't pop up. So, if #994438 is related and the problem is deeper in the kernel (from what I get that's with attaching/detaching a net driver), it happens with radeon and doesn't happen with i915. I'm attaching two new test points with kernel-3.12.6-300.fc20.x86_64 1.- echo DDIS to vgaswitcheroo 2.- log off gnome 3.- I get a black screen, no greeter 4.- Ctrl-Alt-F2, login 5.- echo OFF to vgaswitcheroo 6.- hell breaks loose 1.- boot with systemd.unit=emergency.target 2.- echo DIS to vgaswitcheroo 3.- no issue, no need to echo OFF to vgaswitcheroo, IGD is off and we are using DIS 4.- echo IGD to vgaswitcheroo 5.- feel the pain
Created attachment 848695 [details] Full journal having told DDIS and then OFF, includes a few minutes of the aftermath
Created attachment 848698 [details] Full journal with emergency.target, IGD -> DIS ok, and issue when DIS -> IGD
kernel-3.12.7-300.fc20.x86_64 doesn't seem to trigger this issue. Not having an explanation of what happened in previous versions, I'm hesitant to close this bug just yet, but I'll do if the next iterations don't show it and nobody else say anything.
Two new kernels without the bug. Even though no one has popped in to say what the bug was and what change solves it, I'm closing this issue. [If I don't use the correct status, please someone that knows better change it]