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

Fedora Support? #24

Open
massatt212 opened this issue May 17, 2023 · 29 comments
Open

Fedora Support? #24

massatt212 opened this issue May 17, 2023 · 29 comments

Comments

@massatt212
Copy link

can you support fedora, i love this program since it works on my rx 6400 compare to amdgpu-fan

@mcgillij
Copy link
Owner

I don't have any fedora boxes to test it out on, however it should be pretty straight forward to pull down the repo and load the systemd.service as long as you have these dependencies installed:

depends=('python' 'python-yaml' 'python-numpy' 'python-rich' 'python-click')

@massatt212
Copy link
Author

Hmm ok

@mcgillij
Copy link
Owner

https://github.com/mcgillij/amdfan/blob/main/src/amdfan/amdfan.service here's the systemd service file, I just have it symlinked to /etc/systemd/system/multi-user.target.wants similar things should work fine in fedora.

@massatt212
Copy link
Author

So basically it's a copy paste job and activate service?

@mcgillij
Copy link
Owner

Yeah, there's nothing special going on here, it's just a python script with a systemd service to start it up.

@l33m4n
Copy link

l33m4n commented May 19, 2023

https://github.com/mcgillij/amdfan/blob/main/src/amdfan/amdfan.service here's the systemd service file, I just have it symlinked to /etc/systemd/system/multi-user.target.wants similar things should work fine in fedora.

This did not work for me. I just had to remake my systemd file so thanks for the great starting point. Perhaps it's because i installed via python. this is my systemd file

GNU nano 7.2 /usr/lib/systemd/system/amdfan.service

[Unit]
Description=amdfan controller
After=multi-user.target
Requires=multi-user.target

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

[Install]
WantedBy=final.target

only slightly different. but works for me

Note: that systemd file was created on Fedora 38 XFCE4 spin, installed via pip. If you'd like to do the same thing on regular Fedora 38 Gnome, it will be (for me)

[Unit]
Description=amdfan controller

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

[Install]
WantedBy=multi-user.target

Again, slightly different, but helpful for users that want a copy+ paste solution.

@mcgillij
Copy link
Owner

https://github.com/mcgillij/amdfan/blob/main/src/amdfan/amdfan.service here's the systemd service file, I just have it symlinked to /etc/systemd/system/multi-user.target.wants similar things should work fine in fedora.

This did not work for me. I just had to remake my systemd file so thanks for the great starting point. Perhaps it's because i installed via python. this is my systemd file

`` ``` GNU nano 7.2 /usr/lib/systemd/system/amdfan.service [Unit] Description=amdfan controller After=multi-user.target Requires=multi-user.target

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

[Install] WantedBy=final.target




only slightly different. but works for me 

idk how im messing up the markdown so badly but i think u guys get it 

Yeah, the paths will be different based on where you installed it/how (if you grabbed it from pypi or github etc).

@l33m4n
Copy link

l33m4n commented May 20, 2023

https://github.com/mcgillij/amdfan/blob/main/src/amdfan/amdfan.service here's the systemd service file, I just have it symlinked to /etc/systemd/system/multi-user.target.wants similar things should work fine in fedora.

This did not work for me. I just had to remake my systemd file so thanks for the great starting point. Perhaps it's because i installed via python. this is my systemd file
`` ``` GNU nano 7.2 /usr/lib/systemd/system/amdfan.service [Unit] Description=amdfan controller After=multi-user.target Requires=multi-user.target
[Service] ExecStart=/usr/local/bin/amdfan --daemon Restart=always
[Install] WantedBy=final.target




only slightly different. but works for me 

idk how im messing up the markdown so badly but i think u guys get it 

Yeah, the paths will be different based on where you installed it/how (if you grabbed it from pypi or github etc).

i gotchya, figured it was good practice to post here for reference of other users.

EDIT: Reference has been updated to include SOME other fedora spins.

@massatt212
Copy link
Author

i cant get it to work at all on fedora

@l33m4n
Copy link

l33m4n commented May 27, 2023

i cant get it to work at all on fedora

What problems are you experiencing with the program not working? Do you have any error messages you can report? I have used this program on Fedora 37-38 Xfce spin, as well as currently Fedora 38.

@massatt212
Copy link
Author

let me reinstall it again, i see u have pip support, how do i install it via pip

@l33m4n
Copy link

l33m4n commented May 27, 2023

let me reinstall it again, i see u have pip support, how do i install it via pip

I know this isn't good practice so I'd like to let mcgillij answer this for you. But I personally run
sudo pip install amdfan
I don't know if this is correct because to my knowledge you shouldn't install pip programs as root. Although amdfan requires root permission. So again, mcgillij's answer will be much better. I just do this because it works for me.

@massatt212
Copy link
Author

