I see this bug was resolved in https://bugs.gentoo.org/256211, but it's come up again for some reason. I have x11-misc/xdg-utils-1.2.1-r8 installed, but for some reason the system is fine with this being there, and not having x11-apps/xset. /usr/bin/xdg-screensaver is a POSIX shell script and we can easily see where xset is being used by calling `grep -n xset /usr/bin/xdg-screensaver`: 707: xset +dpms 711: if xset -q | grep 'DPMS is Enabled' > /dev/null 2> /dev/null; then 712: xset -dpms 713: xset +dpms 714: xset dpms force on 762: if xset -q | grep 'DPMS is Enabled' > /dev/null 2> /dev/null; then 767: xset -dpms 993:xset_screensaver_timeout() 995: xset q | sed '/^Screen Saver:/,/^[^ ]/ { s/.*timeout: *\([0-9]*\).*/\1/; t }; d' 1002: timeout=`xset_screensaver_timeout` 1004: echo "$timeout" > "$screensaver_file.xset" 1005: xset s off > /dev/null 1011: if [ -f "$screensaver_file.xset" ] ; then 1012: value=`cat "$screensaver_file.xset"` 1013: xset s $value > /dev/null 1014: rm -f "$screensaver_file.xset" 1020: xset s activate > /dev/null 1025: xset s reset > /dev/null 1030: timeout=`xset_screensaver_timeout` 1037: echo "ERROR: xset q did not report the screensaver timeout" >&2 1412: xset s off && xautolock -disable > /dev/null 1417: xset s default && xautolock -enable > /dev/null
It was made conditional on X here. I guess with the idea that its a runtime optional dependency? https://github.com/gentoo/gentoo/commit/f955680634efdc47b16d9e5049acdae902fb9b86 https://github.com/gentoo/gentoo/pull/35411 CC'ing author (gentoo@fictx.com based on the sign off github@fictx.com) and the committer.
Yes, the dependency was made optional. We assume if you have USE="-X", you don't want X11 support, so we don't require xset to be installed. As far as I can tell, the only negative consequence would be a "command not found" message. Are you experiencing some more serious other issue?
>Are you experiencing some more serious other issue? Yes. xdg-screensaver is being run by vlc a lot of times. I would really appreciate if when I run vlc in terminal I don't get unnecessary "command not found" messages because it gives the impression that the system has broken dependencies. >Yes, the dependency was made optional. We assume if you have USE="-X", you don't want X11 support, so we don't require xset to be installed. The following packages that I have installed, depend on x11-misc/xdg-utils: app-emulation/winetricks-20250102 (x11-misc/xdg-utils) app-eselect/eselect-wine-2.0.2-r2 (xdg ? x11-misc/xdg-utils) app-office/libreoffice-24.2.7.2-r1 (x11-misc/xdg-utils) app-portage/mgorny-dev-scripts-57 (x11-misc/xdg-utils) dev-libs/libqtxdg-4.1.0 (x11-misc/xdg-utils) (x11-misc/xdg-utils) kde-frameworks/kf-env-6 (>=x11-misc/xdg-utils-1.2.1-r1) net-analyzer/wireshark-4.4.2-r1 (gui ? x11-misc/xdg-utils) (gui ? x11-misc/xdg-utils) net-ftp/filezilla-3.67.1 (x11-misc/xdg-utils) (x11-misc/xdg-utils) net-print/cups-2.4.11 (X ? x11-misc/xdg-utils) (X ? x11-misc/xdg-utils) www-client/google-chrome-133.0.6943.126 (x11-misc/xdg-utils) x11-misc/pcmanfm-qt-2.1.0 (x11-misc/xdg-utils) (x11-misc/xdg-utils) These apps are part of my LXQt Xorg desktop, so it's not really looking good when support for xset is not there. From all packages mentioned, www-client/google-chrome makes the most sense to require x11-misc/xdg-utils[X] because the browser should have a way to disable the X screensaver when it's playing a movie. It's a real bummer when a screensaver interrupts a movie. I've been wondering for years why is this happening to me, and now I got it. media-video/vlc[X] should also require x11-misc/xdg-utils[X], because it's the exact same use case.
Note that the desktop profile sets USE="X" globally. Assuming you are not using the desktop profile, my advice would be to set USE="X" in make.conf or add "x11-misc/xdg-utils X" to package.use. The lack of a dependency does not prevent you from taking these actions.
What about packages that play movies, like Chrome and VLC? They disable screensavers for best viewing experience, but without x11-misc/xdg-utils[X] they can't.
It looks like xdg-screensaver already redirects error output to /dev/null in several places, but maybe something got missed? Are you able to tell what arguments xdg-screensaver is being invoked with to cause the errors to appear on the console?
(In reply to Michał Dec from comment #5) > What about packages that play movies, like Chrome and VLC? They disable > screensavers for best viewing experience, but without x11-misc/xdg-utils[X] > they can't. xset is not the only way to disable a screensaver. xdg-screensaver tries several methods, the most common being a dbus call against the org.freedesktop.ScreenSaver service.