LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-30-2010, 04:41 PM   #16
sljunkie
Member
 
Registered: Nov 2008
Location: Brazil
Distribution: Arch Linux/Fedora
Posts: 95

Rep: Reputation: 18

The "heartbeat-cmd" option solves the problem, but the "xscreensaver-command -deactivate" command may be a little slow and prejudice mplayer performance:
Code:
$time xscreensaver-command -deactivate
xscreensaver-command: not active: idle timer reset.


real	0m1.035s
user	0m0.002s
sys	0m0.003s
If so, try niceing the program:
Code:
heartbeat-cmd = "nice xscreensaver-command -deactivate >& /dev/null"
The signal is still sent to xscreensaver, but it doesn't get in the way.

Last edited by sljunkie; 06-30-2010 at 04:47 PM.
 
Old 08-02-2011, 03:06 PM   #17
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Rep: Reputation: 32
I know this is an old thread but I just wanted to say thanks for the information as was just looking for a fix as Xine isn't working currently on my Fedora 15 setup so having to default back to mplayer (which is not my first choice).

Quote:
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)
This did the trick; although maybe inclinded to checkout making the program nice

Quote:
If so, try niceing the program:
Code:

heartbeat-cmd = "nice xscreensaver-command -deactivate >& /dev/null"

The signal is still sent to xscreensaver, but it doesn't get in the way.
I don't get the performance deficite as in what actually degrades but will keep the latter in mind perhaps as comment within the mplayer/config file.
 
Old 08-02-2011, 04:05 PM   #18
ROXR
Member
 
Registered: Jan 2009
Location: Spain
Posts: 107
Blog Entries: 1

Rep: Reputation: 20
For disable kernel screensaver I used this order

Code:
$ setterm -powersave off -blank 0
 
Old 08-02-2011, 04:23 PM   #19
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Rep: Reputation: 32
Quote:
For disable kernel screensaver I used this order

Code:

$ setterm -powersave off -blank 0
Isn't it just better to let mplayer do it as per the OP's request?


I mean I set my screensaver for 15 minutes turn black then off after another 15.

Of course this is during normal run, however, when playing vidoes I want it to be disabled but since I am lazy to run Mplayer from the CLI as my video+directory names can be quite long; I prefer to have mplayer turn the screensaver off for me when run from Thunar (XFCE file manager).

This is actually per the original intent of this thread which is what I also was after
 
Old 08-02-2011, 09:03 PM   #20
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0, CRUX 3.1
Posts: 3,010
Blog Entries: 15

Rep: Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756Reputation: 756
If you use the GUI there is an option to disable xscreensaver. Not sure if this helps but that's all I can offer.
 
Old 08-03-2011, 12:21 AM   #21
bnguyen
Member
 
Registered: Jul 2010
Distribution: Slackware
Posts: 125

Rep: Reputation: 32
Quote:
Originally Posted by ReaperX7 View Post
If you use the GUI there is an option to disable xscreensaver. Not sure if this helps but that's all I can offer.
The difference is doing that will completely disable xscreensaver while the OP only wants it to be disables while MPlayer is running.

Quote:
heartbeat-cmd = "nice xscreensaver-command -deactivate >& /dev/null"
Should it be: heartbeat-cmd = "nice xscreensaver-command -deactivate & >/dev/null" ?
 
Old 08-03-2011, 01:04 AM   #22
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,428

Rep: Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867Reputation: 867
personally I use this is my .bashrc
Code:
#mplayer wrapper to turn off the screensaver and DPMS
#requires xset
function mplayerwrap {
        xscreensaver-command -exit
        xset -dpms
        mplayer "$@"
        xset +dpms
        xscreensaver &
}
#make wrapper execute by default
alias mplayer="mplayerwrap"
slightly modified from gentoo's hints.
 
Old 08-03-2011, 06:56 AM   #23
bnguyen
Member
 
Registered: Jul 2010
Distribution: Slackware
Posts: 125

Rep: Reputation: 32
I use a simpler solution: use xdotool to emulate pressing ctrl key every 30 seconds. This has almost no impact on Mplayer performance as opposed to "xscreensaver-command -deactivate" method.

Put this to ~/.mplayer/config (requires xdotool installed):
heartbeat-cmd="xdotool key ctrl"
 
Old 08-03-2011, 07:05 AM   #24
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Rep: Reputation: 32
Quote:
I use a simpler solution: use xdotool to emulate pressing ctrl key every 30 seconds. This has almost no impact on Mplayer performance as opposed to "xscreensaver-command -deactivate" method.

Put this to ~/.mplayer/config (requires xdotool installed):
heartbeat-cmd="xdotool key ctrl"
When you say 'Mplayer performace' what exactly are you referring to?

I have been using the command I posted above since my last post (yesterday) but haven't noticed anything on straight playback of video files even HD ones or any CPU overhead.

I know am using a different distro to Slackware as mine is Fedora 15, and I also understand that am in the Slackware path of the forums but still..... my initial post did apply and was a thankyou note rather then: "this aint workin' on my distro" note.
 
Old 08-03-2011, 09:08 AM   #25
bnguyen
Member
 
Registered: Jul 2010
Distribution: Slackware
Posts: 125

Rep: Reputation: 32
Quote:
Originally Posted by kayasaman View Post
When you say 'Mplayer performace' what exactly are you referring to?
In my case, I had a very noticeable freeze every 30 seconds using "xscreensaver-command -deactivate"
 
Old 08-03-2011, 09:14 AM   #26
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Rep: Reputation: 32
Ah ok.

Thanks for that.

I haven't noticed anything like that but then I've activated H/W acceleration on my system so mplayer is using very little CPU.

The majority of the processing gets done on the GPU itself.
 
Old 09-25-2012, 01:20 AM   #27
tramni1980
Member
 
Registered: Jul 2006
Location: Tübingen, Germany
Distribution: Slackware64-13.37
Posts: 736

Rep: Reputation: 37
The only thing that worked for me (Slackware13.37, KDE) was adding:
Code:
heartbeat-cmd="qdbus org.freedesktop.ScreenSaver  /ScreenSaver SimulateUserActivity"
to ~/.mplayer/config.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Xscreensaver not running on Zenwalk 4.8 in Fluxbox as root. andy90 Linux - Newbie 19 12-24-2007 01:14 PM
Xscreensaver daemon not running in an X-Windows session swampdog2002 Slackware 1 08-17-2006 03:01 PM
mplayer cannot stop xscreensaver lnthai2002 Linux - Software 1 08-01-2006 09:31 PM
Running Xscreensaver at Startup burningsun1981 DamnSmallLinux 1 07-04-2005 01:04 AM
running xscreensaver on bochs zaman Linux - Software 0 10-15-2003 08:58 PM


All times are GMT -5. The time now is 04:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration