Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support for AMD Framework 13 #23

Closed
rakaw opened this issue Mar 24, 2024 · 2 comments
Closed

[Feature] Support for AMD Framework 13 #23

rakaw opened this issue Mar 24, 2024 · 2 comments

Comments

@rakaw
Copy link

rakaw commented Mar 24, 2024

Hello,

I have the new FW AMD 13 inch laptop and I checked out the changes made to support AMD here, but it looks like my output for lm_sensors is missing acpitz-acpi-0 that is required for fw-fanctrl.

Here is my sensors -j output:

{
   "mt7921_phy0-pci-0100":{
      "Adapter": "PCI adapter",
      "temp1":{
         "temp1_input": 48.000
      }
   },
   "ucsi_source_psy_USBC000:004-isa-0000":{
      "Adapter": "ISA adapter",
      "in0":{
         "in0_input": 0.000,
         "in0_min": 0.000,
         "in0_max": 0.000
      },
      "curr1":{
         "curr1_input": 0.000,
         "curr1_max": 0.000
      }
   },
   "ucsi_source_psy_USBC000:002-isa-0000":{
      "Adapter": "ISA adapter",
      "in0":{
         "in0_input": 5.000,
         "in0_min": 5.000,
         "in0_max": 5.000
      },
      "curr1":{
         "curr1_input": 0.000,
         "curr1_max": 1.500
      }
   },
   "nvme-pci-0200":{
      "Adapter": "PCI adapter",
      "Composite":{
         "temp1_input": 39.850,
         "temp1_max": 84.850,
         "temp1_min": -0.150,
         "temp1_crit": 94.850,
         "temp1_alarm": 0.000
      },
      "Sensor 1":{
         "temp2_input": 39.850,
         "temp2_max": 65261.850,
         "temp2_min": -273.150
      },
      "Sensor 2":{
         "temp3_input": 41.850,
         "temp3_max": 65261.850,
         "temp3_min": -273.150
      },
      "Sensor 8":{
         "temp9_input": 39.850,
         "temp9_max": 65261.850,
         "temp9_min": -273.150
      }
   },
   "amdgpu-pci-c100":{
      "Adapter": "PCI adapter",
      "vddgfx":{
         "in0_input": 1.284
      },
      "vddnb":{
         "in1_input": 0.806
      },
      "edge":{
         "temp1_input": 45.000
      },
      "PPT":{
         "power1_average": 8.236,
         "power1_input": 23.184
      }
   },
   "k10temp-pci-00c3":{
      "Adapter": "PCI adapter",
      "Tctl":{
         "temp1_input": 47.750
      }
   },
   "ucsi_source_psy_USBC000:003-isa-0000":{
      "Adapter": "ISA adapter",
      "in0":{
         "in0_input": 5.000,
         "in0_min": 5.000,
         "in0_max": 5.000
      },
      "curr1":{
         "curr1_input": 0.000,
         "curr1_max": 1.500
      }
   },
   "ucsi_source_psy_USBC000:001-isa-0000":{
      "Adapter": "ISA adapter",
      "in0":{
         "in0_input": 0.000,
         "in0_min": 0.000,
         "in0_max": 0.000
      },
      "curr1":{
         "curr1_input": 0.410,
         "curr1_max": 0.000
      }
   },
   "BAT1-acpi-0":{
      "Adapter": "ACPI interface",
      "in0":{
         "in0_input": 16.221
      },
      "curr1":{
         "curr1_input": 0.000
      }
   }
}

In fanctrl.py, i tried using k10temp-pci-00c3 instead of acpitz-acpi-0 and it seems to work somewhat. It seems like both the 16 inch and 13 inch AMD laptops both contain k10temp-pci-00c3, would it be possible to add support for this?

Thanks.

Edit:
It does look like k10temp should be the correct sensor reading to use for current Ryzen AMD processors.

https://docs.kernel.org/hwmon/k10temp.html

@TamtamHero
Copy link
Owner

That's curious, I sourced 3 different outputs for lm-sensors -j and all 3 had acpitz-acpi-0. They were 16" models though, maybe the 13 never has it, I don't know.
What is your distribution/kernel btw ?

I made a PR to use k10temp-pci-00c3 automatically as a fallback when acpitz-acpi-0 is not present, can you please try it on your system ?
#24

@rakaw
Copy link
Author

rakaw commented Mar 26, 2024

It works! It looks like the changes you implemented fixed it.

Fan speed is constant and it works according to the profile set in configs, so it looks good to merge to me.

$ ectool pwmgetfanrpm all
Fan 0 RPM: 1585

For reference, i am using Garuda Linux GNOME (based on Arch Linux), and the 6.8.1-zen1-1-zen kernel.

I appreciate your work, this is a great tool, and sorely needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants