Screen turning off after 30 seconds inactive

Installed and have been trying zorin os 17 core since yesterday, liking it so far, most beautiful windows/macos-like experience out of the box in my opinion, installed on a dell precision 5530 laptop on full battery and connected to power outlet, all power settings on default, using with no issues. At the end of the day suspended it and disconnected from outlet, went to sleep. Started using again this morning disconnected from outlet, screen started to turn off every 30 seconds of inactivity, so started to tweak power settings: Performance, Dim Screen off, Screen Blank Never, Automatic Power Saver off, Automatic Suspend off, connected back to outlet. Right now I have all those settings + 100% battery + connected and screen keeps turning itself off every 30 seconds (not sure if exact, measured on stopwatch) of inactivity. Doesn't get suspended or anything, just turns itself off. Is this a bug?

3 Likes

Check in your BIOS settings... I'm betting the screen turning off when on-battery is hardware-driven from a BIOS setting.

While you're in there, check to see if there's a built-in utility to update the BIOS / UEFI, and check to see if there's an update. If there's no built-in utility to check for updates, check the Dell support website for a firmware update.

If there is an update available, it's most likely in a Windows-only file format... in that case:

My computer is an HP, but the procedure will work for any computer.

1 Like

Oh wow, I think you were right. Restarted just now to see if anything would change under these new settings, firmware started to update automatically and now it seems the problem is gone. But I got another error and this time I believe is from zorin itself:

failed to build result for a45df35ac0e948ee180fe216a5f703f32dda163f

However no apparent problems anymore, perhaps I'll just ignore this... I'm still gonna see if it's possible to update directly from BIOS, just in case something else pops up and it would be necessary. Thanks for the tip.

1 Like

You may need to check fwupdmgr if there are firmware upgrades available.

I ran fwupdmgr update but only showed Devices with no available firmware updates and Devices with the latest available firmware version, so I believe everything is already up to date?

Did your laptop also face the same problem when you were with Windows?

I never used when on Windows, I got it and on the same day changed to zorin

Have you tried using

xset -dpms

or

xset 0 0

to test if this causes the screen blanking to cease?

3 Likes
xset -dpms

Worked for me on ASUS ROG Zephyrus G15. As this is a wake-up issue, i.e. only happens if the Laptop wakes up from suspension, fine if it's start up from boot, how do I script the event of a wake-up to run the above command?

Note I have updated the firmware, which I had to boot into Windows to do (boo ASUS) but it made no difference. I'm also switching from Mint 21 to ZOS-17-pro. Although Mint didn't have the 30 sec issue with DPMS, it had a truckload of other power management issues like waking up randomly from sleep when the laptop is closed.

1 Like

When you run xset -dpms, it is not a session only command. Display power management will remain off until it is turned on with an initialization command.
Can you please clarify your experience and what you are trying to solve so we can better answer?

Creating a script can be done by make the script, setting it as executable and then assigning it to a systemd service. But again, as it is not a session-only command, I am not sure you need a script.

Thank you for your prompt response. Good news, on further testing xset -dpms is functioning as stated independent of session. Quick question (feel free to rtfm me:)), does xset command effects persist after X restart, i.e. write to xorg.conf? If not, what would I have to add to xorg.conf to enable DPMS on X initialisation?

To outline my initial issue, which seems to be fixed after your suggestion, my ROG Zephyrus would blackscreen after 30 seconds from wakeup from previous screen sleep. But the behaviour was odd! If I rebooted then it would honour the power management configurations until 1st screen sleep, exactly as stated by @distrostayer in OP.

Thanks again.

There are no default configurations for the UI in Zorin OS that are set to blank the screen after 30 seconds. To me, this looks more like a bug than a feature.

Are you using AMD or Nvidia Graphics?
Are you logging in on Wayland?
Can you please check your logs
Current boot:

journalctl -b

Previous boot:

journalctl -b -1

Which kernel are you on?

uname -r

Nvidia
Not Wayland

journalctl -b

what exactly are you looking for in the logs?

uname -r

6.2 (Factory defaults)

Anything contained within them that may provide clues to the cause if the issue.

Excuse me for barging in, I do not mean to interfere with the bug hunt.

I just wanted to mention that Caffeine is a great little tool to keep your screen alive whenever you need it. It lives in your taskbar and can be switched on or off as needed. It might even be preferable because it is more flexible.

image

2 Likes

@Ragnir thanks. I've used it back in the days when power management in Linux was very poor. We have fixed the issue (DPMS), just trying to determine root cause now.

1 Like

@Aravisian there is a lot of output, it may take me a while to find anything out of the ordinary. Will update once I've had an opportunity to go over the logs. Thanks for your continued help here.

2 Likes

Thank you, this solved for me. And yes, came back to say that I realized this happens only when waking up from sleeping, much like @praz01 stated. Not a session only solution, it's working forever now. But what did it do? Big linux newbie here (hence why I chose this distro lol) but genuinely curious. Also what about those other commands you posted?

The xset command sets the state of the X Windowing system. The -dpms disables (-) the Display Power Management Signaling. Display power management signals direct the display to be blanked or turned off to save power after a set amount of time.
Setting that to 0 0 or to disabled will halt screen blanking.

The command journalctl accesses logs for the ext4 journaling file system. Using different parameters can fine tune what logs will be shown. For example, the -b parameter specifies logs only for Boot.

1 Like

Can confirm that caffeine doesn't work as a work-around for this issue, as the system goes to sleep even when caffeine is set to active. However it keeps the session open once xset -dpms has been set, so it's still useful when I need the system to be awake after the correct inactive time has been reached.