Find the answer to your Linux question:
Results 1 to 10 of 10
Like Tree1Likes
  • 1 Post By G-Known
I can disable blank screen using xset command but doesn't have the option to adjust when watching videos. Gnome doesn't offer an option to disable such feature when such occurrence ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Location
    Debian Stable AMD-64 (Gnome 3)
    Posts
    49

    Looking to disable blank screen when watching videos


    I can disable blank screen using xset command but doesn't have the option to adjust when watching videos. Gnome doesn't offer an option to disable such feature when such occurrence calls for it. There's a shell script for firefox for this purpose but there's no workaround within the system. Caffeine doesn't work the last time I tested it.
    Lakshmipathi likes this.

  2. #2
    Linux User
    Join Date
    Dec 2011
    Location
    Turtle Island West
    Posts
    340
    This question is hilarious because mplayer does exactly this thing. It disables the screensaver while it's playing. Hey, who wants to wake the PC up every 10 minutes or whatever while you're laughing and watching Jackie Chan knock bad guys out with a baby stroller? So, if you pause a movie and fall asleep, the screen never turns off and glares all night.

    What's the answer? I dunno. Use mplayer?

    Something like this in $HOME/.bashrc:
    Code:
        xset dpms 0 0 600 # standby, suspend, off 
        xset s off # and turn off screensaver
    Then, anytime you open a terminal window, xset gets called with fresh values.

  3. #3
    Just Joined!
    Join Date
    Jan 2013
    Location
    Debian Stable AMD-64 (Gnome 3)
    Posts
    49
    I know that there are media applications that's able to disable screensavers while it's playing files but I'm concern with web browsers and having to disable screensaver completely is not ideal since you're not saving power . What I do find funny is why Gnome doesn't have a setting for it and left out a feature that should be automatic.
    Last edited by G-Known; 4 Weeks Ago at 05:17 AM.

  4. #4
    Linux User IsaacKuo's Avatar
    Join Date
    Feb 2005
    Location
    Baton Rouge, LA, USA
    Posts
    405
    How is GNOME supposed to know whether or not a video is playing? Psychic?

    Whether or not to disable screen blanking is a setting in the video player, not the desktop environment. But this may or may not work for Caffeine running in a non-KDE environment, or Totem if it's not running in GNOME.

    Mplayer has better luck because it cheats. It simply sends a fake keypress to X every few minutes to prevent a screensaver from activating. This is an ugly hack, but I find this ugly hack is generally more reliable than the "correct" way to disable the screensaver. You see tons of bug reports for Totem and GNOME failing to properly disable the screensaver even though the Totem settings say it should.

    I don't use GNOME, myself. I use XFCE4, and I generally set the screensaver to the maximum xscreensaver timeout value of 720 minutes (12 hours). This frees me from worrying about the annoying bugs with video players.
    Isaac Kuo, ICQ 29055726 or Yahoo mechdan

  5. #5
    Just Joined!
    Join Date
    Jan 2013
    Location
    Debian Stable AMD-64 (Gnome 3)
    Posts
    49
    It's maybe more difficult to detect if a video is playing in the browser because the system needs to detect flash or some other players being used. Turning the window full screen should be a trigger on disabling screensaver and especially when watching videos.

  6. #6
    Linux User Steven_G's Avatar
    Join Date
    Jun 2012
    Location
    Western US
    Posts
    331
    If Caffeine is not working then you either did not install / compile it correctly and / or you are missing deps or you have deeper issues with your x-server.

    And while Debian is a great base to build off of it's not really (IMHO, and not trying to start a flame war) a "complete" desktop OS. There's just too much building to do after install for my taste. You probably just missed something small and there's no telling what it is.

    If you like a Debian base with gnome then try Ubuntu Gnome. It is soooooooooooo much easier to work with than base Debian for a desktop OS and Caffeine will work as expected.

  7. #7
    Just Joined!
    Join Date
    Jan 2013
    Location
    Debian Stable AMD-64 (Gnome 3)
    Posts
    49
    Caffeine was a Gnome extension that I enabled through their website and it detects my system which can be configured through advance setting panel. It could be that my system only listens to X screen setting and not Gnome's because I alter settings in dconf editor to no effect.

    There's a script that "detects if the Flash shared library currently has any memory mapped" and use that to disable screensaver. I've tested this before and it did not work because changing the gnome setting using gconftool-2 doesn't seem to help. The screen will lit dark after 10 minutes of suspending activity even if the variable /app/screensaver/idle_activation_enabled is set to false.
    Last edited by G-Known; 4 Weeks Ago at 02:14 PM.

  8. #8
    Linux User Steven_G's Avatar
    Join Date
    Jun 2012
    Location
    Western US
    Posts
    331
    That sounds more like something is screwy in either your x-server, ACPI settings or dconf. Depending on how much building from core you did you may need to write some bash scripts that run on start up to smooth out that kind of stuff.

    I built my own re-mix I call X-Gnome. I started with the UB minimal core CLI install then took the XFCE4 DE without recommends or the XFCE tools / programs and "grafted" it on to the tools and programs from Gnome without the Gnome DE, then built my own dummy meta packages to keep all my deps straight.

    I ran in to the types of problems you're having and had to write some basic bash startup scripts to fix the problems and smooth out the rough edges.

    My fix scripts are below, maybe they'll give you some ideas. (BTW, I had to do one to "fix" Caffeine as well.)

    Fix screensaver:

    Code:
    #!/bin/bash -e
    
    #I started with a sleep command because if I just try to reset xset at login or boot then XFCE or Gnome *always* 
    #over writes my changes and goes back to default / blanking every 10 minutes 
    sleep 60
    
    #Then apply the changes I want
    xset s noblank
    xset s 0 0
    xset s off
    xset dpms 0 0 0
    
    
    #Then execute the new scripts
    bash -e /home/adam/Startup_Scripts/fixcaffeine.sh
    
    exit 0
    Fix Caffiene:

    Code:
    #!/bin/bash -e
    
    #Wait 5 minutes
    sleep 300
    
    #Then apply the changes I want
    xset s noblank
    xset s 0 0
    xset s off
    xset dpms 0 0 0
    
    #And start it all over again.
    
    bash -e /home/adam/Startup_Scripts/fixcaffeine.sh
    
    exit 0
    I know they create a recursive loop. I know it's sloppy. I know there is probably a more elegant solution. But I'm ain't gonna fix what ain't broke. Besides the RAM footprint for all active instances in the entire loop is only 32MB and I have 8GB to play with.

    Then when I want Caffiene to completely disable the screen saver I just set it to run when a particular program to runs (like xine).

    And regular screen saver still pops every 30 minutess like I want.

    But I never could track down exactly what was causing it to go back to blanking every 10 minutes if I didn't tell it not to do that every 5 minutes with a loop.

    Hope this helps.

  9. #9
    Just Joined!
    Join Date
    Jan 2013
    Location
    Debian Stable AMD-64 (Gnome 3)
    Posts
    49
    I did find some people saying that there may be a bug that exist somewhere in Gnome that cause it to behave this way. It doesn't appear that gnome-screensaver daemon is running, either it doesn't exist or isn't necessary because Gnome 3 have simplified its screensaver preference by only blanking the screen without an GUI to customize it.

    Can't wait for Wayland.

  10. #10
    Linux User Steven_G's Avatar
    Join Date
    Jun 2012
    Location
    Western US
    Posts
    331
    IIRC you're right on both counts: The bug and G3 having no "real" screen saver. I think you can get some DL's / repos / packages for the no G3 screen saver thing to drop some SS's right in to G. But I think I didn't really like them (and they were buggy?). (Been a while since I cobbled all this together.)

    I just installed the good ol' x screen savers. I've always liked them better any way. There's a ton of tut's on the web about how to shoehorn the x-server screen savers in to G3.

    Once again, IIRC, that's the preferred "fix" for no G3 screen savers b/c the "actuals" are (were?) buggy.

Posting Permissions

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