Git Product home page Git Product logo

swaylock's Introduction

swaylock

swaylock is a screen locking utility for Wayland compositors. It is compatible with any Wayland compositor which implements the ext-session-lock-v1 Wayland protocol.

See the man page, swaylock(1), for instructions on using swaylock.

Release Signatures

Releases are signed with E88F5E48 and published on GitHub. swaylock releases are managed independently of sway releases.

Installation

From Packages

Swaylock is available in many distributions. Try installing the "swaylock" package for yours.

Compiling from Source

Install dependencies:

  • meson *
  • wayland
  • wayland-protocols *
  • libxkbcommon
  • cairo
  • gdk-pixbuf2 **
  • pam (optional)
  • scdoc (optional: man pages) *
  • git *

* Compile-time dep
** Optional: required for background images other than PNG

Run these commands:

meson build
ninja -C build
sudo ninja -C build install

On systems without PAM, you need to suid the swaylock binary:

sudo chmod a+s /usr/local/bin/swaylock

Swaylock will drop root permissions shortly after startup.

swaylock's People

Contributors

abdelq avatar attente avatar bendooru avatar cedws avatar christophgysin avatar ddevault avatar deklov avatar eli-schwartz avatar emersion avatar fluxchief avatar ggreer avatar ianyfan avatar ivyl avatar jbeich avatar johanmalm avatar johnae avatar jubalh avatar martinetd avatar mikkeloscar avatar milkey-mouse avatar mortie avatar mstoeckl avatar mswiger avatar nefsen402 avatar nuew avatar redsoxfan avatar ryandwyer avatar sertonix avatar yacinehmito avatar yaroslav-95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swaylock's Issues

Can't unlock swaylock.

I'm running the master version (12-02-19). I'm pretty sure I'm typing my password in the correct way and still swaylock won't let me unlock my screen.

2019-02-12 00:05:45 - [sway/commands/exec_always.c:46] Executing swaylock
2019-02-12 00:05:45 - [sway/commands/exec_always.c:87] Child process created with pid 9294
2019-02-12 00:05:45 - [sway/tree/root.c:253] Recording workspace for process 9294
2019-02-12 00:05:45 - [subprojects/wlroots/types/wlr_surface.c:595] New wlr_surface 0x55e7ceba42d0 (res 0x55e7ceb76ad0)
2019-02-12 00:05:45 - [subprojects/wlroots/types/wlr_layer_shell_v1.c:388] new layer_surface 0x55e7ceba45f0 (res 0x55e7ceb769b0)
2019-02-12 00:05:45 - [sway/desktop/layer_shell.c:365] new layer surface: namespace lockscreen layer 3 anchor 3 size 0x0 margin 0,0,0,0
2019-02-12 00:05:47 - [pam.c:102] pam_authenticate failed: invalid credentials
2019-02-12 00:05:49 - [GLES2] FS SIMD8 shader: 15 inst, 0 loops, 308 cycles, 0:0 spills:fills, Promoted 0 constants, compacted 240 to 160 bytes.
2019-02-12 00:05:49 - [GLES2] FS SIMD16 shader: 15 inst, 0 loops, 322 cycles, 0:0 spills:fills, Promoted 0 constants, compacted 240 to 160 bytes.
2019-02-12 00:05:50 - [pam.c:102] pam_authenticate failed: invalid credentials

I see it gives me "invalid credentials" but just like I said: I'm pretty sure there is nothing wrong with my typing. Any ideas?

Mitigate unresponsive keyboard after sleep

On my laptop, I noticed that the keyboard has an erratic behavior when resuming from sleep. After a few seconds of black screen the screen appears, the keyboard works during about 1 second, stops working during a 1 or 2 seconds and then start working again. For instance, when I quickly type '1' to '9' after resume I typically get something like '34789'. The missing '12' are expected but the missing '56' are a bit annoying. I lost count of the number of times I missed my password because of that.

The console shows the same behavior so this is not specific to wayland or swaylock. I assume that this is because the linux kernel is reinitializing the input devices (though libinput does not report any device change).

So I do not expect that swaylock can fix that behavior but it would be nice to have a way to mitigate the effect. Swaylock probably has no ways to know when the keyboard is actually ready so a simple workaround could be to display a black screen for a few seconds without accepting keyboard events. The delay would be specified on the command line and would be zero by default.

