by blablubb1234 » Fri Jan 07, 2022 3:29 pm
Hi,
I just installed
Kodi 19.3-3 on a Raspberry Pi 3 Model B Rev 1.2 running an up-to-date ArchLinuxARM.
The
(ArchLinux) wiki article regarding Kodi is of course not ARM-centric, but it states:
$this->bbcode_second_pass_quote('', 'B')e aware that these services run Kodi in systemd's user.slice, not system.slice. In order to have Kodi exit gracefully, initiate system reboot/shutdown with the respective Kodi actions instead of systemctl. Failure to do so will result in an ungraceful exit of Kodi and the loss of GUI settings, Kodi uptime etc.
The kodi.service unit provided in the ARM package of Kodi looks like this:
$this->bbcode_second_pass_code('', 'cat /usr/lib/systemd/system/kodi.service
[Unit]
Description=Kodi standalone (GBM)
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.service mysqld.service
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty1.service
[Service]
User=kodi
Group=kodi
EnvironmentFile=-/etc/conf.d/kodi-standalone
PAMName=login
TTYPath=/dev/tty1
ExecStart=/usr/bin/kodi-standalone
ExecStop=/usr/bin/killall --user kodi --exact --wait kodi.bin
Restart=on-abort
StandardInput=tty
StandardOutput=journal
[Install]
Alias=display-manager.service')
and the the status of the running service looks like this:
$this->bbcode_second_pass_code('', '* kodi.service - Kodi standalone (GBM)
Loaded: loaded (/usr/lib/systemd/system/kodi.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2022-01-06 17:03:26 CET; 20h ago
Main PID: 1072 (kodi-standalone)
Tasks: 0 (limit: 1567)
CPU: 33ms
CGroup: /system.slice/kodi.service
> 1072 /bin/sh /usr/bin/kodi-standalone
Jan 06 17:03:26 kodi systemd[1]: Started Kodi standalone (GBM).
Jan 06 17:03:26 kodi systemd[1072]: pam_systemd_home(login:account): systemd-homed is not available: Unit dbus-org.freede>
Jan 06 17:03:26 kodi systemd[1072]: pam_unix(login:session): session opened for user kodi(uid=1000) by (uid=0)
Jan 06 17:03:26 kodi systemd[1072]: pam_env(login:session): deprecated reading of user environment enabled
Jan 06 18:07:41 kodi kodi-standalone[2598]: Can't open display
Jan 06 20:13:53 kodi kodi-standalone[10105]: Can't open display')
So it seems that for ArchLinux
ARM, the (GBM standalone) service
is running in system.slice and
not in user.slice as it supposedly would on a regular ArchLinux (I can't verify this right now). From within Kodi, using the reboot/shutdown options in the GUI works, the exit option crashes Kodi unfortunately and also deactivates the video output:
$this->bbcode_second_pass_code('', 'x kodi.service - Kodi standalone (GBM)
Loaded: loaded (/usr/lib/systemd/system/kodi.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2022-01-07 13:59:03 CET; 1min 19s ago
Process: 367 ExecStart=/usr/bin/kodi-standalone (code=exited, status=0/SUCCESS)
Process: 492 ExecStop=/usr/bin/killall --user kodi --exact --wait kodi.bin (code=exited, status=1/FAILURE)
Main PID: 367 (code=exited, status=0/SUCCESS)
CPU: 70ms
Jan 07 13:58:27 kodi systemd[1]: Started Kodi standalone (GBM).
Jan 07 13:58:27 kodi systemd[367]: pam_systemd_home(login:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Jan 07 13:58:27 kodi systemd[367]: pam_unix(login:session): session opened for user kodi(uid=1000) by (uid=0)
Jan 07 13:58:27 kodi systemd[367]: pam_env(login:session): deprecated reading of user environment enabled
Jan 07 13:59:03 kodi systemd[492]: pam_systemd_home(login:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Jan 07 13:59:03 kodi systemd[492]: pam_unix(login:session): session opened for user kodi(uid=1000) by (uid=0)
Jan 07 13:59:03 kodi systemd[492]: pam_env(login:session): deprecated reading of user environment enabled
Jan 07 13:59:03 kodi systemd[1]: kodi.service: Control process exited, code=exited, status=1/FAILURE
Jan 07 13:59:03 kodi systemd[1]: kodi.service: Failed with result 'exit-code'.')
So how can I properly stop the kodi.service
$this->bbcode_list('1')
from the CLIfrom the GUI (exit option)having Kodi exit gracefully? I would really like to be able to stop Kodi both from the CLI and from within the GUI and use the Raspberry Pi afterwards without having to reboot inbetween.
Thanks.