swaylock icon indicating copy to clipboard operation
swaylock copied to clipboard

Error: Buffer size not divisible by scale

Open ChrisLane opened this issue 4 years ago • 10 comments

wlroots version: 0.12.0.r330.g5e19e005 sway version: 1.5-63a66351 (Feb 9 2021, branch 'master') swaylock version: 1.5 Linux version: 5.10.14-arch1-1

When I run swaylock -d I get the following error:

2021-02-09 19:19:58 - [swaylock-1.5/main.c:1147] Parsing CLI Args
2021-02-09 19:19:58 - [swaylock-1.5/main.c:280] output name is HDMI-A-1
2021-02-09 19:19:58 - [swaylock-1.5/main.c:280] output name is eDP-1
wl_surface@23: error 2: Buffer size not divisible by scale

ChrisLane avatar Feb 09 '21 19:02 ChrisLane

Can you grab a WAYLAND_DEBUG=1 log of swaylock?

emersion avatar Feb 09 '21 19:02 emersion

Can you grab a WAYLAND_DEBUG=1 log of swaylock?

https://gist.github.com/ChrisLane/515b2c49f52f055c49a0af6d20f721eb

ChrisLane avatar Feb 09 '21 19:02 ChrisLane

Hm, seems like swaylock creates a 1x1 buffer for some reason…

emersion avatar Feb 09 '21 19:02 emersion

I should note, I don't think this was happening to me yesterday when I was most likely running versions of wlroots and sway from yesterday morning's git so this may have arisen from commits to wlroots/sway since then.

ChrisLane avatar Feb 09 '21 19:02 ChrisLane

I should note, I don't think this was happening to me yesterday when I was most likely running versions of wlroots and sway from yesterday morning's git so this may have arisen from commits to wlroots/sway since then.

I experienced the same issue after updating to the newest sway-git and wlroots-git

equalis3r avatar Feb 09 '21 20:02 equalis3r

@ChrisLane, @sontrant, do you have output scaling set to anything other than 1?

gmykhailiuta avatar Feb 10 '21 14:02 gmykhailiuta

@ChrisLane, @sontrant, do you have output scaling set to anything other than 1?

Yes, I have the following config for my laptop screen: output $laptop_screen scale 2 pos 1920 0

ChrisLane avatar Feb 10 '21 15:02 ChrisLane

i have the same issue

gari avatar Feb 10 '21 16:02 gari

https://github.com/swaywm/swaylock/pull/167

emersion avatar Feb 10 '21 16:02 emersion

There are still some cases where we use an invalid buffer size for the scale we use: https://github.com/swaywm/swaylock/pull/167#issuecomment-778289975

Probably some rounding errors?

emersion avatar Feb 17 '21 15:02 emersion