betterlockscreen / betterlockscreen

πŸ€ sweet looking lockscreen for linux system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lockscreen not showing blur, cache images ARE generated

riquezjp opened this issue Β· comments

Is there an existing issue for this?

  • I have searched the existing issues

Operating system

Archcraft v2022.06 (openbox)

Installation method

Package Manager (from OS)

Betterlockscreen & Dependency-Versions

Betterlockscreen: version: v4.0.4 (dunst: true, feh: true)
i3lock: version 2.13.c.4 Β© 2010 Michael Stapelberg, Β© 2015 Cassandra Fox, Β© 2021 Raymond Li
Version: ImageMagick 7.1.0-43 Q16-HDRI x86_64 20237 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP(4.5) 
Delegates (built-in): bzlib cairo djvu fontconfig freetype heic jbig jng jp2 jpeg jxl lcms lqr ltdl lzma openexr pangocairo png raqm raw rsvg tiff webp wmf x xml zip zlib
Compiler: gcc (12.1)
dunst version: 1.9.0
feh version 3.9
Compile-time switches: curl exif inotify help magic stat64 verscmp xinerama 
[B] Betterlockscreen

Bug description

Perhaps its my confusion, but I cannot get the lock screen in daily use to show anything except the unaltered image I provided, despite having applied effects.
I checked the .cache dir & there are pixel & blur images generated.
I have issued the command

betterlockscreen -u "/home/rico/Pictures/Desktop-pics/archcraft/hackerz5.jpg" --blur 1
[B] Betterlockscreen
[*] Updating image cache...
[=] Detected 1 display(s) @ 1920x1080 total resolution
[=] Original image(s): hackerz5.jpg
[=] Processing display: eDP (1)
[=] Resolution: 1920x1080
[*] Resizing base image...
[*] Rendering 'dim' effect...
[*] Rendering 'blur' effect...
[*] Rendering 'dimblur' effect...
[*] Rendering 'pixel' effect...
[*] Rendering 'dimpixel' effect...
[*] Rendering 'color' effect...
[*] Rendering final wallpaper images...
[*] Rendering final lockscreen images...
[+] Done

When I run betterlockscreen -l blur I see a BLURRED lockscreen.

BUT, my actual lockscreen after suspend or requesting lock in powermenu, is just the unaltered wallpaper. (the wallpaper passed to betterlockscreen)

I have repeated the steps with different images & the lockscreen image changes, but still the blur is not shown on the actual lockscreen.

If I issue betterlockscreen -w blur my desktop is immediately updated with a BLURED image. So I am at a loss why this is not working in the case of the lockscreen.

Try running

betterlockscreen -l blur dim
commented

lock in powermenu

What Desktop Manager/Window Manager are you using? And have you done any configuration to integrate betterlockscreen there? Otherwise I would guess it just calls the default lock-tool not betterlockscreen

As mentioned I am using Openbox & BLS is working as my lockscreen, it just wont use any of the effects, only the unaltered image. If you read the bug description part carefully it is explained there.

The workarounds I have found are:
a) use GIMP to make my own blurred+dim background, then pass that to betterlockscreen
b) run betterlockscreen -u "/path/to/img", (cache images are generated), then run the command again, this time using the previous caches blur image.
Although a 2nd set of cache images are now generated, it will use the unaltered one which is actually the first cache blur img.

commented

BUT, my actual lockscreen after suspend or requesting lock in powermenu, is just the unaltered wallpaper. (the wallpaper passed to betterlockscreen)

How you describe your issue it sounds for me like the powermenu does not call betterlockscreen correctly as everything works like expected if you manually call it. How does the powermenu in Openbox work? How/which command get's called if you lock from there, executed from which user?

Also logs from a run from the powermenu/where the wrong image is used would be appreciated to see if it falls in failsafe. (see here for further debugging possibilities)

@Santahgeo There is no second argument, it would be ./betterlockscreen -l dimblur.

The reason I know its BLS is because it has the BLS box in the corner saying "type your password" & the circle icon & time.
Also If I pass a pre-blurred image to it, it works as I want. It just wont use the images it generates via the command.

Let me ask something: If you had an image "/home/user/pictures/bird.jpg" as your desktop & you wanted to use a blurred version of that for BLS, what command would you issue?

commented

That's the problem, I can't reproduce the issue. I've used this image for testing with following commands:

./betterlockscreen -u ~/Downloads/681422_81_68310_d0ckiXyLQ.jpg
./betterlockscreen -l
./betterlockscreen -l blur

Reset cache manually:

rm -rf ~/.cache/betterlockscreen

Another test with your "--blur" argument as I read somewhere it's not reliable and should better not be used. (as the default blur parameters works in most circumstances)

