Ec_sys kernel parameter not being enabled

I am using the following lines of code to load and set the kernel param for ec_sys module.

 boot.kernelPackages = pkgs.linuxPackages_latest;
  boot.kernelParams = [
    "nvidia_drm.fbdev=1" "nvidia-drm.modeset=1" "ec_sys.write_support=1"
  ];

It is loaded successfully as shown by the output

lsmod | grep "ec_sys"
ec_sys                 12288  0

But it doesnt have any params set as sudo sysctl -a | grep ec_sys is giving no output, Also the program I am using (MControlCenter) that requires write support isnt able to load the module.
Someone please help me troubleshoot this issue.
TIA :smiley:

Are you certain that you have rebooted into the correct configuration?

yes, I have booted in the correct configuration.

Hrm… perhaps confirm that the ec_sys module really takes the write_support argument?

Do you have MControlCenter installed via home-manager as a user package or via default nixos config as a global package? I had the same problem, and after working on it a lot, it turned out that I just had to install it as a global package. I also installed the msi-ec package as stated in the official repo of MControlCenter, that also might help you. Also, if you wanna check whether write_support is enabled, then you should check the content of /sys/module/ec_sys/parameters/write_support. In my case, it shows the following:

❯ < /sys/module/ec_sys/parameters/write_support
Y

I hope this helps.

Thanks mate!
It works after I installed it as a global package :smiley: