applesmc: wait status failed: c != 8

Bug #102270 reported by Tribe
40
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
linux-source-2.6.20 (Ubuntu)
Won't Fix
Undecided
Unassigned
linux-source-2.6.22 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Hi there,

I'm getting this tpe of lines with dmesg:

[ 274.924000] applesmc: wait status failed: c != 8
[ 328.416000] applesmc: wait status failed: c != 8
[ 378.072000] applesmc: wait status failed: c != 8
[ 408.960000] applesmc: wait status failed: c != 8
[ 459.000000] applesmc: wait status failed: c != 8
[ 648.496000] applesmc: wait status failed: c != 8
[ 821.572000] applesmc: wait status failed: c != 8
[ 834.412000] applesmc: wait status failed: c != 8
[etc etc]

This is on a MacBook Pro with Kubuntu Feisty updated in 01/03/07 with 2.6.20-13-generic kernel.

I've investigated a little bit and found that applesmc is a driver to control some Intel Mac's stuff, as it says the description:

"This driver provides support for the Apple System Management Controller, which
provides an accelerometer (Apple Sudden Motion Sensor), light sensors,
temperature sensors, keyboard backlight control and fan control. Only
Intel-based Apple's computers are supported (MacBook Pro, MacBook, MacMini)."

The author of the driver is related to Mactel people and seem he has already some patches for it since 19/03, you can find them here: http://lwn.net/Articles/226624/ . I don't know if he has more patches than those one posted there, btw, maybe we could contact him or something.

Thanks.

Revision history for this message
Tribe (boikot+ubuntu) wrote :

Still same problem in Feisty final.

tribe@macbook:~$ uname -a
Linux macbook 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux

Revision history for this message
pouns (pouns1) wrote :

same problem on a macbook C2D

Revision history for this message
Tim Perry (pimterry) wrote :

I realize this is an old thread, but I've just got this too, for no discernable reason.

On a macbook core (one) duo I'm getting:

tim@tim-laptop:~$ dmesg | grep applesmc
[ 19.004000] applesmc: Apple MacBook detected:
[ 19.004000] applesmc: - Model with accelerometer
[ 19.004000] applesmc: - Model without light sensors and backlight
[ 19.004000] applesmc: - Model with 7 temperature sensors
[ 19.060000] applesmc: device successfully initialized (0xe0, 0x00).
[ 19.060000] applesmc: device successfully initialized.
[ 19.060000] applesmc: 1 fans found.
[ 19.060000] input: applesmc as /class/input/input6
[ 19.060000] applesmc: driver successfully loaded.
[ 1657.180000] applesmc: wait status failed: c != 18
[ 5998.288000] applesmc: wait status failed: c != 18
[ 6371.756000] applesmc: wait status failed: c != 18
[ 8654.648000] applesmc: wait status failed: c != 18
[10701.920000] applesmc: wait status failed: c != 18
[15024.424000] applesmc: wait status failed: c != 18
[15779.688000] applesmc: wait status failed: c != 18
[16165.128000] applesmc: wait status failed: c != 18
[19650.016000] applesmc: wait status failed: c != 18
[20620.448000] applesmc: wait status failed: c != 18
[20727.128000] applesmc: wait status failed: c != 18
[25963.096000] applesmc: wait status failed: c != 18
[28137.696000] applesmc: wait status failed: c != 18
[28917.708000] applesmc: wait status failed: c != 18

(Note, 18 not 8). Not sure what this means, and nothing appears to be particularly wrong symptomwise... Its just errors. And at the top it seems to initialise with no problems at all. Does anyone know what the wait status means?

uname -a gives:

Linux tim-laptop 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

Revision history for this message
Tribe (boikot+ubuntu) wrote :

Yeh i have the same output on same kernel:
Linux macbook 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

Revision history for this message
Nick Barcet (nijaba) wrote :

Same problem here with Gutsy beta on MacBookPro 3.1 (SantaRosa)

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Now that the 7.10 Gutsy Gibbon release of Ubuntu is out, we were wondering if you can still reproduce this issue. Could you please download and try the new version of Ubuntu from http://www.ubuntu.com/getubuntu/download and report back your results. If the issue is still present in the new release, please attach the following information:

