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

Could not run kodi container on pure wayland machine via x11docker #166

Closed
kanyck opened this issue Jun 17, 2019 · 15 comments
Closed

Could not run kodi container on pure wayland machine via x11docker #166

kanyck opened this issue Jun 17, 2019 · 15 comments
Labels

Comments

@kanyck
Copy link

kanyck commented Jun 17, 2019

Trying to run kodi via
x11docker -- wayland -- tty --gpu --alsa --homedir /home/docker erichough/kodi
gets
invalid volume specification: '/run/user/1000/:/:rw' invalid mount config for type "bind": destination can't be '/'.
Adding "-v /run/user/1000:/tmp:rw" doesn't help.
XDG_RUNTIME_DIR is manually set and exported on a host machine.
I'm not quite familiar with docker yet so I probably would need some directions...
UPDATE: XDG_RUNTIME_DIR being unset makes the "/:/:rw" instead

x11docker.log at pastebin.com

@mviereck
Copy link
Owner

I've found the issue:
You are setting options --wayland --tty. Run with --wayland but without option --tty.

Option --tty configures x11docker to run without X or Wayland. x11docker should catch the invalid combination --wayland --tty, I'll look into it.

However, kodi fails with:

---> starting Kodi with command: kodi-standalone
Error: /usr/lib/x86_64-linux-gnu/kodi/kodi-gbm not found
Error: /usr/lib/x86_64-linux-gnu/kodi/kodi-gbm not found
Error: /usr/lib/x86_64-linux-gnu/kodi/kodi-gbm not found
/usr/bin/kodi --standalone  has exited in an unclean state 3 times in the last 0 seconds.
Something is probably wrong
---> Kodi does not appear to be running. Exiting.

This should be reported at ehough/docker-kodi#26

x11docker succeeds in a pure Wayland environment with:

x11docker --wayland x11docker/xfce xfce4-terminal
x11docker --wayland --hostwayland x11docker/xfce xfce4-terminal

@kanyck
Copy link
Author

kanyck commented Jun 18, 2019

Oh, I see. I wasn't sure about --tty. However without --tty I get another error

fatal: drm backend should be run using weston-launch binary. or your system should provide the logind D-bus API.
fatal: failed to create compositor backend.

As I stated in another thread it's a fresh install and logind might be misconfigured easily. At least both logind and dbus daemons are running and seats are reported correctly and wayland session starts ok with weston-launch.
Please consider that I'm leaving for about 10 days now and will be out of reach for this time, so I'll be temporarily unable to participate. Thanks for your work, I'll get back to this soon. And please report to ehough/docker-kodi#26, for I get another error and won't be able to track... Thanks again!

@mviereck
Copy link
Owner

mviereck commented Jun 18, 2019

Most systems are configured to be able to run weston without weston-launch.
Your log shows that you are using Void Linux.

A related Debian related ticket sheds some light: https://gitlab.freedesktop.org/wayland/weston/issues/204

Three possible attempts:


EDIT: I've tried the first attempt, it is not possible. x11docker runs the compositor in background (with &), but weston-launch & fails with

weston: weston-launch must be run from a virtual terminal

I've found no way to fool this check.

@kanyck
Copy link
Author

kanyck commented Jun 18, 2019

Thanks for the tips! I'll try to sort it out somehow upon return and inform on the results. At least I've a good test -- if weston would launch in a background from a tty without weston-launch.

@kanyck
Copy link
Author

kanyck commented Jul 3, 2019

@mviereck
FYI: I've reported the issue at Void Linux, but it'll apparently take some time. So I'm on the bench now observing. I could have rebuild weston for Void myself, but I run onto some other Void's downsides so I'm not really sure I gonna proceed with Void. I maybe fiddle with Gentoo/Funtoo as the most flexible solution or just go back to LibreELEC for awhile. Will see though.

@mviereck
Copy link
Owner

mviereck commented Jul 3, 2019

Ok, thanks for reporting back. However, you could still try:

Add your user to group weston-launch if it exists on Void Linux.

