Limitations of the Qt-based wayland compositor build into lipstick are a recurring theme and many workarounds have been created like qt-runner. A more sustainable solution was discussed recently:
remove the compositor from lipstick and use an existing one like weston or sway or phoc or …
replace the Qt compositor in lipstick with wlroots
Apparently someone at Jolla got weston running in his holidays but no code was provided. So I started trying the same. My knowledge on all topics involved is quite limited so I would like to invite you to learn and grow together with me. I’ll try to turn this first post into a wiki and invite you to help.
Possible rewards:
simplify executing apps based on newer Qt
package and run GTK based apps (lot’s of packaging …)
Flatpak for things like mobile-config Firefox …
…
Status:
Weston and dependencies packaged
sway almost packaged, systemd is one version too old, might be patchable
weston crashes with wayland backend as libstick (somewhat expected)
I don’t know how to start weston standalone
Todo:
Document how to hack on this
Clean up packaging
get weston to run
get lipstick to run inside weston/as a shell/???
recreate lipstick gestures etc in weston plugin (?)
zypper ar https://repo.sailfishos.org/obs/home:/simonschmeisser:/wayland/sailfish_latest_aarch64/home:simonschmeisser:wayland.repo
zypper ref
zypper install weston
or simulator
#start simulator in QtCreator
ssh defaultuser@localhost -p 2223 -i ~/SailfishOS/vmshare/ssh/private_keys/sdk
sudo su
pkcon in zypper
zypper ar https://repo.sailfishos.org/obs/home:/simonschmeisser:/wayland/sailfish_latest_i486/home:simonschmeisser:wayland.repo
zypper ref
zypper install weston
Try to run it in windowed mode:
weston
run it “standalone”:
unset WAYLAND_DISPLAY
weston
I don’t know how to run it properly, so I hacked the lipstick systemd file:
zypper in vim
vim /usr/lib/systemd/user/lipstick.service
ExecStart=weston -B drm
systemctl daemon-reload
reboot
which gives me this in journalctl
Dec 27 16:19:51 SailfishEmul systemd[431]: Starting The lipstick UI...
Dec 27 16:19:51 SailfishEmul weston[684]: Date: 2025-12-27 EET
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.219] weston 14.0.2
Dec 27 16:19:51 SailfishEmul weston[684]: https://wayland.freedesktop.org
Dec 27 16:19:51 SailfishEmul weston[684]: Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Dec 27 16:19:51 SailfishEmul weston[684]: Build: 14.0.2
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.219] Command line: /usr/bin/weston -B drm
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.219] OS: Linux, 5.0.21-1.4.2.jolla, #1 SMP PREEMPT Thu Feb 6 20:11:51 UTC 2025, i686
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.219] Flight recorder: enabled
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.219] Starting with no config file.
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.219] Output repaint window is 7 ms maximum.
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.220] Loading module '/usr/lib/libweston-14/drm-backend.so'
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.221] initializing drm backend
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.221] Trying libseat launcher...
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.221] [libseat/backend/seatd.c:64] Could not connect to socket /run/seatd.sock: No such file or directory
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.221] [libseat/libseat.c:76] Backend 'seatd' failed to open seat, skipping
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.225] [libseat/libseat.c:73] Seat opened with backend 'logind'
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.226] libseat: session control granted
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.227] using /dev/dri/card0
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.228] DRM: supports atomic modesetting
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.228] DRM: does not support GBM modifiers
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.228] DRM: does not support Atomic async page flip
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.228] DRM: supports picture aspect ratio
Dec 27 16:19:51 SailfishEmul weston[684]: pci id for fd 13: 80ee:beef, driver (null)
Dec 27 16:19:51 SailfishEmul weston[684]: MESA-LOADER: failed to open vboxvideo: /usr/lib/dri/vboxvideo_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.238] Loading module '/usr/lib/libweston-14/gl-renderer.so'
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.240] warning: failed to query rendering device from EGL
Dec 27 16:19:51 SailfishEmul weston[684]: [16:19:51.240] EGL version: 1.5
Dec 27 16:19:51 SailfishEmul systemd[431]: lipstick.service: Failed with result 'exit-code'.
Dec 27 16:19:51 SailfishEmul systemd[431]: Failed to start The lipstick UI.
Dec 27 16:19:52 SailfishEmul systemd[431]: lipstick.service: Start request repeated too quickly.
Dec 27 16:19:52 SailfishEmul systemd[431]: lipstick.service: Failed with result 'exit-code'.
Plasma Mobile uses kwin and would be a good approach if Sailfish OS had a recent Qt version. KDE people love bumping version requirements which is fine because you can fix bugs at the root package/library and not have workarounds everywhere. But it’s hard to keep pace for jolla/us.
It would be interesting to get a wlroots-based compositor running instead of Weston. Maybe things have changed by now, but a few years ago Weston seemed like a dead end. There are a lot of different compositors based on wlroots and it seems to be very flexible. I can try building a simple one for testing purposes.
I was able to get the tinywl.c example running with the wlroots package from the repository, but it seems to be of very limited use because wl_shell is no longer implemented and Qt 5.6 apps don’t support the xdg_shell protocol yet. We need a new Qt version for this to work.
The other option would be to reintroduce wl_shell support. It was removed back in 2019 from wlroots, and more recently from weston.
This is not going as well as I expected, since the wlroots scene graph API is quite limited. For instance, it’s not possible to render windows with rounded corners using it. This means that custom rendering code is needed.
I also had a look at Jolla’s proprietary sailfish-compositor (for those who didn’t notice, it is available as a package in the main jolla repository). It doesn’t use wlroots or anything similar and appears to do the rendering with Qt and some custom OpenGL code. It implements the new xdg_shell protocol too. I hope Jolla can open-source this, it does look quite promising.