* uname -a > uname-a.log
* cat /proc/version_signature > version.log
* dmesg > dmesg.log
* sudo lspci -vvnn > lspci-vvnn.log

Please be sure to attach each file as a separate attachment. For more information regarding the kernel team bug policy, please refer to https://wiki.ubuntu.com/KernelTeamBugPolicies . Thanks again and we appreciate your help and feedback.

Changed in linux-source-2.6.20:
status: New → Incomplete
Revision history for this message
Bob McElrath (bob+ubuntu) wrote :

Yes, this problem still persists in 7.10. I think it may be related to a regular hang in the OS interface, where keyboard input is not accepted and the screen is not updated for several seconds.

Revision history for this message
Bob McElrath (bob+ubuntu) wrote :
Revision history for this message
Bob McElrath (bob+ubuntu) wrote :
Revision history for this message
Bob McElrath (bob+ubuntu) wrote :
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

I'm retargetting this bug for the upcoming Hardy kernel (hence the 'hardy-kernel-candidate' tag). However, against linux-source-2.6.20 and linux-source-2.6.22 this bug does not meet the criteria for a stable release update and is being marked as Won't Fix. You can learn more about the stable release update process at https://wiki.ubuntu.com/StableReleaseUpdates . Thanks!

Changed in linux-source-2.6.20:
status: Incomplete → Won't Fix
Changed in linux-source-2.6.22:
status: New → Won't Fix
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Hardy Heron kernel was recently uploaded for testing. We'd really appreciate it if you could try testing with this newer kernel and verify if this issue still exists. Unfortunately, the Hardy Heron Alpha1 LiveCD was released with the older 2.6.22 kernel. You'll have to manually install the newer Hardy Heron kernel in order to test. This should not be the case for Alpha2. However, here are the instructions to install (if you choose to do so):

1) edit the file /etc/apt/sources.list and add the following line:

deb http://archive.ubuntu.com/ubuntu hardy main restricted

2) sudo apt-get update
3) sudo apt-get install linux-image-2.6.24-1-generic
4) reboot and select the new kernel from the grub menu

After you've tested, please feel free to revert back - ie boot into the old kernel, sudo apt-get remove linux-image-2.6.24-1-generic, and remove the line from /etc/apt/sources.list . Please update this report with your results. Thanks in advance!

Changed in linux:
status: New → Incomplete
Revision history for this message
Bob McElrath (bob+ubuntu) wrote :

The 2.6.24 kernel you mention has no impact on this bug. I can upload the dmesg if you like, but there's nothing essentially new in there. The error messages are the same.

Revision history for this message
Bob McElrath (bob+ubuntu) wrote :

I think this is caused entirely by trying to read hardware that isn't present. The applesmc driver does not have a comprehensive up-to-date list of apple hardware. In particular on my MacBook Pro (v3, Santa Rosa), the kernel message is generated by trying to read its outputs:
cat /sys/devices/platform/applesmc.768/temp1_input
cat /sys/devices/platform/applesmc.768/temp6_input
cat /sys/devices/platform/applesmc.768/temp7_input
cat /sys/devices/platform/applesmc.768/temp12_input
with the error:
applesmc: wait status failed: 5 != 10

The messages are also generated every time I run 'sensors' (because I configured it to use applesmc).

Sometimes, one of the sensors that is present also fails, in which case the kernel message is:
applesmc: wait status failed: c != 18

(The above observations made with 2.6.22, not checked to be same with 2.6.24)

Several other values of 'a != b' appear in the logs under 2.6.22 and 2.6.24, I'm not sure what causes them. In particular, '5 != 4' and 'c != 8' about 100 seconds after bootup (under both kernels).

Revision history for this message
michelem (michele-marcucci) wrote :

Same problem here with MacBook 3,1 Santarosa and manually compiled kernel (2.6.22.9 from linux-source)

Changed in linux:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Baumgartner Martin (baumgartner-martin) wrote :

Problem also exists with Ubuntu Hardy on MacBook 3,1

Revision history for this message
michelem (michele-marcucci) wrote :

Yes Hardy Heron with 2.6.24 kernel has same problem, I can confirm it

Revision history for this message
Milind Arun Choudhary (milindchoudhary) wrote :

I am also getting the same errror on hardy

[ 448.188075] applesmc: wait status failed: 5 != 4
[ 448.192466] applesmc: wait status failed: c != 8

Revision history for this message
Victor Ashik (vashik+) wrote :
Revision history for this message
Henrik Rydberg (rydberg) wrote :

Same problem exists on the Macbook Air, running the 2.6.24-18-generic kernel. The problem does not seem to be (only) about reading hardware that is not present, as readings can sometimes be obtained and sometimes not.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Henrik Rydberg (rydberg) wrote : Re: [Bug 102270] Re: applesmc: wait status failed: c != 8

Tested in kernel 2.6.27-1-generic from the intrepid ppa; problem still remains.

There has been no significant changes to the drivers/hwmon/applesmc.c driver
source between 2.6.24 and 2.6.27, although there has been some recent correspondence.
I am CCing the driver maintainer, Nicolas Boichat, for this bug.

Regards,
Henrik

Revision history for this message
Pala62 (pala62) wrote :

Testded with kernel 2.6.27-3-generic with intrepid -> Problem still exists on a MacBook pro 4,1

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Pala62 wrote:
> Testded with kernel 2.6.27-3-generic with intrepid -> Problem still
> exists on a MacBook pro 4,1
>

I have been in contact with the maintainer regarding a possible
resolution to this problem, which basically conjectures that apple
changed the smc protocol for some of the newer machines (0x0c became
0x08, for instance). At least I managed to map out some of the actual
ports for MBA this way. Hopefully there will be some progress soon.

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Ok, here is a patch that hopefully resolves the problem. There are some other patches around this one that will also be sent to kernel.org, that should make things even better, but the essence is the attached one.

I have only had the opportunity to test this patch on my Macbook Air, so I will need some help testing this patch, on at least

* A recent Macbook Pro

* An older Macbook

Firstly to see that the problem gets solved, secondly to look for regression. The more testing, the better it is, of course :-)

Many thanks,
Henrik

Revision history for this message
Bob McElrath (bob+ubuntu) wrote :

Testing your patch on MacBook Pro 3.1 Santa Rosa, I get the following kernel messages:

Sep 17 19:02:38 futura kernel: [ 181.920006] applesmc: no version for "struct_module" found: kernel tainted.
Sep 17 19:02:38 futura kernel: [ 181.922477] applesmc: Apple MacBook Pro detected:
Sep 17 19:02:38 futura kernel: [ 181.922484] applesmc: - Model with accelerometer
Sep 17 19:02:38 futura kernel: [ 181.922488] applesmc: - Model with light sensors and backlight
Sep 17 19:02:38 futura kernel: [ 181.922493] applesmc: - Model with 12 temperature sensors
Sep 17 19:02:38 futura kernel: [ 181.926963] applesmc: device successfully initialized.
Sep 17 19:02:38 futura kernel: [ 181.927720] applesmc: 2 fans found.
Sep 17 19:02:38 futura kernel: [ 181.933625] input: applesmc as /devices/platform/applesmc.768/input/input126
Sep 17 19:02:38 futura kernel: [ 181.980715] Registered led device: smc:kbd_backlight
Sep 17 19:02:38 futura kernel: [ 181.980767] applesmc: driver successfully loaded.
Sep 17 19:03:13 futura kernel: [ 209.425318] applesmc: wait status failed: 5 != 0
Sep 17 19:03:13 futura kernel: [ 209.440776] applesmc: wait status failed: 5 != 0
Sep 17 19:03:13 futura kernel: [ 209.455250] applesmc: wait status failed: 5 != 0
Sep 17 19:03:13 futura kernel: [ 209.475142] applesmc: wait status failed: 5 != 0
Sep 17 19:05:46 futura kernel: [ 334.034303] applesmc: wait status failed: 5 != 4

The "wait status failed" messages occur when I ran "sensors". I don't know what caused the last message.

