Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Systems goes to sleep mode while playing a movies

  1. #1

    Question Systems goes to sleep mode while playing a movies

    Hi,

    I have migrated to opensuse from Ubuntu and have installed 11.4 on my laptop with windows 7 dual boot. Now the issue is that the power management keeps executing even if the laptop is in working mode. For example, I have configured the power profile to dim the screen after 10 min, start screensaver after 15 min, make the system sleep after 20 min. This should be applicable when the system is idle but it gets executed while I am watching a movie. Whenever I watch a movie, the screen goes dim after 10 min, starts screensaver and even goes to sleep mode while the movie is playing.

    I need a solution that will execute these power options when my laptop is in idle state.

  2. #2

    Default Re: Systems goes to sleep mode while playing a movies

    Ok. I did some google and found that this issue does exist on other linux distros as well. The multimedia apps fails to poll the system telling it that the user is idle though its not.

    Does anyone else has faced this issue? Any idea about a fix for this?

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    22,719

    Default Re: Systems goes to sleep mode while playing a movies

    On 2011-04-26 23:06, rgupta52 wrote:
    > Does anyone else has faced this issue? Any idea about a fix for this?


    The problem is that there is not a common command or whatever that allows a
    multimedia application to tell the system not to sleep. Kde may have a
    method, gnome may have another...

    For example, xine tricks the keyboard into changing some key press status
    so that the system thinks there is user activity.

    Search the forum to see if this has been asked before.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  4. #4
    Join Date
    Jul 2008
    Location
    Bellevue, WA
    Posts
    14,379

    Default Re: Systems goes to sleep mode while playing a movies

    On Tue, 26 Apr 2011 16:06:01 +0000, rgupta52 wrote:

    > I need a solution that will execute these power options when my laptop
    > is in idle state.


    The challenge is in identifying what constitutes an 'idle state'. If
    you're watching a movie, the mouse and keyboard are not active, so that's
    what's being perceived as an 'idle' state and is triggering the timer.

    A possible solution would be to launch your media player with a script
    that disables the screensaver and DPMS settings (for your monitor) before
    running and re-enables them afterwards.

    For example, if you use GNOME, you could do:

    #!/bin/bash
    gnome-screensaver-command --exit
    xset -dpms
    xine
    xset +dpms; xset dpms 600
    gnome-screensaver &

    (the 'xset dpms 600' sets the screen power off to 10 minutes)

    Jim


    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    22,719

    Default Re: Systems goes to sleep mode while playing a movies

    On 2011-04-27 00:26, Jim Henderson wrote:

    > A possible solution would be to launch your media player with a script
    > that disables the screensaver and DPMS settings (for your monitor) before
    > running and re-enables them afterwards.


    But you see, this should be automatic. The user should not have to do such
    hacks. Not even the multimedia application designer!

    There should be a common api, system call, or whatever, that disables
    screen saving features (screen saver, screen dimmer), for any possible desktop.


    There has been some agreements on features the desktop should have, to
    behave nicely with one another. This should be one more feature.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  6. #6
    Join Date
    Jun 2008
    Location
    Connecticut, USA
    Posts
    2,161
    Blog Entries
    1

    Default Re: Systems goes to sleep mode while playing a movies

    Quote Originally Posted by robin_listas View Post
    But you see, this should be automatic. The user should not have to do such
    hacks. Not even the multimedia application designer!

    There should be a common api, system call, or whatever, that disables
    screen saving features (screen saver, screen dimmer), for any possible desktop.
    I would like to see it, and a number of other things, automatic. I would also want to make sure it doesn't lock the advanced users from making it do what they want it to.

    I maythink it would be more the responsibility of the movie player to turn those things off or suspend them while playing. Preferably with the ability to suppress the suppress features.

    Or should it be up to the distributions', so if the distribution is for desktop (consumer) use it does this automatically while distributions for hacking may not and give the user more control?

    Thanks Jim, for that quick script. Is that complete? I just may use it, except many of the movies I use are over the internet so it is actually using the Flash or other technology inside a browser, rather than a stand-alone applications.
    "Linux provides freedom, problem is most users don't know what it is or how to use it." ~me
    Friends don't let Friends wear red shirts on away parties!
    Linux User #477531 | Danbury Area Computer Society (www.dacs.org)

  7. #7

    Lightbulb Re: Systems goes to sleep mode while playing a movies

    I found that the TOTEM Player is what I was looking for. Watching movie in totem avoids trigerring the power management parameters.

    Thanks for the script Jim. But this would become annoying running the script everytime whenever you want to watch a movie. I am wondering how this has not came in the consideration of the OpenSuse developers.

  8. #8
    Join Date
    Jul 2009
    Location
    Montreal, Québec
    Posts
    1,704

    Default Re : Re: Systems goes to sleep mode while playing a movies

    Hi,

    Just to add somme morte information. There is a little apps that just do that I think. It is called : Caffeine. Some guys have package it in OBS. Look there. It prevents the screesaver and the sleep mode from starting.

  9. #9
    Join Date
    Jun 2008
    Location
    Connecticut, USA
    Posts
    2,161
    Blog Entries
    1

    Default Re: Re : Re: Systems goes to sleep mode while playing a movies

    So for Gnome, Totem does it, and for KDE Caffeine does?
    "Linux provides freedom, problem is most users don't know what it is or how to use it." ~me
    Friends don't let Friends wear red shirts on away parties!
    Linux User #477531 | Danbury Area Computer Society (www.dacs.org)

  10. #10
    Join Date
    Feb 2011
    Location
    127.0.0.1
    Posts
    470

    Default Re: Re : Re: Systems goes to sleep mode while playing a movies

    Yes, Kaffeine does that. But I don't have any issues at all with VLC. That's another option, I think.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •