Bug 88861
Summary: | [efi, i915, vgaswitcheroo, black screen, nouveau] Screen goes black when switching from dedicated nvidia graphics card (nouveau) to integrated | ||
---|---|---|---|
Product: | Drivers | Reporter: | Paul Hordiienko (pvt.gord) |
Component: | Video(Other) | Assignee: | DRI developer's list (dri-devel) |
Status: | NEEDINFO --- | ||
Severity: | enhancement | CC: | cvr.dheeraj, intel-gfx-bugs, linux-kernel, lukas, pvt.gord |
Priority: | P4 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 3.18.0-rc5, 3.17.4, 3.16.5 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
Full dmesg log with drm.debug=0xe after few switch on/off iterations.
lspci Kernel config dmesg log config of non-working Linux 4.6.0 config of working Linux 4.6.0 (with commit reverted) kern.log / dmesg of non-working Linux 4.6.0 kern.log / dmesg of working Linux 4.6.0 (commit reverted) Xorg.log on non-working Linux 4.6.0 Xorg.log on working Linux 4.6.0 (commit reverted) refind_linux.conf of both cases dmesg of logdep splat on 4.15-rc9 minus 4eebd5a4e726 |
Description
Paul Hordiienko
2014-11-24 23:04:58 UTC
Created attachment 158731 [details]
lspci
Created attachment 158741 [details]
Kernel config
Just realised that switching works if force integrated card load first. In this case there is just one issue with uncorrect resolution in console when switched on discrete card. For fix it helps patch from Darkulix: https://github.com/ah-/gmux-scripts/issues/1#issuecomment-53850868 Steps: 1) Patch kernel and install it 2) Boot Linux kernel 3) Turn on nvidia card using: echo ON > /sys/kernel/debug/vgaswitcheroo/switch; rmmod nouveau; echo DIS > /sys/kernel/debug/apple_gmux/switch; modprobe nouveau; echo DIS > /sys/kernel/debug/vgaswitcheroo 4) Switch to intel card: echo IGD > /sys/kernel/debug/apple_gmux/switch; echo IGD > /sys/kernel/debug/vgaswitcheroo/switch" 5) Now resolution will be correct in both cases 6) For further switching it is possible to use just: echo DIS > /sys/kernel/debug/vgaswitcheroo/switch echo OFF > /sys/kernel/debug/vgaswitcheroo/switch and echo IGD > /sys/kernel/debug/vgaswitcheroo/switch echo OFF > /sys/kernel/debug/vgaswitcheroo/switch A patchset which is believed to fix this issue was posted to dri-devel: http://lists.freedesktop.org/archives/dri-devel/2015-April/081515.html This patchset enables GPU switching and should at least work on pre-retinas. Please apply it on top of a recent kernel and report back if it works for you. Thank you! Hi Lukas, Thank you for the patchset. It works but partially. Good thing I able to load linux with it. But there are some problems with switching. First, sometimes after switching from intel to nvidia screen becomes black, but luckily system didn't freeze. It happens not each time. One of the possible way to repeat this behaviour: 1. Switch to intel gpu and disable nvidia one 2. Start xorg server 3. Stop xorg server 4. Power on nvida card and switch to it 5. Now screen will be black but system will work Second problem is that unloading of nouveau driver with switched of nvidia gpu leads to the system freeze. Please find attached 2 new dmesg logs. Best regards, Paul Created attachment 179271 [details]
dmesg log
Patchset test.
After switching from intel to nvida card screen becomes black.
(In reply to Lukas Wunner from comment #4) > A patchset which is believed to fix this issue was posted to dri-devel: > http://lists.freedesktop.org/archives/dri-devel/2015-April/081515.html > > This patchset enables GPU switching and should at least work on pre-retinas. > Please apply it on top of a recent kernel and report back if it works for > you. > > Thank you! I have tested this patches on top of the latest 4.0.6 arch linux kernel on a Macbook Pro Retina 2012 Mid (10.1). I am unable to switch between the cards and it still results in black screen. I am using the command "echo DIS > /sys/kernel/debug/vgaswitheroo/switch" when the X is not running. Please let me know if you need any additional information to debug the issue. Please test Lukas' series at http://mid.gmane.org/cover.1452525860.git.lukas@wunner.de Hi Jani, Paul Hordiienko, the reporter of this bug, successfully tested an earlier version (v2) of the patch set, see the Tested-by: tags on these patches: http://lists.freedesktop.org/archives/dri-devel/2015-August/thread.html#88156 The most recent version (v5) was tested on the following machines: Tested-by: Pierre Moreau <pierre.morrow@free.fr> [MBP 5,3 2009 nvidia MCP79 + G96 pre-retina 15"] Tested-by: William Brown <william@blackhats.net.au> [MBP 8,2 2011 intel SNB + amd turks pre-retina 15"] Tested-by: Lukas Wunner <lukas@wunner.de> [MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina 15"] (The patches as posted miss the Tested-by: tags by Pierre and William since I posted them before getting their feedback.) The patch set worked just fine on my machine and William Brown's. On Pierre Moreau's machine the discrete GPU locks up when woken. It used to do that in the past as well but only after about 10 switches, now it's locking up every time. My guess is that this is a regression in nouveau on the G96 since it works fine on my GK107. Paul Hordiienko's machine is an MBP 6,2 2010 with intel ILK + nvidia GT216. So architecturally it is similar to my machine (integrated Intel and discrete Nvidia) and since v2 worked fine, I expect that v5 would work as well (FWIW). Hi Lukas and Jani, I have tested v5 and confirm that it works on my MBP 6,2 2010 without any issues. The commit message for https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=704ab614ec1201138032003c03113a81526638ab refers back here. I have bisected that patch as the reason why Xorg on my MacBook Pro 8,2 does not come up successfully with Linux 4.6. Reverting that commit makes Xorg work again. I boot Linux directly via rEFInd. I got the radeon xorg drivers installed, but neither intel nor fbdev or kms. Feel free to ask if any questions come up. Thanks for the report, Wilfried. Could you please create attachments with dmesg output and Xorg output, both with and without this commit. Your kernel config and Xorg config (if any) would also be helpful. Do you have anything special configured in your Xorg config for the Intel card? Do you have any special rEFInd features or extensions enabled which might change settings of the gmux microcontroller? Created attachment 217521 [details]
config of non-working Linux 4.6.0
Created attachment 217531 [details]
config of working Linux 4.6.0 (with commit reverted)
Created attachment 217541 [details]
kern.log / dmesg of non-working Linux 4.6.0
Created attachment 217551 [details]
kern.log / dmesg of working Linux 4.6.0 (commit reverted)
Created attachment 217561 [details]
Xorg.log on non-working Linux 4.6.0
Created attachment 217571 [details]
Xorg.log on working Linux 4.6.0 (commit reverted)
Created attachment 217581 [details]
refind_linux.conf of both cases
No Xorg config. Especially nothing special for intel or radeon. No special rEFInd features. Files attached. If you revert 4eebd5a4e7269 ("apple-gmux: lock iGP IO to protect from vgaarb changes") instead of 704ab614ec12, does the issue go away? https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4eebd5a4e7269 The issue goes away too, then. I don't currently see any difference to when I reverted 704ab614ec12. Xorg comes up on boot like it also did with 4.5.4 (and 4.5.5). I've e-mailed Bruno Prémont, author of 4eebd5a4e7269, and cc'ed platform-driver-x86: http://www.spinics.net/lists/platform-driver-x86/msg08889.html I've also cc'ed you but your e-mail address isn't working, please fix: <linux-kernel@lebenslange-mailadresse.de>: host mail.lebenslange-mailadresse.de[217.70.197.123] said: 550 Unrouteable address (in reply to RCPT TO command) Oops, fixed (and double-checked) that email issue. Thanks. This issue is still there in Linux 4.10. Because I didn't manage to find this bugzilla entry again I opened a new bug, #194697. The status on this bug here is "NEEDINFO" - what kind of info is needed? *** Bug 194697 has been marked as a duplicate of this bug. *** Created attachment 273877 [details]
dmesg of logdep splat on 4.15-rc9 minus 4eebd5a4e726
logdep splat from Linux 4.15-rc9 with commit 4eebd5a4e726 reverted.
The splat occurred after echoing first "DIS", then "OFF" into /sys/kernel/debug/vgaswitcheroo/switch. The "switched off" in the first line likely is from drivers/gpu/drm/i915/i915_drv.c:584, i915_switcheroo_set_state().
|