You are not logged in.

#1 2025-11-02 16:03:45

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,396
Website

Wayland Screen Timeout

I'm running niri or labwc in a standalone, Wayland-only session on trixie and the laptop screen times out (goes black, the backlight turns off) after, what, ten minutes?

If I run xfce4-power-manager, it still times out. I can't use xset because there is no X on my desktop. A web search isn't giving me anything. My GNOME session doesn't have the problem. Any ideas?


I don't care what you do at home. Would you care to explain?

Offline

#2 2025-11-02 16:53:09

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,723

Re: Wayland Screen Timeout

swayidle and swaylock work with most compositors. I know swaylock works with labwc.

https://github.com/swaywm/swayidle/blob … idle.1.scd


You must unlearn what you have learned.
    -- yoda

Offline

#3 2025-11-02 17:22:27

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,396
Website

Re: Wayland Screen Timeout

I'm running swaylock, which makes the timeout more annoying because I have to enter a password instead of just hitting a key.


I don't care what you do at home. Would you care to explain?

Offline

#4 2025-11-03 18:07:18

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,396
Website

Re: Wayland Screen Timeout

Uggh. So the solution is go back to GNOME if I don't want my screen to turn off automatically. Come on, wlroots!


I don't care what you do at home. Would you care to explain?

Offline

#5 2025-11-03 18:45:50

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,396
Website

Re: Wayland Screen Timeout

Well, I'm not suffering under GNOME Wayland by any means, and it's worth switching to not walk back into a room and see the screen turned off.

BsDq3fju_t.png

I just like the niri session better. It's lighter, I had to do a few more text configs and research to get it running, I built xwayland-satellite by borrowing cargo packages from forky on my testing partition, I built the latest niri, then I transferred the binaries to my daily partition and successfully transferred all the configs over and got all the programs installed.

The niri and labwc desktops are a labor of love. The GNOME one is being amazed by how good it is with almost no effort, just install some extensions.


I don't care what you do at home. Would you care to explain?

Offline

#6 2025-11-03 19:23:54

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,396
Website

Re: Wayland Screen Timeout

hhh wrote:

The GNOME one is being amazed by how good it is with almost no effort, just install some extensions.

This is misleading, it's a lot of extensions. Alphabetically...

Astra Monitor, for CPU/GPU/Core Temp in the panel

Dash to Panel, so there's a panel, GNOME is wrong with whatever panel they're running on their own

Focus, transparency on inactive windows (transparency on the active terminal because it's xfce4-terminal so there's a GUI setting)

Hide Cursor (after a few seconds of inactivity, the same thing unclutter used to do under X)

Just Perfection (this thing does a bunch of crap, but I've left it default except for slowing the window/desktop animations down by 2. You could use the Speedinator Extension instead, not sure why I went with this one. -edit- Because justperfection also let's you customize the notification position. I bet I can drop notification-timeout and use jp instead. -edit2- Nope, no notification timeout setting in justperfection.)

Notification Timeout (what it says, control the timeout)

Overview Background (Super key by default zooms the desktop out to give you an overview, this extension sets your wallpaper as a blurry background for that instead of stock-grey, much prettier)

Rounded Window Corners Reborn (not only set the bottom corners to be rounded, but pick your border width and color as well. Still waiting on a separate setting for inactive window borders)

Weather O'Clock (like all of these extensions, except for Dash-to-Panel, a matter of preference. Used with gnome-weather, it gives you weather on the panel)

Workspace Indicator (what it says)

User Themes (install third-party shell themes, the Yaru theme gives you a much darker notification window background, the stock one is a fairly unimpressive mid-grey.)

Quite the list.


I don't care what you do at home. Would you care to explain?

Offline

#7 2025-11-03 21:56:11

malm
jgmenu developer
Registered: 2016-10-13
Posts: 744
Website

Re: Wayland Screen Timeout

@hhh is there a swayidle command in your autostart file? If so, just comment that out (or run killall swayidle) if you don't want the screenlock/saver.

Offline

#8 2025-11-05 03:49:12

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,396
Website

Re: Wayland Screen Timeout

@malm, I forgot that I had set swayidle up as a service as per here...

https://github.com/YaLTeR/niri/wiki/Exa … temd-Setup

I've removed swayidle entirely, I don't need it. Thanks for the help!

