SUMMARY If I pause a podcast, suspend my laptop, and then wake my laptop, Kasts starts auto-playing the podcast. I would expect it to only play when I manually do it. STEPS TO REPRODUCE 1. Pause a padcast playing in Kasts 2. Suspend laptop (ASUS in my case) 3. Wake laptop from suspend OBSERVED RESULT Kasts auto-plays the paused podcast on wake. EXPECTED RESULT Kasts does nothing. Podcast only plays when it is manually done. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Linux 6.5.2 on EndeavourOS (available in About System) KDE Plasma Version: 5.27.7 KDE Frameworks Version: 5.110.0 Qt Version: 5.15.10 ADDITIONAL INFORMATION Installed from the Arch "extra" repository
Could it be that you have this plasma setting enabled? hardware -> power management -> advanced -> pause media players when suspending I don't know for sure, but it could be that it actually toggles the play/pause state rather than actually putting it in pause state? If you've paused it before suspending, it might then actually toggle it to playing again.
(In reply to bart from comment #1) > Could it be that you have this plasma setting enabled? > hardware -> power management -> advanced -> pause media players when > suspending > > I don't know for sure, but it could be that it actually toggles the > play/pause state rather than actually putting it in pause state? If you've > paused it before suspending, it might then actually toggle it to playing > again. Sorry for the delay. Tried it now and it does toggle it instead of just pausing. Strange. Closing the issue and thanks for the help.
*** Bug 479795 has been marked as a duplicate of this bug. ***
After further digging, I found out that the underlying VLC audio backend was responsible for toggling pause instead of really pausing the audio (i.e. the audio would actually start playing when calling the pause() method if the stream was already in the paused state). I've solved this now on the master branch, so the fix should be in 24.05.
I'll actually also port it back to 24.02.
Git commit 973a5b7ac93cf27022df1d2af03ce5b7d9860628 by Bart De Vries. Committed on 23/01/2024 at 22:16. Pushed by bdevries into branch 'master'. Fix the pause() method toggling pause state for VLC backend This method should pause the audio. Instead, the VLC backend would toggle the pause state, i.e. it would start playing again if the audio stream was already paused. This caused issues with already paused streams incorrectly resuming playback after the system woke up from suspend. M +6 -1 src/kmediasession/mediabackends/vlcmediabackend.cpp https://invent.kde.org/multimedia/kasts/-/commit/973a5b7ac93cf27022df1d2af03ce5b7d9860628
Git commit 2c6c74aa0c08a18283bc96bc42fa3f7a1697f43a by Bart De Vries. Committed on 23/01/2024 at 22:24. Pushed by bdevries into branch 'release/24.02'. Fix the pause() method toggling pause state for VLC backend This method should pause the audio. Instead, the VLC backend would toggle the pause state, i.e. it would start playing again if the audio stream was already paused. This caused issues with already paused streams incorrectly resuming playback after the system woke up from suspend. M +6 -1 src/kmediasession/mediabackends/vlcmediabackend.cpp https://invent.kde.org/multimedia/kasts/-/commit/2c6c74aa0c08a18283bc96bc42fa3f7a1697f43a