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

sudo make tests failed because of applesmc even though it's there #220

Open
MoonPadUSer opened this issue May 30, 2020 · 9 comments
Open
Labels
needinfo Waiting for reporter feedback

Comments

@MoonPadUSer
Copy link

When I run sudo make tests I get:

make install
make[1]: Entering directory '/home/moonpaduser/Downloads/mbpfan-2.2.1'
install -d /usr/sbin
install -d /etc
install -d /lib/systemd/system
install -d /usr/share/doc/mbpfan
install bin/mbpfan /usr/sbin
install -m644 mbpfan.conf /etc
install -m644 README.md /usr/share/doc/mbpfan
install -d /usr/share/man/man8
install -m644 mbpfan.8.gz /usr/share/man/man8

******************
INSTALL COMPLETED
******************

A configuration file has been copied (might overwrite existing file) to /etc/mbpfan.conf.
See README.md file to have mbpfan automatically started at system boot.

Please run the tests now with the command
   sudo make tests

make[1]: Leaving directory '/home/moonpaduser/Downloads/mbpfan-2.2.1'
/usr/sbin/mbpfan -f -v -t
mbpfan needs applesmc support. Please either load it or build it into the kernel. Exiting.
make: *** [Makefile:40: tests] Error 1

but the weird thing is that applesmc is builtin to my kernel
(sudo modinfo applesmc)

filename:       /lib/modules/5.6.12-2-mbp/kernel/drivers/hwmon/applesmc.ko.xz
license:        GPL v2
file:           drivers/hwmon/applesmc
description:    Apple SMC
author:         Paul Pawlowski
author:         Nicolas Boichat

but, when I run lsmod | grep smc, there's is no output.
output of journalctl -b | grep applesmc:

Mai 30 16:00:15 moonpaduser-macbookpro kernel: applesmc: key=718 fan=1 temp=37 index=36 acc=0 lux=0 kbd=0
Mai 30 16:00:15 moonpaduser-macbookpro kernel: applesmc APP0001:00: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Mai 30 16:00:15 moonpaduser-macbookpro systemd-modules-load[304]: Module 'applesmc' is built in
@MoonPadUSer MoonPadUSer changed the title sudo make tests failed because of applesmc even though it's there sudo make tests failed because of applesmc even tough it's there May 30, 2020
@MoonPadUSer MoonPadUSer changed the title sudo make tests failed because of applesmc even tough it's there sudo make tests failed because of applesmc even though it's there May 30, 2020
@nyped
Copy link

nyped commented Jul 10, 2020

Hey, i guess you are using a new model of macbook, like me. You just have to change the directory of applesmc, wich may be different:

diff --git a/src/mbpfan.c b/src/mbpfan.c
index 1916d64..2bc6fb3 100644
--- a/src/mbpfan.c
+++ b/src/mbpfan.c
@@ -51,7 +51,7 @@
 #define max(a,b) ((a) > (b) ? (a) : (b))
 
 #define CORETEMP_PATH "/sys/devices/platform/coretemp.0"
-#define APPLESMC_PATH "/sys/devices/platform/applesmc.768"
+#define APPLESMC_PATH "/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:96/APP0001:00"
 
 /* temperature thresholds
  * low_temp - temperature below which fan speed will be at minimum
@@ -274,7 +274,7 @@ t_fans *retrieve_fans()
     char *path_fan_max = NULL;
     char *path_fan_min = NULL;
 
-    const char *path_begin = "/sys/devices/platform/applesmc.768/fan";
+    const char *path_begin = "/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:96/APP0001:00/fan";
     const char *path_output_end = "_output";
     const char *path_label_end = "_label";
     const char *path_man_end = "_manual";

@MoonPadUSer
Copy link
Author

oooh, ok I see, I'll try that

@MoonPadUSer
Copy link
Author

hum, how can I find the path of the device tho?

@MoonPadUSer
Copy link
Author

Thank you very very much, I got it to work :DDD

@nyped
Copy link

nyped commented Jul 11, 2020

hehe np

@gaul
Copy link
Member

gaul commented Jul 11, 2020

Can someone submit a pull request that works with the new and old paths? I only have an older MacBook.

@nyped
Copy link

nyped commented Jul 12, 2020

Hi,
The applesmc driver that we use is a patched one to fit the new devices. Thes patches are not upstreamed yet so I think it is better to wait, in case there are modifications.

networkException added a commit to networkException/mbpfan that referenced this issue Sep 9, 2020
The added script searches for a fan device in /sys/devices and replaces
some lines in src/mbpfan.c (see linux-on-mac#220)
@gaul
Copy link
Member

gaul commented Feb 28, 2021

I don't understand the status of this issue. I run Fedora 33 with kernel 5.10.7-200.fc33.x86_64 and don't see a difference in the paths.

@gaul gaul added the needinfo Waiting for reporter feedback label Feb 28, 2021
@gaul
Copy link
Member

gaul commented Feb 26, 2022

I don't understand the status of this issue. Does a more recent kernel change the applesmc path? Related to #236.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo Waiting for reporter feedback
Projects
None yet
Development

No branches or pull requests

3 participants