Why does Java (XWayland / Weston) resize a Window to 1x1 pixel when HDMI is unplugged (and does not resize back when HDMI is plugged)

Martin Petzold martin.petzold at tavla.de
Thu Jun 8 17:13:39 UTC 2023


Am 08.06.23 um 14:45 schrieb Martin Petzold:
> Hi Pekka,
>
> Am 08.06.23 um 14:37 schrieb Pekka Paalanen:
>> On Thu, 8 Jun 2023 14:21:31 +0200
>> Martin Petzold <martin.petzold at tavla.de> wrote:
>>
>>> I am fixed to this Kernel, will be hard to get Weston 12 running.
>> Hi,
>>
>> why would you say that? Did you try? Or do you mean that building
>> Weston and a few dependencies (not kernel, not Mesa) from source is too
>> much?
>
> We are compiling our own kernel version for embedded i.MX8. Also the 
> Debian is our custom build and we are able to adjust to other packages 
> or compile parts. We know how to do that. However, we are fixed to 
> 5.10.52 for several reasons. And I need to cross-compile Weston then, 
> which is maybe challenging?
>
> I can try to compile on device and test. But which dependencies also 
> need to be compiled then? XWayland? Wayland? Libraries?
>
>>
>> FWIW, when you unplug the last display, leaving none, then there is no
>> display area. Weston does not pretend a fake display, there just is
>> none. I don't know how Xwayland reacts to that, and how that Java suite
>> reacts to what Xwayland does. Those would be something to look into, if
>> Weston upgrade does not help.
> Yes, it must be XWayland. Maybe there is any configuration to fix it?
>>
>> Xwayland might have a fake something when all real displays are gone,
>> and maybe nothing then re-associates your app window from the fake
>> monitor to a real monitor once a real monitor appears again? No idea.
>>
>> Maybe check what xrandr says while you have no displays connected? That
>> might give a clue, assuming the Java stack listens to RandR.
>>
>
Interesting: It changes from XWAYLAND0 to XWAYLAND1 to XWAYLAND2 and 
also if I have it UNPLUGGED the screen is there.

HDMI PLUGGED (on boot)

xrandr --current
Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
XWAYLAND0 connected 1920x1080+0+0 (normal left inverted right x axis y 
axis) 1110mm x 620mm
    1920x1080     59.96*+

HDMI UNPLUGGED

xrandr --current
Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
XWAYLAND1 connected 1920x1080+0+0 (normal left inverted right x axis y 
axis) 1150mm x 650mm
    1920x1080     59.96*+

HDMI RE-PLUGGED

xrandr --current
Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
XWAYLAND2 connected 1920x1080+0+0 (normal left inverted right x axis y 
axis) 1110mm x 620mm
    1920x1080     59.96*+

Thanks,

Martin



More information about the wayland-devel mailing list