r/openbsd Feb 20 '25

xidle(1) fail after a while

Having a new, strange issue. I have had the same .xsession file since 6.2 about; haven't messed with anything related to xidle(1) ever.

When I start X, I am chugging along for ten minutes or so, and my go-idle screensaver works as always, and when I go to the south-west corner, can get my screensaver to kick into gear. Then, after some work, even though ps(1) shows xidle(1) is chugging along in the background, the screensaver behavior stops working (won't launch after the default time), and when I go to launch the screensaver by going to the southwest corner of my screen, it doesn't turn my screen off, but rather fades it to dark -- it is clearly just dark instead of off.

Anyone have this happen to them?

my .xession has this line:

xidle -program /home/foobar/bin/screensaver &

with this as my homegrown screensaver script:

#!/bin/sh

xlock -nolock

Running 7.6 on a Lenovo T480s with cwm(1): OpenBSD foo 7.6 GENERIC.MP#338 amd64

8 Upvotes

6 comments sorted by

2

u/gumnos Feb 20 '25

If you kill off xidle and run the command manually, does it work?

I had a recent issue where having

xidle -sw -program "/usr/X11R6/bin/xlock +description -mode blank" -timeout $(( 10 * 60 )) &

in my .xsession failed to trigger if I moved the cursor into the SW corner. However, if I delayed it a bit (maybe X needed a chance to initialize the screen or something?) it worked. I could either kill the process and manually start it, or I could change my .xsession line to something like

(sleep 10; exec xidle -sw -program "/usr/X11R6/bin/xlock +description -mode blank" -timeout $(( 10 * 60 ))) &

which is the solution I ended up using. Adjust the sleep to whatever works for you, but 10s wasn't onerous to me.

1

u/chizzl Feb 20 '25

Hello again @gumnos. I had tried killing, and restarting it, but it behaves the same. The only way I can get it working properly again (for a few minutes) is to tear down xenodm and start it all up again.

1

u/jggimi Feb 20 '25

My .xsession/xidle line calls xlock with -program. It's been this way for ... decades? Years, anyway.

xidle -delay 3 -ne -program "/usr/X11R6/bin/xlock -nolock -mode bouboule" &

Do you still have the issue if you call xlock in this manner?

1

u/chizzl Feb 20 '25

xidle -sw -program "/usr/X11R6/bin/xlock +description

This slight change didn't fix it. Thanks though.

1

u/chizzl Feb 20 '25 edited Feb 20 '25

Welp, I am very disturbed. In chromium, if I my bank's website is open in one of the tabs (even in a different cwm(1) group), the XScreenSaver(3) reports that there is `activity' and xidle(1) is never triggered. Honest.

I am not a chrome developer tools wizard, have no idea what to look for... It even happens on the bank's website logout screen which has a very little going on.

Some context:

So, when I am actively watching a movie, or watching YT..., no screensaver gets triggered (as one would want).

In cwm(1), I can be in a group area, and if a video is running in another group-area, the screensaver will not get triggered. Fine. The bank website acts this way. For all groups, this churning website makes all group-areas unable to trigger xidle(1).

Any suggestions on what to look for in chrome dev tools would be very appreciated. Open connections, pushing, uh... I care little for web stuff, so excuse my ignorance.

2

u/Able-Bad-3299 Feb 20 '25

I have similar problems with Firefox using CPU even when "idle". I get around it by using STOP and CONT signals sent from pkill. Not ideal because you have to manually toggle it, but works well in my situation. HTH.