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

OSError: [Errno 22] Invalid argument #18

Open
crazy-frag opened this issue Aug 6, 2020 · 6 comments
Open

OSError: [Errno 22] Invalid argument #18

crazy-frag opened this issue Aug 6, 2020 · 6 comments

Comments

@crazy-frag
Copy link

lsb_release -a
#Description: Ubuntu 18.04.4 LTS

lspci | grep VGA
#1:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X] (rev ef)

python3 --version
#Python 3.6.9

sudo apt install python3-pip

pip3 --version
#pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

sudo amdgpu-fan

starting amdgpu-fan
Traceback (most recent call last):
File "/usr/local/bin/amdgpu-fan", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/amdgpu_fan/controller.py", line 7 8, in main
FanController(config).main()
File "/usr/local/lib/python3.6/dist-packages/amdgpu_fan/controller.py", line 3 5, in main
logger.debug(f'{name}: Temp {temp}, Setting fan speed to: {speed}, fan speed {card.fan_speed}, min:{card.fan_min}, max:{card.fan_max}')
File "/usr/local/lib/python3.6/dist-packages/amdgpu_fan/lib/amdgpu.py", line 5 0, in fan_speed
return int(self.read_endpoint('fan1_input'))
File "/usr/local/lib/python3.6/dist-packages/amdgpu_fan/lib/amdgpu.py", line 3 7, in read_endpoint
return e.read()
OSError: [Errno 22] Invalid argument

@crazy-frag
Copy link
Author

RX570, RX580

@crazy-frag
Copy link
Author

crazy-frag commented Aug 7, 2020

amdgpu-pro-20.30-1109583-ubuntu-18.04.tar.xz =)

@apichlinski
Copy link

apichlinski commented Aug 24, 2020

Hi,
I Installed newest official driver amdgpu-pro-20.30-1109583-ubuntu-20.04.tar.xz for Ubuntu 20.04 but without resolve.
Could you tell me what is wrong for RX580?

lsb_release -a
#Description: Ubuntu 20.04 LTS

lspci | grep VGA
#3:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e7)

python3 --version
#Python 3.8.2

pip3 --version
#pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

sudo amdgpu-fan
starting amdgpu-fan
Traceback (most recent call last):
File "/usr/local/bin/amdgpu-fan", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/amdgpu_fan/controller.py", line 78, in main
FanController(config).main()
File "/usr/local/lib/python3.8/dist-packages/amdgpu_fan/controller.py", line 35, in main
logger.debug(f'{name}: Temp {temp}, Setting fan speed to: {speed}, fan speed{card.fan_speed}, min:{card.fan_min}, max:{card.fan_max}')
File "/usr/local/lib/python3.8/dist-packages/amdgpu_fan/lib/amdgpu.py", line 50, in fan_speed
return int(self.read_endpoint('fan1_input'))
File "/usr/local/lib/python3.8/dist-packages/amdgpu_fan/lib/amdgpu.py", line 37, in read_endpoint
return e.read()
OSError: [Errno 22] Invalid argument

Best regards.

@kluzas
Copy link

kluzas commented Jan 16, 2021

I had same error, and what I have figured out is that with default config in /etc/amdgpu-fan.yml it fails by reading temperature on my integrated GPU, which is card0 on my system. So the solution is to add this config in /etc/amdgpu-fan.yml:

...
cards:
- card1

This will skip card0, and control fans on card1 only

@LucasSymons
Copy link

LucasSymons commented Jan 22, 2021

Having the same issue on Manjaro.
Is this project still maintained?

@GIJack @chestm007 both still look active on Github, any chance you could take a look at this one?

@LucasSymons
Copy link

I think i found the issue I have been trying to get it working and the issue is related to the write operation when writing to the pwm1 extension.
I was reading this error https://gitlab.freedesktop.org/drm/amd/-/issues/1164
One person suggests that they are getting invalid argument when trying to write values below 3. quick test with my config file showed that to be the case.

Edit the config file so the lowest value is 4 not 0 and my service is up and running again.

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

4 participants