./betterlockscreen -u ~/Downloads/681422_81_68310_d0ckiXyLQ.jpg --blur 1
./betterlockscreen -l
./betterlockscreen -l blur

On each of this (and the previous test-commands), I get a blurred result/lock-screen. Could you maybe attach your image? Try to update the cache without "--blur" and/or manually clear the cache.

My cache looks like:

/home/sebtm/.cache/betterlockscreen/
β”œβ”€β”€ 1-eDP-1
β”‚   β”œβ”€β”€ blur.png
β”‚   β”œβ”€β”€ color.png
β”‚   β”œβ”€β”€ dimblur.png
β”‚   β”œβ”€β”€ dimpixel.png
β”‚   β”œβ”€β”€ dim.png
β”‚   β”œβ”€β”€ pixel.png
β”‚   └── resize.png
└── current
    β”œβ”€β”€ lock_blur.png
    β”œβ”€β”€ lock_color.png
    β”œβ”€β”€ lock_dimblur.png
    β”œβ”€β”€ lock_dimpixel.png
    β”œβ”€β”€ lock_dim.png
    β”œβ”€β”€ lock_pixel.png
    β”œβ”€β”€ lock_resize.png
    β”œβ”€β”€ wall_blur.png
    β”œβ”€β”€ wall_color.png
    β”œβ”€β”€ wall_dimblur.png
    β”œβ”€β”€ wall_dimpixel.png
    β”œβ”€β”€ wall_dim.png
    β”œβ”€β”€ wall_pixel.png
    └── wall_resize.png

2 directories, 21 files

So just to be clear.
The following will generate the cache of altered images.

betterlockscreen -u ~/Downloads/681422_81_68310_d0ckiXyLQ.jpg

Then by running

betterlockscreen -l blur

you are instructing BLS to use the lock_blur.jpg for the lockscreen from now on.

That is what I expect to happen, Am I correct?
I just want to clear that up for sure so I'm not missing something vital.

yeah, it just isnt working as it should.

 sudo rm -rf ~/.cache/betterlockscreen
[sudo] password for rico:        

I confirmed the dir is removed

ο„…ο„…ο„…   ~ betterlockscreen -u '/home/rico/Pictures/Desktop-pics/archcraft/defaultish.png'  
[B] Betterlockscreen
[*] Updating image cache...
[=] Detected 1 display(s) @ 1920x1080 total resolution
[=] Original image(s): defaultish.png
[=] Processing display: eDP (1)
[=] Resolution: 1920x1080
[*] Resizing base image...
[*] Rendering 'dim' effect...
[*] Rendering 'blur' effect...
[*] Rendering 'dimblur' effect...
[*] Rendering 'pixel' effect...
[*] Rendering 'dimpixel' effect...
[*] Rendering 'color' effect...
[*] Rendering final wallpaper images...
[*] Rendering final lockscreen images...
[+] Done

all the images are regenerated correctly in the .cache

ο„…ο„…ο„…   ~ betterlockscreen -l blur

At this point BLS triggers & the lockscreen IS BLURRED

[B] Betterlockscreen
[*] Running prelock...
[*] Locking screen...
[*] Running postlock...
ο„…ο„…ο„…   ~ 

Now I trigger my lockscreen in my OS & the lockscreen is NOT BLURRED

commented

you are instructing BLS to use the lock_blur.jpg for the lockscreen from now on.

No this is the actual lock command to lock it with the blurred cache image. That's why I'm asking how/which command is called when you lock in your "OS" / Openbox. Also see usage for command explanation: https://github.com/betterlockscreen/betterlockscreen#usage

sudo rm -rf ~/.cache/betterlockscreen

It can also be a permission issue, normally the files are within your home-dir and owned by your user so there should be no need for sudo here.

ahh!! well, maybe this is my issue. I have no idea tbh what the trigger is in Oenbox. I assumed BLS was in charge of that. (never assume!) Ill have to check more deeply ...
But how come BLS is triggered at all but not using blur, that's odd to me.

found it i think ~

.config/openbox/rc.xml

<!-- Lockscreen -->
    <keybind key="C-A-l">
      <action name="Execute">
        <command>betterlockscreen --lock</command>
      </action>
    </keybind>

Edit = well, that DOES work for the keybinding ctrl-alt-l it shows a blurred lockscreen when I changed the command. ill keep digging
& FINALLY - .config/openbox/rofi/bin/powermenu the same command can be altered for blur

Thats great, thanks for your assistance.

Final comment:
Perhaps this could be made clearer in the docs. It confused me more that BLS was automatically added into these configs on install, but then expected tweaking.

commented

Thanks for the feedback, looks like your are on the right track now! πŸ‘πŸ»