Revision history for this message
Bob McElrath (bob+ubuntu) wrote :

A few minutes later, another message:

Sep 17 19:09:54 futura kernel: [ 531.365060] applesmc: command failed: 10 -> c

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Hello Bob,

thanks for testing!

> Sep 17 19:09:54 futura kernel: [ 531.365060] applesmc: command failed: 10 -> c

What you see here is a message equivalent to the 'status wait' message,
but for a specific command. It might have to do with a second problem
I also encountered regarding data size changes in the SMC protocol for
the light sensor. I am applying the patch for it.

What were the corresponding messages before applying the patch?

Henrik

Revision history for this message
Bob McElrath (bob+ubuntu) wrote :

See my dmesg attached to this bug: http://launchpadlibrarian.net/10268555/dmesg.log for messages on this laptop before your patch.

Revision history for this message
Pala62 (pala62) wrote :

Hi, like to help, but could you please explain how to patch in ubuntu, sorry guess i am a noobish.. may some one can help, i will test it out.

Here Macbook Pro 4,1 from April this year. I am running Ubuntu 8.10

Greets
Pala

Revision history for this message
Henrik Rydberg (rydberg) wrote :

> Here Macbook Pro 4,1 from April this year. I am running Ubuntu 8.10

Perhaps you could provide an output of the current situation to start
with, an equivalent to the log bob just provided. Simply restart your
computer, run "sensors" on the command line, and send the complete output
of "dmesg" as an attachment to this bug.

Many thanks,
Henrik

Revision history for this message
Henrik Rydberg (rydberg) wrote :

We really have three kinds of problems dealing with in this bug.

The original bug was for a MacbookPro3,1 from 2007, which displayed occasional warnings on Feisty, but in general it works. The behavior seems to persist all the way up to Intrepid and the latest patches attached here. It might have become slightly better, at least it is not worse. I would say this problem is really due to the applesmc interface not buffering any sensor data, so it will not change unless a slight rewrite is made in applesmc.

The second problem is for MacbookPro4,1 from 2008, where it seems the number of failures in the log are much more abundant. It might also have gotten worse in Intrepid (a confirmation here would be good). It is my conjecture that the two patches

http://launchpadlibrarian.net/17695749/0001-hwmon-applesmc-Fix-the-wait-status-failed-c-8.patch
http://launchpadlibrarian.net/17697680/0004-hwmon-applesmc-Allow-for-variable-ALV0-and-ALV1-pa.patch

will improve the situation considerably. Anyone with a MBP4,1 who would like to give it a try?

The third problem is for MacbookAir, from 2008, which works very poorly in Hardy: the /sys/devices interface does not work at all. The amount of warnings in Intrepid is very large. For this machine, the two patches make the /sys/devices interface work perfectly. The warning rate running sensors is similar to what is reported for MBP4,1. Under normal operation without sensors, it is completely silent.

at all in Hardy

Revision history for this message
Pala62 (pala62) wrote :

Hi

ok, after I "modprobe applesmc" the messages with the "wait status failed" begins.
Normaly I blacklist the applesmc because if I leave the loaded module, my syslog gets about 15MB a day!!

I will attach my dmesg

MacBook pro 4,1 with Intrepid. If i know how (sry) i would give the patches a try.

Greets
Pala

Revision history for this message
Pala62 (pala62) wrote :

ups, forget, in dmesg, after driver successfully loadet, i type sensors, you can see the messages in dmesg.

the output in terminal was this:

