Jump to content

Recommended Posts

Posted

hi,Kind hearted people

 

ubuntu22 gome desktop

How to configure the default settings of non-stop screen and non automatic screen lock??


I tried to execute:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target 

it can only solve the problem of not entering sleep mode!!!
But the screen will still go black,
So how to set the default black screen never???

help ,help

Posted

Hi,

On 5/12/2025 at 11:59 AM, lay said:

ubuntu22 gome desktop

 

In Gnome settings-> power there should be a "Automatic Screen Blank" toggle which you can switch to disabled. I checked this in a quite new Gnome version (48), not sure what version you have.

Posted

Thank you for your support.

but,

Where is the file configured?

 

I want to pre-set it in advance

Posted (edited)

 I am Wayland Gnome Ubuntu 22
I executed the command you gave me, but it didn't work


sudo gsettings set org.gnome.desktop.session idle-delay 0


(process:36816): dconf-WARNING **: 12:28:47.991: failed to commit changes to dconf: Cannot autolaunch D-Bus without X11 $DISPLAY

Edited by lay
  • Solution
Posted

It only works when you are already logged in Gnome, just for your session (no sudo).

 

If you want global settings, you could try setting this via /etc/profile.d/. Create a script like:

 

/etc/profile.d/disable-screen-blank.sh

With the contents 

#!/bin/bash
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
  gsettings set org.gnome.desktop.session idle-delay 0
fi

and make it executable

sudo chmod +x /etc/profile.d/disable-screen-blank.sh

I tried it and it works for my Gnome 48 test system.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines

OSZAR »