You are not logged in.

#26 2015-04-12 21:18:29

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Battery only detected if AC power connected at bootup

So for you it works most of the time with acpi_osi="Darwin" ?

Offline

#27 2015-04-12 21:26:41

parades
Member
From: Michigan
Registered: 2015-03-02
Posts: 23
Website

Re: Battery only detected if AC power connected at bootup

I would try it out and see if it makes it work more frequently for you, but yes that is the case for me. If I reboot without it I get no acpi output, then if I change it and reboot again I get battery stats.

Offline

#28 2015-04-13 21:00:49

parades
Member
From: Michigan
Registered: 2015-03-02
Posts: 23
Website

Re: Battery only detected if AC power connected at bootup

@Olorin, can you add "Macbook" or something like that to the title? Might help with finding support.

Offline

#29 2015-04-14 06:37:35

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Battery only detected if AC power connected at bootup

It doesn't work 100% of the time with neither of the options we specified =[

Offline

#30 2015-04-14 18:47:38

parades
Member
From: Michigan
Registered: 2015-03-02
Posts: 23
Website

Re: Battery only detected if AC power connected at bootup

Mine's been pretty consistent so far, but I haven't rebooted lately to test. I'm on 3.19.3-3-ARCH.

Offline

#31 2015-04-17 08:19:22

orion91
Member
From: Italy
Registered: 2007-03-23
Posts: 14
Website

Re: Battery only detected if AC power connected at bootup

I've same problem with my Dell Inspiron 15 7537. Battery was recognized only after i've plugged AC adapter.
I've run: dmesg | grep ACPI first and after but no changes find.

I've booted Linux Mint 17.1 live cd and my battery is recognized without problem at startup. So i've runned lsmod first on Linux Mint and after on Arch Linux and this is the differences between the command output:

Modules only on Arch Linux:

8250_dw, ac, atkbd, battery, button, ccm, crc16, crc32c_intel, ctr, dell_led, dell_smo8800, dw_dmac, dw_dmac_core, ecb, ehci_hcd, 
ehci_pci, evdev, ext4, fat, fuse, gpio_lynxpoint, hid_logitech_hidpp, hwmon, i2c_core, i2c_designware_core, i2c_designware_platform, i2c_hid, 
i2c_i801, i8042, i8k, iTCO_vendor_support, iTCO_wdt, intel_gtt, iosf_mbi, jbd2, led_class, libata, libps2, mbcache, media, mmc_core, mousedev, 
nls_cp437, pcspkr, processor, rfkill, sch_fq_codel, scsi_mod, sd_mod, sdhci, sdhci_acpi, serio, shpchp, snd_hda_codec_generic, snd_hda_controller, 
spi_pxa2xx_platform, thermal, uas, usb_common, usbcore, v4l2_common, vfat, xhci_hcd, xhci_pci

Modules only on Linux Mint:

binfmt_misc, bnep, dm_crypt, dm_log, dm_mirror, dm_multipath, dm_region_hash, intel_rst, intel_smartconnect, lp, mxm_wmi, nouveau, 
overlayfs, parport, parport_pc, ppdev, rfcomm, scsi_dh, snd_page_alloc, snd_rawmidi, snd_seq, snd_seq_device, snd_seq_midi, snd_seq_midi_event, 
squashfs, ttm

I've tried Arch Linux LTS kernel but nothing... the battery was not recognized... Some suggestions?

Offline

#32 2015-04-19 19:48:56

bakerboy
Member
From: Manchester, UK
Registered: 2009-10-06
Posts: 23

Re: Battery only detected if AC power connected at bootup

I seemed of solved the problem on my Macbook pro 9.2 by doing this:

 
sudo modprobe battery

sudo nano /etc/module-load.d/battery.conf

battery

Seems to detect the battery everytime now....

Hope this helps,

Gordy

ps make sure you have acpid installed  and enabled it

 sudo systemctl enable acpid 

Last edited by bakerboy (2015-04-26 05:27:54)

Offline

#33 2015-04-19 20:08:21

parades
Member
From: Michigan
Registered: 2015-03-02
Posts: 23
Website

Re: Battery only detected if AC power connected at bootup

Wow, I assumed I had that loaded somewhere, but turns out I didn't. My path was /etc/modules-load.d. Worked on first restart, optimistic that this may fix it for me smile Thanks

