Overview
I have several laptops, but I mostly use Linux laptops these days. Among them, I use Xfce-based [Xubuntu] (https://xubuntu.org/ ) , but I remember removing the sleep mode from the GUI worked well in the past, but even though I turned off all the settings, there is a phenomenon that keeps going into sleep mode, so I record the solution process.
a problem
I don’t know why, but there was a phenomenon that the monitor went into power saving mode every 5 minutes even though the display power manager was turned off.
Resolution process
First of all, after looking at various things, I thought it would be most accurate to look at the x window setting, so I checked it as below.
1xset -q
1Keyboard Control:
2auto repeat: on key click percent: 0 LED mask: 00000000
3XKB indicators:
400: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
503: Compose: off 04: Kana: off 05: Sleep: off
606: Suspend: off 07: Mute: off 08: Misc: off
709: Mail: off 10: Charging: off 11: Shift Lock: off
812: Group 2: off 13: Mouse Keys: off
9auto repeat delay: 500 repeat rate: 20
10auto repeating keys: 00ffffffdffffbbf
11fadfffefffffffff
129fffffffffffffff
13fff7ffffffffffff
14bell percent: 50 bell pitch: 400 bell duration: 100
15Pointer Control:
16acceleration: 2/1 threshold: 4
17Screen Saver:
18prefer blanking: no allow exposures: no
19timeout: 300 cycle: 300
20Colors:
21default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
22Font Path:
23/usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins
24DPMS (Energy Star):
25Standby: 600 Suspend: 600 Off: 600
26DPMS is Enabled
27Monitor is On
When I checked, Screen Saver was set to sleep every 5 minutes, so I executed the command as below.
1xset -q
1Keyboard Control:
2auto repeat: on key click percent: 0 LED mask: 00000000
3XKB indicators:
400: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
503: Compose: off 04: Kana: off 05: Sleep: off
606: Suspend: off 07: Mute: off 08: Misc: off
709: Mail: off 10: Charging: off 11: Shift Lock: off
812: Group 2: off 13: Mouse Keys: off
9auto repeat delay: 500 repeat rate: 20
10auto repeating keys: 00ffffffdffffbbf
11fadfffefffffffff
129fffffffffffffff
13fff7ffffffffffff
14bell percent: 50 bell pitch: 400 bell duration: 100
15Pointer Control:
16acceleration: 2/1 threshold: 4
17Screen Saver:
18prefer blanking: no allow exposures: no
19timeout: 300 cycle: 300
20Colors:
21default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
22Font Path:
23/usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins
24DPMS (Energy Star):
25Standby: 600 Suspend: 600 Off: 600
26DPMS is Enabled
27Monitor is On
When I checked, Screen Saver was set to sleep every 5 minutes, so I executed the command as below.
1Keyboard Control:
2auto repeat: on key click percent: 0 LED mask: 00000000
3XKB indicators:
400: Caps Lock: off 01: Num Lock: off 02: Scroll Lock: off
503: Compose: off 04: Kana: off 05: Sleep: off
606: Suspend: off 07: Mute: off 08: Misc: off
709: Mail: off 10: Charging: off 11: Shift Lock: off
812: Group 2: off 13: Mouse Keys: off
9auto repeat delay: 500 repeat rate: 20
10auto repeating keys: 00ffffffdffffbbf
11fadfffefffffffff
129fffffffffffffff
13fff7ffffffffffff
14bell percent: 50 bell pitch: 400 bell duration: 100
15Pointer Control:
16acceleration: 2/1 threshold: 4
17Screen Saver:
18prefer blanking: no allow exposures: no
19timeout: 0 cycle: 300
20Colors:
21default colormap: 0x20 BlackPixel: 0x0 WhitePixel: 0xffffff
22Font Path:
23/usr/share/fonts/X11/misc,/usr/share/fonts/X11/Type1,built-ins
24DPMS (Energy Star):
25Standby: 600 Suspend: 600 Off: 600
26DPMS is Enabled
27Monitor is On
If you check the Screen Saver after the command above, you can see that the timeout is set to 0.
Since application, the display has not been reduced every 5 minutes.
What is the xset off command?
‘xset’ is a tool to change user settings on X Windows systems. The ‘xset off’ command disables the screen saver and the screen off function. This setting must be applied manually on a per-session basis, which means you have to run it again every time you reboot your computer.
How to set up automatic execution when booting
Create a .desktop file
You can set the ‘xset off’ command to run automatically at boot-up using the ‘Automatic Application Start’ feature provided by the Xfce environment. To do this, create the ‘.desktop’ file (ex. disable_screensaver.desktop)
1[Desktop Entry]
2Type=Application
3Exec=bash -c "sleep 10; xset s off"
4Name=Disable Screen Saver
5Comment=Disables the screen saver at startup with a delay
6X-GNOME-Autostart-enabled=true
This file runs at Xfce startup and disables the screen saver after a 10 second delay after booting with the bash -c “sleep 10; xset off” command.
Why set a 10-second delay?
Ideal to run ‘xset off’ command immediately during bootup