Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apps crash if sway output scaling is not equal to 1 #6014

Closed
gmykhailiuta opened this issue Feb 10, 2021 · 12 comments
Closed

Apps crash if sway output scaling is not equal to 1 #6014

gmykhailiuta opened this issue Feb 10, 2021 · 12 comments
Labels
bug Not working as intended

Comments

@gmykhailiuta
Copy link

gmykhailiuta commented Feb 10, 2021

  • Sway Version:

    • sway version 1.5-b1b10415 (Feb 10 2021, branch 'master')
      • sway-git AUR package version r6597.b1b10415-1
    • wlroots-git version: 0.12.0.r330.g5e19e005-1
    • swaylock version: 1.5.r9.g235b925-1
  • Debug Log:

  • Configuration File:

    • Reproducible with default config provided by sway-git AUR package.
  • Steps to reproduce:

    • Start sway: /usr/bin/sway -d --config /etc/sway/config $@ &>>/tmp/sway-debug.log
    • Run swaylock -f. It will work as expected.
    • Run swaymsg output eDP-1 scale 1.25 (also tried with scale 2).
    • Run swaylock -f.
    • It crashes with message: wl_surface@16: error 2: Buffer size not divisible by scale

Also, at least Firefox, Wofi and Sublime Text 3 crash once mouse pointer gets over any input field. But only if scale is not equal to 1. Error message:

Gdk-Message: 13:30:52.477: Error 71 (Protocol error) dispatching to Wayland display.

Presumably, breaking change was introduced after next upgrades:

  • wlroots-git 0.12.0.r322.g9396d843-1 -> 0.12.0.r330.g5e19e005-1
  • sway-git r6596.63a66351-1 -> r6597.b1b10415-1

But few other things also got updated. Would pacman logs be valuable?

@gmykhailiuta gmykhailiuta added the bug Not working as intended label Feb 10, 2021
@emersion
Copy link
Member

Duplicate of swaywm/swaylock#166

@emersion emersion marked this as a duplicate of swaywm/swaylock#166 Feb 10, 2021
@emersion
Copy link
Member

at least Firefox, Wofi and Sublime Text 3 crash once mouse pointer gets over any input field

Hm, that's news to me.

@emersion emersion reopened this Feb 10, 2021
@emersion
Copy link
Member

Can you get a WAYLAND_DEBUG=1 log of one of these clients?

@gmykhailiuta
Copy link
Author

Sure: https://gist.github.com/gmykhailiuta/b5c3879e80c8f6e3f5aef4706b121872.
Note, that there're 2 files in gist, one for Firefox, and one for Wofi.
I couldn't get any output from sublime though.

@gmykhailiuta
Copy link
Author

Firefox version: 85.0.2-1
Wofi version: r367.cc821241bb71-1

Chromium works fine on scale >1, but crashes if gets rescaled to 1. Switching between 1.25 <-> 1.5, as well as 1-> 1.25 and 1->1.5 works fine.
Chromium version: 88.0.4324.150-1.
Command line: /usr/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland

@emersion
Copy link
Member

https://gitlab.freedesktop.org/wayland/wayland/-/issues/194

@heroin-moose
Copy link

Maybe it's possible to revert swaywm/wlroots@91fa2ff until the proper fix/workaround is implemented?

@gmykhailiuta
Copy link
Author

gmykhailiuta commented Feb 12, 2021

@heroin-moose, wouldn't it be easier to build and install the older version, which does not include that commit? For instance, wlroots 0.12.0.r322.g9396d843-1 and sway r6590.169b90f9-1 work fine for me.

@heroin-moose
Copy link

heroin-moose commented Feb 13, 2021

Well yeah, but since this affects everyone with HiDPI screens I believe it would be easier to place a "fix" in one place.

@heroin-moose
Copy link

heroin-moose commented Feb 13, 2021

FYI, this also affects programs that create the buffer first and then resize it with the proper scaling and height/width after entering the surface (like https://github.com/eXeC64/imv does). If I understand correctly that's an application bug, but just in case.

emersion added a commit to emersion/wlroots that referenced this issue Feb 15, 2021
A libwayland-cursor bug [1] makes many clients crash.

[1]: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194

Fixes: 91fa2ff ("surface: check buffer size is compatible with scale")
Closes: swaywm/sway#6014
@emersion
Copy link
Member

swaywm/wlroots#2742

@gmykhailiuta
Copy link
Author

Thanks! Works perfectly fine for me with wlroots 0.12.0.r344.g641c223d-1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

3 participants