Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic - missing wl_subcompositor #210

Open
levone1 opened this issue Dec 21, 2021 · 16 comments
Open

Panic - missing wl_subcompositor #210

levone1 opened this issue Dec 21, 2021 · 16 comments

Comments

@levone1
Copy link

levone1 commented Dec 21, 2021

Anybody here have any thoughts about this - alacritty/alacritty#5709

Thanks

Maybe some way to export wl_subcompositor or run with --wl_subcompositor= or...?

@i509VCB
Copy link
Member

i509VCB commented Dec 21, 2021

In the alacritty issue, I assume by qxdisplay you are referring to this: https://github.com/sailfish-containers/qxdisplay

@levone1
Copy link
Author

levone1 commented Dec 22, 2021

In the alacritty issue, I assume by qxdisplay you are referring to this: https://github.com/sailfish-containers/qxdisplay

yes

@i509VCB
Copy link
Member

i509VCB commented Dec 22, 2021

Could you run wayland-info inside the container and report the output?

Based on the alacritty issue I think might be an issue with qxdisplay, that command should reveal some more information about the situation we have here.

@levone1
Copy link
Author

levone1 commented Dec 22, 2021

QT_WAYLAND_DISABLE_WINDOWDECORATION=1
WAYLAND_DISPLAY=../../display/wayland-container-0
EGL_PLATFORM=wayland
QT_WAYLAND_FORCE_DPI=96> Could you run wayland-info inside the container and report the output?

Based on the alacritty issue I think might be an issue with qxdisplay, that command should reveal some more information about the situation we have here.

Command not found... Also no pkg by that name in repos... I did see a Gitlab source for it. I could try building if helpful ...
env | grep -i wayland
shows
QT_WAYLAND_DISABLE_WINDOWDECORATION=1 WAYLAND_DISPLAY=../../display/wayland-container-0 EGL_PLATFORM=wayland QT_WAYLAND_FORCE_DPI=96

echo $XDG_SESSSION_TYPE
shows
unspecified

@i509VCB
Copy link
Member

i509VCB commented Dec 22, 2021

Well that does show the environment is set, which is expected because alacritty did not fail to create the event loop.

The output of wayland-info would help a lot since I need to see what globals the compositor is providing to clients.

It might be under some meta package, wayland-utils for example in arch packages repo. You might also have weston-info which is pretty much the same package in your package repositories?

@levone1
Copy link
Author

levone1 commented Dec 22, 2021

Well that does show the environment is set, which is expected because alacritty did not fail to create the event loop.

The output of wayland-info would help a lot since I need to see what globals the compositor is providing to clients.

It might be under some meta package, wayland-utils for example in arch packages repo. You might also have weston-info which is pretty much the same package in your package repositories?

weston-info output:
`*** Please use wayland-info instead
*** weston-info is deprecated and will be removed in a future version

interface: 'wl_compositor', version: 3, name: 1
interface: 'wl_data_device_manager', version: 1, name: 2
interface: 'wl_shm', version: 1, name: 3
formats: 'C8 '(0x20203843) 'XR30'(0x30335258) 'AR30'(0x30335241) 'XB30'(0x30334258) 'AB24'(0x34324241) 'XB24'(0x34324258) 'AR12'(0x32315241) 'XR12'(0x32315258) 'RG24'(0x34324752) 'XR15'(0x35315258) RGB565 ARGB8888 XRGB8888 XRGB8888 ARGB8888
interface: 'qt_hardware_integration', version: 1, name: 4
interface: 'android_wlegl', version: 2, name: 5
interface: 'qt_surface_extension', version: 1, name: 6
interface: 'qt_touch_extension', version: 1, name: 7
interface: 'qt_key_extension', version: 2, name: 8
interface: 'wl_seat', version: 3, name: 9
name: (null)
capabilities: pointer keyboard touch
interface: 'wl_shell', version: 1, name: 10
interface: 'wl_output', version: 2, name: 11
x: 0, y: 0, scale: 1,
physical_width: -1 mm, physical_height: -1 mm,
make: '', model: '',
subpixel_orientation: unknown, output_transform: normal,
mode:
width: 1080 px, height: 2160 px, refresh: 60.000 Hz,
flags: current preferred`
Indeed, no wl_subcompositor ... Possible to add?

