sway icon indicating copy to clipboard operation
sway copied to clipboard

"Failed to roundtrip with the compositor" when output command is used twice

Open danieledagnelli opened this issue 4 years ago • 13 comments
trafficstars

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

danieledagnelli avatar Nov 06 '21 12:11 danieledagnelli

What Wayland compositor are you using?

emersion avatar Nov 06 '21 13:11 emersion

Sway (on Manjaro)

 > sway --version
sway version 1.6.1

danieledagnelli avatar Nov 06 '21 16:11 danieledagnelli

Same here on Arch Linux, Sway 1.7

pescepalla avatar Jan 27 '22 18:01 pescepalla

[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

mstoeckl avatar Jan 29 '22 16:01 mstoeckl

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/swaybg with 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.jpg results 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 000000 results 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.

pescepalla avatar Jan 29 '22 17:01 pescepalla

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'.

mstoeckl avatar Jan 29 '22 17:01 mstoeckl

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?

pescepalla avatar Jan 29 '22 18:01 pescepalla

[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

mstoeckl avatar Jan 29 '22 19:01 mstoeckl

Thanks. It now reads: 2022-01-30 15:34:00 - [main.c:577] Failed to roundtrip with the compositor

pescepalla avatar Jan 30 '22 14:01 pescepalla

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.

mstoeckl avatar Jan 30 '22 15:01 mstoeckl

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.

pescepalla avatar Jan 30 '22 15:01 pescepalla

a0e86d8071c00dd9fe6117556992fe6d6e787e5a should print a less confusing error message.

emersion avatar Mar 10 '22 09:03 emersion

Transferred to Sway.

emersion avatar Jun 03 '22 14:06 emersion