mstoeckl / swaylock-plugin Goto Github PK
View Code? Open in Web Editor NEWThis project forked from swaywm/swaylock
Screen locker for Wayland -- fork with background plugin support
License: MIT License
This project forked from swaywm/swaylock
Screen locker for Wayland -- fork with background plugin support
License: MIT License
Sometimes the indicator vanishes after e.g. typing in a password and failing to log in.
This produces a similar bug to swaywm/sway#3631 when swaylock is not installed alongside.
I think this is because swaylock-plugin wants to use /etc/pam.d/swaylock to check the user password, which usually does not exist if the original swaylock is not installed.
Instead this fork has /etc/pam.d/swaylock-plugin. And indeed, if I do sudo ln -s /etc/pam.d/swaylock-plugin /etc/pam.d/swaylock
it works again.
First, thank you so much for this fork! It's great and really appreciated
I noticed, however that swaylock-plugin is logging what appears to be every single frame decoded, indefinitely. I'm on hyprland with a bit of an unorthodox setup, which is worth noting:
[email protected] GHz/z690/96g DDR5 6400@6200, Archlinux btw 6.6.16-lts normal gcc arch kernel, zfs root on optane, Radeon 6650XT and Alder lake integrated GPU (for VAAPI/AV1) -- stable and well built rig
hyprland, almost always on the git/master branch
Using a 25fps video for mpvpaper lock screen, dual displays, one is 4k@144hz horizontal, secondary is 4k60 vertical orientation, both 1.5x scale (fractional), mpv configured to use Alder Lake iGPU for decoding (low power draw for a screen saver, reliable intel driver stack, reasons)
Anyway, this is what I get when I lock the screen: (zultra is hostname)
Feb 17 01:57:21 zultra systemd[5785]: Started Screen locker for Wayland.
Feb 17 01:57:21 zultra swaylock-plugin[1330180]: Cannot load libcuda.so.1
Feb 17 01:57:21 zultra swaylock-plugin[1330180]: (+) Video --vid=1 (*) (h264 3840x2160 25.000fps)
Feb 17 01:57:21 zultra swaylock-plugin[1330180]: Using hardware decoding (vaapi).
Feb 17 01:57:21 zultra swaylock-plugin[1330180]: [autoconvert] Converting vaapi[nv12] -> vaapi[rgb0]
Feb 17 01:57:21 zultra swaylock-plugin[1330180]: VO: [libmpv] 3840x2160 vaapi[rgb0]
Feb 17 01:57:21 zultra swaylock-plugin[1330180]: V: 00:00:00 / 00:00:30 (0%)
Feb 17 01:57:21 zultra swaylock-plugin[1330180]: V: 00:00:00 / 00:00:30 (1%)
Feb 17 01:57:22 zultra swaylock-plugin[1330180]: V: 00:00:00 / 00:00:30 (2%)
Feb 17 01:57:22 zultra swaylock-plugin[1330180]: V: 00:00:00 / 00:00:30 (3%)
Feb 17 01:57:22 zultra swaylock-plugin[1330180]: V: 00:00:01 / 00:00:30 (3%)
Feb 17 01:57:22 zultra swaylock-plugin[1330180]: V: 00:00:01 / 00:00:30 (4%)
Feb 17 01:57:23 zultra swaylock-plugin[1330180]: V: 00:00:01 / 00:00:30 (5%)
Feb 17 01:57:23 zultra swaylock-plugin[1330180]: V: 00:00:01 / 00:00:30 (6%)
Feb 17 01:57:23 zultra swaylock-plugin[1330180]: V: 00:00:01 / 00:00:30 (7%)
Feb 17 01:57:23 zultra swaylock-plugin[1330180]: V: 00:00:02 / 00:00:30 (7%)
Feb 17 01:57:23 zultra dbus-daemon[5297]: [system] Activating via systemd: service name='net.reactivated.Fprint' unit='fprintd.service' requested by ':1.187' (uid=1000 pid=1330178 comm="/usr/bin/swaylock-plugin -f")
Feb 17 01:57:24 zultra systemd[1]: Starting Fingerprint Authentication Daemon...
Feb 17 01:57:24 zultra swaylock-plugin[1330180]: V: 00:00:02 / 00:00:30 (8%)
Feb 17 01:57:24 zultra dbus-daemon[5297]: [system] Successfully activated service 'net.reactivated.Fprint'
Feb 17 01:57:24 zultra systemd[1]: Started Fingerprint Authentication Daemon.
Feb 17 01:57:24 zultra swaylock-plugin[1330180]: V: 00:00:02 / 00:00:30 (9%)
Feb 17 01:57:24 zultra swaylock-plugin[1330180]: V: 00:00:02 / 00:00:30 (10%)
Feb 17 01:57:24 zultra swaylock-plugin[1330180]: V: 00:00:03 / 00:00:30 (10%)
Feb 17 01:57:24 zultra swaylock-plugin[1330180]: V: 00:00:03 / 00:00:30 (11%)
Feb 17 01:57:25 zultra swaylock-plugin[1330180]: V: 00:00:03 / 00:00:30 (12%)
Feb 17 01:57:25 zultra swaylock-plugin[1330180]: V: 00:00:03 / 00:00:30 (13%)
Feb 17 01:57:25 zultra swaylock-plugin[1330180]: V: 00:00:04 / 00:00:30 (13%)
Feb 17 01:57:25 zultra swaylock-plugin[1330180]: V: 00:00:04 / 00:00:30 (14%)
Feb 17 01:57:26 zultra swaylock-plugin[1330180]: V: 00:00:04 / 00:00:30 (15%)
Feb 17 01:57:26 zultra swaylock-plugin[1330180]: V: 00:00:04 / 00:00:30 (16%)
Feb 17 01:57:26 zultra swaylock-plugin[1330180]: V: 00:00:04 / 00:00:30 (17%)
Feb 17 01:57:26 zultra swaylock-plugin[1330180]: V: 00:00:05 / 00:00:30 (17%)
Feb 17 01:57:27 zultra swaylock-plugin[1330180]: V: 00:00:05 / 00:00:30 (18%)
Feb 17 01:57:27 zultra swaylock-plugin[1330180]: V: 00:00:05 / 00:00:30 (19%)
Feb 17 01:57:27 zultra swaylock-plugin[1330180]: V: 00:00:05 / 00:00:30 (20%)
mpvpaper does not do this on its own outside of swaylock-plugin, so i think it may be specific to swaylock-plugin... but here's the twist that I just remembered as I type: I use systemd-lock-handler (https://sr.ht/~whynothugo/systemd-lock-handler/) to trigger swaylock, so that might be related
Pardon the ultra verbose report, hopefully this gives you enough information
Thanks so much for the great fork, loving it
I used to use a full-screen sticky mpv with my GIFs until wlroots adopted the stricter no-background policy, which broke my workflow. Then you saved my life, please provide us a link to pay you a beer (or a coffee).
Instead of rendering with a background | plugin | overlay
stack, merge the background
and plugin
surfaces into one, which takes buffers from the plugin if available, and buffers created by swaylock otherwise.
Instead of running the command once to draw all outputs, running an independent copy of the command to provide a surface for each individual output would be more flexible.
When running swaylock --command 'program'
, the screen locker shows a background frame (white by default) until the background plugin program provides its first frame. Instead, Swaylock-plugin should wait (up to say, 200ms) for the background program to submit a frame.
Hi! I am a happy user of this project, and it would be even better if I didn't have to compile it for myself :) Any chance you could start doing releases so it could get packaged in distros more easily?
Note: this would require some method of avoiding infinite retries when the plugin program is broken. Perhaps rate limit the restarting, so that successive restarts must be separated by at least 100 seconds?
When a program that is given as command fails, this ends up in an infinite loop. It should rather just give up and display a solid color or something.
Example:
/usr/lib64/misc/wscreensaver ✗ swaylock-plugin --command /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
....
Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5240
GL_MAX_TEXTURE_SIZE: 16384, GL_MAX_TEXTURE_UNITS: 8
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
abort in load_font_retry_1:372Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5250
GL_MAX_TEXTURE_SIZE: 16384, GL_MAX_TEXTURE_UNITS: 8
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
abort in load_font_retry_1:372Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5260
GL_MAX_TEXTURE_SIZE: 16384, GL_MAX_TEXTURE_UNITS: 8
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
abort in load_font_retry_1:372Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5270
GL_MAX_TEXTURE_SIZE: 16384, GL_MAX_TEXTURE_UNITS: 8
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
abort in load_font_retry_1:372Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5280
GL_MAX_TEXTURE_SIZE: 16384, GL_MAX_TEXTURE_UNITS: 8
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
abort in load_font_retry_1:372Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5290
GL_MAX_TEXTURE_SIZE: 16384, GL_MAX_TEXTURE_UNITS: 8
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
abort in load_font_retry_1:372Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5300
GL_MAX_TEXTURE_SIZE: 16384, GL_MAX_TEXTURE_UNITS: 8
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
abort in load_font_retry_1:372Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5310
GL_MAX_TEXTURE_SIZE: 16384, GL_MAX_TEXTURE_UNITS: 8
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
Call to unimplemented jwxyz_load_native_font
abort in load_font_retry_1:372Running command: /usr/lib64/misc/wscreensaver/xscreensaver-memscroller
Forked background plugin: 5320
This is hijacking my whole shell. I can not open a new shell and to only way to exit his is blindly typing killall swaylock-plugin
.
meson complains:
swaylock-plugin/meson.build:159:0: ERROR: File pam/swaylock-plugin does not exist.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.