Announcement

Collapse
No announcement yet.

5700(XT) cards with custom fan curve on linux via kernel patch + fanctl!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 5700(XT) cards with custom fan curve on linux via kernel patch + fanctl!

    Hey everyone, I don't really know where to post this, but I thought it might be quite useful to people around here, and maybe even Michael.

    Since the default fan curve on the 5700/5700XT is quite bad on the reference cards, I wanted to get a custom fan curve working. It required both a bugfix patch for the kernel/amdgpu, and writing a simple fan controller.

    You can find my kernel patch (should be on amd-staging-drm-next soon) here: https://lists.freedesktop.org/archiv...ly/037735.html. That patch will make the sysfs interface for the fans work.

    My fan controller (fanctl), can be found on GitLab here: https://gitlab.com/mcoffin/fanctl.

    Here is a config file I'm using for a very aggressive fan curve on my 5700 XT. It's loud, but you won't be hurting your card while benchmarking! : https://gitlab.com/snippets/1881771.

    To run the fan controller (as root for proper permissions), use the following command.

    Code:
    fanctl -c /path/to/fanctl.yml
    I hope this helps somebody out. If you have comments on fanctl itself, please let me know, as I'd really like to keep building it out as a way better alternative to fancontrol as I find the configuration interface for fancontrol to be moderately confusing, and hard to use.

    FWIW, I also noticed that to get my card to use the correct power profile mode, I had to do the following:

    Code:
    echo 1 | sudo tee /sys/class/drm/card0/device/pp_power_profile_mode && echo 0 1 | sudo tee /sys/class/drm/card0/device/pp_dpm_sclk
    Changing the power profile mode didn't really seem to impact performance in any meaningful way, but I thought it should be in the correct mode regardless.

    Cheers, and happy hacking,
    codeYeTi/mcoffin

  • attah
    replied
    First off, thanks for your contribution to more tolerable sound levels.
    However, i cant for the life of me figure out what i should put in the config file. Did i miss where the docs for that format are located?
    What does "ty" mean? How do i set another profile than Maximum? Is that even what i should be doing?
    Even if i change the "output" values to 0.1 or even 0.0 the resulting speed is over 2000RPM.

    Edit: Apparently the key is the "ty: Static" entry, which acts as a "minimum" setting, not allowing the curve to go below it. How was i supposed to know?
    Last edited by attah; 10-13-2019, 11:34 AM.

    Leave a comment:


  • RavFX
    replied
    Yes, that was the patch that I did forgot. I saw the commit in the drm next when I was looking for some sdma patchs...

    Now I'm waiting for proper OD support. I did flash the 5700 XT 50th anniversary edition BIOS in my 5700 and it work fine except that it somehow killed IOMMU support (temp don't go over 73ºC at 1980Mhz). Once OD will work I will be able to increase the power limit.

    Leave a comment:


  • mcoffin
    replied
    Originally posted by RavFX View Post

    Good question. I did try to write in all the fanx_enable I could find I could not write in any of them.
    But I don't need anymore as I did add the card on my custom loop.

    amdgpu-pci-0d00
    Adapter: PCI adapter
    vddgfx: +0.78 V
    fan1: 0 RPM (min = 0 RPM, max = 4950 RPM)
    edge: +38.0°C (crit = +118.0°C, hyst = +0.0°C)
    (emerg = +80000.0°C)
    junction: +39.0°C (crit = +80000.0°C, hyst = +0.0°C)
    (emerg = +80000.0°C)
    mem: +44.0°C (crit = +80000.0°C, hyst = +0.0°C)
    (emerg = +80000.0°C)
    power1: 31.00 W (cap = 150.00 W)

    Next step : overclocking, did not have time to look at it yet.
    Hmm, and you did have that kernel patch that I linked installed, yes? If so, that's a bug somewhere, which would be a bummer.

    Leave a comment:


  • RavFX
    replied
    Originally posted by mcoffin View Post

    There shouldn't be any other things necessary, provided you have configured the fanctl.yml file to point at the right filenames for your machine.

    From that output, it looks like fanctl is failing to write "1" to the fanX_enable file. Are you using the PwmFan controller or the AmdgpuFan config in fanctl?
    Good question. I did try to write in all the fanx_enable I could find I could not write in any of them.
    But I don't need anymore as I did add the card on my custom loop.

    amdgpu-pci-0d00
    Adapter: PCI adapter
    vddgfx: +0.78 V
    fan1: 0 RPM (min = 0 RPM, max = 4950 RPM)
    edge: +38.0°C (crit = +118.0°C, hyst = +0.0°C)
    (emerg = +80000.0°C)
    junction: +39.0°C (crit = +80000.0°C, hyst = +0.0°C)
    (emerg = +80000.0°C)
    mem: +44.0°C (crit = +80000.0°C, hyst = +0.0°C)
    (emerg = +80000.0°C)
    power1: 31.00 W (cap = 150.00 W)

    Next step : overclocking, did not have time to look at it yet.

    Leave a comment:


  • mcoffin
    replied
    Originally posted by RavFX View Post
    When I run fanctl I get : [2019-08-08T13:04:49Z ERROR fanctl] Error updating fanctl graph: Error updating fan: Error updating fan (gpu_fan): Invalid argument (os error 22)

    dmesg tell me : [71898.806182] manual fan speed control should be enabled first


    Is there is another switch I have to enable before?
    There shouldn't be any other things necessary, provided you have configured the fanctl.yml file to point at the right filenames for your machine.

    From that output, it looks like fanctl is failing to write "1" to the fanX_enable file. Are you using the PwmFan controller or the AmdgpuFan config in fanctl?

    Leave a comment:


  • RavFX
    replied
    When I run fanctl I get : [2019-08-08T13:04:49Z ERROR fanctl] Error updating fanctl graph: Error updating fan: Error updating fan (gpu_fan): Invalid argument (os error 22)

    dmesg tell me : [71898.806182] manual fan speed control should be enabled first


    Is there is another switch I have to enable before?

    Leave a comment:

Working...
X