Why is systemd-logind.service masked? - problems with kodi Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Cyber1000
Posts: 4
Joined: Sun Dec 27, 2020 4:23 am

Why is systemd-logind.service masked? - problems with kodi

Post by Cyber1000 »

I had a problem with following command:

Code: Select all

# dbus-send --print-reply --system --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.CanReboot
Error org.freedesktop.systemd1.UnitMasked: Unit systemd-logind.service is masked.
I don't use this command directly, but kodi on my rpi3 with dietpi seems to do something similar for getting info about shutdown/reboot availability. I asked at kodi-forums: https://forum.kodi.tv/showthread.php?ti ... pid2998375

The solution was this:

Code: Select all

# sudo systemctl unmask systemd-logind.service
Removed /etc/systemd/system/systemd-logind.service.
/etc/systemd/system/systemd-logind.service seemed to link to /dev/null before


Is this dietpi-specific (don't think I had this with raspbian)? What's the background of this and what's the implication of unmasking this (what I did)?

Thanks for your help!
User avatar
Joulinar
Posts: 3154
Joined: Sat Nov 16, 2019 12:49 am

Re: Why is systemd-logind.service masked? - problems with kodi

Post by Joulinar »

Hi,

many thanks for your message. Indeed service systemd-logind is mask by default on DietPi systems. There is an option inside /boot/dietpi.txt to have it unmask during first inital setup/boot

Code: Select all

# Unmask (enable) systemd-logind service (including dbus), which is masked by default on DietPi
AUTO_UNMASK_LOGIND=0
Later on, you would need to use following, if the service is needed.

Code: Select all

systemctl unmask systemd-logind.service
systemctl enable systemd-logind.service
systemctl start systemd-logind.service
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Cyber1000
Posts: 4
Joined: Sun Dec 27, 2020 4:23 am

Re: Why is systemd-logind.service masked? - problems with kodi

Post by Cyber1000 »

Hi,

Thanks for your answer, didn't look in /boot/dietpi.txt (that's quite new to me)
So the service is masked cause dietpi doesn't need it in normal operation and this reduces resources?
User avatar
Joulinar
Posts: 3154
Joined: Sat Nov 16, 2019 12:49 am

Re: Why is systemd-logind.service masked? - problems with kodi

Post by Joulinar »

Cyber1000 wrote: Tue Dec 29, 2020 1:03 pm Hi,

Thanks for your answer, didn't look in /boot/dietpi.txt (that's quite new to me)
So the service is masked cause dietpi doesn't need it in normal operation and this reduces resources?
correct. DietPi is starting with a minimal (diet) setup. If needed it could be unmask and started.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply