regolith-desktop icon indicating copy to clipboard operation
regolith-desktop copied to clipboard

Upgrade to Sway >= 1.10

Open ztec opened this issue 11 months ago β€’ 10 comments

For now, I'm a bit stuck and cannot use the sway flavour of regolith because of some issue with Nvidia. they seems to be addressed in new versions of wlroots and sway 1.10 bring them.

I have found no way to get sway 1.10 with regolith in a package (I may compile it to test tho)

What are the requirements to build and package sway 1.10 or 1.10.1 with regolith / in regolith package sourcedeb ? Can I help ?

ztec avatar Feb 01 '25 14:02 ztec

Hi @ztec , it looks like we're blocked on packaging sway 1.10 due to (at least) the wlroots dependency. I tried building the 1.10.1 release of sway and saw this:

$ git remote add upstream https://github.com/swaywm/sway.git # from git repo sway-regolith
$ git fetch upstream
$ git checkout 1.10.1
$ meson build/
...
Run-time dependency wlroots-0.18 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency wlroots-0.18

meson.build:48:10: ERROR: Subproject "subprojects/wlroots" required but not found.
...

Looking at what's available in the repos: Ubuntu: https://launchpad.net/ubuntu/+source/wlroots Debian: https://packages.debian.org/sid/libwlroots-dev

So, it seems that for the next Ubuntu release we may be able to build in version 1.10 of sway, but not at this time.

Until then, if you're able to locally build sway 1.10 with it's dependencies on your machine, you could then apply the patches for Regolith integration. The patches are contained within the /debian folder of the Regolith fork of Sway. You could copy the whole /debian directory into your copy of sway, and try building and fix up any issues you find (example). Once the Regolith variant of sway builds correctly, you could install it into /usr/local and then that version of sway should be picked up by the Regolith session init script.

If you do make that work, you could create a PR back here and once the wlroots dependency is available, your update could be packaged into Regolith.

kgilmer avatar Feb 01 '25 18:02 kgilmer

Thanks for all of that πŸ€—. My compilation skills are a bit rusty, so no promises πŸ˜…. As soon as I have some time I will try tho and keep you posted.

ztec avatar Feb 02 '25 08:02 ztec

For now (with wlroot as submodule, not as package) I got this error :-/

Dependency libinput found: NO found 1.25.0 but need: '>=1.26.0' (cached)

meson.build:75:50: ERROR: Dependency 'libinput' is required but not found.

I'm looking for a way to get that, without success yet.

edit: Found it https://launchpad.net/ubuntu/+source/libinput/1.26.2-1

ztec avatar Feb 02 '25 10:02 ztec

So far I built sway using wlroot sources directly. Not tested it yet.

Trying to build using packaged version of wlroot but apart from outdated dependencies, it seems two package are missing on ubuntu (but I found them on debian side)

  • https://packages.debian.org/sid/libdisplay-info2
  • https://packages.debian.org/sid/libxcb-errors0

All the other dependencies issue with ubuntu 24.04:

$ sudo dpkg -i libwlroots-0.18-dev_0.18.2-3_amd64.deb
(Reading database ... 391485 files and directories currently installed.)
Preparing to unpack libwlroots-0.18-dev_0.18.2-3_amd64.deb ...
Unpacking libwlroots-0.18-dev:amd64 (0.18.2-3) over (0.18.2-3) ...
dpkg: dependency problems prevent configuration of libwlroots-0.18-dev:amd64:
 libwlroots-0.18-dev:amd64 depends on libwlroots-0.18 (= 0.18.2-3); however:
  Version of libwlroots-0.18:amd64 on system is 0.18.2-2.
 libwlroots-0.18-dev:amd64 depends on liblcms2-dev; however:
  Package liblcms2-dev is not installed.
 libwlroots-0.18-dev:amd64 depends on libxcb-errors-dev; however:
  Package libxcb-errors-dev is not installed.

dpkg: error processing package libwlroots-0.18-dev:amd64 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libwlroots-0.18-dev:amd64

