[SOLVED] How to fix :"plymouth-start.service ... KillMode=none ... This is unsafe" Error?

D

Deleted member 143446

Guest
I found an error in dmesg :
/lib/systemd/system/plymouth-start.service:16: Unit configured to use KillMode=none. This is unsafe, as it disables systemd's process lifecycle management for the service. Please update your service to use a safer KillMode=, such as 'mixed' or 'control-group'. Support for KillMode=none is deprecated and will eventually be removed.
Does anybody know how can I fix it? I found similar issue but İ do not understand how can I apply
... if you are looking for a quick fix: use KillMode=mixed...
Thanks.
 


This is what mine looks like.

[Unit]
Description=Show Plymouth Boot Screen
DefaultDependencies=no
Wants=systemd-ask-password-plymouth.path systemd-vconsole-setup.service
After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
Before=systemd-ask-password-plymouth.service
ConditionKernelCommandLine=!plymouth.enable=0
ConditionVirtualization=!container
IgnoreOnIsolate=true

[Service]
ExecStart=/usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
ExecStartPost=-/usr/bin/plymouth show-splash
Type=forking
RemainAfterExit=yes
KillMode=mixed
SendSIGKILL=no
 
You can see what yours looks like using this command.

systemctl cat plymouth-start
 
Mine was :

$ systemctl cat plymouth-start
# /lib/systemd/system/plymouth-start.service
[Unit]
Description=Show Plymouth Boot Screen
DefaultDependencies=no
Wants=systemd-ask-password-plymouth.path
After=systemd-udev-trigger.service systemd-udevd.service keyboard-setup.service
Before=systemd-ask-password-plymouth.service
ConditionKernelCommandLine=!plymouth.enable=0
ConditionKernelCommandLine=!nosplash
ConditionVirtualization=!container

[Service]
ExecStart=/usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-
to-session
ExecStartPost=-/usr/bin/plymouth show-splash
Type=forking
RemainAfterExit=yes
KillMode=none
SendSIGKILL=no


@dos2unix shall I change it to mixed? How and does this change is safe?
 
