LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How to disable xscreensaver while MPlayer is running? (http://www.linuxquestions.org/questions/slackware-14/how-to-disable-xscreensaver-while-mplayer-is-running-701384/)

sertmusluman 02-01-2009 02:25 AM

How to disable xscreensaver while MPlayer is running?
 
Hello,

I installed "mplayer-svn_20081215" from the SlackBuilds dot org and noticed that xscreensaver was still active while watching video with MPlayer. I found an option for disabling screensaver using MPlayer's GUI, but it does not work. Then I tried to add "stop-xscreensaver=yes" line to "~/.mplayer/config" file. It did not work again. Do I have to use an option for disabling xscreensaver as default while compiling package?

Thanks.

guanx 02-01-2009 03:49 AM

The config file should be "~/.mplayer/config". Pay attention to the dot.

$ cat .mplayer/config
# Write your default config options here!
stop-xscreensaver=1
ao=esd,arts,alsa,sdl

There are other ways to stop xscreensavers that do not support the proper X API. Use "man mplayer" and search for "xscreensaver".

sertmusluman 02-01-2009 06:03 AM

Quote:

The config file should be "~/.mplayer/config". Pay attention to the dot.
Yes, thanks I edited :)

But adding following lines to "~/.mplayer/config" again yielded nothing. :(

Code:

stop-xscreensaver=1
ao=esd,arts,alsa,sdl

Screen saver still interrupts video stream.

I will look at man pages as you said. Thanks.

digger95 02-01-2009 06:35 AM

If you use KDE, I remember reading somewhere that you need to use a different command in ~/.mplayer/config to pause the screensaver while mplayer is running. If I can find the info again I'll post it.

sertmusluman 02-01-2009 06:50 AM

Quote:

Originally Posted by digger95 (Post 3428017)
If you use KDE, I remember reading somewhere that you need to use a different command in ~/.mplayer/config to pause the screensaver while mplayer is running. If I can find the info again I'll post it.

I use XFCE. Thank you very much digger95.
I have an old MPlayer precompiled package from "linuxpackages.net". I reinstalled it again, it stops screensaver while running, but it does not allow SMPLAYER to use new properties that is why I want to upgrade MPlayer to latest version.

bergman 02-01-2009 07:12 AM

Im having a similar problem, with my screen going black after 10 minutes of keyboard/mouse inactivity. Its a real pain when watching TV in my browser (although mplayer is fine with no black screens for the duration of the TV program/movie).

It doesnt appear to be an 'xscreensaver' problem, because I have uninstalled it, and the same thing happens.

wadsworth 02-01-2009 08:18 AM

Have a look in /etc/rc.d/rc.M (line #25)
Code:

/bin/setterm -blank 15 -powersave powerdown -powerdown 60
Or putting this in /etc/X11/xorg.conf (and restarting X):
Code:

Section "ServerFlags"
        Option "StandbyTime" "0"
        Option "BlankTime" "0"
        Option "OffTime" "0"
        Option "SuspendTime" "0"
EndSection

will stop all the display power management while X is running.

bergman 02-01-2009 08:25 AM

thanks wadsworth :)

digger95 02-01-2009 02:58 PM

Thanks for the info, Wadsworth. Will commenting out the line in /etc/rc.d/rc.M prevent the screen from blanking out at the console also? I've always wondered how that even happens since technically X isn't running at console, right?

bathory 02-01-2009 03:11 PM

You can use xset to disable screen blanking while in X:
Code:

xset -dpms
xset s off


David the H. 02-01-2009 03:38 PM

The screen blanking is the monitor's dpms "Energy Star" suspend function. Another way to disable it temporarily is to run "xset -dpms". You can then re-enable it with "xset +dpms".

According to Wikipedia, dpms is built into the monitor and controlled through the video card. I don't imagine the xorg settings would work in console mode, but using xset might work, unless it also requires a running x-server (I'm not going to shut down my x to test it :D). However, you can also use vbetool to change the settings when X isn't running.

digger95 02-01-2009 04:56 PM

Thanks very much David. I'm fairly new to Linux so a lot of times when I am at console trying to figure out what the heck I am doing (which is more often than not) my monitor blanks out, and it never did that under windows. I will try your suggestions.

digger95 02-01-2009 04:59 PM

P.S. Sorry to threadjack the OP's original post. Let's get back to how to disable xscreensaver while mplayer is running. That will be of benefit to a lot of people I think, and I've read that it is a fairly common problem.

wadsworth 02-01-2009 08:24 PM

You can disable the KDE screensaver with
Code:

dcop kdesktop KScreensaverIface enable false
or enable it with
Code:

dcop kdesktop KScreensaverIface enable true
Maybe execute those commands with desktop icons?

Odd that Mplayer can't cope with KDE's screensaver. :confused:

Thursapr 04-28-2010 03:55 PM

Though the thread's rather old, hope this will be useful for someone.

The problem can be solved by adding this to ~/.mplayer/config
Quote:

heartbeat-cmd="xscreensaver-command -deactivate"
(from mplayer man page)


All times are GMT -5. The time now is 12:40 PM.