Comments (8)
Looks like wlroots 0.17 might add the option to disable headless backends at runtime. https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4236
Cage does not compile for me with this version though.
from cage.
Then, kodi crashes and cage exits until systemd stops to restart the unit.
Weird. Is it a Cage issue? Which version have you tried?
from cage.
cage (master) no longer exits when the last monitor is disconnected.
I tried adding a headless output using WLR_HEADLESS_OUTPUT=1 and that works, now everything starts up even if the projector is not on!
I find this surprising, WLR_HEADLESS_OUTPUT=1 is only picked up when only the headless backend is running (without the DRM backend).
from cage.
Sorry for the long delay. A bit more information. I'm on Arch Linux, just updated everything. Kodi is version 20.2-4 and cage is version 0.1.5-1.
When I start it without the beamer attached (no DRM monitor) and without headless I get
Oct 06 18:32:08 htpc (cage)[481]: pam_unix(login:session): session opened for user kodi(uid=972) by kodi(uid=0)
...
Oct 06 18:32:10 htpc cage[504]: terminate called after throwing an instance of 'std::runtime_error'
Oct 06 18:32:11 htpc cage[504]: what(): No outputs received from compositor
...
Oct 06 18:32:11 htpc systemd-coredump[528]: [🡕] Process 504 (kodi.bin) of user 972 dumped core.
Stack trace of thread 504:
#0 0x00007f49c491c83c n/a (libc.so.6 + 0x8e83c)
#1 0x00007f49c48cc668 raise (libc.so.6 + 0x3e668)
#2 0x00007f49c48b44b8 abort (libc.so.6 + 0x264b8)
#3 0x00007f49c409ca6f _ZN9__gnu_cxx27__verbose_terminate_handlerEv (libstdc++.so.6 + 0x9ca6f)
#4 0x00007f49c40b011c _ZN10__cxxabiv111__terminateEPFvvE (libstdc++.so.6 + 0xb011c)
#5 0x00007f49c40b0189 _ZSt9terminatev (libstdc++.so.6 + 0xb0189)
#6 0x00007f49c40b03ed __cxa_throw (libstdc++.so.6 + 0xb03ed)
#7 0x0000557d70cdf7c8 n/a (kodi.bin + 0x7ab7c8)
#8 0x0000557d71bdb404 _ZN4KODI9WINDOWING7WAYLAND27CWinSystemWaylandEGLContext19InitWindowSystemEGLEii (kodi.bin + 0x16a7404)
#9 0x0000557d71bdb4e1 _ZN4KODI9WINDOWING7WAYLAND29CWinSystemWaylandEGLContextGL16InitWindowSystemEv (kodi.bin + 0x16a74e1)
...
Oct 06 18:32:11 htpc systemd[1]: [email protected]: Deactivated successfully.
Oct 06 18:32:11 htpc cage[499]: /usr/bin/kodi: line 181: 504 Aborted (core dumped) ${KODI_BINARY} $SAVED_ARGS
That's probably not very helpful.
So I add
WLR_BACKENDS=headless,drm,libinput
WLR_HEADLESS_OUTPUTS=1
to the environment in which kodi & cage is started.
Then kodi starts fine, but then I also have two outputs once I start the beamer and then Kodi is streched across them :( I think I'll probably just wait for a newer version of cage that links agains the latest wlroots and try again.
from cage.
@maufl
The logs definitely show that Kodi is crashing, not Cage. Apparently, "no output" is not a case managed by Kodi. You could open an issue there to discuss such a choice.
To workaround the issue right now, maybe you could disable the headless output using wlr-randr
or equivalent tool when the DRM output is up.
from cage.
@joggee-fr Sorry if I was not clear in my first post. This exactly what I too think the problem is. Kodi is crashing because there is no monitor, cage exists when Kodi exits. I agree that it would be good to open an issue with Kodi but I don't think that this will be fixed on their side soon, which is why I wanted to search for workarounds.
Disabling the headless output using wlr-randr
doesn't work either, because it seems that wltroots
doesn't support this for headless outputs at all (in the version that cage currently uses). The next version of wlroots
does seem to support it though.
So I'll report it with Kodi and wait for a new cage version and see what comes first.
Since there seems to not exist a workaround for this right now, I'll close this issue again.
from cage.
@maufl
If you open an issue in the Kodi porject, please add a link here just for curiosity.
An other workaround may be to play with output position using wlr-randr
for example. By default, new outputs are added to the right side to create an extended "viewport". If you force the DRM output to be positioned at 0,0 and check size also, it could be good.
from cage.
I found a somewhat ok solution to my problem. I can't find a way to detect when the beamer is turned on and only then start cage+kodi, but I realized I could start cage and then use wlr-randr
to wait for the HDMI display. So now I have small script that is run by cage and which will itself start kodi once the HDMI output is available.
#!/bin/bash
while ! wlr-randr --output HDMI-A-1 2 > /dev/null 2>&1;
do
sleep 1s
done
wlr-randr --output HDMI-A-1 --mode 1920x1080@60
/bin/bash -c "$@"
from cage.
Related Issues (20)
- Matching touch input to rotated screen - how to find my output device name HOT 2
- DRM panel orientation not taken into account HOT 3
- Screen sharing via apps like TeamViewer and AnyDesk, is unattended mode possible in Wayland? HOT 4
- Support wlr-layer-shell as a Backend HOT 1
- Build Fails on wlroots 0.17.2-1 HOT 6
- Cage doesn't seem to auto-activate the client until the first input HOT 5
- Persisting Data HOT 3
- Unable to create wlroots backend HOT 6
- Add an IRC channel for communication
- Cannot launch in X11 session HOT 5
- XDG_RUNTIME_DIR is not set in the environment HOT 6
- Release new version HOT 2
- [QUESTION] Running a second app? HOT 2
- Segfault on SIGTERM leaving the display hanging
- error on raspberr pi os HOT 7
- doesnt build HOT 2
- cage: error while loading shared libraries: libwlroots.so.12: cannot open shared object file: No such file or directory HOT 1
- Has development stopped? HOT 3
- Can't install. HOT 1
- Extra steps for launching cage on boot with systemd
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cage.