You are not logged in.

#1 2014-09-11 04:06:30

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[solved] How to disable brightness reduction when watching videos?

Hi there,

I used xfce4-power-manager-settings to define that my laptop's brightness should automatically be reduced after a certain time.

In the settings, it looks like this: http://i.imgur.com/LR47F1T.png

When watching videos such as on YouTube, however, I temporarily want to disable the automatic brightness adjustment.

For now, I see two possibilities:

1. Opening xfce4-power-manager-settings and setting the level back to 100%
2. Killing xfce4-power-manager-settings and restarting it again after having watched the video

Both ways are not very elegant. Do you know of a better alternative?

Thanks ahead!

Last edited by orschiro (2014-09-12 06:04:19)

Offline

#2 2014-09-11 10:59:00

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [solved] How to disable brightness reduction when watching videos?

The problem is that your video player is unable to make the system believe that it's not idle. Which video player are you using?

See if there is some setting in the video player, related to power management. Or alternatively, generate some fake event (mouse move or similar) using a script. mpv makes it fairly trivial to do so.

Last edited by x33a (2014-09-11 10:59:54)

Offline

#3 2014-09-11 11:04:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [solved] How to disable brightness reduction when watching videos?

I don't use xfce, so it's powermanager *might* ignore these settings, but the most general answer would just be to disable dpms for the duration of the video:

xset -dpms
mplayer /some/long/movie.mp4
xset +dpms

There should be no need for mouse/keyboard events.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2014-09-11 11:29:01

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,423

Re: [solved] How to disable brightness reduction when watching videos?

i'm afraid there's nothing that could be done for youtube apart from manual intervention, of course.
At best, you could find a quicker way (maybe scripting? can't say if it is possible with xfce) to manually disable/enable the feature.


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#5 2014-09-12 01:06:17

scryan
Member
Registered: 2014-07-01
Posts: 50

Re: [solved] How to disable brightness reduction when watching videos?

Not automatic, but if you right click the tray icon for xfce4-power-manager and choose mode->presentation it will disable the inactivity dimming.
If your running X in such a way that its following all its config files it will still blank your screen at something like 10-15 minutes. I don't remember the setting I had to modify on the config file to prevent it... But I currently have it disabled with my config file for i3wm by running the following at startup:

xset -dpms &
xset s noblank &
xset s off &

Offline

#6 2014-09-12 04:05:28

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to disable brightness reduction when watching videos?

The problem is that your video player is unable to make the system believe that it's not idle. Which video player are you using?

The normal Flash player in my Firefox browser which unfortunately does not offer any of such an option.

@Trilby

Disabling dpms does not do the job with the inactivity dimming of the Xfce power manager.

@scryan

Interesting! How do I run the power manager with the tray icon? I don't use the entire Xfce environment but the power manager together with Openbox. The tray icon you are referring to is an applet for the Xfce desktop, I guess?

~ xfce4-power-manager --help
Usage:
  xfce4-power-manager [OPTION...] 

Help Options:
  -h, --help               Show help options
  --help-all               Show all help options
  --help-gtk               Show GTK+ Options

Application Options:
  --no-daemon              Do not daemonize
  --debug                  Enable debugging
  --dump                   Dump all information
  --restart                Restart the running instance of Xfce power manager
  -c, --customize          Show the configuration dialog
  -q, --quit               Quit any running xfce power manager
  -V, --version            Version information
  --display=DISPLAY        X display to use

The best idea might indeed to trigger some fake mouse events. Is there a small program that does this?

EDIT:

Found xdotool:

fake-mouse-event() {
    while true
    do
	    xdotool mousemove 0 0
	    sleep 10m
    done
}

Last edited by orschiro (2014-09-12 04:29:36)

Offline

#7 2014-09-12 04:48:02

progandy
Member
Registered: 2012-05-17
Posts: 5,269

Re: [solved] How to disable brightness reduction when watching videos?

Instead of mousemove, maybe better try something like | xdotool key VoidSymbol |. That should reset the inactivity counter without moving the mouse to an unexpected position or sending an unwanted keystroke.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#8 2014-09-12 06:04:07

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to disable brightness reduction when watching videos?

@progandy

Great suggestion, thanks!

Will mark this as solved.

Offline

#9 2014-09-12 21:36:49

scryan
Member
Registered: 2014-07-01
Posts: 50

Re: [solved] How to disable brightness reduction when watching videos?

orschiro wrote:

@scryan

Interesting! How do I run the power manager with the tray icon? I don't use the entire Xfce environment but the power manager together with Openbox. The tray icon you are referring to is an applet for the Xfce desktop, I guess?

Oh, didn't notice you said xfce4-power-manager-settings, I just read it as xfce4-power-manager. Its part of the xfce environment obviously, but doesn't require xfce4. Not sure on open box, but for i3 I just run xfce4-power-manager at startup and its added to the system tray on the status bar. I would guess open box would do the same.
Then I disabled X's screen saver stuff, and let xfce4-power-manager handle screen dimming options.
Its in the official repository.

Offline

#10 2014-09-13 03:44:35

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [solved] How to disable brightness reduction when watching videos?

@scryan

And how do you start it?

I added     xfce4-power-manager & to my .xinitrc but I do not get a tray icon on Openbox with stalonetray. Would be great to have one though.

EDIT:

This gave me the crucial hint. I had to enable the tray icon to show up in the settings first.

Thanks! Now with presentation mode, this is a perfect solution. smile

Last edited by orschiro (2014-09-13 03:46:53)

Offline

Board footer

Powered by FluxBB