You are not logged in.

#1 2022-01-03 06:23:43

lfitzgerald
Member
Registered: 2021-07-16
Posts: 162

[SOLVED] xss-lock and i3lock-color - screen locks but does not redraw

I want to use xss-lock to trigger i3lock-color after inactivity.

To test, I run "xss-lock lock" in one terminal window ("lock" is a script that calls i3lock; typing "lock" by itself will bring up the i3lock splash). I then go into another terminal, do "xset s 10" and wait. After 10 seconds of idleness, the screen is locked.

However, after locking the screen remains on whatever frame was last shown. For example, if I use termdown to display a counter, the screen "freezes" showing 9. If I press any key, it redraws the i3lock screen. However I'd like it to redraw upon locking, not after I press a key.

Am I missing something or is this how xss-lock is supposed to work? Is there a better alternative? By the way, later I'm also planning to automatically hibernate after a longer idle period (eg. lock after 15 min and hibernate after 1 h), so if xss-lock doesn't work for that I might as well use something else.

Last edited by lfitzgerald (2023-01-30 23:04:43)

Offline

#2 2022-01-03 08:14:32

seth
Member
Registered: 2012-09-03
Posts: 49,979

Re: [SOLVED] xss-lock and i3lock-color - screen locks but does not redraw

That sounds a bit more like a rendering glitch (do you use a compositor?) but you could try xautolock or simply "sleep 5; i3lock".
Maybe "i3lock -k" works around that.

As for auto-hibernation you could simply

i3lock -n & I3PID=$!; sleep 1h; [ $(realpath /proc/$I3PID/exe) = /usr/bin/i3lock ] && systemctl hibernate

(-n is important to catch the proper PID because i3lock forks itself by default and you can obviously make the condition fancier and eg. also check the runtime of that process)

Offline

#3 2022-01-03 08:43:23

progandy
Member
Registered: 2012-05-17
Posts: 5,184

Re: [SOLVED] xss-lock and i3lock-color - screen locks but does not redraw

How is your screen supposed to look? i3lock-color does have an option to show a (blurred) screenshot. Try seth's suggestion with "sleep 5; lock-command", and see if that has problems as well.

Last edited by progandy (2022-01-03 08:45:34)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2022-01-03 20:47:12

lfitzgerald
Member
Registered: 2021-07-16
Posts: 162

Re: [SOLVED] xss-lock and i3lock-color - screen locks but does not redraw

seth wrote:

That sounds a bit more like a rendering glitch (do you use a compositor?)

Sounds like it. I've never seen i3lock by itself not update the screen, I'm guessing the issue happens before i3lock. I was suspecting that either xss-lock has some setting I didn't see about redrawing the screen or not, or perhaps it's something I forgot to xset.

I'm using just xorg, no compositor.

seth wrote:

you could try xautolock.

That seems like the next step to try, I'll give it a go.

progandy wrote:

How is your screen supposed to look? i3lock-color does have an option to show a (blurred) screenshot. Try seth's suggestion with "sleep 5; lock-command", and see if that has problems as well.

I call the i3lock with --image so it should fill the screen with the image I gave it. It does so when I type lock (lock is a wrapper script that calls "i3lock --image ..."). I am aware of the blurred screenshot but that's not the case here. When xss-lock triggers the lock, the screen appears to freeze (with no blurring) and as soon as I press any key it gets redrawn with the image I gave to i3lock.

Regarding the sleep commands, I tried:

* "sleep 5; lock" - after 5 seconds, shows the i3lock-color screen with the image I configured
* "sleep 5; i3lock" - after 5 seconds, shows the default i3lock-color screen (screen filled with grey)

Offline

#5 2022-01-03 21:14:32

seth
Member
Registered: 2012-09-03
Posts: 49,979

Re: [SOLVED] xss-lock and i3lock-color - screen locks but does not redraw

You could try whether "xset s [no]{blank,expose}" has any impact (see "xset" default output and "xset q" for the present configuration)

Last edited by seth (2022-01-03 21:15:04)

Offline

#6 2022-10-10 06:58:04

harpium
Member
Registered: 2021-12-23
Posts: 9

Re: [SOLVED] xss-lock and i3lock-color - screen locks but does not redraw

This post is a bit old, but I encountered the same issue. Passing the "--composite" argument to i3lock fixed it for me. In my case, I'm using betterlockscreen, a wrapper for i3lock-color, and you can pass arguments to i3lock, so the complete command should be something like "xss-lock -- betterlockscreen -l dimblur -- --composite"

Offline

#7 2023-01-30 23:04:23

lfitzgerald
Member
Registered: 2021-07-16
Posts: 162

Re: [SOLVED] xss-lock and i3lock-color - screen locks but does not redraw

Passing "--composite" to i3lock fixed this.

Offline

Board footer

Powered by FluxBB