@i509VCB
Copy link
Member

i509VCB commented Dec 22, 2021

Looking at the qt compositor reference, you might have to take things into your own hands: https://doc.qt.io/qt-5/qtwayland-compositor-qmlmodule.html

There isn't any WaylandSubcompositor type I can easily find but I think some low level interaction can be done to make it work.

Now why does sctk and by proxy winit and alacritty need the subcompositor? sctk uses the subcompositor to draw it's fallback decorations if server side decorations are not present. We don't currently have an option to turn that requirement off.

Not sure if @vberger would want to add another fallback to just not draw the frame if there is no sub-compositor. That is something that would need to go up the chain for winit and there alacritty to update for if it is done.

@elinorbgr
Copy link
Member

elinorbgr commented Dec 22, 2021

I'd like to point that wl_subcompositor is a non-deprecated part of the core Wayland protocol, as such any compliant compositor is expected to support it, and client can rely on it.

@levone1
Copy link
Author

levone1 commented Dec 22, 2021

Looking at the qt compositor reference, you might have to take things into your own hands: https://doc.qt.io/qt-5/qtwayland-compositor-qmlmodule.html

There isn't any WaylandSubcompositor type I can easily find but I think some low level interaction can be done to make it work.

Now why does sctk and by proxy winit and alacritty need the subcompositor? sctk uses the subcompositor to draw it's fallback decorations if server side decorations are not present. We don't currently have an option to turn that requirement off.

Not sure if @vberger would want to add another fallback to just not draw the frame if there is no sub-compositor. That is something that would need to go up the chain for winit and there alacritty to update for if it is done

Looking at the qt compositor reference, you might have to take things into your own hands: https://doc.qt.io/qt-5/qtwayland-compositor-qmlmodule.html

There isn't any WaylandSubcompositor type I can easily find but I think some low level interaction can be done to make it work.

Now why does sctk and by proxy winit and alacritty need the subcompositor? sctk uses the subcompositor to draw it's fallback decorations if server side decorations are not present. We don't currently have an option to turn that requirement off.

Not sure if @vberger would want to add another fallback to just not draw the frame if there is no sub-compositor. That is something that would need to go up the chain for winit and there alacritty to update for if it is done.

Any way to edit source to disable whatever requirement it's looking for? I have attempted to edit environment.rs line 183 (where the panic is called), but not knowledgeable enough, plus I don't think removing the panic will necessarily make it work, or...?

@levone1
Copy link
Author

levone1 commented Dec 22, 2021

@vberger - here is reply from qxcompositor dev - elros34/qxcompositor#2

Anything useful there, as far as maybe making it work?

@elinorbgr
Copy link
Member

Well, if you want to remove the requirement for subsurfaces, you're going to need to significantly change the Window logic in SCTK to remove the fallback decorations, as they are made using subsurfaces.

That'll mean that unless your compositor provides server-side decorations, alacritty build using such a modified SCTK will be undecorated, which may be a problem depending on your environment.

@MarijnS95
Copy link

For completeness gamescope also doesn't expose wl_subcompositor (probably because it always renders a single full-screen window).

In winit it's extremely trivial to just disable Client Side Decorations by making the subcompositor Optional and never initializing the "lazily initialized" Frame (that's either from sctk or sctk_adwaita).

@i509VCB
Copy link
Member

i509VCB commented Dec 11, 2023

For completeness gamescope also doesn't expose wl_subcompositor (probably because it always renders a single full-screen window).

In winit it's extremely trivial to just disable Client Side Decorations by making the subcompositor Optional and never initializing the "lazily initialized" Frame (that's either from sctk or sctk_adwaita).

Does gamescope provide decorations in that case?

@MarijnS95
Copy link

Where would it provide those decorations - outside of the physical screen where they're invisible?

@i509VCB
Copy link
Member

i509VCB commented Dec 11, 2023

Where would it provide those decorations - outside of the physical screen where they're invisible?

More specifically if gamescope isn't fullscreened, does gamescope provide decorations to the host compositor on behalf of the window it is wrapping?

@MarijnS95
Copy link

I am not aware of it providing window borders or forwarding borders of the nested application (via wl_subcompositor...) in the nested-compositor "sandboxing" use-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants