lay Posted May 12 Posted May 12 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 0 Quote
IBV Posted May 13 Posted May 13 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. 0 Quote
lay Posted May 13 Author Posted May 13 Thank you for your support. but, Where is the file configured? I want to pre-set it in advance 0 Quote
IBV Posted May 13 Posted May 13 You can try to change the value via cli: gsettings set org.gnome.desktop.session idle-delay 0 I don't think you will find text config files for gnome, you should use gsettings or dconf editor. Take a look here: https://wiki.archlinux.org/title/GNOME#Configuration 0 Quote
lay Posted May 14 Author Posted May 14 (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 May 14 by lay 0 Quote
Solution IBV Posted May 14 Solution Posted May 14 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. 0 Quote
Recommended Posts
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.