Greetings,
Let's start this message from the good news: Fedora 34 was released with Sway 1.6 available as a day 0 update. We're getting a lot of bugfixes, shiny new wlroots DRM renderer backend, and of course new bugs :)
## Upstream release notes:
- https://github.com/swaywm/sway/releases/tag/1.6 - https://github.com/swaywm/wlroots/releases/tag/0.13.0
## Default configuration changes for Fedora package:
A couple of configuration snippets are now provided by the optional dependency sway-systemd:
- `/etc/sway/config.d/10-systemd-session.conf` - configures systemd user session environment - `/etc/sway/config.d/10-systemd-cgroups.conf` - configures automatic management of cgroups for GUI applications in sway session (#1935923)
Detailed documentation: https://github.com/alebastr/sway-systemd/blob/main/README.md
### Opt-in for users with custom config file:
`include /etc/sway/config.d/*` directive in the default configuration already includes these snippets. If you removed the line from your custom config file, you can restore it or just include the parts you want. (the configuration files may change in the future, so it is better to include them instead of copying the contents).
### Opt-out options:
- Remove `sway-systemd` package and add it to `excludepkgs` in the `fedora`, `updates` and `updates-testing` repository configuration - Remove `include` directives that match the files listed above from your sway config file. - Edit `/etc/sway/config.d/*.conf` files and comment all uncommented lines. Be aware that the future updates of sway-systemd package may create `/etc/sway/config.d/*.conf.rpmnew` files which are also sourced by sway
## grimshot
`grimshot` screenshot helper script from the sway/contrib source directory is now offered as a `grimshot` package. It provides several convenient wrappers around grim, slurp and wl-copy.
## xdg-desktop-portal-wlr 0.3.0
Just a heads up that the updated xdpw package now asks you to select the output you'd like to share. It does that using `slurp` though, so it's completely understandable if you get confused first time that happens :) See OUTPUT CHOOSER section of `man 5 xdg-desktop-portal-wlr` to configure alternative chooser command (dmenu, rofi, wofi, etc...).
Deprecation warning: if you have xdg-desktop-portal-wlr.service override with `-o` option for xdpw, you may want to remove it and use chooser or specify desired output as an option in the configuration file.
***
## Known issues:
- Sway may fail to start with *any* GPU (including integrated Intel) if the libs from the proprietary NVIDIA driver are installed. Even if the kernel module for NVIDIA driver is not loaded. Upstream link: https://github.com/swaywm/wlroots/issues/2480 Solution: ensure that libglvnd >= 1.3.2-4.fc34 is installed
- Artifacts and glitches with Nouveau open-source driver for NVIDIA cards. Upstream link: https://github.com/swaywm/sway/wiki#sway-16-shows-garbage-on-nouveau Solution: start sway with WLR_DRM_NO_MODIFIERS=1 environment variable, i.e. `env WLR_DRM_NO_MODIFIERS=1 /usr/bin/sway` Will be fixed with mesa 21.1.x update somewhere in May.
- Sway or any other wlroots-based compositor refuses to start on Allwinner SOC devices with `lima` open-source driver (PinePhone et al.). Upstream link: https://github.com/swaywm/wlroots/issues/2795 Solution: wait for mesa 21.1.x update somewhere in May. Meanwhile, sway-1.5.1 is still available in f34 repositories and should work on this hardware.
- Mouse cursor is not visible in some apps on a scaled output Upstream: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194, https://github.com/swaywm/sway/issues/6166 Solution: a comment in the sway issue mentions that certain cursor themes are not affected. I cannot provide further guidance due to the lack of HiDPI display, so suggestions with the working cursor theme available from Fedora repositories are welcome.
- Applications started as a systemd user service are failing to connect to a wayland socket. Solution: see default configuration changes section above
- Sway with all applications is terminated on low memory condition. Solutions: a) remove systemd-oomd-defaults package to disable systemd OOM killer b) see default configuration changes section above
***
I'm certain that I forgot to mention a lot of things, so feel free to reply with the changes you consider important :)
On 4/29/21 6:32 PM, Aleksei Bavshin wrote:
I'm certain that I forgot to mention a lot of things, so feel free to reply with the changes you consider important :)
One of those important things I forgot to mention about is modularity.
f32 and f33 module updates are currently blocked by the fact that it's not possible to build new wlroots from rawhide sources on f33. Notably, it requires newer meson (>= 0.56) and wayland-server (>= 1.19).
While I have a trivial patch to downgrade wayland-server dependency, there's nothing we can do about meson that is allowed by Fedora policies. Note that even build-only modular packages still hold the requirement of commit access. If we want to continue updating module for f33, we'll have to set up a rolling branch from the latest sway 1.5.1/wlroots 0.12.0 build and maintain it. Somehow after all the modularity things I encountered I don't feel motivated enough to deal with that.
Therefore, unless someone else wants to step in, I'm declaring sway module in f32/f33 dead.
***
For f34 I took a chance to drop everything except `sway` and `wlroots` from the module manifest. I don't expect that we'll need the f34 module until the next wlroots release, but I'll still try to keep it in sync with rawhide.
***
Module builds are currently not published for rawhide. This gives us flexibility to drop the module completely in f35 if we decide to do so.
I just wanted to say thanks to you and each maintainer that worked and still work on sway-related packages on Fedora repos.
Thank you very much for the hard works. I find sway very usable even with a 10 years old notebook with only 2GB of memory.
My objective is trying to enable Chinese Input Method "cangjie" (for the default terminal and for Firefox) using Internet Searchable hints while following the default sway config as much as possible (or following the recommended config by the SWAY SIG as close as possible.)
I will start with Fedora 34 Workstation, and replicate to Silverblue 34.
Currently, what I have done is:
sudo systemctl set-default multi-user.target sudo dnf install sway
After login in Console, I just run manually run sway
Q1. What is the preferred way to start testing sway? (with systemd integration) Q2. Where can I find the "recommended" sway config by the SIG?
On 5/9/21 7:50 PM, Sampson Fung wrote:
Thank you very much for the hard works. I find sway very usable even with a 10 years old notebook with only 2GB of memory.
My objective is trying to enable Chinese Input Method "cangjie" (for the default terminal and for Firefox) using Internet Searchable hints while following the default sway config as much as possible (or following the recommended config by the SWAY SIG as close as possible.)
I have no experience with Chinese input methods, but I'll try to answer to the best of my knowledge.
As far as I'm aware, the only IME fully supporting sway is fcitx5; ibus support for input-method-unstable-v2[1] is still WIP with nothing usable at the moment. fcitx5 seems to have "cangjie" data available via `fcitx5-chinese-addons` and `libime-data` packages. `fcitx5-rime` could be an alternative configuration, but it'll take more manual steps as we don't provide `rime-cangjie` dictionaries in Fedora. I'm really out of my depth here, so if you have questions on configuring the specific input method I suggest to reach out to Qiyu Yan (@yanqiyu), the maintainer of fcitx5 packages in Fedora.
Now, onto the sway specific instructions.
You'll need sway 1.6 and fcitx5-5.0.8 from updates-testing[2]. You can start IME service with `exec fcitx5` command in the sway configuration file. The tricky part is getting apps to use IME. You need to ensure that all the following variables are set before you launch sway:
INPUT_METHOD=fcitx GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx XMODIFIERS=@im=fcitx
You've mentioned that you run sway from a console session, so adding these to the shell config (.bashrc, .zshrc, etc.) should be sufficient. That would also work with `sddm` display manager (but doesn't work with `gdm`). I'll stop here, since the topic of setting sway environment is complicated and writing the document on that is on my TODO list.
I will start with Fedora 34 Workstation, and replicate to Silverblue 34.
Currently, what I have done is:
sudo systemctl set-default multi-user.target sudo dnf install sway
After login in Console, I just run manually run sway
Q1. What is the preferred way to start testing sway? (with systemd integration)
Just make sure that `sway-systemd` is installed (it's a recommended dependency of `sway` package so it's there if you haven't disabled weak dependencies) and the configuration files from `/etc/sway/config.d/*` are sourced. There's no preferred way to start sway; either running it from the console or using display manager is supported.
Q2. Where can I find the "recommended" sway config by the SIG?
There's an upstream configuration file installed at `/etc/sway/config` and the only change we apply is to change background image to the Fedora defaults. There's also a couple of config snippets in the `/etc/sway/config.d` directory provided via `sway-systemd` package, and that's the full extent of our customizations.
[1]: https://github.com/ibus/ibus/issues/2182 [2]: https://bodhi.fedoraproject.org/updates/FEDORA-2021-7798845ee1