Switching to integrated card with vgaswitcheroo makes the kernel to hang, until pulseaudio is killed

Bug #1210470 reported by Marco Trevisan (Treviño)
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Linux
Unknown
Medium
pulseaudio (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have a dual-GPU notebook, with a Intel Ironlake integrated GPU and a AMD 5650m dedicated GPU (muxed system). The AMD gpu is also connected to an HDMI port that implies an audio card (I'm running radeon module with radeon.audio=1).

If I switch to the integrated card after that the UI is up and pulseaudio is loaded, as soon as I exit from lightdm (both to reload X or to shutdown the PC) the kernel hangs (both in 12.10, 13.04 and 13.10):

[ 489.177732] hda-intel 0000:01:00.1: Disabling via VGA-switcheroo
[ 489.297129] hda-intel 0000:01:00.1: Cannot lock devices!
[ 489.297139] radeon: switched off
[ 489.300356] [drm] Disabling audio support
[ 489.319552] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x000000000015e418 and cpu addr 0xffffc90009df0418
[ 489.973886] ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK event: unsupported
[ 489.973903] _handle_hotplug_event_root: Bus check notify on \_SB_.PCI0
[ 678.992375] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 678.992453] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 683.996303] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 683.996377] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 683.996453] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing C3DC (len 871, WS 0, PS 0) @ 0xC439
[ 689.000275] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 689.000349] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 694.004285] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 694.004363] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 699.008330] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 699.008414] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 699.514458] init: tty1 main process (2460) killed by QUIT signal
[ 699.514489] init: tty1 main process ended, respawning
[ 704.012405] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 704.012492] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 709.016515] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 709.016596] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28

At the contrary, if once lightdm starts I go to tty1 → sudo service lighdm stop → sudo killall pulseaudio → echo OFF| sudo tee /sys/kernel/debug/vgaswitcheroo/switch #switch to integrated card

Everything works well instead.

So it seems that pulseaudio should disable the powered-off card on switch (or is this something that the kernel should do?).

Revision history for this message
In , Marco Trevisan (Treviño) (3v1n0) wrote :

I've a Mobility Radeon HD 5650 muxed with an intel card. If I boot with radeon.audio=1 and I switch the radeon card off when pulseaudio is running, then the kernel hangs as soon as I close X:

[ 489.177732] hda-intel 0000:01:00.1: Disabling via VGA-switcheroo
[ 489.297129] hda-intel 0000:01:00.1: Cannot lock devices!
[ 489.297139] radeon: switched off
[ 489.300356] [drm] Disabling audio support
[ 489.319552] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x000000000015e418 and cpu addr 0xffffc90009df0418
[ 489.973886] ACPI: \_SB_.PCI0: ACPI_NOTIFY_BUS_CHECK event: unsupported
[ 489.973903] _handle_hotplug_event_root: Bus check notify on \_SB_.PCI0
[ 678.992375] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 678.992453] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 683.996303] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 683.996377] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 683.996453] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing C3DC (len 871, WS 0, PS 0) @ 0xC439
[ 689.000275] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 689.000349] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 694.004285] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 694.004363] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 699.008330] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 699.008414] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 699.514458] init: tty1 main process (2460) killed by QUIT signal
[ 699.514489] init: tty1 main process ended, respawning
[ 704.012405] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 704.012492] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28
[ 709.016515] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting
[ 709.016596] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing CD0C (len 62, WS 0, PS 0) @ 0xCD28

These errors doesn't happen instead if I close X and kill pulseaudio before switching cards.

Not sure if this is a pulseaudio issue or a kernel one (that should notify pulseaudio about the unplugged HDMI audio card).

affects: pulseaudio → linux
Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote : Re: [Bug 1210470] Re: Switching to integrated card with vgaswitcheroo makes the kernel to hang, until pulseaudio is killed

2013/8/9 Raymond <email address hidden>:
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/pci/hda/hda_intel.c?qt=grep&q=vga

Oh, cool... Isn't this going to be merged on mainline?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Garri (g-djavadyan) wrote :

I expirienced similar problems. https://bugs.gentoo.org/show_bug.cgi?id=506188

pulseaudio hangs when it tryes to access switched off audio device.

How I reproduced the problem:

I started Gnome 3 session with disabled discrete GPU + HDMI audio. Disabled via vgaswitcheroo before session start.
Switched on radeon GPU via vgaswitcheroo.
Stopped pulseaudio daemon and launched it as foreground process with -vvv options.
Launched sound applet from Gnome Control Center and verified that there is an HDMI Audio output device.
Switched off radeon GPU via vgaswitcheroo.
Tried to access switched off HDMI Audio by pressing 'Test Speakers' button.

The outcome is not responding Sound applet and error messages from pulseaudio:

D: [alsa-source-ALC271X Analog] ratelimit.c: 241 events suppressed
D: [alsa-source-ALC271X Analog] memblock.c: Pool full
W: [alsa-source-ALC271X Analog] asyncq.c: q overrun, queuing locally
D: [alsa-source-ALC271X Analog] memblock.c: Pool full
W: [alsa-source-ALC271X Analog] asyncq.c: q overrun, queuing locally
D: [alsa-source-ALC271X Analog] memblock.c: Pool full
W: [alsa-source-ALC271X Analog] asyncq.c: q overrun, queuing locally
D: [alsa-source-ALC271X Analog] memblock.c: Pool full
W: [alsa-source-ALC271X Analog] asyncq.c: q overrun, queuing locallyt
D: [alsa-source-ALC271X Analog] memblock.c: Pool full
W: [alsa-source-ALC271X Analog] asyncq.c: q overrun, queuing locally
D: [alsa-source-ALC271X Analog] memblock.c: Pool full

The pulseaudio process is not reacted to SIGTERM and SIGKILL.

Revision history for this message
Carlos Gomes (cmalvesgomes) wrote :

I am currently experiencing the issue described by Garri. Any fix or workaround yet?

Revision history for this message
Carlos Gomes (cmalvesgomes) wrote :

Okay, switching off the HDMI sound card in pavucontrol works for me.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 13.10 (saucy) reached end-of-life on July 17, 2014.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test.

Changed in pulseaudio (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Closed due to no response.

Changed in pulseaudio (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
In , Martin-peres-n (martin-peres-n) wrote :

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/365.

Changed in linux:
status: Confirmed → Unknown
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.