$ sudo dpkg -i libwlroots-0.18_0.18.2-2_amd64.deb 
(Reading database ... 391485 files and directories currently installed.)
Preparing to unpack libwlroots-0.18_0.18.2-2_amd64.deb ...
Unpacking libwlroots-0.18:amd64 (0.18.2-2) over (0.18.2-2) ...
dpkg: dependency problems prevent configuration of libwlroots-0.18:amd64:
 libwlroots-0.18:amd64 depends on libwayland-client0 (>= 1.23); however:
  Version of libwayland-client0:amd64 on system is 1.22.0-2.1build1.
 libwlroots-0.18:amd64 depends on libwayland-server0 (>= 1.23); however:
  Version of libwayland-server0:amd64 on system is 1.22.0-2.1build1.
 libwlroots-0.18:amd64 depends on libxcb-ewmh2 (>= 0.4.2); however:
  Version of libxcb-ewmh2:amd64 on system is 0.4.1-1.1build3.
 libwlroots-0.18:amd64 depends on libxcb-icccm4 (>= 0.4.2); however:
  Version of libxcb-icccm4:amd64 on system is 0.4.1-1.1build3.
 libwlroots-0.18:amd64 depends on libxcb-xinput0 (>= 1.17.0); however:
  Version of libxcb-xinput0:amd64 on system is 1.15-1ubuntu2.

dpkg: error processing package libwlroots-0.18:amd64 (--install):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
Errors were encountered while processing:
 libwlroots-0.18:amd64

I think the amount of dependencies to update is too high for me. I don't have available VM do to it in a isolated way and do not want to break my main install for now.

If you have an easy solution to update all those dependencies I might test but it is beyond my current knowledge for now.

ztec avatar Feb 02 '25 11:02 ztec

You got far! It turns out that the package dependencies we need are packaged on Debian Trixie (testing). I'm working on porting the regolith patches to 1.10. LMK if you'd like to help!

kgilmer avatar Feb 06 '25 04:02 kgilmer

You can fine my merge of the sway-1.10 here: https://github.com/ztec/sway-regolith/commit/a9f04712812338d13a0d2851d7ae21f5281a009e

It is not perfect as I'm no expert in C and didn't really understand all the diffs. Patches files seems ok (with the whitespace option to git apply). If it can help, good. If not, I won't take it personally πŸ˜‰ .

It compiled/worked on my machineβ„’ but had other issues with Hardware Acceleration (nvidia and firefox). Had to stop the experimentation.

ztec avatar Feb 06 '25 09:02 ztec

Ah, nice. Thanks for providing that, it might help me if I encounter issues when upleveling to 1.10. From a packaging perspective, I'm doing this in the opposite direction. I take the source tree from upstream, and then update the patches we have to "fit" the updated version, like here: https://github.com/regolith-linux/sway-regolith/pull/34

kgilmer avatar Feb 06 '25 15:02 kgilmer

I figured it out it is done the other way around (like you do) but only after I did it. And also after I fully (mostly anyway) understood how you handle this package. πŸ˜‚ Had to put back pieces together and it took longer than I would admit πŸ˜“ .

ztec avatar Feb 06 '25 16:02 ztec

Hi again @ztec . Maybe you already got yourself going, but if not I have tested sway-regolith 1.10-2-1regolith-testing in Regolith 3.2 on Debian Trixie. I think you will have the proper dependencies in Ubuntu 25.04 as well. FWIW (I would not do this on Ubuntu, only Debian):

cat /etc/apt/sources.list.d/regolith.list
deb [arch=amd64 signed-by=/usr/share/keyrings/regolith-archive-keyring.gpg] https://archive.regolith-desktop.com/debian/unstable testing main
sudo apt install sway-regolith

kgilmer avatar Feb 11 '25 04:02 kgilmer

I'm running Regolith/sway on Ubuntu 24.04 and looks like this has been resolved?

$ sway --version
sway version 1.10.1

stephenh avatar Aug 12 '25 00:08 stephenh