Comments (8)
Ah, I see cage
seems to require a user runtime_dir whereas xorg does not. I need to dig into the manual for cage but we can pass this environment variable to the service just pointing to /tmp
for now it seems. Can you try this on your setup and let me know if everything (audio, video, etc.) is working?
As root add the following line under the [Service] section of /usr/lib/systemd/system/kodi-wayland.service
Environment="XDG_RUNTIME_DIR=/tmp"
from kodi-standalone-service.
Now kodi-wayland starts and sound works fine, but there is this message in the journal:
Dec 16 18:18:26 redacted systemd[1]: Started Kodi standalone (Wayland).
Dec 16 18:18:26 redacted cage[511]: 00:00:00.000 [ERROR] [backend/session/logind.c:665] User has no sessions
Dec 16 18:18:26 redacted cage[511]: 00:00:00.000 [ERROR] [backend/session/logind.c:724] Couldn't find an active session or a greeter session
Dec 16 18:18:29 redacted cage[535]: XDG_RUNTIME_DIR (/tmp) is not owned by us (uid 974), but by uid 0! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
Dec 16 18:18:29 redacted cage[535]: Connection failure: Connection refused
Dec 16 18:18:29 redacted cage[535]: pa_context_connect() failed: Connection refused
Dec 16 18:18:31 redacted cage[543]: XDG_RUNTIME_DIR (/tmp) is not owned by us (uid 974), but by uid 0! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
Edit: I just switched to pipewire-pulse
on my home theater PC where Kodi runs and sound works fine. Now the journal spam is reduced to:
Dec 16 18:22:41 redacted systemd[1]: Started Kodi standalone (Wayland).
Dec 16 18:22:41 redacted cage[511]: 00:00:00.000 [ERROR] [backend/session/logind.c:665] User has no sessions
Dec 16 18:22:41 redacted cage[511]: 00:00:00.000 [ERROR] [backend/session/logind.c:724] Couldn't find an active session or a greeter session
Dec 16 18:22:47 redacted cage[542]: XDG_RUNTIME_DIR (/tmp) is not owned by us (uid 974), but by uid 0! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
from kodi-standalone-service.
I am not a wayland user. Can you explain the pipewire-pulse
comment? As to the journalctl spam, this mess is due to the fact that the service is no longer running as a user process. If it does, when you shutdown your system (different from stopping kodi-wayland.service
, systemd kills the processes without letting kodi write out configuration changes you may have made. It also kills them before kodi can update the systemtotaluptime
in /var/lib/kodi/.kodi/userdata/guisettings.xml
which is also lame.
See my recent commit comments for more but that in a nutshell is why I changed it. kodi-x11.service
has a similar quirk. I am looking into a two service solution that might clean things up for x11 and wayland (gbm is fine as-is). See: https://bbs.archlinux.org/viewtopic.php?id=261763
from kodi-standalone-service.
I understand about the unclean shutdown, I've been following the updates. Thanks for the work you're doing on that. Also, I don't mind the journal spam. As to the issue reported here it seems to be enough to add the XDG_RUNTIME_DIR
variable to the systemd service so this is solved. The warning about /tmp
being owned by a different user is only a warning, though I wonder if there is something more systemd-y that we can do for the service. Perhaps PrivateTmp=yes
?
Regarding the pipewire-pulse
comment: pipewire is a new multimedia server that has reached maturity and it is able to completely replace pulseaudio
with little to no changes in applications that were already using Pulseaudio. Sorry, I assumed you were following that because you're a pretty prolific Linux user. :P
from kodi-standalone-service.
I don't think the PrivateTmp matters, it still spams the journal. I will commit this as a temp fix. Thanks for reporting.
from kodi-standalone-service.
Could also use this, it'll handle creating a runtime dir with the correct permissions.
RuntimeDirectory=kodi
Environment=XDG_RUNTIME_DIR=%t/kodi
It should clean up after the unit is destroyed.
from kodi-standalone-service.
@Ram-Z - Is that in addition or in place of what is currently present?
from kodi-standalone-service.
A bit of both. ;)
Would need to add the RuntimeDirectory
and replace the existing
Environment=XDG_RUNTIME_DIR=/tmp
to point at %t/kodi
.
from kodi-standalone-service.
Related Issues (20)
- Server is already active for display 0 when staring kodi-x11 HOT 7
- Run kodi additionally to the display-manager HOT 1
- kodi-wayland exits but can cause seg fault without data loss HOT 5
- Why is the kodi user now always in the "input" group? HOT 15
- GBM service doesn't work with Kodi 19 beta HOT 1
- kodi-gdm udev permission problems HOT 2
- kodi-wayland encrypted h.264 video streams show as flickering screens dominated by a primary color. HOT 4
- /etc/conf.d/kodi-standalone overwrites existing config HOT 1
- Does not work on raspi os HOT 11
- Environment files start with "-" HOT 4
- ubuntu 20.04 file and folder /etc/sysusers.d/kodi-standalone.conf not found HOT 4
- Cannot mount nfs share HOT 9
- [Help] : Kodi service stops displaying after a while of inactivity. HOT 3
- running this on RaspiOS is easier than README suggests HOT 10
- breaks under systemd_homed HOT 10
- Conflict when using `/dev/tty` in Proxmox LXC HOT 3
- After Kodi upgrade to 21.0, there is no HDMI sound HOT 5
- block by prompt "[sudo] password for kodi" HOT 5
- ERROR: Unable to create GUI. Exiting in kodi-gbm
- No keyboard input using GBM HOT 6
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 kodi-standalone-service.