You will have to su - to root.
Then edit the /lib/systemd/system/plymouth-start.service file
With pluma, nano, or vi. (whatever you're comfortable with)
Change the second to the last line from...
KillMode=none
to
KillMode=mixed

save the file. Reboot.
 
The better option would be to create a drop in file under /etc/systemd/system/plymouth-start.service.d/00-dropin.conf and then add the option you want to change you might have to do the whole configuration with the specific option you want changed. This because the location /lib/systemd/system/plymouth-start.service will probably be overwritten if the package for that service file is updated.
 
Thanks @dos2unix and @f33dm3bits.
I checked but I could not find a folder /etc/systemd/system/plymouth-start.service.d. Is it safe to create a folder too? Do I have to create it with root priviliges or user priviliges, which one?
f33dm3bits wrote :
This because the location /lib/systemd/system/plymouth-start.service will probably be overwritten if the package for that service file is updated.
Does that means that fles under /etc/ wont update when package is updated? Thanks.
 
You have to create this folder
1. Create folder: mkdir /etc/systemd/system/plymouth-start.service.d
2. Create file: touch /etc/systemd/system/plymouth-start.service.d/00-dropin.conf
3. Then Edit that file with your custom settings.
 
@f33dm3bits , to make it permanent, I first tried your solution, create both folder and file but nothing changed, error remained after reboot.
@dos2unix , I just tried your above solution and write "mixed" replacing "none" and it worked, after reboot, error dissapeared but this time new error appeared :

Code:
[   13.467193] systemd[1]: plymouth-start.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
[   13.694137] systemd[1]: plymouth-start.service: Cannot add dependency job, ignoring: Unit plymouth-start.service has a bad unit file setting.

Does it due to the configuration file in /etc/.. folder last I created? Or what is the new problem? Thanks.
 
I forgot the the fourth step, which is you have to reload the unit files.
4. systemctl daemon-reload
If that doesn't work maybe @dos2unix has some more ideas.

I'm running Fedora.
systemctl status plymouth-start.service
● plymouth-start.service - Show Plymouth Boot Screen
Loaded: loaded (/usr/lib/systemd/system/plymouth-start.service; static)
Active: active (exited) since Fri 2022-07-22 09:17:51 CEST; 4h 54min ago
Main PID: 531 (code=exited, status=0/SUCCESS)
CPU: 2.678s

Jul 22 09:17:51 fedora systemd[1]: Starting plymouth-start.service - Show Plymouth Boot Screen...
Jul 22 09:17:51 fedora systemd[1]: Started plymouth-start.service - Show Plymouth Boot Screen.

cat /lib/systemd/system/plymouth-start.service
[Unit]
Description=Show Plymouth Boot Screen
DefaultDependencies=no
Wants=systemd-ask-password-plymouth.path systemd-vconsole-setup.service
After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
Before=systemd-ask-password-plymouth.service
ConditionKernelCommandLine=!plymouth.enable=0
ConditionVirtualization=!container
IgnoreOnIsolate=true

[Service]
ExecStart=/usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
ExecStartPost=-/usr/bin/plymouth show-splash
Type=forking
RemainAfterExit=yes
KillMode=mixed
SendSIGKILL=no

Working just fine here so it might be a bug?
 
Last edited:
@f33dm3bits , I used "reload" command and after reboot it says :

Code:
[    5.624627] random: plymouthd: uninitialized urandom read (8 bytes read)
[    5.626067] random: plymouthd: uninitialized urandom read (8 bytes read)

I think it iwas a kind of bug of Debian in Debian bug page :

Ben,

even though X is not involved, you are right on the money about this
being caused by waiting for random bits. This is a kernel bug caused by
urandom blocking when it should not. I will merge the issues when I have
my final patch ready.

You can see the "random: plymouthd: uninitialized urandom read" warning
in my screen photo:
https://bugs.debian.org/cgi-bin/bug...97572;filename=img_20180504_120059.jpg;msg=37
Although they said that, in "Confirmed fixed in 0.9.3-3"( I think it is a kernel version, but not sure what it is), I see it. Then I decided to make previous change to back and use "control-group" option... I will send the result here after reboot.
 
Ok, I used control-group option and reload daemon but nothing changed, system is continuing giving the "uninitialized urandom read" error for only plymouth service, not for any other ones.
 
Last edited by a moderator:
By the way, I wrote :
Although they said that, in "Confirmed fixed in 0.9.3-3"( I think it is a kernel version, but not sure what it is), I see it. Then I decided to make previous change to back and use "control-group" option... I will send the result here after reboot.
That was plymouth's own version. As I said before, I have 0.9.5-3 version of it.
 
Does the plymouth error shown in dmesg output involve any dysfunction of the system? My debian systems run fine with plymouth purged entirely from user space.

In any case, the resolution of the issue appears to be in Lennart Poettering's post in the link supplied in the first post in this thread.
 
Last edited:
I just installed a vm with Debian 11 and I got the same message in dmesg from plymouth-start(also plymouth 0.9.5-3), I tried to dropin method as I suggested to you which didn't work for me either. Then I changed it directly in the file /usr/lib/systemd/system/plymouth-start.service and rebooted, after that the message didn't appear in dmesg anymore. Thinking about it shouldn't be a problem to change in the original file directly because eventually the Debian developers will make that change and since it's already being used in Fedora so probably other distributions as well.
 
Last edited:
Then I changed it directly in the file /usr/lib/systemd/system/plymouth-start.service and rebooted, after that the message didn't appear in dmesg anymore.
@f33dm3bits , I am back, sorry for late answer. I saw the above comment and I looked what was written in my file there :

$ cat /usr/lib/systemd/system/plymouth-start.service
[Unit]
Description=Show Plymouth Boot Screen
DefaultDependencies=no
Wants=systemd-ask-password-plymouth.path
After=systemd-udev-trigger.service systemd-udevd.service keyboard-setup.service
Before=systemd-ask-password-plymouth.service
ConditionKernelCommandLine=!plymouth.enable=0
ConditionKernelCommandLine=!nosplash
ConditionVirtualization=!container

[Service]
ExecStart=/usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
ExecStartPost=-/usr/bin/plymouth show-splash
Type=forking
RemainAfterExit=yes
KillMode=control-group
SendSIGKILL=no


It was the same in : /lib/systemd/system/plymouth-start.service
However, I am a little bit, which one is the original one? I think I understood "hard" & "soft" links but I could not understand what is going on there? Because, I checked the files in both /usr/lib and /lib but, it looked like that they are the same! They changed in the same time(exactly), and they have the same permission properties etc.

In that situation, I will try to change the file directly from /usr/lib/... folder. and I will again reply the result here.

@osprey thanks for contribution. In summary, I tried the answers in the link, but none of them worked(neither mixed nor control-group). And new error appeared.
 
In that situation, I will try to change the file directly from /usr/lib/... folder. and I will again reply the result here.
lib is a symlink to usr/lib so it's the same file.
Code:
lrwxrwxrwx   1 root root     7 Jul 23 08:21 lib -> usr/lib
Killmode original was set to "none" before I changed it in the file /usr/lib/systemd/system/plymouth-start.service.
 
@f33dm3bits , by the way I provide my deepest thanks yo you because of your dedication level to help people "...I just installed a vm with Debian 11...".

In order to prevent misunderstandings, my last error continues i.e ""uninitialized urandom read", not the original one.

So, I changed the original file in the /usr/lib/... "KillMode=control-group" but nothing changed. Maybe "mixed" worked for you, I will try that ASAP(when there is a two alternative or more, situations sometimes become like a puzzle game :p )

Also one last question arise in my mind, although it does not say "misconfigured file" error do your file have a blank last line at the end? What I learned from Linux environment is that, such things can become a big source of trouble for users(i.e unintentioned spaces, new lines etc.) Mine has a blank new line and I can not prevent the editor put that.

By the way: this is the plymouth file in my /lib/.. .folder :

$ ls -la /lib/systemd/system/plymouth-start.service
-rw-r--r-- 1 root root 570 Tem 23 17:17 /lib/systemd/system/plymouth-start.service


There is no "l" letter in front of mine! Why mine is not link but yours? Did I broke something while editing? Is it possible? Also mine does not have the same permissions as yours, yours have 777 mine has 570. (Why?)x2
 
Also one last question arise in my mind, although it does not say "misconfigured file" error do your file have a blank last line at the end? What I learned from Linux environment is that, such things can become a big source of trouble for users(i.e unintentioned spaces, new lines etc.) Mine has a blank new line and I can not prevent the editor put that.
This is what my plymouth-start.service looks like in my Debian 11 vm after having edited and it doesn't have a blank line in the end.
Code:
root@debian:~# cat /usr/lib/systemd/system/plymouth-start.service
[Unit]
Description=Show Plymouth Boot Screen
DefaultDependencies=no
Wants=systemd-ask-password-plymouth.path
After=systemd-udev-trigger.service systemd-udevd.service keyboard-setup.service
Before=systemd-ask-password-plymouth.service
ConditionKernelCommandLine=!plymouth.enable=0
ConditionKernelCommandLine=!nosplash
ConditionVirtualization=!container

[Service]
ExecStart=/usr/sbin/plymouthd --mode=boot --pid-file=/run/plymouth/pid --attach-to-session
ExecStartPost=-/usr/bin/plymouth show-splash
Type=forking
RemainAfterExit=yes
KillMode=mixed
SendSIGKILL=no
What you can do to remove the blank line is the following.
1. Open file with vim: vim /usr/lib/systemd/system/plymouth-start.service
2. Go down the blank line using the arrow keys
3. When you are on the blank line with the cursor delete it by pressing: dd (That's d twice)"
4. Save the file by pressing: :wq

What Debian version are you running I was actually assuming Debian 11 since you have the same version of plymouth installed and same kernel(5.10.x)? Can you share the output of the following?
Code:
 ls -l /
 
Last edited:

Members online


Top