Software & AppsOperating SystemLinux

How To Disable Screen Timeout in i3 WM on Ubuntu

Ubuntu 5

In this article, we will guide you through the process of disabling the screen timeout in i3 WM on Ubuntu. This is a common requirement for users who don’t want their screens to go blank or turn off automatically after a certain period of inactivity.

Quick Answer

To disable the screen timeout in i3 WM on Ubuntu, you can use the xset tool to turn off the screen saver and power saving features. Run the command xset s off to disable the screen saver and xset -dpms to disable power saving. If you want to adjust the screen timeout instead of disabling it completely, you can use the xset tool to set specific timeout values.

Prerequisites

Before we begin, ensure that you have the x11-xserver-utils package installed on your system. This package includes the xset tool, which we will use to adjust the screen timeout settings. If you don’t have this package installed, you can install it by running the following command in your terminal:

sudo apt-get install x11-xserver-utils

Disabling Screen Saver and Power Saving Features

The xset tool is a user preference utility for X. It allows you to change various settings related to your screen. Here, we will use it to disable the screen saver and power saving features.

Disabling Screen Saver

To disable the screen saver feature, run the following command:

xset s off

In this command, s stands for “screen saver”, and off disables it.

Disabling Power Saving

To disable the power saving feature, which turns off your screen after a period of inactivity, run the following command:

xset -dpms

Here, dpms stands for “Display Power Management Signaling”, and the - sign before it turns off this feature.

With these settings, your screen should no longer turn off or go blank automatically until you reboot your machine.

Adjusting Screen Timeout

If you don’t want to completely disable the screen timeout but wish to adjust it, you can use the xset tool for that as well.

Adjusting Screen Saver Timeout

For example, to enable the screen saver after 15 minutes of idle time, run the following command:

xset s 900

In this command, s stands for “screen saver”, and 900 is the number of seconds before the screen saver is activated (15 minutes x 60 seconds/minute = 900 seconds).

Adjusting Power Saving Timeout

Similarly, to turn off the monitor after 20 minutes of idling, run the following command:

xset dpms 0 0 1200

In this command, dpms stands for “Display Power Management Signaling”, and 1200 is the number of seconds before the monitor is turned off (20 minutes x 60 seconds/minute = 1200 seconds).

Making Changes Permanent

Please note that the settings made with xset are usually not persistent, meaning they may not persist after a reboot. If you want to make the changes permanent, you can either make equivalent settings in the xorg.conf file or run xset from an X auto start script.

Alternative Method

If xset does not work for you, you can try modifying the ~/.xscreensaver file. Change the timeout value to a large value, such as 9:00:00, and then save the file. Afterward, restart the xscreensaver with the command:

xscreensaver-command --restart

Remember to change the timeout value back if needed.

Conclusion

We hope this guide has been helpful in showing you how to disable or adjust the screen timeout in i3 WM on Ubuntu. Remember that while these settings can be useful for keeping your screen active, they can also consume more power and potentially shorten the lifespan of your monitor. Use them wisely!

Note: The solutions provided are specific to i3 WM on Ubuntu 14.04 and 15.10. For other versions or distributions, please refer to their respective documentation.

How can I check if the `x11-xserver-utils` package is installed on my system?

You can check if the x11-xserver-utils package is installed on your system by running the following command in the terminal: dpkg -s x11-xserver-utils. If the package is installed, you will see information about the package. If it is not installed, you will see an error message.

Can I adjust the screen timeout to a custom value?

Yes, you can adjust the screen timeout to a custom value using the xset tool. Simply specify the desired number of seconds for the screen saver or power saving timeout using the appropriate xset command. For example, to set the screen saver timeout to 10 minutes, you would run the command xset s 600 (10 minutes x 60 seconds/minute = 600 seconds).

Leave a Comment

Your email address will not be published. Required fields are marked *