According to VLC devs: https://trac.videolan.org/vlc/ticket/9718#comment:19 In older versions, VLC used to be able to inhibit screensaver while a movie is playing. Now they're claiming XFCE doesn't support this feature anymore...
This belongs in xfpm, moving. I think it might be a good idea to add a heartbeat to stop xscreensaver in presentation mode for the people stuck using xscreensaver.
*** Bug 11111 has been marked as a duplicate of this bug. ***
Created attachment 5622 Use XScreenSaverSuspend and XTestFakeKeyEvent Can you try this patch out? It tries a couple different ways to get the screensaver to stop running when xfce4-power-manager is placed into presentation mode or if a program requests an inhibit lock.
Created attachment 5630 debug log To my surprise I was still using 1.2.0 on Arch Linux. I tried 1.3.2 but it was the same so I tried your patches. I set the lowest timeout to 2 minutes to avoid issues if some timers are one minute long but I still experience screen turning off itself after some time when running VLC (fullscreen or windowed). Weird thing is that first the screen with video freezes for a few seconds when the screensaver timeout is hit. But I don't use any screensaver (my setup for various testing looks like this https://github.com/moneytoo/myarch/blob/master/arch.sh).
Created attachment 5631 timeouts
(In reply to Eric Koegel from comment #3) > Created attachment 5622 > Use XScreenSaverSuspend and XTestFakeKeyEvent > > Can you try this patch out? It tries a couple different ways to get the > screensaver to stop running when xfce4-power-manager is placed into > presentation mode or if a program requests an inhibit lock. Tested, and everything is fine. Note: I created manually the /xfce4-power-manager/presentation-mode property, because panel plugin crashes (bug #11101), so I could not have access to this feature.
Eric, Do you need more testing before you decide to push this patch? If so, can you clarify that we should: - set presentation mode, and a timeout for the screen to be shutdown - do nothing until the timeout is hit - notice that the presentation mode prevents the screen from shutting down - set normal mode, and a timeout... - do nothing... - notice the screen turns off
Rebased the patch on git master and applied. commit a805071464ecf0fee27d59de15620b035d855eb0 Author: Eric Koegel <eric.koegel@gmail.com> Date: Thu Jun 11 18:34:27 2015 +0300 Use XScreenSaverSuspend and XTestFakeKeyEvent (Bug 11083) Use the XScreenSaverSuspend and XTestFakeKeyEvent calls to suspend the screensaver when we're in presentation mode or something has requested an inhibit lock. This tries several different ways of getting the screensaver to stop running since there's no standard way listed on: http://www.freedesktop.org/wiki/Specifications/ http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=a805071464ecf0fee27d59de15620b035d855eb0 I'm leaving this report open since one person reported it not working. xfce4-power-manager --debug will provide output at what xfpm is doing with inhibiting the screensaver.
(In reply to Eric Koegel from comment #8) > Rebased the patch on git master and applied. > > commit a805071464ecf0fee27d59de15620b035d855eb0 > Author: Eric Koegel <eric.koegel@gmail.com> > Date: Thu Jun 11 18:34:27 2015 +0300 > > Use XScreenSaverSuspend and XTestFakeKeyEvent (Bug 11083) > > Use the XScreenSaverSuspend and XTestFakeKeyEvent calls to suspend > the screensaver when we're in presentation mode or something has > requested an inhibit lock. This tries several different ways of > getting the screensaver to stop running since there's no standard > way listed on: http://www.freedesktop.org/wiki/Specifications/ > http://git.xfce.org/xfce/xfce4-power-manager/commit/ > ?id=a805071464ecf0fee27d59de15620b035d855eb0 Please revert XTestFakeKeyEvent usage. It breaks certain things. For example: - xfce4-terminal resets back to the bottom of the terminal (when scrolled up) and this event is received - firefox e.g. when playing in youtube fullscreen pops up the seek controls everytime this event is received Or should the keycode 255 blocked somewhere somehow? But currently it breaks several things for me.
(In reply to timo.teras from comment #9) > Please revert XTestFakeKeyEvent usage. It breaks certain things. For example: > - xfce4-terminal resets back to the bottom of the terminal (when scrolled > up) and this event is received > - firefox e.g. when playing in youtube fullscreen pops up the seek controls > everytime this event is received Other person affected there: http://unix.stackexchange.com/questions/253184/my-keyboard-generates-spurious-events gnome-terminal and xterm do scroll back to the bottom upon that 255 keypress. They don't upon Ctrl though (alone unlikely to be mapped by a window manager).
Created attachment 6611 Replace XTestFakeKeyEvent with inhibit/heartbeat So this is what I've been looking at. Using any real key events can cause issues with an app (i.e., using ctrl might mess up the user playing a game). So if we can't use the fake key we'll have to do something else. Instead of using XTestFakeKeyEvent, attempt to contact whatever screensaver is running via its dbus interface. Failing that, a /xfce4-power-manager/heartbeat-command xfconf property will be executed every 30 seconds to keep the screensaver from launching. This way xscreensaver, xdg-screensaver, caffeine or a similar tool can be used. It checks for the org.freedesktop.ScreenSaver dbus service, as well as the same for cinnamon, mate, and gnome.
Just tested this patch with xscreensaver and the xfconf heartbeat-command set to "xscreensaver-command -deactivate" and it works. Also didn't notice the firefox video controls popping up.
Thanks ToZ! Pushed to master in: commit d0ea6d9202b0433f562ac30ad53d1f9480f51895 Author: Eric Koegel <eric.koegel@gmail.com> Date: Mon Feb 15 20:11:12 2016 +0300 Replace XTestFakeKeyEvent with inhibit/heartbeat (Bug #11083) Instead of using XTestFakeKeyEvent, attempt to contact whatever screensaver is running via its dbus interface. Failing that, a /xfce4-power-manager/heartbeat-command xfconf property will be executed every 30 seconds to keep the screensaver from launching. This way xscreensaver, xdg-screensaver, caffeine or a similar tool can be used. http://git.xfce.org/xfce/xfce4-power-manager/commit/?id=d0ea6d9202b0433f562ac30ad53d1f9480f51895
This is available in 1.6.0. Marked resolved.