首页 > 解决方案 > Can't write data to applesmc error, after upgrade to Arch linux kernel 5.8.1

问题描述

I'm using the current version of mbpfan (mbpfan-git-2.2.1.r4.g52d8973-1-x86_64) from Arch User Repository, running Arch linux on a MacBookPro 6,1 mid-2010 (on external usb, actually). Mbpfan is a small daemon designed to control mac fan speed and solve heat problems.

After a recent upgrade to 5.8.1 kernal, from 5.7.12, mbpfan does not work, with error

Aug 20 17:19:56 ehost kernel: applesmc: send_byte(0x03, 0x0300) fail: 0x00 Aug 20 17:19:56 ehost kernel: applesmc: FS! : write data fail

and

ehost mbpfan[380]: Could not set fan speed: Input/output error Aug 20 17:21:56 ehost kernel: applesmc: send_byte(0x40, 0x0300) fail: 0x00 Aug 20 17:21:56 ehost kernel: applesmc: F0Tg: write data fail

FS! fail is saying, can't change fan to "manual," and F0Tg is the first fan where it tries to write a new speed.

From looking in /sys/devices/platform/applesmc.768 one can see that even root can only write to fan1_manual, fan1_min, and fan1_output, for example.

-r--r--r-- 1 root root 4096 Aug 18 21:00 fan1_input
-r--r--r-- 1 root root 4096 Aug 18 21:01 fan1_label
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_manual
-r--r--r-- 1 root root 4096 Aug 18 21:00 fan1_max
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_min
-rw-r--r-- 1 root root 4096 Aug 18 21:00 fan1_output

The above permissions have not changed from earlier kernels when mbpfan worked. They are exactly the same on the installations where mbpfan works (different usb stick, same machine).

Permissions should not be an issue, as I understand that one writes to "fan1_output," which is rw, to set the desired fan speed (counterintuitively).

As a test, I upgraded another installation with a working mbpfan (kernel 5.7.9) to 5.8.1, and the same no write problem appears.

--It seems that something in the kernel that affects mbpfan has changed between 5.7.12 and 5.8.1.

Naturally, I have reported this at the developer's git hub area. I've been digging around in the code a bit, but it's tough going so far as I really know nothing about drivers. --I'd really appreciate any suggestions on what I might try to get this working...

标签: linuxlinux-kernel

解决方案


推荐阅读