Can't set background to image with spaces in name

Version info (using the Arch Linux package):

$ swaylock --version
swaylock version  (Mar 11 2019, branch '')
$ pacman -Qo $(which swaylock)
/usr/bin/swaylock is owned by swaylock 1.3-3

Regardless of how I quote the filename in the shell, swaylock fails to open it if there are spaces present.

$ ls -l Running\ Man\ Nebula.jpg
-rw-r--r-- 1 josh josh 1872438 Mar  6 16:33 'Running Man Nebula.jpg'
$ swaylock -i Running\ Man\ Nebula.jpg 
2019-03-25 11:16:53 - [swaylock-1.3/background-image.c:31] Failed to load background image (Failed to open file “Running”: No such file or directory).
$ swaylock -i 'Running Man Nebula.jpg'
2019-03-25 11:19:04 - [swaylock-1.3/background-image.c:31] Failed to load background image (Failed to open file “Running”: No such file or directory).

Segmentation fault on sleep

I have swaylock occasionally segfaulting at the point of locking before suspend:

https://gist.github.com/luispabon/5489fc8207b69f47691a2bd94ea290a0
https://github.com/luispabon/sway-dotfiles
https://github.com/luispabon/sway-dotfiles/blob/master/configs/swaylock/config
https://github.com/luispabon/sway-dotfiles/blob/master/configs/sway/conf.d/idle-and-lockscreen

I'm not too versed on debugging this sort of thing. I've installed what I believe to be debug symbols, providing that's what I need to get a trace or something could you please let me know how to set things up next time it crashes?

These commits are all the latest versions as of monday:

swaylock 1156038 (latest as of today)
sway 5becce8005e3c617afbdddda8f0da95f84540b27
wlroots 46dc4100d66567f77a413627a0a0b046ccf8094b

Ubuntu 19.04

Unlock failure callback?

Just an idea I had, it would be interesting if the user could set a script/exec to run on each password entry failure. My motivation for this is I'd like to get a snapshot with the camera, and then attempt to upload it to my VPS. Of course I'm sure many other creative uses for this feature must exist, so it might be worth considering

-Werror breaks build on POSIXly correct systems

poll is an XSI extension in POSIX < 2008, so either _POSIX_C_SOURCE should be bumped or replaced with _XOPEN_SOURCE.

../loop.c: In function 'loop_poll':
../loop.c:83:2: error: implicit declaration of function 'poll'; did you mean 'powl'? [-Werror=implicit-function-declaration]
  poll(loop->fds, loop->fd_length, ms);
  ^~~~
  powl

http://muscles.dragonflybsd.org/synth/logs/x11___swaylock.log
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/v5.4.2/sys/sys/poll.h#L99-L101
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/v5.4.2/sys/sys/cdefs.h#L612-L615
https://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html (POSIX 2001, X/Open 6)
https://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html (POSIX 2008, X/Open 7)

Cannot type password again immediately after failed attempt

When you try to unlock the screen but get the password wrong, you have to wait until the 'wrong' indicator goes away. Xscreensaver allows you to start typing again while this message is shown and I'd like to see the same behavior in swaylock.

Force one keyboard layout

Seeing a layout is really nice addon, but 'd be nice to log in only entering a password without switching a layout. Pretty sure almost everyone got their keyword on a specific language.

xoxo to every contributor 🖤

RFE: Delay asking for a password

most screen lockers these days have an option to delay the password requirement, so that if your locker activates you have 2-3 seconds to just press a button and get your screen back without typing the password.

display image across multiple screens

i3lock would display an image across multiple screens. However swaylock does repeat the same image on all screens. It would be nice to have an option where swaylock displays a single image across both screens, I usually set one large image to stretch both screens.

Race condition when an output is plugged in

  1. Have a window with sensitive information
  2. Run swaylock
  3. Unplug the output so that sway runs without any output
  4. Re-plug the output
  5. sway draws the window with sensitive information
  6. swaylock notices a new output has appeared, creates a new surface and draws
  7. sway draws swaylock, occluding the sensitive data

(5) may or may not be visible during a long time, depending on various conditions. Recording the screen with a camera might allow to retrieve the screen contents.

