Ah, it seems that the root cause is that with wayland, while $DISPLAY is ":1" in the environment, the display number in the .Xauthority file entries is empty! That's why the $auth->get_by_host call in /usr/share/perl5/X11/Protocol.pm:2310 (which passes "1" from the environment in this case) does not find nor return anything and we get the "Authorization required, but no authorization protocol specified" error.
Marcin

