F44 Kernel update gives systemd-sysctl.service error

Hi, I’m running Fedora44 cinnamon spin; since updating to kernel 7.1.3-200 I get a momentary warning flash on the screen saying:

Failed to start systemd-sysctl.service - Apply Kernel Variables.

This occurs on startup and shutdown.

Running

$ sudo dmesg -l emerg,alert,crit,err

gives the following:

[    0.131457] virt/tdx: TDX not supported by the host platform
[    1.021610] systemd[1]: Failed to start systemd-sysctl.service - Apply Kernel Variables.
[    2.385579] nouveau 0000:01:00.0: drm: failed to create ce channel, -22
[    9.327683] systemd[1]: Failed to start systemd-sysctl.service - Apply Kernel Variables.
[   25.351347] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Index (0x000000050) is beyond end of object (length 0x50) (20251212/exoparg2-393)
[   25.351358] ACPI Error: Aborting method \_SB.WMID.WQBE due to previous error (AE_AML_BUFFER_LIMIT) (20251212/psparse-529)
[   25.352942] ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [D008] at bit offset/length 128/8 exceeds size of target Buffer (128 bits) (20251212/dsopcode-198)
[   25.352947] ACPI Error: Aborting method \HWMC due to previous error (AE_AML_BUFFER_LIMIT) (20251212/psparse-529)
[   25.352962] ACPI Error: Aborting method \_SB.WMID.WMAA due to previous error (AE_AML_BUFFER_LIMIT) (20251212/psparse-529)
[   26.634824] Bluetooth: hci0: BCM: firmware Patch file not found, tried:
[   26.634829] Bluetooth: hci0: BCM: 'brcm/BCM43142A0-0a5c-216c.hcd'
[   26.634830] Bluetooth: hci0: BCM: 'brcm/BCM-0a5c-216c.hcd'
[   28.667518] Bluetooth: hci0: Opcode 0x1003 failed: -110
[   28.667524] Bluetooth: hci0: command 0x1003 tx timeout

I don’t think that the bios errors can be fixed because it is too old (2014?) and I’ve disabled Bluetooth. But I don’t know what to do about the systemd-sysctl.service error. If I startup in an earlier kernel the message no longer appears.

The only other error message is one that has occurred since kernel 6: Weston has been killed by SIGSEGV. It hasn’t appeared to have any impact on running but I thought I’d mention it in the hope it may provide some clues.

I’d be grateful if someone can provide an answer for the systemd-sysctl.service error. Thank you.

Check the journal to see if you get any more detail on the failure:

sudo journalctl -u systemd-sysctl.service -b

You can also check which settings the service is trying to apply by running:

/usr/lib/systemd/systemd-sysctl --tldr

Swap --tldr for --cat-config to get the same output with all of the explanatory comments as well, but that’s a much larger output.

You could also run the command in strict mode (without sudo!), which will try and change settings back to those that would be set at start up. Running it without sudo will generate permission denied errors, so you can see what hasn’t yet been set successfully, but it may also show entries that another program/service has deliberately changed after startup:

/usr/lib/systemd/systemd-sysctl --strict

Hi Thomas,
Thanks for your prompt helpful response.

sudo journalctl -u systemd-sysctl.service -b

returned:

Jul 09 08:14:30 Desktop systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables...
Jul 09 08:14:30 Desktop systemd[1]: systemd-sysctl.service: Main process exited, code=exited, status=1/FAILURE
Jul 09 08:14:30 Desktop systemd[1]: systemd-sysctl.service: Failed with result 'exit-code'.
Jul 09 08:14:30 Desktop systemd[1]: Failed to start systemd-sysctl.service - Apply Kernel Variables.
Jul 09 08:14:31 Desktop systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables...
Jul 09 08:14:31 Desktop systemd[1]: systemd-sysctl.service: Main process exited, code=exited, status=1/FAILURE
Jul 09 08:14:31 Desktop systemd[1]: systemd-sysctl.service: Failed with result 'exit-code'.
Jul 09 08:14:31 Desktop systemd[1]: Failed to start systemd-sysctl.service - Apply Kernel Variables.

/usr/lib/systemd/systemd-sysctl --tldr

returned:

# /usr/lib/sysctl.d/10-default-yama-scope.conf
kernel.yama.ptrace_scope = 0

# /usr/lib/sysctl.d/10-map-count.conf
vm.max_map_count=1048576

# /usr/lib/sysctl.d/50-coredump.conf
kernel.core_pattern=|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %d %F
kernel.core_pipe_limit=16
fs.suid_dumpable=2

# /usr/lib/sysctl.d/50-default.conf
kernel.sysrq = 16
kernel.core_uses_pid = 1
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.*.rp_filter = 2
-net.ipv4.conf.all.rp_filter
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.*.accept_source_route = 0
-net.ipv4.conf.all.accept_source_route
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.*.promote_secondaries = 1
-net.ipv4.conf.all.promote_secondaries
-net.ipv4.ping_group_range = 0 2147483647
-net.core.default_qdisc = fq_codel
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
fs.protected_regular = 1
fs.protected_fifos = 1

