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

ubuntu mate 16.04 system can't pass the "sudo make tests" #155

Closed
GalaxyGroot opened this issue Aug 9, 2018 · 8 comments
Closed

ubuntu mate 16.04 system can't pass the "sudo make tests" #155

GalaxyGroot opened this issue Aug 9, 2018 · 8 comments

Comments

@GalaxyGroot
Copy link

Hello.
Thank you very much for providing such a good code.
I found my ubuntu system (16.04) can't pass the tests but still works.
Now the fan noise is getting lower.

Before I tried this code, I installed the i8kutils. However, it make the fan stop-and-run.

Is there any solutions to help the system pass the tests? or it doesn't matter?

@GalaxyGroot
Copy link
Author

mbpfan issue

Here is the screenshot.

@An7ar35
Copy link

An7ar35 commented Aug 12, 2018

Fan control does not work on MBP 11.5 (2015), 4.17.14-arch1-1-ARCH for user.
There are indeed no fan*_input devices in the hwmon path.

Output for mbpfan -f -v -t:

It is normal for them to take a bit to finish.
Using new sensor path for kernel >= 3.15.0 or some CentOS versions with kernel 3.10.0
Found hwmon path at /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp
Found 5 sensors
Found 0 fans
mbpfan could not detect any fan. Please contact the developer.

Running with sudo yields this though:

It is normal for them to take a bit to finish.
Using new sensor path for kernel >= 3.15.0 or some CentOS versions with kernel 3.10.0
Found hwmon path at /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp
Found 5 sensors
Found 2 fans
Using new sensor path for kernel >= 3.15.0 or some CentOS versions with kernel 3.10.0
Found hwmon path at /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp
Found 5 sensors
Couldn't open configfile, using defaults
polling_interval is not 1 
Tests run: 5

gaul added a commit to gaul/mbpfan that referenced this issue Aug 15, 2018
@gaul
Copy link
Member

gaul commented Aug 15, 2018

mbpfan needs root to write to files in find /sys/devices/platform/applesmc.768/. I opened a pull request to make this more clear. Does mbpfan work correctly when using sudo?

@An7ar35
Copy link

An7ar35 commented Aug 20, 2018

@gaul No it doesn't. on Arch I noticed it stopped working recently even though it used to on an older kernel. Trying to set fan speed manually via echo "4000" > /sys/devices/platform/applesmc.768/fan1_input for example yield a fan1_input: Permission denied error (sudo or su to root does not affect the result - still gets denied).

Also In /sys/devices/platform/coretemp.0/hwmon/hwmon1/ there isn't any fan*_input.

Both coretemp and applesmc are loaded.
Any ideas how this could have happened?

@gaul
Copy link
Member

gaul commented Aug 20, 2018

Trying to set fan speed manually via echo "4000" > /sys/devices/platform/applesmc.768/fan1_input for example yield a fan1_input: Permission denied error (sudo or su to root does not affect the result - still gets denied).

Pipes are a bit tricky in bash; could you try echo 4000 | sudo tee /sys/devices/platform/applesmc.768/fan1_input instead?

Also could you share the output of find /sys/devices/platform/coretemp.0/hwmon/hwmon1/?

Note that applesmc has the fan controls and hwmon has the temperatures.

I'm actually not sure I understand your issue; #155 (comment) shows mbpfan succeeding with sudo?

@An7ar35
Copy link

An7ar35 commented Aug 20, 2018

@gaul Thanks for replying.

Doing echo 4000 | sudo tee /sys/devices/platform/applesmc.768/fan1_input still results in a `Permission Denied``.

Result for find /sys/devices/platform/coretemp.0/hwmon/hwmon1/:

/sys/devices/platform/coretemp.0/hwmon/hwmon1/
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_crit
/sys/devices/platform/coretemp.0/hwmon/hwmon1/uevent
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_crit_alarm
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp4_label
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_crit
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_max
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/runtime_active_time
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/runtime_active_kids
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/runtime_usage
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/runtime_status
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/autosuspend_delay_ms
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/async
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/runtime_suspended_time
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/runtime_enabled
/sys/devices/platform/coretemp.0/hwmon/hwmon1/power/control
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_label
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp5_crit_alarm
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_crit
/sys/devices/platform/coretemp.0/hwmon/hwmon1/device
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp5_label
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_max
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_crit_alarm
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp4_input
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_label
/sys/devices/platform/coretemp.0/hwmon/hwmon1/subsystem
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_crit_alarm
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp4_max
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp5_crit
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp5_input
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp4_crit
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_label
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp4_crit_alarm
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_max
/sys/devices/platform/coretemp.0/hwmon/hwmon1/name
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp5_max
/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input

Even though mbpfan testing on sudo seems to work it actually doesn't do anything in terms of fan control anymore.

dmesg reports this at any attempts to set fan speeds:

[  363.179063] applesmc: send_byte(0x40, 0x0300) fail: 0x40
[  363.179065] applesmc: F1Tg: write data fail

This is really weird as a few months ago the fan speed control via mbpfan worked flawlessly. Since then (+ a hand full of kernel rolling upgrades) it stopped working at some point and since I didn't do much CPU intensive task during that period I didn't notice this problem until recently.

gaul added a commit that referenced this issue Aug 20, 2018
gaul added a commit that referenced this issue Aug 20, 2018
@gaul
Copy link
Member

gaul commented Aug 20, 2018

@An7ar35 I pushed a commit to master which should report the same error as bash. However, if bash cannot set the fan speed then there is some other issue. The applesmc driver has not changed much recently:

https://github.com/torvalds/linux/blob/master/drivers/hwmon/applesmc.c

Could you try an older kernel to narrow this down further?

@gaul
Copy link
Member

gaul commented Aug 20, 2018

@GalaxyGroot I believe that ce32184 should resolve the test issue. Could you test and report back?

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