I did a test with kodi adding missing Wayland packages and get a different error now: ehough/docker-kodi#26 (comment)
I am not sure how to proceed, the error message isn't that useful.

I think we can close this ticket for now and continue in the docker-kodi ticket.
However, feel free to comment here, the ticket can be reopened.

@mviereck mviereck closed this as completed Jul 3, 2019
@kanyck
Copy link
Author

kanyck commented Jul 3, 2019

The user was in weston-launch group from the very start. AFAIU it allowed the user to start weston-launch but it obviously didn't help with start via weston command. Thank you!

@mviereck
Copy link
Owner

mviereck commented Jul 3, 2019

The user was in weston-launch group from the very start. AFAIU it allowed the user to start weston-launch but it obviously didn't help with start via weston command.

oh, ok. Maybe I misunderstood that. Thanks for the info!

Could you please provide the link to the Void linux bug report? I'd like to look at it, too. Overall Void is an interesting project.

@kanyck
Copy link
Author

kanyck commented Jul 3, 2019

Maybe I misunderstood that

And maybe I did...
Here's the report:
void-linux/void-packages#12754
However I don't expect huge activity on this...

@mviereck mviereck reopened this Jul 3, 2019
@mviereck
Copy link
Owner

mviereck commented Jul 8, 2019

As an alternate attempt you can install Xwayland and run in an already running Wayland session:

x11docker --xwayland --gpu erichough/kodi

or with weston+Xwayland:

x11docker --weston-xwayland --gpu --fullscreen erichough/kodi

However, both attempts use the X backend of kodi and do not fit the desire to run a pure Wayland environment.

@mviereck
Copy link
Owner

I have encircled the issue, however, I don't have an idea why and how to solve.

Executing weston-launch & directly on console works.
But the very same command in a script fails with:
weston-launch: weston-launch must be run from a virtual terminal

@mviereck
Copy link
Owner

I found that I can reproduce the issue with command tty:

$ tty
/dev/pts/0

$ tty &
/dev/pts/0

$ (tty)
/dev/pts/0

$ (tty) &
/dev/pts/0

$ (tty &)
not a terminal

Unfortunately I did not find an explanation or a solution.
I'll close here for now as unresolved.

@kanyck
Copy link
Author

kanyck commented Jul 22, 2019

Well, I believe it's how the unix shell works: creating separated instance on sub-command. If it's the root of the issue, it's unresolvable. So only weston command is probably applicable, not weston-launch. Meanwhile using Xwayland vs. Xorg is completely pointless -- just creating extra entity, that's it.
JFYI: I could not create pure wayland-based environment on my test notebook yet: X11 is pulled in anyway by other package's dependencies. However, having put xwayland disable into sway's config I made X not to run at all. All the apps are working under wayland environment. So yes, creating pure wayland machine is theoretically possible. However it would demand massive ebuild reworking to fine-tune the deps. BTW I used Funtoo for this. Wanted to try it out for some time.
Thanks for your efforts!

@mviereck
Copy link
Owner

mviereck commented Aug 7, 2019

I've encountered a related issue in #176 where tty fails if x11docker is called by another script.
I have changed the shebang of x11docker to run the script interactive (bash -i +H). That seems to make a difference.
x11docker now uses weston-launch if the tty is interactive.
Hopefully it works now.

EDIT: I had to remove the options in the shebang, it is not portable. (#176 (comment))

Workaround: You can run x11docker with bash -i +H -- $(which x11docker), that should help to run weston-launch instead of weston.

EDIT2: This workaround is unreliable due to a bug in bash: #176 (comment)

@mviereck
Copy link
Owner

mviereck commented Aug 8, 2019

I've introduced an experimental option --enforce-i to run bash in interactive mode.
I can successfully run weston-launch in x11docker now. This should work on void linux, too.

However, I am not sure if this setup is entirely stable and reliable. In my test runs it seems to be ok, but I am not aware of all implications.

Another possibility, less recommended, is to source x11docker into the shell with source x11docker [...].

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

No branches or pull requests

2 participants