# /usr/lib/sysctl.d/50-libkcapi-optmem_max.conf
net.core.optmem_max = 81920

# /usr/lib/sysctl.d/50-libreswan.conf
net.ipv6.conf.default.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0

# /usr/lib/sysctl.d/50-pid-max.conf
kernel.pid_max = 4194304

# /etc/sysctl.d/99-cfg-hardening.conf
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.forwarding = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
lines 1-50
/usr/lib/systemd/systemd-sysctl --cat-config

returned:

/usr/lib/sysctl.d/10-default-yama-scope.conf
# When yama is enabled in the kernel it might be used to filter any user
# space access which requires PTRACE_MODE_ATTACH like ptrace attach, access
# to /proc/PID/{mem,personality,stack,syscall}, and the syscalls
# process_vm_readv and process_vm_writev which are used for interprocess
# services, communication and introspection (like synchronisation, signaling,
# debugging, tracing and profiling) of processes.
#
# Usage of ptrace attach is restricted by normal user permissions. Normal
# unprivileged processes cannot interact through ptrace with processes
# that they cannot send signals to or processes that are running set-uid
# or set-gid.
#
# yama ptrace scope can be used to reduce these permissions even more.
# This should normally not be done because it will break various programs
# relying on the default ptrace security restrictions. But can be used
# if you don't have any other way to separate processes in their own
# domains. A different way to restrict ptrace is to set the selinux
# deny_ptrace boolean. Both mechanisms will break some programs relying
# on the ptrace system call and might force users to elevate their
# privileges to root to do their work.
#
# For more information see Documentation/security/Yama.txt in the kernel

/usr/lib/systemd/systemd-sysctl --strict

returned:

/etc/sysctl.d/99-cfg-hardening.conf:50: Line is not an assignment, ignoring: EOF
Couldn't write '3 3 3 3' to 'kernel/printk': Permission denied
Couldn't write '2' to 'net/core/bpf_jit_harden': Permission denied

I tried to improve security by hardening the internet settings as much as possible based on the kernel systctl section in this guide: Harden Fedora 44 for Desktop and Server: Complete Guide | ComputingForGeeks
and the CIS workstation L1 guide. I have very good reasons for wanting to do this. It worked for the earlier kernels so what do you suggest is the best way to resolve it?
Thank you
Cheers
John

The Permission denied is because you need to be root to run this command:
run as

sudo /usr/lib/systemd/systemd-sysctl --strict

The broken config is from this

/etc/sysctl.d/99-cfg-hardening.conf:50: Line is not an assignment, ignoring: EOF

What is in that file at line 50?

Looking at those instructions, the text “EOF” at the end of the file shouldn’t be there. Delete that line from the file and I expect that you’ll stop getting the error message.


That was deliberate. If you run it without root, then you get a permission denied line for anything that currently has a different value to the one set in config - although in this case those lines aren’t particularly helpful.

Thank you, Thomas and Barry.
I’ve tried removing EOF from the /etc/sysctl.d/99-cfg-hardening.conf:50 but there was no change in error messages.

I then took the computer back to an earlier ‘Snapper’ snapshot and even though the Grub menu showed kernel 7.1.3-200


when I clicked on it the computer locked up with the following message:

I booted into the earlier Kernel 7.0.14 and ran

$ rpm -q kernel-core

which told me that only kernels 6.19.10 and 7.0.14 were present. I tried reinstalling kernel 7.1.3-200 and got the same result: locked computer and when I could check from kernel 7.0.14 the rpm check again showed no kernel 7.1.3-200.

I ran

journalctl -xb

and the same error messages from my previous post popped up plus some additional ones. I’ve added only those I thought were relevant:

(systemd)[1570]: PAM unable to dlopen(/usr/lib64/security/pam_oddjob_mkhomedir.so): /usr/lib64/security/pam_oddjob_mkhomedir.so: cannot open shared object file: No such file or directory
(systemd)[1570]: PAM adding faulty module: /usr/lib64/security/pam_oddjob_mkhomedir.so

Desktop (udev-worker)[1560]: sr0: Process '/usr/sbin/pktsetup -i -d 11:0' failed with exit code 1.

Desktop dbus-broker-launch[1615]: Service file '/usr/share//dbus-1/services/nemo.FileManager1.service' is not named after the D-Bus name 'org.freedesktop.FileManager1'.
Desktop NetworkManager[877]: <warn>  [1783654721.1190] dns-sd-resolved[674e85a29d01dd0d]: send-updates SetLinkDNS@3 failed: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Invalid DNS server address

Desktop systemd[1]: iscsi.service: Unit cannot be reloaded because it is inactive.

I’m completely bamboozled. The kernel update from 6 to 7 seemed to be fine but to 7.1.3?? Is it just that this computer is too old? It’s an AMI motherboard from 2014.

Thanks for your patience.
Cheers
John