BUG: soft lockup - CPU#0 stuck for 22s (when using vgaswitcheroo)
A message that is not in the archive (sent off-list or not yet received): [email protected]/
https://bugzilla.kernel.org/show_bug.cgi?id=64891
Takashi Iwai <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|Sound(ALSA) |Video(DRI - non Intel)
Assignee|[email protected] |drivers_video-dri@kernel-bu
| |gs.osdl.org--- Comment #16 from Takashi Iwai <[email protected]> --- OK, changing the component to DRI...
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
Alex Deucher <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #17 from Alex Deucher <[email protected]> ---
This might be related to bug 61891 (and related fdo bugs). In that case, bbd34fcdd1b201e996235731a7c98fd5197d9e51 caused the regression. Unfortunately, I'm not familiar enough with the acpi or hotplug code to really understand what's going on.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #18 from Takashi Iwai <[email protected]> --- Rafael, any clue?
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #19 from Joaquín Aramendía <[email protected]> --- Created attachment 119641
--> https://bugzilla.kernel.org/attachment.cgi?id=119641&action=edit
Dmesg blacklisting snd_hda_intel module only
Just a little more research: blacklisting snd_hda_intel I got this dmesg. A call trace is called on gpu turn off but I'm able to continue using my laptop (no lockup). I'll try to make a debug version so that trace is something useful.
$ uname -r 3.12.6-1-ARCH
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #20 from Joaquín Aramendía <[email protected]> --- I'm not able to compile a debug version, at least not easily. Hope the trace is helpful as is, if not, please give me some pointers on how to improove it. Thanks.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #21 from Alex Deucher <[email protected]> ---
See bug 61891. Does booting with acpiphp.disable=1 on the kernel command line in grub help?
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #22 from Joaquín Aramendía <[email protected]> --- Thanks for the reply, Alex.
Adding 'acpiphp.disable=1' to bootloader indeed helps.
Tested on
$ uname -r 3.12.6-1-ARCH
Last lines of dmesg shows the Nvidia card is shut down
[ 25.473454] hda-intel 0000:01:00.1: Disabling via VGA-switcheroo [ 28.062014] ACPI Warning: \_SB_.PCI0.P0P1.PEGP._DSM: Argument #4 type
mismatch - Found [Integer], ACPI requires [Package] (20130725/nsarguments-95)
And is confirmed by vgaswitcheroo
# cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Pwr:0000:00:02.0 1:DIS: :DynOff:0000:01:00.0 2:DIS-Audio: :Off:0000:01:00.1
Then tested powering on/off with prime and it didn't work. It froze when calling:
$ DRI_PRIME=1 glxinfo | grep renderer
Couldn't catch the dmesg after that.
Indeed it seems like a duplicate of bug 61891. I can't test the patch proposed there as it's radeon specific.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #23 from Alex Deucher <[email protected]> --- (In reply to Joaquín Aramendía from comment #22)
Quoted 5 lines
Thanks for the reply, Alex.
Adding 'acpiphp.disable=1' to bootloader indeed helps.Indeed it seems like a duplicate of bug 61891. I can't test the patch proposed there as it's radeon specific.
We probably need a similar patch for nouveau and the DSM acpi method.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #24 from Joaquín Aramendía <[email protected]> --- (In reply to Alex Deucher from comment #23)
Quoted 1 line
We probably need a similar patch for nouveau and the DSM acpi method.
Should I open a new bug report? Or change the title on this one? Let me know. I can test whatever is necessary
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
Rafael J. Wysocki <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #114431|text/x-log |text/plain
mime type| |Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #25 from Rafael J. Wysocki <[email protected]> --- (In reply to Joaquín Aramendía from comment #24)
Quoted 5 lines
(In reply to Alex Deucher from comment #23)
Quoted 1 line
We probably need a similar patch for nouveau and the DSM acpi method.
Should I open a new bug report? Or change the title on this one? Let me know. I can test whatever is necessary
Can you please attach dmesg from the failing kernel without any changes?
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #26 from Rafael J. Wysocki <[email protected]> --- Created attachment 120021
--> https://bugzilla.kernel.org/attachment.cgi?id=120021&action=edit
nouveau: Possible VGA switcheroo problem fix
If this is exactly the same issue as in bug #61891, this (untested) patch on top of
https://patchwork.kernel.org/patch/3414401/
should work for nouveau.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #27 from Joaquín Aramendía <[email protected]> --- I'll test it tonight. I tried to make a similar code for nouveau but didn't work.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #28 from Joaquín Aramendía <[email protected]> --- Created attachment 120071
--> https://bugzilla.kernel.org/attachment.cgi?id=120071&action=edit
3.13rc5 patched dmesg
(In reply to Rafael J. Wysocki from comment #26)
Quoted 8 lines
nouveau: Possible VGA switcheroo problem fix
If this is exactly the same issue as in bug #61891, this (untested) patch on top of
https://patchwork.kernel.org/patch/3414401/
should work for nouveau.
I could test it after a struggle. This is what I did:
Patched the clean 3.13rc5 tarball with both patches and compiled it. After that adding the "acpiphp.disable=1" workarround made no difference, so that issue might be cleared.
To get to at least an interactive system I had to blacklist 'snd_hda_module' and get into 'multi-user.target' in systemd. X will freeze before I could enter my password.
I finally could get into tty and run a dmesg. I noticed that nouveau gets insmod-ed and rmmod-ed once every, roughly, a minute. After two minutes the system will lock. Unfortunatelly I couldn't catch up the dmesg before that, 'journalctl' got a crippled dmesg from previous boot (this one I'm attaching). There is a call trace regarding hotplug in there.
In a related issue: I also noticed that the 'acpiphp.disable=1' workarround won't always work on 3.12.6-ARCH, it will lock X after login. Specially when the system is recovering from a hard button shutdown (when I have to kill my laptop with the power button). Sometimes it freezes earlier than X login. (Possibly a race condition?)
Hope all this helps.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
Rafael J. Wysocki <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |ASSIGNED
--- Comment #29 from Rafael J. Wysocki <[email protected]> --- (In reply to Joaquín Aramendía from comment #28)
Quoted 11 lines
Created attachment 120071 [details]
3.13rc5 patched dmesg(In reply to Rafael J. Wysocki from comment #26)
Quoted 7 lines
nouveau: Possible VGA switcheroo problem fix
If this is exactly the same issue as in bug #61891, this (untested) patch on top of
Quoted 7 lines
Quoted 1 line
should work for nouveau.
I could test it after a struggle. This is what I did:
Patched the clean 3.13rc5 tarball with both patches and compiled it. After that adding the "acpiphp.disable=1" workarround made no difference, so that issue might be cleared.
That's what the patch is for, so it looks like it has worked.
I'll the nouveau workaround to https://patchwork.kernel.org/patch/3414401/
then.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
Joaquín Aramendía <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #115771|0 |1
is obsolete| |
Attachment #115931|0 |1
is obsolete| |
Attachment #119641|0 |1
is obsolete| |
Attachment #120071|0 |1
is obsolete| |--- Comment #30 from Joaquín Aramendía <[email protected]> --- Created attachment 120321
--> https://bugzilla.kernel.org/attachment.cgi?id=120321&action=edit
dmesg after ACPIPHP patch
A follow-up on this issue:
After applying Rafael's patch, the issue with the lockup is still present. After booting on 3.13rc5 kernel in 'multi-user.target' I managed to get a full dmesg.
The nouveau driver seems not to handle vgaswitcheroo well. After being disabled as DSM call mismatch error suggest, it will lock, after a minute or so it starts printing this messages:
...
[ 123.322051] smeagol kernel: nouveau W[ PFIFO][0000:01:00.0] unknown intr
0x04200000, ch 2
...
Followed by timeout errors:
...
[ 129.302814] smeagol kernel: nouveau E[ PFIFO][0000:01:00.0] channel 2 [DRM] unload timeout ... [ 149.888549] smeagol kernel: nouveau W[ BARCTL][0000:01:00.0] flush timeout
...
When the laptop finally responded to Ctrl+Alt+Del then a backtrace appeared regarding acpi hotplug.
And then nouveau is reloaded again! Just before I had to drown my laptop with the power button.
...
[ 207.138410] smeagol kernel: nouveau [ DEVICE][0000:01:00.0] BOOT0 : 0x0a8a80b1 [ 207.138415] smeagol kernel: nouveau [ DEVICE][0000:01:00.0] Chipset: GT218 (NVA8) [ 207.138418] smeagol kernel: nouveau [ DEVICE][0000:01:00.0] Family : NV50 [ 207.139892] smeagol kernel: nouveau [ VBIOS][0000:01:00.0] checking PRAMIN for image... [ 207.188025] smeagol kernel: nouveau [ VBIOS][0000:01:00.0] ... signature not found [ 207.188030] smeagol kernel: nouveau [ VBIOS][0000:01:00.0] checking PROM for image... [ 208.466903] smeagol kernel: nouveau [ VBIOS][0000:01:00.0] ... signature not found [ 208.466907] smeagol kernel: nouveau [ VBIOS][0000:01:00.0] checking ACPI
for image...
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #31 from Rafael J. Wysocki <[email protected]> --- It looks like the ACPIPHP is not sufficient in your case, because it still tries to remove some devices in response to the event signaled after _DSM execution.
We'll need some more debug info to figure out what is going on.
Please remove the patches you have applied so far and apply this one instead:
https://patchwork.kernel.org/patch/3416861/
This contains the nouveau part already.
I'll let you know what to apply in addition to that.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
Rafael J. Wysocki <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEEDINFO
--- Comment #32 from Rafael J. Wysocki <[email protected]> --- First off, please attach the output of acpidump from that machine.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #33 from Rafael J. Wysocki <[email protected]> --- Created attachment 120331
--> https://bugzilla.kernel.org/attachment.cgi?id=120331&action=edit
Debug patch for ACPIPHP
Second. please apply this patch (on top of the one I pointed you to previously) and try to get a dmesg output analogous to the previous one.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #34 from Joaquín Aramendía <[email protected]> --- Created attachment 120361
--> https://bugzilla.kernel.org/attachment.cgi?id=120361&action=edit
acpidump for Dell Vostro 3500
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #35 from Joaquín Aramendía <[email protected]> --- Created attachment 120371
--> https://bugzilla.kernel.org/attachment.cgi?id=120371&action=edit
dmesg Debug patch
Hope this is what you want
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #36 from Rafael J. Wysocki <[email protected]> --- Yes, thanks!
It looks like on your system the device having the "switching _DSM" method has to be marked with no_hotplug.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
Rafael J. Wysocki <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #120021|0 |1
is obsolete| |
--- Comment #37 from Rafael J. Wysocki <[email protected]> --- Created attachment 120381
--> https://bugzilla.kernel.org/attachment.cgi?id=120381&action=edit
ACPIPHP / radeon / nouveau: Fix VGA switcheroo problem related to hotplug
Please apply this patch (instead of the ones from comment #31 and #33) and check if it makes any difference.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #38 from Joaquín Aramendía <[email protected]> --- (In reply to Rafael J. Wysocki from comment #36)
Quoted 2 lines
It looks like on your system the device having the "switching
_DSM" method has to be marked withno_hotplug.
Indeed, the Nvidia card has a sound card in it that is claimed by the snd_hda_intel module. That module controls both sound cards.
I'll apply patch in comment #37 and report back.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #39 from Joaquín Aramendía <[email protected]> --- Created attachment 120391
--> https://bugzilla.kernel.org/attachment.cgi?id=120391&action=edit
dmesg after patch from comment #38
Now when I get to the tty the system is at leas responsive. The card is turned off and doing
# cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Pwr:0000:00:02.0 1:DIS-Audio: :Off:0000:01:00.1 2:DIS: :DynOff:0000:01:00.0
I noticed an order change (before 1 was the DIS card, 2 the DIS-Audio).
Then I started to toy with it, tryed
# systemctl isolate graphical.target
And it hanged. So I rebooted and tried again. This time trying a reboot after checking the vgaswitcheroo status, and it hanged with the attached dmesg. I'm not able to get into a graphical.target yet.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #40 from Rafael J. Wysocki <[email protected]> --- Well, that may be a different error. It looks like there are no hotplug events triggered by switcheroo any more which is the purpose of the patch.
Please apply the patch from comment #33 on top of the one in #37 and retest to verify that the hotplug events are really gone.
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #41 from Joaquín Aramendía <[email protected]> --- Created attachment 120411
--> https://bugzilla.kernel.org/attachment.cgi?id=120411&action=edit
dmesg for test on comment #40
Sorry for the delay.
Seems that there are some hotplug events left as per dmesg suggests:
...
[ 22.292356] smeagol kernel: ACPI Warning: \_SB_.PCI0.P0P1.PEGP._DSM: Argument #4 type mismatch - Found [Integer], ACPI requires [Package] (20131115/nsarguments-95) [ 22.299084] smeagol kernel: acpiphp_glue: hotplug_event: Bus check notify on \_SB_.PCI0.P0P1 [ 22.299087] smeagol kernel: acpiphp_glue: hotplug_event: re-enumerating slots under \_SB_.PCI0.P0P1 [ 22.299093] smeagol kernel: pcieport 0000:00:01.0: acpiphp_check_bridge [ 22.299097] smeagol kernel: video LNXVIDEO:00: no_hotplug set
...
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #42 from Rafael J. Wysocki <[email protected]> --- Yes, the event is triggered, but because of the no_hotplug set for LNXVIDEO:00, it is actually ignored and that's what I meant. This means that the patch works as intended and it should take hotplug out of the way for you.
The other issues you're seeing need to be investigated by colleagues who are more familiar with graphics and audio than I am.
Thanks a lot and happy New Year!
Signature · 2 lines
You are receiving this mail because: You are watching the assignee of the bug.
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #43 from Joaquín Aramendía <[email protected]> --- Thanks, Rafael! Hope I get it fixed (or help someone to do it, most likely). Happy new year.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #44 from Joaquín Aramendía <[email protected]> --- Created attachment 120671
--> https://bugzilla.kernel.org/attachment.cgi?id=120671&action=edit
Nouveau locked dmesg 3.13rc6 patched
Ok. Then I got 3.13rc6 with the patch from comment #37. Entering multi-user.target went fine. Then I tried to enter X. Here is the dmesg from that run. It took me almost 15 minutes of lockup. This time it got to print a trace. It seems that is only related to nouveau.
Hope this helps
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
--- Comment #45 from Joaquín Aramendía <[email protected]> --- Today I tested mainline kernel with no arguments and I found out that it works out-of-the-box like a charm. So no more issues related with power on/off nvidia card. I'll mark this as fixed.
Thanks to all.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugzilla.kernel.org/show_bug.cgi?id=64891
Tommaso Falchi Delitala <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #46 from Tommaso Falchi Delitala <[email protected]> --- Created attachment 181501
--> https://bugzilla.kernel.org/attachment.cgi?id=181501&action=edit
dmesg showing lockpuos (radeon off)
I still experience lockups related to audio with discrete card disabled via vgaswitcheroo. Moreover the systems hangs at shutdown.
Kernel 4.0.6-1-ARCH
AMD Mobility Radeon HD5470 + intel integrated.
# cat /sys/kernel/debug/vgaswitcheroo/switch 0:IGD:+:Pwr:0000:00:02.0 1:DIS: :DynOff:0000:01:00.0 2:DIS-Audio: :Off:0000:01:00.1
Interesting dmesg print:
snd_hda_intel 0000:01:00.1: Disabling via VGA-switcheroo snd_hda_intel 0000:01:00.1: Cannot lock devices!
INFO: task kworker/u16:0:6 blocked for more than 120 seconds.
Tainted: G W 4.0.6-1-ARCH #1
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u16:0 D ffff880132fd7ca8 0 6 2 0x00000000
Workqueue: hd-audio1 hdmi_repoll_eld [snd_hda_codec_hdmi]See complete dmesg in attachment.
Signature · 6 lines
You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel