mcgillij / amdfan

Updated AMD Fan control utility forked from amdgpu-fan and updated.
https://mcgillij.dev/pages/amdfan.html
GNU General Public License v2.0
33 stars 7 forks source link

works well but does not load fan curve after restart #26

Open bitterhalt opened 1 year ago

bitterhalt commented 1 year ago

I have a small issue or I just do something very wrong. When I set my fan curve and start and enable systemd service everything works as expected. Fan curve stays after login out and suspend but when I restarr my fan uses stock profile.

My confic:

`# [<Temp in C>,<Fanspeed in %>]
speed_matrix:
- [38, 31]
- [50, 32]
- [56, 50]
- [75, 60]
- [85, 68]

# Current Min supported value is 4 due to driver bug
#
# Optional configuration options
#
# Allows for some leeway +/- temp, as to not constantly change fan speed
# threshold: 4
#
# Frequency will change how often we probe for the temp
# frequency: 5
#
# While frequency and threshold are optional, I highly recommend finding
# settings that work for you. I've included the defaults I use above.
#
# cards:
# can be any card returned from `ls /sys/class/drm | grep "^card[[:digit:]]$"`

Is there something with my curve? I used same values in corectrl?

I am using archlinux

I enabled systemd service like this:

systemctl enable amdfan.service
systemctl start amdfan.service

config is in /etc/amdfan.yml

service status before reboot:

 amdfan.service - amdfan controller
     Loaded: loaded (/usr/lib/systemd/system/amdfan.service; enabled; preset: disabled)
     Active: active (running) since Tue 2023-08-08 16:23:15 EEST; 1s ago
   Main PID: 7128 (amdfan)
      Tasks: 1 (limit: 38359)
     Memory: 25.2M
        CPU: 103ms
     CGroup: /system.slice/amdfan.service
             └─7128 /usr/bin/python /usr/bin/amdfan --daemon

service statatus after restart:

○ amdfan.service - amdfan controller
     Loaded: loaded (/usr/lib/systemd/system/amdfan.service; enabled; preset: disabled)
     Active: inactive (dead)
bitterhalt commented 1 year ago

I edited my /usr/lib/systemd/system/amdfan.service like it was in previous build and now it is working fine after reboot:

[Unit]
Description=amdfan controller

[Service]
ExecStart=/usr/bin/amdfan --daemon
Restart=always

[Install]
WantedBy=multi-user.target

If there is any help I am using DWM with lightdm

mcgillij commented 1 year ago

I'm using i3 / lightdm and both configs work, so unless it stops working for more folks I'll probably leave it as is for now.

bitterhalt commented 1 year ago

I'm using i3 / lightdm and both configs work, so unless it stops working for more folks I'll probably leave it as is for now.

I have also i3 installed so I can test does it work there.

bitterhalt commented 1 year ago

I booted in my i3 and fan service started normally with default systemd setting so the problem seems to be somewhere in DWM.

I event tested clean build without any patches and it did not start on DWM until I edited it https://github.com/mcgillij/amdfan/issues/26#issuecomment-1669761467

bitterhalt commented 1 year ago

You can close this if you want since It works for me now. If someone else have problem with DWM can look here.