Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is on a Macbook 2,1 dual booting Arch Linux and OS X Leopard.

I use a conky script to disply my battery percent with:

${battery_percent BAT0}

Recently, it switched from displaying coherent values to something like (its current output):


I checked in /sys/class/power_supply/BAT0 directly, as I believe this is what conky uses to calculate its values. Files I know used to have coherent values had turned to 0.

I dual boot with OS X and on a whim I tried re-booting from Linux -> OS X -> Linux. I'd been living in Linux (mostly pm-suspending, but occasionally shutting down/rebooting, but only from Linux -> Linux). It worked. I now have values in the files again and conky is working. Here is a table of pre-post values:

 All files from /sys/class/power_supply/BAT0

| File               |  Pre-Reboot | Post-Reboot |
| energy_full        |           0 |    41660000 |
| energy_full_design |           0 |    50200000 |
| energy_now         |           0 |    35870000 |
| power_now          |           0 |    15988000 |
| voltage_now        |           0 |    11757000 |
| present            |           1 |           1 |
| status             | Discharging | Discharging |

Not everything was useless. It knew it was discharging and present, but that's it.

Why would rebooting into OS X change the values for files under Linux in /sys/class/power_supply/BAT0? Is there some sort of hardware/firmware in the battery that OS X fiddles with? In other words, why a reboot from Linux -> Linux wouldn't work, but Linux -> OS X -> Linux does.

share|improve this question
So the value displaying is 2^31, which suggests to me that it's defaulting to its max possible value. This could indicate a faulty sensor, or driver, somewhere. – user3463 Jan 18 '12 at 5:02
@RandolphWest: Perhaps... but it's "reset" or fixed somehow by booting into OS X. If it was a bad piece of hardware, I wouldn't expect a particular OS to fix it somehow. – Hendy Jan 18 '12 at 15:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.