I have read on arch wiki’s page that you can mask systemd-rfkill when you are using tlp.
Well, I’m not using tlp so would it be alright to mask it anyway?
I am not using tlp but want to mask this service i.e systemd-rfkill
Why would you want to do that?
On my system the service is started at boot and immediately terminated:
# systemctl status systemd-rfkill
* systemd-rfkill.service - Load/Save RF Kill Switch Status
Loaded: loaded (/usr/lib/systemd/system/systemd-rfkill.service; static)
Active: inactive (dead) since Thu 2023-05-04 08:50:57 CEST; 1 day 4h ago
Duration: 5.005s
TriggeredBy: * systemd-rfkill.socket
Docs: man:systemd-rfkill.service(8)
Main PID: 1531 (code=exited, status=0/SUCCESS)
CPU: 3ms
Mai 04 08:50:52 rakete systemd[1]: Starting Load/Save RF Kill Switch Status...
Mai 04 08:50:52 rakete systemd[1]: Started Load/Save RF Kill Switch Status.
Mai 04 08:50:57 rakete systemd[1]: systemd-rfkill.service: Deactivated successfully.
The service can not be disabled:
# systemctl disable systemd-rfkill
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled or disabled using systemctl.
Possible reasons for having this kind of units are:
* A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
* A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
* A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
* In case of template units, the unit is meant to be enabled with some
instance name specified.
But this is not neccessary because it hardly consumes any resources during boot. systemctl blame
says:
4ms systemd-rfkill.service
I would not be concerned about that.
I was going to ask the same thing.
I think you need to disable the socket:
systemd-rfkill.socket - Load/Save RF Kill Switch Status /dev/rfkill Watch
Loaded: loaded (/usr/lib/systemd/system/systemd-rfkill.socket; static)
Active: active (listening) since Fri 2023-05-05 12:43:40 CEST; 1h 1min ago
Triggers: ● systemd-rfkill.service
Docs: man:systemd-rfkill.socket(8)
Listen: /dev/rfkill (Special)
CGroup: /system.slice/systemd-rfkill.socket
May 05 12:43:40 cachyos systemd[1]: Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
I wouldn’t bother either.
No. That does not work either:
# systemctl disable systemd-rfkill.socket
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled or disabled using systemctl.
Possible reasons for having this kind of units are:
* A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
* A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
* A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
* In case of template units, the unit is meant to be enabled with some
instance name specified.
I would suggest to just leave it as it is.
Right. I was mistaken. However you can mask it in order to preventing it from stating:
sudo systemctl mask systemd-rfkill.socket
Created symlink /etc/systemd/system/systemd-rfkill.socket → /dev/null.
But as you said, I wouldn’t bother with it. Better to leave it as is.
I mean if it doesn’t have any use so masking it wouldn’t cause any issues, would it?
I think that’s why arch wiki page about tlp recommends masking it.
Though, I’m not using tlp. Still if I mask it, would it cause any other problems, like are there are any uses for this service or socket?
I think you should read these two pages and decide for yourself:
Better explanation in Archwiki.
Mask it until you need it.