jellyfin-media-player icon indicating copy to clipboard operation
jellyfin-media-player copied to clipboard

Display dims while playing video

Open herrwusel opened this issue 1 year ago • 1 comments

Describe the bug Whenever I watch a video after some time my display goes to sleep/dims and ultimately locks. When I play videos in eg. firefox the display is kept from going to sleep. Im using DPMS with the following settings:

xset s 180 300
xss-lock -l -n dim-screen.sh -- lockerutil.sh &

To Reproduce Start video.

Expected behavior Jellyfin-media-player suspends screen energy savings while playing videos

Desktop (please complete the following information):

  • OS: Arch
  • Installation Method: AUR version

Additional context Im using X11 with dwm.

herrwusel avatar Jul 21 '22 10:07 herrwusel

Same here both on Artix Linux with qtile and Linux Mint Cinnamon, both of them X11. Doesn't happen in Firefox or when watching a film with just mpv.

145818 avatar Aug 01 '22 16:08 145818

I tested a bit further. DBUS doesn't seem to receive the inhibit signal. I checked by running dbus-monitor --system "interface='org.freedesktop.ScreenSaver'".

@rickylinden a simple fix is to use the X11 screen management by altering cmake command (e.g. in PKGBUILD): cmake -DCMAKE_INSTALL_PREFIX='/usr/' -DCMAKE_BUILD_TYPE='Debug' -DLINUX_X11POWER=ON -DQTROOT=./qt -DCMAKE_SKIP_RPATH=1 ..

herrwusel avatar Oct 31 '22 06:10 herrwusel

@rickylinden a simple fix is to use the X11 screen management by altering cmake command (e.g. in PKGBUILD): cmake -DCMAKE_INSTALL_PREFIX='/usr/' -DCMAKE_BUILD_TYPE='Debug' -DLINUX_X11POWER=ON -DQTROOT=./qt -DCMAKE_SKIP_RPATH=1 ..

Those options are in the latest PKGBUILD, but the issue remains.

dataprolet avatar Dec 15 '22 12:12 dataprolet

I copied the jellyfin-media-player-git PKGBUILD and adding -DLINUX_X11POWER=ON fixed it for me.

EDIT: Also make sure to clean build and check the output for the following: image

herrwusel avatar Dec 15 '22 12:12 herrwusel

What is X11/XDG screensaver management? Is it using DPMS? Because it's disabled on my system. Or is it using XScreensaver? Because that's not installed on my system.

EDIT: Also on KDE Plasma screen locking and screen saver are handled by Plasma's own KSMServer service.

Edit: As I understand it (I'm not a programmer) the jellyfin-media-player manages power on Linux (mostly disabling the screensaver) through either xdg-screensaver or dbus according to this files: https://github.com/jellyfin/jellyfin-media-player/tree/master/src/power. But I can't seem to find anything explicitly mentioning the screen getting locked or not.

I have both xdg-utils (containing xdg-screensaver) installed (as a dependency of mpv) and dbus (obviously, as a dependency of systemd). So I don't get what's happening on your system, that it's working, what's missing on my system? Maybe I have to enable DPMS?

dataprolet avatar Dec 15 '22 15:12 dataprolet

To answer your first question: cmake is just telling you that x11 features (xdg-screensaver) is used instead of DBus.

As for DPMS: it is enabled on my system. Maybe give it a try.

herrwusel avatar Dec 15 '22 16:12 herrwusel

Enabling DPMS solves the issue. Now I just need to figure out why it's turned off by default and why it's turning off by itself after turning it on manually.

EDIT: Weirdly enough it's also working with jellyfin-media-player-git without -DLINUX_X11POWER=ON and DPMS disabled. Then it also correctly shows in the KDE Plasma Power Management tray entry as "jellyfinmediaplayer is currently blocking sleep and screen locking (playing)".

dataprolet avatar Dec 16 '22 15:12 dataprolet

I think I can close my issue, since my system does not have a program installed that provides org.freedesktop.ScreenSaver. Nothing jellyfin-media-player can do here I guess. Using the X11 power management solves the problem for me.

herrwusel avatar Jan 06 '23 07:01 herrwusel

Hm, on my system with X11, KDE and DPMS enabled it does not work. I used AUR with jellyfin-media-player though, maybe I should give jellyfin-media-player-git a try...

I'm not sure the issue should be closed. It clearly does not (always) work out of the box, while other programs like Firefox do just work. Not sure if I should open separate duplicate issue...

I also wonder if it works on the Flatpak version

EDIT: okay there also is #345

p0358 avatar May 21 '23 12:05 p0358