Have to scan fingerprint after entering password

Swaylock version: 1.3
OS: Arch Linux
Sway version: 1.0
Laptop: Thinkpad T540p

If I lock the screen with swaylock I have to enter the password (obviously), but after entering the correct password, it will not let me in. This is when my fingerprint reader starts showing its "scanning" light. It only lets me in when I scan my fingerprint.

The scanner doesn't start until I enter something (Not necessarily my actual password - can even press Enter) and doesn't work even if entering right password (until I scan my fingerprint).

It appears that the fingerprint scanner doesn't start automatically until a key press triggers the login process.

Swaylock failing to lock outputs that are inactive

Attempting to lock using swaylock yields endless spam in the terminal as it is trying to get data from an inactive output. It consistently rotates the name of the expected image in the tmp folder. In my case I have two active outputs, HDMI-A-2 and HDMI-A-3 used from the Internal GPU on my i5-6600k. I use the Nvidia GPU in passthrough to a Windows VM. This Windows output would be called DP-3. The output in question "DVI-D-1" refers to the DVI port on the Nvidia card that has no cables attached to it at all. I can't pin this to an exact package update. Swaylock was functional for me prior to Sway 1.0. Running swaymsg -t get_outputs does not show DVI-D-1 as a registered output, just the two HDMI ports.

unknown output 'DVI-D-1'convert: no decode delegate for this image format `MUZWT0F2KP' @ error/constitute.c/ReadImage/556.
convert: no images defined `/tmp/tmp.MUZWt0F2kP' @ error/convert.c/ConvertImageCommand/3300.
convert: no decode delegate for this image format `OIIWVWUV3V' @ error/constitute.c/ReadImage/556.
convert: no images defined `/tmp/tmp.OIIwvwuv3v' @ error/convert.c/ConvertImageCommand/3300.
unknown output 'DVI-D-1'convert: no decode delegate for this image format `UBCNU76T2U' @ error/constitute.c/ReadImage/556.
convert: no images defined `/tmp/tmp.uBCnu76t2u' @ error/convert.c/ConvertImageCommand/3300.
convert: no decode delegate for this image format `CIBV0DKQPP' @ error/constitute.c/ReadImage/556.
convert: no images defined `/tmp/tmp.cIbV0DKqpP' @ error/convert.c/ConvertImageCommand/3300.
unknown output 'DVI-D-1'convert: no decode delegate for this image format `KWF9JRIHH0' @ error/constitute.c/ReadImage/556.
convert: no images defined `/tmp/tmp.Kwf9jriHh0' @ error/convert.c/ConvertImageCommand/3300.
convert: no decode delegate for this image format `0VNHWHHCBM' @ error/constitute.c/ReadImage/556.
convert: no images defined `/tmp/tmp.0VnhWhHcbm' @ error/convert.c/ConvertImageCommand/3300.

pam config install dir

On my Arch Linux machine the swaylock pam file is installed to /usr/local/etc/pam.d/ if I use ninja to install from source and if the meson option --prefix /usr is not given.
If I use the prefix option it goes to /etc/pam.d/ as it should be.
I am not entirely sure if this is the expected behavior, but it seems strange to me.

Cursor only disappears once moved.

This is really minor. As long as you don't move your cursor after activating swaylock, the cursor will stay on screen. Once you do move your cursor, it will disappear (and on a sidenote, it does a strange movement before disappearing, kind of like a slide-fade into the bottom right corner... perhaps intended?).

swaylock lock console

This is an enhancement request. It would be nice if swaylock supported disabling switching consoles, for obvious reasons...

Cannot use --color and --image at the same time

Contrary to the documented behaviour, specifying both --color and --image will only produce the effects of the one option which was given last (via command line or config file), i.e. either

  • the image with default transparent background (e.g. if centred), or
  • the specified colour.

Support for other pam modules

Hi! I know this is low priority compared to the amazing work you're doing on moving sway to wlroots, but one of the things that'd hold me back from moving to sway is the lack of support for MFA on Swaylock.
I use a yubikey as a second factor of authencication and TOTP (google auth) as a fallback in case I lose the yubikey. For some reason, it seems that neither scenarios are covered or supported by swaylock.

Anyway, thanks for the good work.

Cheers,
Henry John Kupty

