Bug 348286 - Kmix appears to override deliberately overridden playback devices
Summary: Kmix appears to override deliberately overridden playback devices
Status: REPORTED
Alias: None
Product: kmix
Classification: Applications
Component: Backend: Pulseaudio (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-27 05:27 UTC by Mal Haak
Modified: 2019-01-13 15:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mal Haak 2015-05-27 05:27:39 UTC
I use an external USB sound card on my laptop with my better headphones. As such I override the playback device for Amarok. 
Randomly at song change Kmix appears to be setting this overridden value back to the 'default' value.

This was not the case on KDE4. Once set it would maintain the new output device even across reboots. 

Reproducible: Sometimes

Steps to Reproduce:
1. Use Kmixer or Kmixer plasma widget to change playback device for Amarok
2. Hit next a few times
3. 

Actual Results:  
KMix reverts the playback device

Expected Results:  
Overridden playback device remains overridden as Pulse will revert to default if device goes away. And will re-override output to non-default device on hot-plug.

This worked correctly on KDE4
Comment 1 Colin Guthrie 2015-05-27 07:40:34 UTC
There are a number of components involved here (pulseaudio, module-device-manager PA module, phonon, kmix), so perhaps it's better to report this downstream via your distro where someone can help you diagnose at which point in the chaing the problem lies, then you can report upstream again with more information.

At present, it's really hard to say from the description provided where the problem could lie - we'd have to setup a similar system and reproduce the problem to be able to get appropriate debug information.

For example, kmix simply calls PulseAudio APIs here, so it's very unlikely to be kmix that is at fault. Can you e.g. quit kmix, and then use some other stream manipulation GUI - e.g. pavucontrol, or simply pactl if you want to get the right names or indexes ("pactl list" will give you references and "pactl move-sink-input $sink_input_id $sink_name") will move it, and reproduce the same issue.

If you can reproduce via this mechanism, then try unloading the module-device-manager module from PA. This provides the Phonon device priority lists for application categories (e.g. "music" vs "video" apps) - you can do this via "pactl unload-module $index" (again pactl list will show you the value you need). 

If you can still reproduce, then try using a different phonon backend (e.g. vlc rather than gst or vice versa).

If, after all that you can still reproduce, then the problem is probably in PulseAudio itself.

This will help narrow down where the problem lies, but like I say it's probably best to do this downstream first and bring it upstream once you are certain what component is to blame. I'll make the bug as such in the meantime but feel free to reopen if you feel appropriate.
Comment 2 Mal Haak 2015-05-27 07:52:41 UTC
My apologies,

I'm pretty sure it's Kmix doing it, as it notifies me of what it is doing when it happens. I get a 'toast' down the bottom from the Kmix plasma widget when it happens and it has a revert button. 

This doesn't happen when I force the stream around using any other method (like PulseAudio Volume control). I tested that before opening the bug. 

Like I said, this worked in KDE 4, which was on this machine less than 48hrs ago, running pretty much everything else identical.

I haven't replaced Pulse as part of that upgrade nor do I believe much of the Phonon backend was replaced in the upgrade. Only the User Space components of plasma. 

I'm happy to do all the testing you are talking about in your post, it will only take a few hours and I've got the time.

I'm not a punt it over the fence kind of guy. I want to work this, I more or less just need somebody to tell me what they need to know.
Comment 3 Colin Guthrie 2015-05-27 08:01:32 UTC
OK, thanks for the additional information, it certainly helps clarify things. I'm not really sure what's happening in kmix these days in terms of what it actively does. When I wrote the original support I was very explict in not making it do too much as putting too much logic in here would always conflict with policy and routing modules lower down in the stack.

I know phonon has a toaster popup type thing with a revert button, but I wasn't aware kmix had one. I'll reassign to someone who knows more about kmix in a plasma world.
Comment 4 nuc 2019-01-13 15:27:27 UTC
Isn't this related or a duplicate to #270971 ?