Offline

#34 2015-04-19 20:17:20

bakerboy
Member
From: Manchester, UK
Registered: 2009-10-06
Posts: 23

Re: Battery only detected if AC power connected at bootup

I had this problem for ages but I decided tonight to sit down and try and find out what is going on.... seems that the battery module only loaded some of the time... after about 9 reboots the battery is always detected after I done this. :-)

Gordy.

Offline

#35 2015-04-19 22:40:56

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Battery only detected if AC power connected at bootup

Thanks much for the help.

I will get back with results!

Offline

#36 2015-04-23 23:05:41

watgrad
Member
From: Waterloo, Ontario
Registered: 2014-09-21
Posts: 17

Re: Battery only detected if AC power connected at bootup

Sadly - bakerboy's solution did not work for me. Though acpid / acpi were not installed on my system, LTS always found the battery. 
Installing and enabling acpi / acpid did not work (macbookpro 8,1) --- kernel 3.19 just won't reliably find the battery on my machine.

I can only get reliable battery recognition from the LTS kernel.

Offline

#37 2015-04-24 13:53:37

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Battery only detected if AC power connected at bootup

It didn't work for me either...

I will continue to try to find a solution. Please keep the thread live if you want, so that people that might solve this problem provide a response to it.

Offline

#38 2015-04-29 20:04:31

watgrad
Member
From: Waterloo, Ontario
Registered: 2014-09-21
Posts: 17

Re: Battery only detected if AC power connected at bootup

Battery still not detected reliably with kernel 4.0.1
I was hoping...

Offline

#39 2015-04-29 20:07:26

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Battery only detected if AC power connected at bootup

Me too. I think it actually got a bit worse. I shut down 3 times in order for my battery to be detected...

Offline

#40 2015-04-30 11:56:31

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Battery only detected if AC power connected at bootup

I don't know if it helps, but I have saved 2 different lsmod results and I have diffed them side by side.

bat.txt is the lsmod output when the battery is detected
nobat.txt is the lsmod output when the battery isn't detected

These are the results:

# diff -y bat.txt nobat.txt 
ablk_helper            16384  1 aesni_intel			ablk_helper            16384  1 aesni_intel
ac                     16384  0 				ac                     16384  0 
aesni_intel           172032  4 				aesni_intel           172032  4 
aes_x86_64             20480  1 aesni_intel			aes_x86_64             20480  1 aesni_intel
af_alg                 16384  1 algif_skcipher			af_alg                 16384  1 algif_skcipher
ahci                   36864  2 				ahci                   36864  2 
algif_skcipher         20480  0 				algif_skcipher         20480  0 
apple_bl               16384  1 apple_gmux			apple_bl               16384  1 apple_gmux
apple_gmux             16384  0 				apple_gmux             16384  0 
applesmc               20480  0 				applesmc               20480  0 
arc4                   16384  2 				arc4                   16384  2 
b43                   413696  0 				b43                   413696  0 
battery                20480  0 				battery                20480  0 
bcm5974                20480  0 				bcm5974                20480  0 
bcma                   49152  1 b43				bcma                   49152  1 b43
button                 16384  1 i915				button                 16384  1 i915
ccm                    20480  1 				ccm                    20480  1 
cdrom                  53248  1 sr_mod				cdrom                  53248  1 sr_mod
cfg80211              483328  2 b43,mac80211			cfg80211              483328  2 b43,mac80211
coretemp               16384  0 				coretemp               16384  0 
crc16                  16384  1 ext4				crc16                  16384  1 ext4
crc32c_intel           24576  0 				crc32c_intel           24576  0 
crc32_pclmul           16384  0 				crc32_pclmul           16384  0 
crc_itu_t              16384  1 firewire_core			crc_itu_t              16384  1 firewire_core
crct10dif_pclmul       16384  0 				crct10dif_pclmul       16384  0 
cryptd                 20480  4 ghash_clmulni_intel,aesni_int	cryptd                 20480  4 ghash_clmulni_intel,aesni_int
ctr                    16384  1 				ctr                    16384  1 
dm_crypt               28672  1 				dm_crypt               28672  1 
dm_mod                 98304  9 dm_crypt			dm_mod                 98304  9 dm_crypt
drm                   282624  6 i915,drm_kms_helper		drm                   282624  6 i915,drm_kms_helper
drm_kms_helper        102400  1 i915				drm_kms_helper        102400  1 i915
ehci_hcd               73728  1 ehci_pci			ehci_hcd               73728  1 ehci_pci
ehci_pci               16384  0 				ehci_pci               16384  0 
evdev                  24576  30 				evdev                  24576  30 
ext4                  512000  1 				ext4                  512000  1 
fat                    65536  1 vfat				fat                    65536  1 vfat
firewire_core          57344  1 firewire_ohci			firewire_core          57344  1 firewire_ohci
firewire_ohci          45056  0 				firewire_ohci          45056  0 
fuse                   90112  3 				fuse                   90112  3 
gf128mul               16384  1 lrw				gf128mul               16384  1 lrw
ghash_clmulni_intel    16384  0 				ghash_clmulni_intel    16384  0 
glue_helper            16384  1 aesni_intel			glue_helper            16384  1 aesni_intel
hid                   110592  4 hid_generic,usbhid,hid_applei	hid                   110592  4 hid_generic,usbhid,hid_applei
hid_apple              16384  0 				hid_apple              16384  0 
hid_appleir            16384  0 				hid_appleir            16384  0 
hid_generic            16384  0 				hid_generic            16384  0 
hwmon                  16384  3 tg3,applesmc,coretemp		hwmon                  16384  3 tg3,applesmc,coretemp
i2c_algo_bit           16384  1 i915				i2c_algo_bit           16384  1 i915
i2c_core               53248  7 drm,i915,i2c_i801,drm_kms_hel	i2c_core               53248  7 drm,i915,i2c_i801,drm_kms_hel
i2c_i801               20480  0 				i2c_i801               20480  0 
i915                 1024000  4 				i915                 1024000  4 
input_polldev          16384  1 applesmc			input_polldev          16384  1 applesmc
intel_gtt              20480  1 i915				intel_gtt              20480  1 i915
intel_powerclamp       20480  0 				intel_powerclamp       20480  0 
intel_rapl             20480  0 				intel_rapl             20480  0 
iosf_mbi               16384  1 intel_rapl			iosf_mbi               16384  1 intel_rapl
iTCO_vendor_support    16384  1 iTCO_wdt			iTCO_vendor_support    16384  1 iTCO_wdt
iTCO_wdt               16384  0 				iTCO_wdt               16384  0 
jbd2                   90112  1 ext4				jbd2                   90112  1 ext4
joydev                 20480  0 				joydev                 20480  0 
kvm                   446464  1 kvm_intel			kvm                   446464  1 kvm_intel
kvm_intel             155648  0 				kvm_intel             155648  0 
led_class              16384  3 b43,sdhci,applesmc		led_class              16384  3 b43,sdhci,applesmc
libahci                28672  1 ahci				libahci                28672  1 ahci
libata                184320  2 ahci,libahci			libata                184320  2 ahci,libahci
libphy                 32768  1 tg3				libphy                 32768  1 tg3
lpc_ich                24576  0 				lpc_ich                24576  0 
lrw                    16384  1 aesni_intel			lrw                    16384  1 aesni_intel
mac80211              655360  1 b43				mac80211              655360  1 b43
mac_hid                16384  0 				mac_hid                16384  0 
mbcache                20480  1 ext4				mbcache                20480  1 ext4
media                  20480  2 uvcvideo,videodev		media                  20480  2 uvcvideo,videodev
mei                    77824  1 mei_me				mei                    77824  1 mei_me
mei_me                 20480  0 				mei_me                 20480  0 
mmc_core              110592  4 b43,ssb,sdhci,sdhci_pci		mmc_core              110592  4 b43,ssb,sdhci,sdhci_pci
Module                  Size  Used by				Module                  Size  Used by
mousedev               20480  0 				mousedev               20480  0 
msr                    16384  0 				msr                    16384  0 
nls_cp437              20480  1 				nls_cp437              20480  1 
nls_iso8859_1          16384  1 				nls_iso8859_1          16384  1 
parport                36864  2 ppdev,parport_pc		parport                36864  2 ppdev,parport_pc
parport_pc             28672  0 				parport_pc             28672  0 
pcmcia                 53248  2 b43,ssb				pcmcia                 53248  2 b43,ssb
pcmcia_core            20480  1 pcmcia				pcmcia_core            20480  1 pcmcia
pcspkr                 16384  0 				pcspkr                 16384  0 
ppdev                  20480  0 				ppdev                  20480  0 
pps_core               20480  1 ptp				pps_core               20480  1 ptp
processor              28672  0 				processor              28672  0 
ptp                    20480  1 tg3				ptp                    20480  1 tg3
rfkill                 24576  2 cfg80211			rfkill                 24576  2 cfg80211
rng_core               16384  1 b43				rng_core               16384  1 b43
sbs                    16384  0 				sbs                    16384  0 
sbshc                  16384  1 sbs				sbshc                  16384  1 sbs
sch_fq_codel           20480  12 				sch_fq_codel           20480  12 
scsi_mod              147456  3 libata,sd_mod,sr_mod		scsi_mod              147456  3 libata,sd_mod,sr_mod
sdhci                  40960  1 sdhci_pci			sdhci                  40960  1 sdhci_pci
sdhci_pci              24576  0 				sdhci_pci              24576  0 
sd_mod                 36864  3 				sd_mod                 36864  3 
shpchp                 36864  0 				shpchp                 36864  0 
snd                    69632  8 snd_hwdep,snd_timer,snd_hda_c |	snd                    69632  12 snd_hwdep,snd_timer,snd_hda_
snd_hda_codec         114688  5 snd_hda_codec_hdmi,snd_hda_co	snd_hda_codec         114688  5 snd_hda_codec_hdmi,snd_hda_co
snd_hda_codec_cirrus    20480  1 				snd_hda_codec_cirrus    20480  1 
snd_hda_codec_generic    65536  1 snd_hda_codec_cirrus		snd_hda_codec_generic    65536  1 snd_hda_codec_cirrus
snd_hda_codec_hdmi     53248  1 				snd_hda_codec_hdmi     53248  1 
snd_hda_controller     28672  1 snd_hda_intel			snd_hda_controller     28672  1 snd_hda_intel
snd_hda_intel          28672  0 			      |	snd_hda_intel          28672  3 
snd_hwdep              16384  1 snd_hda_codec			snd_hwdep              16384  1 snd_hda_codec
snd_pcm                90112  4 snd_hda_codec_hdmi,snd_hda_co |	snd_pcm                90112  5 snd_hda_codec_hdmi,snd_hda_co
snd_timer              28672  1 snd_pcm			      |	snd_timer              28672  2 snd_pcm
soundcore              16384  2 snd,snd_hda_codec		soundcore              16384  2 snd,snd_hda_codec
sr_mod                 24576  0 				sr_mod                 24576  0 
ssb                    65536  1 b43				ssb                    65536  1 b43
tg3                   167936  0 				tg3                   167936  0 
usb_common             16384  1 usbcore				usb_common             16384  1 usbcore
usbcore               200704  7 uvcvideo,ehci_hcd,ehci_pci,us	usbcore               200704  7 uvcvideo,ehci_hcd,ehci_pci,us
usbhid                 49152  0 				usbhid                 49152  0 
uvcvideo               86016  0 				uvcvideo               86016  0 
v4l2_common            16384  1 videobuf2_core			v4l2_common            16384  1 videobuf2_core
vfat                   24576  1 				vfat                   24576  1 
video                  24576  2 i915,apple_gmux			video                  24576  2 i915,apple_gmux
videobuf2_core         40960  1 uvcvideo			videobuf2_core         40960  1 uvcvideo
videobuf2_memops       16384  1 videobuf2_vmalloc		videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_vmalloc      16384  1 uvcvideo			videobuf2_vmalloc      16384  1 uvcvideo
videodev              135168  3 uvcvideo,v4l2_common,videobuf	videodev              135168  3 uvcvideo,v4l2_common,videobuf
vmmon                  86016  0 				vmmon                  86016  0 
vmnet                  57344  13 				vmnet                  57344  13 
vmw_vmci               61440  1 vmw_vsock_vmci_transport	vmw_vmci               61440  1 vmw_vsock_vmci_transport
vmw_vsock_vmci_transport    32768  0 				vmw_vsock_vmci_transport    32768  0 
vsock                  32768  1 vmw_vsock_vmci_transport	vsock                  32768  1 vmw_vsock_vmci_transport
x86_pkg_temp_thermal    16384  0 				x86_pkg_temp_thermal    16384  0 
xhci_hcd              155648  1 xhci_pci			xhci_hcd              155648  1 xhci_pci
xhci_pci               16384  0 				xhci_pci               16384  0 

I have also pasted them here https://bpaste.net/show/3d359395e769

I can't make anything out of the differences though.

Last edited by redsolja (2015-04-30 11:57:26)

Offline

#41 2015-04-30 20:26:51

parades
Member
From: Michigan
Registered: 2015-03-02
Posts: 23
Website

Re: Battery only detected if AC power connected at bootup

Ran icdiff to get colorized, succinct output of a diff. I ran lsmod with and without battery detection prior to starting my x server.

OyLbVmO.png]

Only differences are with the "sbs" and "iTCO_wdt" modules. No idea what those are so I will continue investigating.

Offline

#42 2015-05-15 09:25:19

sagreble
Member
Registered: 2015-05-09
Posts: 6

Re: Battery only detected if AC power connected at bootup

bakerboy wrote:

I seemed of solved the problem on my Macbook pro 9.2 by doing this:

 
sudo modprobe battery
sudo nano /etc/module-load.d/battery.conf
battery

Hello! I've had the same problem when I recently moved to linux, that fixed the issue, thanks ! smile

Offline

#43 2015-05-15 18:05:00

xiii1408
Member
Registered: 2014-03-24
Posts: 10

Re: Battery only detected if AC power connected at bootup

I've been able to fix this issue (twice now) on the occasions I boot without battery detected by reloading both the battery and sbs modules.

# rmmod battery
# rmmod sbs
# modprobe battery
# modprobe sbs

I'm running 4.0.2-1 on a MacBook Pro 9,2.

Offline

#44 2015-05-17 19:41:25

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Battery only detected if AC power connected at bootup

xiii1408 wrote:

I've been able to fix this issue (twice now) on the occasions I boot without battery detected by reloading both the battery and sbs modules.

# rmmod battery
# rmmod sbs
# modprobe battery
# modprobe sbs

I'm running 4.0.2-1 on a MacBook Pro 9,2.

I also faced this issue, and in case the above doesn't work either for somebody else, I just had to change the order of modprobing battery and sbs.
For some strange reason, elsewise the 'modprobe sbs' command was stuck and even killing with SIGKILL took more than ten seconds.
Something I did only see yet when mounting or unmounting some device that was not recognized as removed.

I will now check whether adding sbs and battery to some /etc/modules-load.d/* file works permanently.

Offline

#45 2015-05-18 16:07:28

respiranto
Member
Registered: 2015-05-15
Posts: 479
Website

Re: Battery only detected if AC power connected at bootup

As soon as I put either sbs or battery or both in no matter which order into /etc/modules-load.d/battery.conf, I get following Error on boot-screen:

A start job is running for Load Kernel Modules ([X min] XXs / no limit)

This is running seemingly infinitely and appears always right after :

Started Update UMTP about System Boot/Shutdown

This does not appear in my current dmesg, so I suppose this is already wrong, also regarding the mention of Shutdown.
Searching the web for the latter also shows, that this usually appears at boot failures.

Is this expected behaviour since the modules are already to be inserted by default?

Offline

#46 2015-05-29 14:25:20

watgrad
Member
From: Waterloo, Ontario
Registered: 2014-09-21
Posts: 17

Re: Battery only detected if AC power connected at bootup

Seems like the latest firmware and kernel updates have resolved this form me.

Offline

#47 2015-06-01 19:36:31

parades
Member
From: Michigan
Registered: 2015-03-02
Posts: 23
Website

Re: Battery only detected if AC power connected at bootup

Yeah I haven't experienced it in a while either. Also have some modprobes running at startup though, but if you don't (watgrad) then it looks like this might be resolved.

Offline

#48 2015-06-08 09:48:52

redsolja
Member
Registered: 2011-04-04
Posts: 43

Re: Battery only detected if AC power connected at bootup

It seems fixed for me as well yikes
kernel and firmware 4.0.4 fixed it I think? or 4.0.3?

Offline

Board footer

Powered by FluxBB