Bug 454388 - Pause media players on suspend pauses Cantata, also pausing MPD on external device
Summary: Pause media players on suspend pauses Cantata, also pausing MPD on external d...
Status: RESOLVED WORKSFORME
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-25 11:15 UTC by mwb_eng
Modified: 2022-05-25 16:23 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mwb_eng 2022-05-25 11:15:10 UTC
SUMMARY
If device enters suspend while Cantata is open it pauses, causing MPD server on external device to also pause. Does not pause MPD playback when suspend if Cantata is already closed. Suspend of laptop/PC should not pause external MPD server.


NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Have an MPD server on an external device
2. Open Cantata (ensure MPD host is already configured in settings) and play something
3. Suspend while Cantata is still open

OBSERVED RESULT
Cantata pauses, causing external MPD server to pause

EXPECTED RESULT
Cantata does not pause/is ignored by "pause media players on suspend" setting, MPD continues to play on external server

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-05-25 15:32:41 UTC
It's up to Cantata as to what it does when it's asked to pause the music. Since Cantata is a frontend to an MPD server hosted elsewhere, I'm not surprised that it pauses the server.

If you want to make the system not pause music players when locking or suspending, you can go to System Settings > Power Management > Advanced Power Settings > uncheck "Pause media players when suspending".
Comment 2 mwb_eng 2022-05-25 16:21:02 UTC
(In reply to Nate Graham from comment #1)
> It's up to Cantata as to what it does when it's asked to pause the music.
> Since Cantata is a frontend to an MPD server hosted elsewhere, I'm not
> surprised that it pauses the server.
> 
> If you want to make the system not pause music players when locking or
> suspending, you can go to System Settings > Power Management > Advanced
> Power Settings > uncheck "Pause media players when suspending".

The feature is great for local media players. However, I feel like it shouldn't tell mpd clients like cantata to pause on suspend as they are really just controlling/getting status of a music source and not actually playing the media/consuming resources. Is there a way to blacklist an application from this feature perhaps?
Comment 3 Nate Graham 2022-05-25 16:23:10 UTC
No, it's all-or-nothing. We can't detect the capabilities of the music player app because there's no standardized means for that information to be communicated. We could conceivably add a feature to allow the user to blacklist certain apps, but this seems like super overkill IMO when there is already a setting to control the behavior.