Error during `systemd-sysctl.service` startup - Failed to apply Kernel Variables

Error during systemd-sysctl.service startup - Failed to apply Kernel Variables

Message:

Hello everyone,
I’m facing an issue during startup where the following error related to systemd-sysctl.service appears:

× systemd-sysctl.service - Apply Kernel Variables
     Loaded: loaded (/usr/lib/systemd/system/systemd-sysctl.service; static)
     Active: failed (Result: exit-code) since Sun 2025-04-27 19:57:44 AST; 10min ago
   Duration: 1.162s
 Invocation: d11bcaf494614e1f9a2fb505c7921825
       Docs: man:systemd-sysctl.service(8)
             man:sysctl.d(5)
    Process: 441 ExecStart=/usr/lib/systemd/systemd-sysctl (code=exited, status=1/FAILURE)
   Main PID: 441 (code=exited, status=1/FAILURE)
   Mem peak: 2M
        CPU: 12ms

Apr 27 19:57:44 leandrom-hpenvyx36 systemd-sysctl[441]: Failed to read file '/etc/sysctl.d/80-gamecompatibility.conf', ignoring: Is a directory
Apr 27 19:57:44 leandrom-hpenvyx36 systemd[1]: systemd-sysctl.service: Main process exited, code=exited, status=1/FAILURE
Apr 27 19:57:44 leandrom-hpenvyx36 systemd[1]: systemd-sysctl.service: Failed with result 'exit-code'.
Apr 27 19:57:44 leandrom-hpenvyx36 systemd[1]: Failed to start Apply Kernel Variables.

From what I can see, the system is trying to read a file named /etc/sysctl.d/80-gamecompatibility.conf, but it’s being treated as a directory instead of a file, which causes the service to fail.

Steps I’ve tried:

  1. Confirmed that /etc/sysctl.d/80-gamecompatibility.conf is actually an empty directory, likely the source of the error.
  2. Considering renaming or removing the directory and replacing it with a properly formatted file, but I’m unsure what content should go into the file.

Questions:

  • Is it safe to simply delete the directory and replace it with an empty file?
  • What configurations are typically included in similar files to prevent these kinds of errors related to game compatibility?
  • Should I be concerned about any other consequences while resolving this issue?

Any advice or guidance would be greatly appreciated. Thank you in advance!

Yes, in fact it is safe to delete it and not replace it if you want.

/etc/sysctl.d is a directory for drop-in configuration files for the sysctl command. The sysctl command is used to modify kernel parameters at runtime, so adding config files in here can allow you to adjust some aspect of the kernel’s behavior.

My guess would be a directory wound up in here due to following a tutorial or similar, and maybe a command was entered incorrectly or bad advice was given in the tutorial, or something like that. If you aren’t sure what the file is supposed to be, it’s fine to just delete it and not have the drop-in config at all.

Or you could retrace your steps, and try to figure out what the config file was supposed to be. For example, here is an article which advises creating a drop-in with the exact same name:

https://wiki.archlinux.org/title/Gaming#Increase_vm.max_map_count

Increase vm.max_map_count

Having the vm.max_map_count set to a low value can affect the stability and performance of some games. It can therefore be desirable to increase the size permanently by creating the following sysctl config file.

/etc/sysctl.d/80-gamecompatibility.conf
vm.max_map_count = 2147483642

I hope that helps, welcome to the community @CravingDev. :wave:

Thanks.

@CravingDev welcome to our world.
One question out of curoristy, what is the loglevel that is defined in your grub configuration file, i.e. /etc/default/grub. The reason that I ask is that in my Grub file the loglevel is given is 3 and I cannot find in the systemd boot logs that systemd-sysctl is getting executed. I am assuming it is because of the loglevel that I have.

Would appreciate your letting me know what is the log level that you have.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.