I'm leaving this thread open, I think more discussion is possible.


I don't care what you do at home. Would you care to explain?

Offline

#9 2025-11-05 17:17:29

malm
jgmenu developer
Registered: 2016-10-13
Posts: 744
Website

Re: Wayland Screen Timeout

For anyone who wants to use swayidle, you can also just call it in autostart like this:

swayidle -w \
	timeout 300 'swaylock -f -c 000000' \
	timeout 600 'wlopm --off \*' \
	resume 'wlopm --on \*' \
	before-sleep 'swaylock -f -c 000000' >/dev/null 2>&1 &

https://github.com/labwc/labwc/blob/c81 … rt#L28-L39

Offline

#10 2025-11-16 07:07:53

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 559
Website

Re: Wayland Screen Timeout

@hhh @malm

I've discovered this: https://codeberg.org/QuincePie/matcha

Some Desktop Environments and status bars may not include an idle inhibitor.

Matcha implements a general Wayland idle inhibitor that utilize wayland-protocols as oppossed to the common approach of using dbus.

So I built it and installed and it does what it says on the box smile

I start it daemonized in my autostart -  matcha -d -o & just below the swayidle routine, which is basically the same as the previous post.
then toggle it with , matcha -t . I'll set up a keybind for that.

You can query the state at any time with  matcha -s  which returns on or off.

Last edited by micko01 (2025-11-16 08:37:21)


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#11 2025-11-19 21:54:08

malm
jgmenu developer
Registered: 2016-10-13
Posts: 744
Website

Re: Wayland Screen Timeout

Nice find!

Offline

#12 2025-11-20 23:02:13

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 559
Website

Re: Wayland Screen Timeout

It's very handy to have an idle inhibitor. Anyway I've written a couple of scripts for my own purposes that work quite well.

As we know I wanted a keybind, but I also wanted a notification so this one is called simply toggle-idle

#!/bin/sh

# script to inhibit idle using 'matcha'; wayland only
# designed to be called from a key bind
# https://codeberg.org/QuincePie/matcha

# toggle idle state
matcha -t
sleep 1
# get the idle state
R=$(matcha -s)
echo $R
# notify user
case $R in
  on)
  notify-send -i unlock -a Idle -u low -t 2000 "Idle inhibited"
  ;;
  off)
  notify-send -i lock -a Idle -u low -t 2000 "Idle is restored"
  ;;
esac

In labwc/rc.xml I have

<keybind key="W-i" name.action="Execute" command.action="toggle-idle"/>

so that my keybind is W-i.

The next script alleviates the problem of screen locking/blanking while watching a movie on youtube, peertube, any other web video with sound, locally with mpv, xine, mplayer or whatever OR listening to music using MPD, Audacious or any other player. It depends on pw-dot, so pipewire only but it could be used with pulse or even pure alsa systems with modification to suit. Yeah, there's already utilities to do that but why use them when I already have an idle inhibitor?

It's called pw-idle-inhibit and runs as a daemon waiting for an audio stream and when it detects one toggles matcha's state. When the stream stops idle inhibit is toggled off

#!/bin/sh

while true
do
  # this queries pipewire for an active audio stream
  pw-dot -o - | grep -qi 'Stream/Output/Audio'
  ret=$?
  idle_state=$(matcha -s)
  case $ret in
    0) # turn off idle if on
      case $idle_state in
        on)
        ;;
        off) matcha -t
        ;;
      esac
    ;;
    1) # reinstate idle if off
      case $idle_state in
        on) matcha -t
        ;;
        off)
        ;;
      esac
    ;;
  esac
  sleep 90
done

And here is the end of my labwc/autostart

(snip)
swayidle -w \
  timeout 360 'swaylock -i /home/mick/teallach-lock.svg &' \
  timeout 720 'wlopm --off \*' \
  resume 'wlopm --on \*' \
  before-sleep 'swaylock -i /home/mick/teallach-lock.svg &' >/dev/null 2>&1 &
fnott &
killall matcha >/dev/null 2>&1
matcha -d -o &
pw-idle-inhibit &

Could be used with other wlroots compoistors with the appropriate adjustments. Usual warnings apply, use at own risk.

Last edited by micko01 (2025-11-20 23:05:42)


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

Board footer

Powered by FluxBB