how to disable screen timeouts in guix

Table of Contents

Problem: screen timeout in 15 minutes

This question was originally posted on the guix subreddit1

My problem is that my screens timeout in 15 minutes if I’m watching something, which is problematic. It seems like the answer is my xorg settings, and I am trying to apply this: https://wiki.archlinux.org/title/Display_Power_Management_Signaling which calls for editing of my .xorg.conf.d file. It seems like it should be according to these directions: https://guix.gnu.org/manual/en/html_node/X-Window.html However, I want to make sure my syntax is correct.

(list (service gnome-desktop-service-type)
           (set-xorg-configuration
            (xorg-configuration
             (extra-config '("Option \"DPMS\" \"false\"")))

Am I grokking that right? I’ve found that getting such things wrong in guix can be costly, and the documentation is without examples of the equivalent xorg configuration. A bonus would be if I could only disable the screen shutdown when I am plugged in to power, but I’m taking this one step at a time.

Anwer: xset

I am runnig exwm on guix linux, with Gnome atop for some setting management. However, Gnome doesn’t seem to be in charge of power settings (I tried, and no-go). Because of this it was recommmended that I ask in the exwm subreddit, where I received an answer beautifully quickly2. I was able to apply the answer as follows:

Get xset on guix

guix install xset

It’s available just in the standard repo, but does not require sudo despite being pretty low-level stuff.

Add the following to some always-run-on-start place

The original poster suggested .initrc, and I suppose .bashrc would work too. As it happens I have an elisp file that I use for monitor setup every location I go, which is run at startup, so I put this there:

;; disable screen blanking
(start-process-shell-command
 "xset screen" nil "xset s off")
;; disable screen power management
(start-process-shell-command
   "xset dpms" nil "xset -dpms")

Resources

https://www.reddit.com/r/EXWM/comments/16zp0w1/how_to_disable_screen_timeouts_in_guix/

Footnotes

1 The first post with several ideas was here: https://www.reddit.com/r/GUIX/comments/16ofwbu/how_to_disable_screen_timeouts_in_guix/

2 cross posted and answered here: https://www.reddit.com/r/EXWM/comments/16zp0w1/how_to_disable_screen_timeouts_in_guix/

Tory Anderson avatar
Tory Anderson
Full-time Web App Engineer, Digital Humanist, Researcher, Computer Psychologist