After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 347426 - Pause playback when session is not active
Pause playback when session is not active
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other Linux
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 352292 552512 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-13 16:42 UTC by James Read
Modified: 2018-05-24 11:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14



Description James Read 2006-07-13 16:42:04 UTC
It would be nice to mute the sound, especially if a passsword is present. It would be extremely elegant to tap a key on the keyboard (sleep key for me), which fades the screen to the screensaver, locks the computer, *and* mutes the sound. Prehaps a little checkbox/condition could exist in the event that people want to lock the screen but play music for a party or something.
Comment 1 William Jon McCann 2006-07-13 16:44:57 UTC
what do you use to listen to music?  My first thought is that is might be better for us to modify it to listen to the screensaver DBUS messages.
Comment 2 James Read 2006-07-13 17:14:20 UTC
rythmbox. 

Could you not just mute ALSA/Equivilent? That way it could take out various other things like games if they were running in the background.
Comment 3 William Jon McCann 2006-07-13 17:51:16 UTC
But wouldn't you expect that rhythmbox would not just mute but it would stop playing (using CPU) and not use the audio devices (allowing them to power down)?

The same can be said for games too.  Wouldn't you expect the game to pause and not continue playing with muted sounds?
Comment 4 James Read 2006-07-13 20:12:40 UTC
If you're locking the screen, you're not using the applications anymore. Does it really matter what state they are in while the screensaver is running?
Comment 5 William Jon McCann 2006-07-13 20:14:56 UTC
Yes, it matters.  Power consumption is one reason.  Resource utilization is another.
Comment 6 James Read 2006-07-14 12:27:00 UTC
Do many programs at the moment listen for when the screensaver becomes active? I assume that if a broadcast system is already in place, I should proberbly take this suggestion to rythmbox instead. Although it's a pitty that this suggestion should have to be echo'd throughout any gnome application that uses sound in any form. I believe it would be far easier to do it on the gnome-screensaver side. 

Prehaps, you could have a fallback. You let applications try to do what they'd like when they receive a message about the screensaver going active. This way, they can go idle, stop playing music, using cpu, etc. If there is sound still playing, you could then mute it if the application has not already done so. This way, it won't make any difference to the current system, whereby applications are using just as much cpu. 
Comment 7 William Jon McCann 2006-08-22 15:49:55 UTC
*** Bug 352292 has been marked as a duplicate of this bug. ***
Comment 8 William Jon McCann 2006-10-02 19:04:57 UTC
I think this is best handled in RB.  Also I'm not sure we should mute the sound when the screen blanks.  Some people (like me) like to listen to music at home with the screen locked.  However, I think it always makes sense to pause/mute when the active user is switched.  This can be one form of solution to this problem since the screensaver may offer to switch users.

Use cases:

case 1. User1 doesn't want music to stop when screen is locked
case 2. User2 does want music to stop when screen is locked
case 3. Music should stop when User1 is no longer the active session

case1:
     current
        * Screen is blanked or locked and music continues to play.
     proposed
        * Current behavior - no action needed

case2:
     current
        * Screen potentially locked and user2 has no access to turn off music
        * Must resort to turning off system or similar
     proposed
        * User2 clicks "switch user" to switch to a) another session b) display manager chooser
        * Applications in user1's session receive notification that they no longer in the active session
        * Applications yield the hardware

case3:
     current
        * Very difficult and generally not implemented
     proposed
         * Applications in user1's session receive notification that they no longer in the active session
        * Applications yield the hardware


The missing piece of this puzzle is the entity that sends the "ActiveSessionChanged" notification.  I'm working on this.

In the meantime, I'll move this to RB.
Comment 9 David Juran 2006-10-10 18:47:26 UTC
I don't fully agree with your solution to use case 2. 
Imagine the scenario of a machine in an office. Now when the user leaves his machine and the screen saver kicks in, the ideal thing to do here is to mute the sound automatically so that _all_ sounds (e.g. email notifications or misconfigured screensaver hacks) are muted. Needless to say this should be done without requiring actions from co-workers unnecessarily raising irritation levels... This scenario is in my opinion solved much better in gnome-screen-saver by the solution outlined by James in comment 0 since it will silence everything, not only compliant gnome applications.

Then of course it's a good idea for applications to notice that the session is not used and stop playing sounds for power consumption reasons. But that I believe is a separate bug report...
Comment 10 Cyphase 2007-01-08 11:23:44 UTC
It should be an option whether or not the music turns off when the screensaver comes on or you switch users. I have wireless headphones (300 feet), and I frequently have them on when not at the computer. Whenever someone else uses their account on my computer, e.g. my little brother, I still want to be able to hear whatever it is I'm listening to. The same thing could apply to speakers/wired headphones as well. Better to make it an option, even if it's just in GConf, although much preferably it'd have some kind of UI.
Comment 11 Alexander “weej” Jones 2007-03-29 00:04:15 UTC
James - a question. I'm working on a desktop-wide session presence manager ("SessionPresenceManager") with exactly what you posted in Comment #0 in mind.

The system includes a daemon and a basic preliminary client with two buttons, "here" and "away".

As of this morning, I have a Rhythmbox plugin that listens for presence updates, and pauses playback when "away".

I plan to make GNOME Screensaver client of this (stripping out its own idle detection system) so that it will activate the screensaver when the new daemon decides that the user is "away". Basically, this amounts to replacing the idea of "Activate screensaver when computer is idle" with "Activate screensaver when away". As is the case now, screen locking is down to GNOME Screensaver, so that's not a problem.

Does this sound like a good solution, to you?
Comment 12 Alexander “weej” Jones 2007-03-29 02:03:52 UTC
http://live.gnome.org/SessionPresence
Comment 13 Bastien Nocera 2007-03-29 12:05:23 UTC
(In reply to comment #11)
> James - a question. I'm working on a desktop-wide session presence manager
> ("SessionPresenceManager") with exactly what you posted in Comment #0 in mind.

How is that different from Galago?

Galago also supports integration with IM programs, and would certainly allow for this type of interaction, no?
Comment 14 Alexander “weej” Jones 2007-03-29 13:17:56 UTC
It's different because it's not backed off an IM program - IM programs are backed off of it, instead.
Comment 15 William Jon McCann 2007-03-29 13:35:04 UTC
Alex, there is already an interface for session idleness:
http://live.gnome.org/GnomeScreensaver/FrequentlyAskedQuestions#head-ac43c8f33bc700a5e298e6a82ded0e8bb9b33043

Let's not turn this bug into an analysis of hypothetical presence manager.  If you have a specific proposal for changes to gnome-screensaver you should submit a bug to the gnome-screensaver product and perhaps discuss it on the screensaver list.
Comment 16 Alexander “weej” Jones 2007-03-29 18:53:44 UTC
I will open a bug against GNOME Screensaver to integrate my changes in due course.

Comment 17 James Read 2007-03-30 12:32:25 UTC
This solution seems quite excellent. 

Now for integration with Gaim. :) 

Locking your screen, pausing your music, setting your msn status to away. That is simply brilliant. Oh how I love gnome.
Comment 18 Jonathan Matthew 2008-09-16 21:43:33 UTC
*** Bug 552512 has been marked as a duplicate of this bug. ***
Comment 19 GNOME Infrastructure Team 2018-05-24 11:39:10 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME'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.gnome.org/GNOME/rhythmbox/issues/205.