nbfc-linux icon indicating copy to clipboard operation
nbfc-linux copied to clipboard

Can't find kernel modules in guix

Open florhizome opened this issue 2 years ago • 1 comments

Hello, I made a package for myself to use this service with GNU Guix as a system. Thanks for your work since I recently have a more esoteric laptop (ASUS Expertbook B5 flip) and there are not services linke I had available for my previous thinkpad :) It should be somewhat similar to nix, but Guix uses GNU Guile, a scheme dialect for configuration and the GNU shepherd as init. In my shepherd service i so far just try to start nbfc_service and append a generated config file with the NoteBookModelID, kind of what you suggest for nix. This is grepped from the logs

Sep 4 14:48:11 localhost shepherd[1]: Service nbfc-linux-daemon has been started. Sep 4 14:48:11 localhost shepherd[1]: [nbfc_service] Using 'HP Spectre x360 Convertible 13-ae0xx' as model config Sep 4 14:48:11 localhost shepherd[1]: [nbfc_service] Using 'ECSysLinux' as EmbeddedControllerType Sep 4 14:48:11 localhost shepherd[1]: [nbfc_service] modprobe: FATAL: Module ec_sys not found in directory /lib/modules/5.19.5 Sep 4 14:48:11 localhost shepherd[1]: [nbfc_service] Could not load ec_sys' kernel module Sep 4 14:48:11 localhost shepherd[1]: Service nbfc-linux-daemon (PID 19010) exited with 3. Sep 4 14:48:11 localhost shepherd[1]: Service nbfc-linux-daemon has been disabled. `

guix installs its kernel modules under /run/current-system/kernel so it comes with no surprise if nbfc looks under /lib... loading ec_sys manually and restarting does not help. this is the first program where I experience this error, normal modprobe works ofc. Maybe there could be a make flag to set the Kernel module path?

florhizome avatar Sep 04 '22 13:09 florhizome

I am interested in the answer as well.

While I am at it, could you please provide an example of how you use nbfc on Guix @florhizome? I have no idea how to set up the service in my config.scm.

I also have an quite niche device (7") running Guix and someone sent me a nbfc configuration they made for it in another distribution, but I can't find how to import it, since the package you made for Guix seems to only be able to apply profiles that are in /gnu/store/hash-nbfc-linux-version/etc//nbfc/nbfc.json. Or maybe this would clear up when I see how one is supposed to use nbfc and its service on Guix?

{
  "NotebookModel": "GPD Win Mini",
  "Author": "Justin Weiss",
  "EcPollInterval": 5000,
  "ReadWriteWords": false,
  "CriticalTemperature": 85,
  "FanConfigurations": [
    {
      "ReadRegister": 122,
      "WriteRegister": 122,
      "MinSpeedValue": 1,
      "MaxSpeedValue": 244,
      "ResetRequired": true,
      "FanSpeedResetValue": 0,
      "FanDisplayName": "Fan",
      "TemperatureThresholds": [
        {
          "UpThreshold": 30,
          "DownThreshold": 0,
          "FanSpeed": 0.0
        },
        {
          "UpThreshold": 45,
          "DownThreshold": 25,
          "FanSpeed": 30.0
        },
        {
          "UpThreshold": 60,
          "DownThreshold": 40,
          "FanSpeed": 40.0
        },
        {
          "UpThreshold": 70,
          "DownThreshold": 50,
          "FanSpeed": 60.0
        },
        {
          "UpThreshold": 80,
          "DownThreshold": 65,
          "FanSpeed": 80.0
        },
        {
          "UpThreshold": 85,
          "DownThreshold": 75,
          "FanSpeed": 100.0
        }
      ],
      "FanSpeedPercentageOverrides": []
    }
  ],
  "RegisterWriteConfigurations": []
}

Kabouik avatar Dec 22 '23 19:12 Kabouik