sway
sway copied to clipboard
"Failed to roundtrip with the compositor" when output command is used twice
I get this error:
[main.c:560] Missing a required Wayland interface
on a Raspberry Pi 4 if I insert both the Keyboard and an external HD through the USB.
It is the same error I get if I lack the keyboard altogether. Whilst I think this is a bug in itself, is there a flag that I can put somewhere to ignore this check at boot time?
Thanks
What Wayland compositor are you using?
Sway (on Manjaro)
> sway --version
sway version 1.6.1
Same here on Arch Linux, Sway 1.7
[main.c:560] Missing a required Wayland interface
How are you running swaybg? From a terminal, or is it automatically launched by sway because of an output ... bg .... command, or somehow else?
If this issue still happens when running swaybg from a terminal, try running it as with Wayland protocol debug logging enabled, via WAYLAND_DEBUG=1 swaybg, and post the log output.
Otherwise, if you have time, try building swaybg from the following branch, which has adds a bit more detail to the error message: https://github.com/mstoeckl/swaybg/tree/better-startup-errors
Launching swaybg from the config file. The error does not occur when launching from command line. I'll build swaybg and report back.
Edit:
-
Launching the newly-built
/usr/local/bin/swaybgwith no arguments results in the following message:[main.c:295] Could not find config for output eDP-1 (Unknown 0x046B 0x00000000) -
Launching
/usr/local/bin/swaybg -i image.jpgresults in the following message:[main.c:299] Found config * for output eDP-1 (Unknown 0x046B 0x00000000)but no wallpaper is changed. -
Launching
/usr/local/bin/swaybg -c 000000results in the following messages:2022-01-29 18:18:56 - [main.c:79] 000000 is not a valid color for swaybg. Color should be specified as #rrggbb (no alpha). 2022-01-29 18:18:56 - [main.c:429] Invalid color: 000000 2022-01-29 18:18:56 - [main.c:295] Could not find config for output eDP-1 (Unknown 0x046B 0x00000000)No wallpaper is changed.
What error message is provided when swaybg (that is, the build with more detailed error messages) is run from the config file, in the same way the produced the [main.c:560] Missing a required Wayland interface error?
The other error messages mentioned above are all expected; e.g, you get "Could not find config for output" when swaybg is not given any config options as command line arguments. Regarding "no wallpaper is changed" -- new instances of swaybg display under old instances, so you need to kill the already running instance of swaybg first, to see any difference. Finally, /usr/local/bin/swaybg -c 000000 should be /usr/local/bin/swaybg -c '#000000'.
Okay, I've temporarily linked /usr/bin/swaybg to /usr/local/bin/swaybg so I can run it natively from the config file and not as an exec swaybg ...
I'm still receiving the same messages:
2022-01-29 19:08:29 - [main.c:521] Missing a required Wayland interface
117311
2022-01-29 19:08:30 - [main.c:299] Found config eDP-1 for output eDP-1 (Unknown 0x046B 0x00000000)
...
Should I execute sway with any options to enable further logging?
[main.c:521] Missing a required Wayland interface
Based on the line number in the error message, it looks like you built from the mstoeckl/master branch, not mstoeckl/better-startup-errors . Try downloading from: https://github.com/mstoeckl/swaybg/archive/refs/heads/better-startup-errors.zip
Thanks. It now reads: 2022-01-30 15:34:00 - [main.c:577] Failed to roundtrip with the compositor
2022-01-30 15:34:00 - [main.c:577] Failed to roundtrip with the compositor
This implies that swaybg is connecting to something, but the connection is broken before it can do anything. Unfortunately, I'm not sure what would cause this.
Should I execute sway with any options to enable further logging?
Yes, maybe record the process of starting sway with the --debug command line flag? Also, post your config file.
-- Edit: I forgot to ask whether swaybg actually ends up showing a background.
Edit: I can reproduce the error message with the following config file:
output '*' bg test.jpg fill
output '*' bg test.jpg fill
It looks like, whenever there are multiple output .... bg lines in a config, a new instance of swaybg is launched for each one, and the old instance disconnected. If this happens quickly enough, the old instance fails while it is setting up and produces the "Failed to roundtrip with the compositor" error message.
exec sway -d 2> sway.log: sway.log
The "theme" part of my config calling the wallpapers:
output eDP-1 bg /home/alessandro/Pictures/wallpapers/laptop/.bg-edp-1 fill
output HDMI-A-1 bg /home/alessandro/Pictures/wallpapers/laptop/.bg-hdmi-a-1 fill
# font
font pango:DroidSansMono, FontAwesome5Free 10
# borders
#for_window [app_id=".*"] border none
#titlebar_padding
titlebar_border_thickness 0
titlebar_padding 2
Yes, the background shows normally and yes I also call bg twice, once for my main and once for my secondary screen.
a0e86d8071c00dd9fe6117556992fe6d6e787e5a should print a less confusing error message.
Transferred to Sway.