Asserion failed on GNOME

Hi,
swaylock fails immediately on assertion:
version 98e5afe

$ swaylock -d
2019-04-03 10:57:17 - [main.c:1018] Parsing CLI Args
swaylock: ../main.c:1054: main: Assertion `state.compositor && state.layer_shell && state.shm' failed.
Aborted

external monitor

$ xrandr 
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
XWAYLAND1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     59.96*+

Gnome 3.30.2, Debian buster

Thanks for investigating. Please let me know if there is some additional info I can give.

pam_tally: error opening /var/log/faillog

I'm getting the following errors when unlocking my screen:

swaylock[13620]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
swaylock[13620]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read

pam_tally is used to keep a count on attempted accesses, and deny access if too many attempts fail. I'm using the default PAM configuration provided by Arch Linux. I think pam_tally is invoked from /etc/pam.d/system-login (included from system-local-login from login from swaylock).

I understand that using pam_tally is a configuration option. But I think that it shouldn't fail with swaylock.

Not possible to chain commands after swaylock

Running the following command with i3lock will lock the screen and then suspend the computer, so the next time the computer is started you will be prompted for a password.
i3lock && systemctl suspend

Running the same command with swaylock will lock the screen and prompt you for a password and when you unlock, the rest of the command will be run and the computer will be suspended without a password on next startup.

Is this a security feature of swaylock or a bug? Is it possible to get it to work as i3lock?

package size issue reported on gentoo

Hi,
Here we have:

  • Digest verification failed:
  • /usr/local/portage/dev-libs/swaylock/swaylock-9999.ebuild
  • Reason: Filesize does not match recorded size
  • Got: 2337
  • Expected: 2338

It builds though, but doesn't integrate well in gentoo's package management system (portage)

Thks 4 ur attention.

swaylock --image strange error message

Hi, I've got this output when trying out swaylock.

$ swaylock --image /opt/images/lock_screen_image.jpg
swaylock: unrecognized option '--image /opt/images/lock_screen_image.jpg'
Usage: swaylock [options...]

  -C, --config <config_file>       Path to the config file.
  -c, --color <color>              Turn the screen into the given color instead of white.
  -d, --debug                      Enable debugging output.
  -e, --ignore-empty-password      When an empty password is provided, do not validate it.
  -f, --daemonize                  Detach from the controlling terminal after locking.
  -h, --help                       Show help message and quit.
  -i, --image [[<output>]:]<path>  Display the given image.
  -L, --disable-caps-lock-text     Disable the Caps Lock text.
  -l, --indicator-caps-lock        Show the current Caps Lock state also on the indicator.
  -s, --scaling <mode>             Scaling mode: stretch, fill, fit, center, tile.
  -t, --tiling                     Same as --scaling=tile.
  -u, --no-unlock-indicator        Disable the unlock indicator.
  -F, --show-failed-attempts       Show current count of failed authentication attempts.
  -v, --version                    Show the version number and quit.
  --bs-hl-color <color>            Sets the color of backspace highlight segments.
  --caps-lock-bs-hl-color <color>  Sets the color of backspace highlight segments when Caps Lock is active.
  --caps-lock-key-hl-color <color> Sets the color of the key press highlight segments when Caps Lock is active.
  --font <font>                    Sets the font of the text.
  --indicator-radius <radius>      Sets the indicator radius.
  --indicator-thickness <thick>    Sets the indicator thickness.
  --inside-color <color>           Sets the color of the inside of the indicator.
  --inside-clear-color <color>     Sets the color of the inside of the indicator when cleared.
  --inside-caps-lock-color <color> Sets the color of the inside of the indicator when Caps Lock is active.
  --inside-ver-color <color>       Sets the color of the inside of the indicator when verifying.
  --inside-wrong-color <color>     Sets the color of the inside of the indicator when invalid.
  --key-hl-color <color>           Sets the color of the key press highlight segments.
  --line-color <color>             Sets the color of the line between the inside and ring.
  --line-clear-color <color>       Sets the color of the line between the inside and ring when cleared.
  --line-caps-lock-color <color>   Sets the color of the line between the inside and ring when Caps Lock is active.
  --line-ver-color <color>         Sets the color of the line between the inside and ring when verifying.
  --line-wrong-color <color>       Sets the color of the line between the inside and ring when invalid.
  -n, --line-uses-inside           Use the inside color for the line between the inside and ring.
  -r, --line-uses-ring             Use the ring color for the line between the inside and ring.
  --ring-color <color>             Sets the color of the ring of the indicator.
  --ring-clear-color <color>       Sets the color of the ring of the indicator when cleared.
  --ring-caps-lock-color <color>   Sets the color of the ring of the indicator when Caps Lock is active.
  --ring-ver-color <color>         Sets the color of the ring of the indicator when verifying.
  --ring-wrong-color <color>       Sets the color of the ring of the indicator when invalid.
  --separator-color <color>        Sets the color of the lines that separate highlight segments.
  --text-color <color>             Sets the color of the text.
  --text-clear-color <color>       Sets the color of the text when cleared.
  --text-caps-lock-color <color>   Sets the color of the text when Caps Lock is active.
  --text-ver-color <color>         Sets the color of the text when verifying.
  --text-wrong-color <color>       Sets the color of the text when invalid.

All <color> options are of the form <rrggbb[aa]>.

The image is actually set for the lock screen, but this output bothers me.

Manpage shows warning

Hi,

not sure if that should be handled here ore in scdoc, but the manpage of swaylock shows a warning:

# man --warnings -l swaylock.1 >/dev/null 
troff: <standard input>:70: warning: macro ':'' not defined

this comes from line 52 in the swaylock.1.scd which starts with ':'

':' to prevent interpreting part of it as

it can be fixed by moving the newline before the term 'another', but it could also be fixed by scdoc by adding a zero-width space (\&) before a ' at the start of a line

/etc/pam.d/swaylock overwritten on update

On Arch, whenever the package is updated /etc/pam.d/swaylock is overwritten, which means that I have to change it manually every time. Is this a n issue with the packaging on Arch (that is, should I report the bug to the package maintainer)?

Swaylock crashes if you spam enter

Swaylock crashes if you spam enter really fast and gives you full access to the desktop.

lock command

bindsym XF86ScreenSaver exec swaylock --scaling=fill -i ~/Pictures/22713368_10213619311424692_4943994771009049545_o.jpg

Even if i use the -e option i'm able to crash it.
The only unusual pam module that i use is pam_mount (but it has always worked fine)

System info and related logs following.

 OS: Arch Linux 
 Kernel: x86_64 Linux 4.20.0-arch1-1-ARCH
 Uptime: 3m
 Shell: bash 4.4.23
 Resolution: 1600x900
 WM: sway
 GTK Theme: "Adapta-Nokto-Eta" [GTK3]
 CPU: Intel Core i5-3320M @ 4x 3.3GHz [47.0°C]
 GPU: Mesa DRI Intel(R) Ivybridge Mobile 
 RAM: 1059MiB / 7791MiB
 Display Manager: GDM 3.30.2 (gdm-plymouth from aur)
Jan 16 01:15:50 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:50 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:50 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:50 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:50 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:48 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:48 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:48 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:48 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:48 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:47 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:47 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:47 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:47 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:47 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:45 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:45 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:45 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:45 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:45 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:43 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:43 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:43 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:43 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:43 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:42 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:42 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:42 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:42 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:42 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:40 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:40 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:40 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:40 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:40 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:38 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:38 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:38 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:38 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:38 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:36 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:36 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:36 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:36 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:36 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:34 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:34 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:34 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:34 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:34 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:33 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:33 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:33 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:33 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:33 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:31 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:31 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read
Jan 16 01:15:31 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for update
Jan 16 01:15:31 codeWriter /usr/lib/gdm-wayland-session[30626]: 2019-01-16 01:15:31 - [sway/swaylock/pam.c:49] pam_authenticate failed
Jan 16 01:15:29 codeWriter swaylock[3398]: pam_unix(swaylock:auth): authentication failure; logname= uid=1000 euid=1000 tty= ruser= rhost=  user=jacotsu
Jan 16 01:15:29 codeWriter swaylock[3398]: pam_tally(swaylock:auth): Error opening /var/log/faillog for read

No longer support for transparent pngs.

Swaylock used to support transparent png's. I use this functionality to check my status bar when locked. It can often be handy to check wifi status, battery level, time and so on even when the computer is locked. I have cut a hole in the upper right corner of my lock screen bg to check for exactly that, but more or less since the split from sway, swaylock doesn't let me see through to waybar and instead just renders the transparent pixels as white.

Lock screen input name is truncated in and odd way

Version

swaylock version 1.4-4-ga9b274e (Jun  9 2019, branch 'master')

Problem

I have a custom keyboard layout which should display as "English (Custom)" under the password wheel on the lock screen. But instead it looks like this:

nglish (Custo

Where the beginning and end is truncated, almost like there's a pixel width limit and if the word is too long it gets truncated in this odd way.

P.S. This used not to be the case a few versions back, it would display the whole name as expected.

Invert --show-keyboard-layout option

Is there any possibility of an option like --show-keyboard-layout, but where it hides the keyboard layout even if there are multiple activated?

Thanks!

Notifications displayed on top of swaylock

Using sway 1.0, swaylock 1.3 and mako 1.3 on Arch Linux.

I'm using mako configured to display notifications in an "overlay layer", which is meant to have notifications displayed above fullscreen windows.
I've found out however that this also results in the notifications being displayed on top of swaylock, which I would consider being an issue.

I'm not sure where this should be reported though. I would guess the problem belongs in sway or swaylock which should prevent any such above display when the screen is locked.
Let me know if this issue should be moved to another project.

Crash in seat.c when unplugging a display/keyboard/mouse

If it happens again I may have a clearer picture of how to trigger it, but here's a stack trace:

#0  0x00007feada6632c0 in xkb_state_update_mask () at /usr/lib/libxkbcommon.so.0
#1  0x000056168fee0187 in keyboard_modifiers (data=0x56168fee7d20 <state>, wl_keyboard=0x561691baeae0, serial=8405, mods_depressed=0, mods_latched=0, mods_locked=0, group=0) at ../swaylock/seat.c:64
        state = 0x56168fee7d20 <state>
        caps_lock = 22038
#2  0x00007fead944a6d0 in ffi_call_unix64 () at /usr/lib/libffi.so.6
#3  0x00007fead944a0a0 in ffi_call () at /usr/lib/libffi.so.6
#4  0x00007feada6528bc in wl_closure_invoke (closure=closure@entry=0x561691badba0, flags=flags@entry=1, target=<optimized out>, target@entry=0x561691baeae0, opcode=opcode@entry=4, data=<optimized out>)
    at src/connection.c:1006
        count = <optimized out>
        cif = {abi = FFI_UNIX64, nargs = 7, arg_types = 0x7ffe3049a2c0, rtype = 0x7fead944b180 <ffi_type_void>, bytes = 8, flags = 0}
        ffi_types = 
          {0x7fead944b060 <ffi_type_pointer>, 0x7fead944b060 <ffi_type_pointer>, 0x7fead944b0e0 <ffi_type_uint32>, 0x7fead944b0e0 <ffi_type_uint32>, 0x7fead944b0e0 <ffi_type_uint32>, 0x7fead944b0e0 <ffi_type_uint32>, 0x7fead944b0e0 <ffi_type_uint32>, 0x7feada65068b <wl_proxy_marshal_array_constructor_versioned+178>, 0x561691bae870, 0x28, 0x561691bae870, 0x0, 0x56168fee6c20 <wl_callback_interface>, 0x7ffe3049a370, 0x0, 0x7feada651cad <wl_closure_clear_fds+59>, 0x75, 0xfceb347a3cc71200, 0x1, 0x561691bae700, 0x1, 0x7feada651fd9 <wl_closure_init+129>}
        ffi_args = 
          {0x7ffe3049a290, 0x7ffe3049a298, 0x561691badbb8, 0x561691badbc0, 0x561691badbc8, 0x561691badbd0, 0x561691badbd8, 0x561691bae7d0, 0x7ffe40000000, 0x561691ba9218, 0x7feada659d38 <wl_display_events+24>, 0x7feada6526fb <wl_closure_lookup_objects+160>, 0x561691ba9218, 0xfceb347a3cc71200, 0x91baa475, 0x561691bae0d0, 0x7feada654463, 0x3, 0x561691bae0d0, 0x0, 0x0, 0x7feada652de1 <wl_closure_destroy+22>}
        implementation = <optimized out>
#5  0x00007feada650132 in dispatch_event (display=display@entry=0x561691ba91a0, queue=queue@entry=0x561691ba9268) at src/wayland-client.c:1427
        closure = 0x561691badba0
        proxy = 0x561691baeae0
        opcode = 4
        proxy_destroyed = <optimized out>
#6  0x00007feada650198 in dispatch_queue (display=display@entry=0x561691ba91a0, queue=queue@entry=0x561691ba9268) at src/wayland-client.c:1573
        count = 4
#7  0x00007feada650ea6 in wl_display_dispatch_queue_pending (display=display@entry=0x561691ba91a0, queue=queue@entry=0x561691ba9268) at src/wayland-client.c:1815
        ret = <optimized out>
#8  0x00007feada651049 in wl_display_dispatch_queue (display=display@entry=0x561691ba91a0, queue=queue@entry=0x561691ba9268) at src/wayland-client.c:1791
        ret = <optimized out>
#9  0x00007feada651244 in wl_display_roundtrip_queue (display=0x561691ba91a0, queue=0x561691ba9268) at src/wayland-client.c:1238
        display_wrapper = <optimized out>
        callback = 0x561691bae9d0
        done = 0
        ret = 0
#10 0x00007feada651277 in wl_display_roundtrip (display=<optimized out>) at src/wayland-client.c:1267
#11 0x000056168feddfac in main (argc=4, argv=0x7ffe3049a698) at ../swaylock/main.c:1135
        line_mode = LM_LINE
        config_path = 0x0
        result = 0
        registry = 0x561691bad320
        __PRETTY_FUNCTION__ = "main"
        surface = 0x56168fee7c90 <types+112>

'show-failed-attempts' support

i3lock features a '--show-failed-attempts' parameter that displays the number of failed login attempts on the lock screen, it would be nice if this could get implemented for swaylock as well.

huge delays when pressing keys with image background on multiple monitors

With an image background displayed on multiple monitors (laptop monitor and 2 external screens), I experience huge delays (i.e., delays from key presses to visual acknowledgments). Also, the three displays are not synchronized (key presses are shown at different times) and CPU usage is very high while I enter my password.

It's smooth without a background image. There's a small delay with one monitor (laptop screen), but it's much better.

Is that a known issue? Could that be due to the image format? (Mine is a 4000 x 2330 PNG.)

RFE: swaylock should display the current XKB layout

For people that have different xkb layouts configured, it can be problem when trying to unlock their computer by typing in cyrillics when their password is in latin.

swaylock should display the current xkb layout, perhaps similar to how it displays when caps-lock is pressed.

Screen sometimes locks multiples times requiring several unlocks

I configure sway to lock my screen on timeout or suspend:

exec swayidle -w \
    timeout 7200 'swaylock -f' \
    before-sleep 'swaylock -f'

Sometimes when I try to unlock the machine I need to enter my password multiple times. I am certain I am typing it correctly and the failure message does not show up.

I suspect this happens when I suspend the machine when it is already locked, using a hardware button. However, when I just tested this for this bug report, I could not reproduce it again, yet it happened to me a day ago and I have not updated anything since then.

Usability: visual notification of impending lock (fade)

When a lock is about to happen, visually indicate this in some way so the user can preempt the lock, avoiding the need to retype their password. Other environments use a "fade to black" to indicate an impending lock. I guess this would be "fade to background".

This would alleviate user pain due to lack of inhibit support in various applications (fullscreen video in Firefox), which makes undesired locks common.

Release

I wanted to inquire whether you plan a new release for swaylock (and swayidle).

As I understand it the last stable version of sway included these programs. But with sway 1.0 this is going to be changed and they are seperate.

If this is the case I suggest creating new releases for swaylock and swayidle when releasing sway 1.0.

Latest release of swaylock for example doesn't even build for me because of a wrong include path. I fixed this for our local package but having everthing in order when sway 1.0 gets out would be nice.

I would also suggest to set a version automatically instead of needing to pass them at build time.
So in case git is not present just use that version. If git is present use version + git hash or whatever.

Remove list.c

This will require some refactoring. Can probably replace it with wl_list.

"Eye candy" options: clock, indicator position?

Hi, I'm loving using Sway and Wayland so far! I've got some high hopes for the future.

It looks like there aren't options for a clock or a date to be displayed on the lock screen. I was wondering if there are plans to add these features to swaylock. I was using i3lock-color before switching to Sway, and I loved the ability to show a clock and date in one corner while setting the indicator to display in another corner.

swaylock 1.3 build failure

If I don't have wlroots as a build dependency I get:

meson.build:38:0: ERROR:  Dependency "wayland-client" not found, tried pkgconfig

Should 56b672a have removed wayland_client = dependency('wayland-client') or does it need wlroots/sway installed to build?

Can't use Ctrl+m to confirm password

The last screen locker I used was xscreensaver, in which I could confirm the password typed with Ctrl+m. swaylock only allows me to press Enter instead. 😞

This is by far not a big deal. But why doesn't Ctrl+m works the same as Enter? It would be nice to have it working with Ctrl+m.

[Doc] turn off dpms on lock/turn on dpms on action

The i3 man page provides this nice script to turn off dpms on i3lock and turn on dpms on action.

#!/bin/sh
revert() {
  xset dpms 0 0 0
}
trap revert SIGHUP SIGINT SIGTERM
xset +dpms dpms 5 5 5
i3lock -n
revert

We should document this in the README or elsewhere too. It would look something like:

#!/bin/sh
revert() {
  swaymsg "output * dpms on"
}
trap revert SIGHUP SIGINT SIGTERM # How to fix this line?
swaymsg "output * dpms off"
swaylock
revert

But the trap command does not work. The dpms is off until the screen is unlocked (revert on last line).
What would be the wayland/wlroots equivalent for trap?

Can't start swaylock on lidclose

Trying to replicate the behavior from i3lock with the following systemd service:

[Unit]
Description=Lock screen on resume from suspend
Before=sleep.target

[Service]
User=kf
Environment=DISPLAY=:0
Type=forking
ExecStart=/usr/bin/swaylock
ExecStartPost=/usr/bin/sleep 1

[Install]
WantedBy=sleep.target

but it is not running... the exact same service runs fine with i3lock.
Output from journalctl:

Feb 02 15:13:48 arch systemd-logind[3378]: Lid closed.
Feb 02 15:13:48 arch systemd-logind[3378]: Suspending...
Feb 02 15:13:48 arch systemd[1]: Starting Lock screen on resume from suspend...
-- Subject: A start job for unit lock.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit lock.service has begun execution.
-- 
-- The job identifier is 1703.
Feb 02 15:13:48 arch swaylock[16317]: error: XDG_RUNTIME_DIR not set in the environment.
Feb 02 15:13:48 arch swaylock[16317]: 2019-02-02 15:13:48 - [swaylock/main.c:1047] Unable to connect to the compositor. If your compositor is running, check or set the WAYLAND_DISPLAY enviro>
Feb 02 15:13:48 arch systemd[1]: lock.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- An ExecStart= process belonging to unit lock.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Feb 02 15:13:49 arch systemd[1]: lock.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The unit lock.service has entered the 'failed' state with result 'exit-code'.
Feb 02 15:13:49 arch systemd[1]: Failed to start Lock screen on resume from suspend.
-- Subject: A start job for unit lock.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit lock.service has finished with a failure.
-- 
-- The job identifier is 1703 and the job result is failed.
Feb 02 15:13:49 arch systemd[1]: Reached target Sleep.
-- Subject: A start job for unit sleep.target has finished successfully
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit sleep.target has finished successfully.
-- 
-- The job identifier is 1649.
Feb 02 15:13:49 arch systemd[1]: Starting Suspend...
-- Subject: A start job for unit systemd-suspend.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit systemd-suspend.service has begun execution.
-- 
-- The job identifier is 1646.
Feb 02 15:13:49 arch systemd-sleep[16320]: Suspending system...
-- Subject: System sleep state suspend entered
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The system has now entered the suspend sleep state.

System Arch Linux 4.14.71-rt44-1-rt-lts, sway version 1.0-beta.2-204-g70637b40 (Jan 17 2019, branch 'master'), swaylock version 1.2-46-geffdea5 (Feb 1 2019, branch 'master')

Am I just messing up the systemd service file, or is there a bug somewhere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.