× amdfan.service - amdfan controller
Loaded: loaded (/usr/lib/systemd/system/amdfan.service; enabled; preset: d>
Active: failed (Result: exit-code) since Sat 2023-05-27 15:26:16 AST; 2s a>
Duration: 674us
Process: 5862 ExecStart=/usr/bin/amdfan --daemon (code=exited, status=203/E>
Main PID: 5862 (code=exited, status=203/EXEC)
CPU: 729us

May 27 15:26:16 sscstv systemd[1]: amdfan.service: Scheduled restart job, resta>
May 27 15:26:16 sscstv systemd[1]: Stopped amdfan.service - amdfan controller.
May 27 15:26:16 sscstv systemd[1]: amdfan.service: Start request repeated too q>
May 27 15:26:16 sscstv systemd[1]: amdfan.service: Failed with result 'exit-cod>
May 27 15:26:16 sscstv systemd[1]: Failed to start amdfan.service - amdfan cont>
lines 1-13/13 (END)

@l33m4n
Copy link

l33m4n commented May 27, 2023

× amdfan.service - amdfan controller Loaded: loaded (/usr/lib/systemd/system/amdfan.service; enabled; preset: d> Active: failed (Result: exit-code) since Sat 2023-05-27 15:26:16 AST; 2s a> Duration: 674us Process: 5862 ExecStart=/usr/bin/amdfan --daemon (code=exited, status=203/E> Main PID: 5862 (code=exited, status=203/EXEC) CPU: 729us

May 27 15:26:16 sscstv systemd[1]: amdfan.service: Scheduled restart job, resta> May 27 15:26:16 sscstv systemd[1]: Stopped amdfan.service - amdfan controller. May 27 15:26:16 sscstv systemd[1]: amdfan.service: Start request repeated too q> May 27 15:26:16 sscstv systemd[1]: amdfan.service: Failed with result 'exit-cod> May 27 15:26:16 sscstv systemd[1]: Failed to start amdfan.service - amdfan cont> lines 1-13/13 (END)

Can i see ur systemd file pls
/usr/lib/systemd/system/amdfan.service to be exact

That was my problem the other day. The second one I listed is what ended up working for me.

Description=amdfan controller

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

[Install]
WantedBy=multi-user.target 

@massatt212
Copy link
Author

[Unit]
Description=amdfan controller
After=multi-user.target
Requires=multi-user.target

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

[Install]
WantedBy=final.target

@l33m4n
Copy link

l33m4n commented May 27, 2023

[Unit] Description=amdfan controller After=multi-user.target Requires=multi-user.target

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

[Install] WantedBy=final.target

try this and see if it works? If not ur gonna have to wait til the dev can help u.

[Unit]
Description=amdfan controller

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

[Install]
WantedBy=multi-user.target 

@massatt212
Copy link
Author

i think its working, ill go test it soon

@massatt212
Copy link
Author

did not work, getting 80deg on apex, before i was getting 69deg and the fan rpm on 0 when idle

@massatt212
Copy link
Author

[Unit]
Description=amdfan controller

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

[Install]
WantedBy=multi-user.target

only arch pkgs put files in the bin folder

@l33m4n
Copy link

l33m4n commented May 28, 2023

did not work, getting 80deg on apex, before i was getting 69deg and the fan rpm on 0 when idle

I would wait for the dev to reply then.

only arch pkgs put files in the bin folder

whereis amdfan
amdfan: /usr/local/bin/amdfan

@massatt212
Copy link
Author

Ubuntu fedora installs stuff a lil different adds and extra folder usr/local/bin

Arch does usr/bin

@l33m4n
Copy link

l33m4n commented May 28, 2023

Ubuntu fedora installs stuff a lil different adds and extra folder usr/local/bin

Arch does usr/bin

am confused on what u mean by "Ubuntu fedora"

@massatt212
Copy link
Author

Ubuntu and Fedora installs some stuff different from arch.

@mcgillij
Copy link
Owner

mcgillij commented May 29, 2023

you can check if it's running with a systemctl status amdfan, however your service file should point to the correct location where you installed the script. And you can check what it's reporting with amdfan --monitor

image

which amdfan should also output where you installed it, if it's in your $PATH.

@massatt212
Copy link
Author

But u should write a guide on how to install it on other distros

@mcgillij
Copy link
Owner

But u should write a guide on how to install it on other distros

I don't use any other distro's sorry, and I made this package for Arch. Feel free to update the wiki or push up a PR with some docs.

@mcgillij
Copy link
Owner

https://github.com/mcgillij/amdfan/wiki I created the GH wiki, so anyone should be able to update it there.

@l33m4n
Copy link

l33m4n commented Jun 21, 2023

https://github.com/mcgillij/amdfan/wiki I created the GH wiki, so anyone should be able to update it there.

i started adding to it but idk how to pr the wiki changes

edit: aparently u have to add me to the repo?

"You can edit wikis directly on GitHub, or you can edit wiki files locally. By default, only people with write access to your repository can make changes to wikis, although you can allow everyone on GitHub.com to contribute to a wiki in a public repository. For more information, see "Changing access permissions for wikis.""
https://docs.github.com/en/communities/documenting-your-project-with-wikis/about-wikis

@mcgillij
Copy link
Owner

image
should be good to go now

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

3 participants