~exec64/imv#20: 
wl_surface@10: error 2: Buffer size (717x795) is not divisible by scale (2)

imv (and mpv) broke on wlroots/sway > May 30.

imv Downloads/screenshot-2022-06-01-14:47:56.png
wl_surface@10: error 2: Buffer size (717x795) is not divisible by scale (2)

According to emersion, this is not a bug on wlroots/sway (see https://github.com/swaywm/sway/issues/7050)

(I tried with imv latest as well as master)

Status
RESOLVED CLOSED
Submitter
~primalmotion
Assigned to
No-one
Submitted
2 years ago
Updated
1 year, 11 months ago
Labels
No labels applied.

~primalmotion 2 years ago

mpv fixed the issue in their master, not sure if the same thing can be applied in imv. I tried naively to find some similar portion of the code in imv, but could not find anything relevant

https://github.com/mpv-player/mpv/commit/cd3b4edea06dec659d9676f2649cc1b1be2e8565

~primalmotion 2 years ago*

continuing my investigation, I can get the master of imv to work on output with scale > 1 with this patch

diff --git a/src/wl_window.c b/src/wl_window.c
index 5efa42f..77b02f2 100644
--- a/src/wl_window.c
+++ b/src/wl_window.c
@@ -488,7 +488,7 @@ static void output_scale(void *data, struct wl_output *wl_output, int32_t factor
 {
   (void)data;
   struct output_data *output_data = wl_output_get_user_data(wl_output);
-  output_data->pending_scale = factor;
+  output_data->pending_scale = 1;
 }

This is obviously completely ugly and definitely not the fix, but it does fix the issue partially (the image shows but it's blurry)

~whynothugo 2 years ago

Seeing the same issue. Should be noted that the window renders for an instant, and immediately closes. imv-wayland continue running with very high CPU usage in the background.

Are you all seeing these additional symptoms too?

~primalmotion 2 years ago*

I haven't checked the cpu usage, but I see the same symptoms otherwise, yeah

~whynothugo 2 years ago

Above patch works for me. Thanks!

~nittens 2 years ago

After recently upgrading to wlroots 0.16.1 I get the this error as well:

wl_surface@9: error 2: Buffer size (956x1055) is not divisible by scale (2)

Running on archlinux with imv 4.3.1-7 Using sway with scale 2 setting

~akemi 2 years ago

Getting the same error as @nittens, also on wlroots 0.16.1-2. Works in even dimensions, though fails immediately on odd dimensions with imv-wayland taking up 100% CPU.

The problem only occurs when opening it. If imv is first opened in even dimensions, then resized to odd ones, it doesn't crash

~loadsas 1 year, 11 months ago ยท edit

Same for me.

~emersion 1 year, 11 months ago

~whynothugo 1 year, 11 months ago

Above patch works for me. Many thanks!

~primalmotion 1 year, 11 months ago*

On Jan 18, 2023 11:00, ~emersion wrote:

Patch for this: https://lists.sr.ht/~exec64/imv-devel/patches/38286

Fixes the issue here too. Thanks!

~exec64 REPORTED CLOSED 1 year, 11 months ago

Simon Ser referenced this ticket in commit 1817ef3.

Register here or Log in to comment, or comment via email.