coretemp-isa-0000
Adapter: ISA adapter
Core 0: +34.0°C (high = +100.0°C, crit = +100.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Core 1: +35.0°C (high = +100.0°C, crit = +100.0°C)

applesmc-isa-0300
Adapter: ISA adapter
ERROR: Can't get value of subfeature fan1_min: I/O error
Left side :2004 RPM (min = 0 RPM)
ERROR: Can't get value of subfeature fan2_min: I/O error
Right side :1992 RPM (min = 0 RPM)
ERROR: Can't get value of subfeature temp1_input: I/O error
temp1: +0.0°C
temp2: +32.5°C
temp3: +47.2°C
ERROR: Can't get value of subfeature temp4_input: I/O error
temp4: +0.0°C
temp5: +48.8°C
ERROR: Can't get value of subfeature temp6_input: I/O error
temp6: +0.0°C
ERROR: Can't get value of subfeature temp7_input: I/O error
temp7: +0.0°C
temp8: +48.2°C
ERROR: Can't get value of subfeature temp9_input: I/O error
temp9: +0.0°C
temp10: +38.5°C
temp11: +34.5°C
ERROR: Can't get value of subfeature temp12_input: I/O error
temp12: +0.0°C

Greets
Pala

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Pala,

This problem should also be visible on Hardy. If you have a hardy setup, you could try to test through the instructions in this thread: http://ubuntuforums.org/showthread.php?t=924096

Henrik

Revision history for this message
Henrik Rydberg (rydberg) wrote :
Changed in linux:
status: Triaged → Fix Committed
Revision history for this message
Henrik Rydberg (rydberg) wrote :

Bob,

reading https://bugs.launchpad.net/ubuntu/+source/linux/+bug/102270/comments/14 again, I realize MBP3 might be suffering the same temperature sensor problem as the MBP4, meaning the patch http://lkml.org/lkml/2008/9/22/168 might be of interest to you.

In order to confirm that this is the case, I have attached a script to run (as root), originating from Nicolas Boichat. The script lists all present sensor names, together with type and typical data output. On a positive confirmation, I willl send (another) patch to the lm-sensors list. If there are more models out there whith mismatching sensors data, please feel free to report the output of the attached script.

Revision history for this message
Henrik Rydberg (rydberg) wrote :

A final improvement patch has been submitted:

http://lkml.org/lkml/2008/9/27/73

Thanks to Bob for all the testing.

Revision history for this message
Henrik Rydberg (rydberg) wrote :

Present in 2.6.27-7

Changed in linux:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Коренберг Марк (socketpair) wrote :

root@imac:~# uname -a
Linux imac 2.6.32-24-generic-pae #42-Ubuntu SMP Fri Aug 20 15:37:22 UTC 2010 i686 GNU/Linux

applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 4 != 5
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 4 != 0
applesmc: wait status failed: 4 != 0
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 4 != 0
applesmc: wait status failed: 4 != 0
applesmc: wait status failed: 5 != 1

Bug still here.....
I have imac 8,1
all sensors work OK, but sometimes read error occured and such message appear in dmesg

Revision history for this message
yngens (foranycase) wrote :

I'm hitting the same issue here:

<code>
root@host:~# uname -a
Linux host.drupion.org 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux
root@host:~# dmesg | grep applesmc
[ 11.821530] applesmc: Apple MacPro detected:
[ 11.821532] applesmc: - Model without accelerometer
[ 11.821533] applesmc: - Model without light sensors and backlight
[ 11.821535] applesmc: - Model with 35 temperature sensors
[ 11.821581] applesmc: device successfully initialized.
[ 11.822128] applesmc: 6 fans found.
[ 11.822130] applesmc: More than 4 fans found, but at most 4 fans are supported by the driver.
[ 11.822227] applesmc: driver successfully loaded.
[ 5674.259924] applesmc: wait status failed: 5 != 0
[ 5674.292958] applesmc: wait status failed: 5 != 0
[ 5674.325991] applesmc: wait status failed: 5 != 0
[ 5674.359020] applesmc: wait status failed: 5 != 0
[ 5674.392048] applesmc: wait status failed: 5 != 0
[ 5674.425084] applesmc: wait status failed: 5 != 0
[ 5674.458117] applesmc: wait status failed: 5 != 0
...
</code>

I am particularly worried with:

[ 11.822128] applesmc: 6 fans found.
[ 11.822130] applesmc: More than 4 fans found, but at most 4 fans are supported by the driver.

Does that mean 2 out of 6 funs don't work?

Revision history for this message
yngens (foranycase) wrote :

root@host:~# cat /proc/version_signature
Ubuntu 2.6.32-38.83-server 2.6.32.52+drm33.21

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.