mortie / swaylock-effects

Swaylock, with fancy effects
MIT License
707 stars 46 forks source link

Doesn't work with latest sway version #97

Open Zeioth opened 1 year ago

Zeioth commented 1 year ago

Just running

swaylock

Blocks the screen displaying red color. Doesn't seem to respond to keyboard input. Using the package swaylock works fine.

naba-nyan commented 1 year ago

Similarly Zeioth, I have the same issue after updating sway from 1.7 to 1.8. It does not work properly, but it can be locked in some situation below.

This is my swaylock config file:

# General:
#ignore-empty-password
show-failed-attempts
indicator-idle-visible

# Clock:
clock
timestr=%H:%M:%S
datestr=%a, %b %d

# Appearance:
font=IPAPGothic
indicator-caps-lock
indicator-thickness=20
indicator-radius=250

# Effects:
screenshots
effect-greyscale
effect-blur=10x2
fade-in=1.0

I noticed that with this config file, swaylock works with white background and no effects. However, if I comment out all the part of effects, then it behaves the same as Zeioth.

jaydizz commented 1 year ago

This likely has to do with the implementation of ext-session-lock-v1 for session locking in sway 1.8. swaylock-effects is based on an older version of swaylock that relies on the old client-based approach for screen-locking.

Repartee41 commented 1 year ago

Similarly Zeioth, I have the same issue after updating sway from 1.7 to 1.8. It does not work properly, but it can be locked in some situation below.

This is my swaylock config file:

# General:
#ignore-empty-password
show-failed-attempts
indicator-idle-visible

# Clock:
clock
timestr=%H:%M:%S
datestr=%a, %b %d

# Appearance:
font=IPAPGothic
indicator-caps-lock
indicator-thickness=20
indicator-radius=250

# Effects:
screenshots
effect-greyscale
effect-blur=10x2
fade-in=1.0

I noticed that with this config file, swaylock works with white background and no effects. However, if I comment out all the part of effects, then it behaves the same as Zeioth.

I can confirm this, after updating to Sway 1.18, swaylock only shows a white background with no effects (other than clock and light appearance tweaks), but disabling effects breaks the program altogether as noted in OP.

floesche commented 1 year ago

For me the solution at https://github.com/jirutka/swaylock-effects/pull/20 worked.

mortie commented 1 year ago

I'm trying to look into this, but I can't reproduce the issue. I'm on Ubuntu 22.10, with a custom build of Sway 1.8 (commit b88b1b63 tagged 1.8) using wlroots 0.16.1 (commit 0911a41f, tagged 0.16.1). Using a build of swaylock-effects from master (commit b2ea29de), everything seems to work. I'm running this command: swaylock --show-failed-attempts --indicator-idle-visible --clock --timestr='%H:%M:%S' --datestr='%a, %b %d' --indicator-caps-lock --indicator-thickness=20 --indicator-radius=250 --screenshots --effect-greyscale --effect-blur=10x2 --fade-in=1.0, and it acts exactly as it's supposed to. I can also run swaylock without any options and get a white lock screen which accepts keyboard input as expected and unlocks as expected.

Can anyone who's affected by this issue report the version of their swaylock-effects package, their sway package and their wlroots package, as well as the output of swaylock --version and swaymsg -t get_output?

Clearly swaylock-effects has to be updated to support the new locking mechanism, but at least for me, it seems like Sway 1.8 still supports the old locking mechanism the same way Sway 1.7 did.

mortie commented 1 year ago

Okay, so I did a bit more digging and it turns out that it is broken in the latest tagged release. Can someone who experiences this issue verify that swaylock-effects commit 70516672 (tagged 1.6-3) is broken under Sway 1.8, but that swaylock-effects commit b2ea29de works?

It's probably about time to make a new release.

Repartee41 commented 1 year ago

Okay, so I did a bit more digging and it turns out that it is broken in the latest tagged release. Can someone who experiences this issue verify that swaylock-effects commit 7051667 (tagged 1.6-3) is broken under Sway 1.8, but that swaylock-effects commit b2ea29d works?

It's probably about time to make a new release.

I can confirm the latest master build solves this issue. Thank you!

mortie commented 1 year ago

Alright, cool! I made a new release, 1.6-4, which just contains everything that has happened in the repo since the last release: https://github.com/mortie/swaylock-effects/releases/tag/v1.6-4

I'll keep this issue open until I've had more confirmations that 1.6-4 fixes it. Even if 1.6-4 doesn't fix it, I still think making a new release right now is appropriate; it will be the last version in the 1.6 series. If further fixes are required, those will happen after merging in all new upstream commits in a 1.7 series.

floesche commented 1 year ago

I had the issue before, and v1.6.4 fixes the issue for me (on Arch with wlroots-0.16.1-2, sway-1.8-3, swaylock-effects-1.6.4-1):

$ swaylock --version
swaylock version 1.6-4
$ swaymsg -t get_outputs                                                                                                                                                                      [1]
Output eDP-1 'AU Optronics 0x502D Unknown' (focused)
  Current mode: 1920x1080 @ 60.033 Hz
  Position: 960,2160
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 1
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    1920x1080 @ 60.033 Hz
    1920x1080 @ 48.010 Hz
cab404 commented 1 year ago

can confirm it working on nixos, sway 1.8

rj1 commented 1 year ago

i'm experiencing this issue randomly

sometimes it will be a red screen that i can't unlock, sometimes it will be a white screen that i can unlock, sometimes it will produce the desired swaylock effect, but it's not consistent. when i trigger swaylock-effects manually using a sway bind, it produces the desired swaylock effect. when swayidle executes (using the same command) it typically produces the white screen, but every once in awhile it will be the red one. this random behavior has been happening since installing sway 1.8

using arch, latest versions of everything

❯ swaylock --version swaylock version 6b87fda (Jan 10 2023, branch 'makepkg')

❯ sway --version sway version 1.8

thx for your hard work, really cool software

dzintars commented 1 year ago

Just came across this ticket when explicitly trying to run swaylock -C /path/to/config. If using just commonly used

swaylock \
  --screenshots \
  --clock \
  --indicator-idle-visible \
    --indicator-radius 100 \
    --indicator-thickness 7 \
.....

it works just fine. swaylock version a863c2f (Apr 24 2023, branch 'master')

dzintars commented 1 year ago

Oh... my fault. RTFM.

-C, --config The config file to use. By default, the following paths are checked: $HOME/.swaylock/config, $XDG_CONFIG_HOME/swaylock/config, and SYSCONFDIR/swaylock/config. All flags aside from this one are valid options in the configuration file using the format long-option=value. For options such as ignore-empty-password, just supply the long-option. All leading dashes should be omitted and the equals sign is required for flags that take an argument.

I was missing = sign in config.

532910 commented 1 year ago

this master works fine with sway 1.8.1-1 from debian experimental