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

Wayland native applications do not start on alpine + zfs on root #4918

Closed
ngortheone opened this issue Jan 17, 2020 · 2 comments
Closed

Wayland native applications do not start on alpine + zfs on root #4918

ngortheone opened this issue Jan 17, 2020 · 2 comments

Comments

@ngortheone
Copy link

ngortheone commented Jan 17, 2020

Hi @ddevault I am on fresh Alpine Linux edge.
Just installed sway according to this https://wiki.alpinelinux.org/wiki/Sway

X11 applications work, but Wayland applications crash - all seem to complain about failing to load cursor

For example firefox

➜  ~ MOZ_ENABLE_WAYLAND=1 firefox 

(firefox:21171): Gdk-WARNING **: 21:39:05.583: Failed to load cursor theme default

(firefox:21171): Gdk-WARNING **: 21:39:05.645: Failed to load cursor theme Adwaita

(/usr/lib/firefox/firefox:21217): Gdk-WARNING **: 21:39:06.005: Failed to load cursor theme default
Exiting due to channel error.

Alacritty

➜  ~ alacritty
thread 'main' panicked at 'Memory allocation failure while loading a theme.', /home/buildozer/aports/community/alacritty/src/cargo/registry/src/github.com-1ecc6299db9ec823/wayland-client-0.23.6/src/cursor.rs:80:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[wayland-client error] A handler for wl_registry panicked.
[1]    17141 abort  alacritty

I did install gtk3, and a bunch of themes, tried exporting GTK_THEME and tried suggestions from wikw https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
Nothing works.

It is worth mentioning it is a pretty bare-bones alpine install, so I might be missing some libs. Not sure where to proceed from here, please advice

@ngortheone ngortheone changed the title Wayland native applications do not start Wayland native applications do not start on alpine Jan 17, 2020
@emersion
Copy link
Member

Please ask for help in the IRC channel (either Sway's or Alpine's). Closing because this isn't a Sway bug.

@ngortheone
Copy link
Author

ngortheone commented Jan 18, 2020

@emersion
I found the root cause of the problem. Indeed this is not sway, but wayland itself. I leave this here for reference, in case someone has same issue

fallocate returns EOPNOTSUPP and libwayland-cursor exits

I use ZFS and it does not support fallocate

strace

open("/tmp/wayland-cursor-shared-keMDcG", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 8
fcntl(8, F_SETFD, FD_CLOEXEC)           = 0
unlink("/tmp/wayland-cursor-shared-keMDcG") = 0
fallocate(8, 0, 0, 1024)                = -1 EOPNOTSUPP (Not supported)
close(8)                                = 0
write(2, "thread '", 8thread ')                 = 8
write(2, "main", 4main)                     = 4
write(2, "' panicked at '", 15' panicked at ')         = 15
write(2, "Memory allocation failure while "..., 48Memory allocation failure while loading a theme.) = 48

Line that causes crash
libwayland-cursor https://gitlab.freedesktop.org/wayland/wayland/blob/master/cursor/os-compatibility.c#L159

Musl does not consider this a problem, they argue that application must have a fallback behavior when fallocate is not supported
https://www.openwall.com/lists/musl/2018/04/27/1

ZFS guys argue that it is hard ot do fallocate on COW file system
openzfs/zfs#326

Opened wayland issue: https://gitlab.freedesktop.org/wayland/wayland/issues/137

I fixed my issue by using tmpfs for /tmp

@ngortheone ngortheone changed the title Wayland native applications do not start on alpine Wayland native applications do not start on alpine + zfs on root Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants