Bug 61101 - Second battery is not used on Asus TX300
Summary: Second battery is not used on Asus TX300
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-10 08:03 UTC by jkp
Modified: 2016-02-15 21:45 UTC (History)
5 users (show)

See Also:
Kernel Version: 3.11
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description jkp 2013-09-10 08:03:02 UTC
On Asus TX300, a tablet/notebook hybrid, there's one battery inside the tablet part and another in the keyboard dock part. Tablet has the processor and the touchscreen display, SSD and micro HDMI and one battery, while the keyboard dock part has keyboard, touch area, ethernet & USB ports, a HDD and another battery.

Linux shows only the state of the battery in the tablet part, and doesn't appear to make use of the battery in the notebook part unless a specialy "battery up" mode is enabled by Win8.

Notebook part battery can be gotten into use by booting into Win8, turning the "battery up" mode on, then rebooting without switching power off. Then Linux appears to use the second battery, too. Expected battery duration by acpi is reported as 10 hour compared in the same situation when the tablet battery is partially charged and shows 2 hours.  

When the machine is powered up, the dock USB ports are active (jugding from an external keyboard working). In Win8 mode, if "battery up" mode is activated, Win8 then switches the mode off at boot if the setting is activated.

ACPI reports undock & dock messages, some details at discussion at (1). Not sure if ACPI or some other method (wmi, asus-wmi?) would be a good place to add support for controlling the external battery and the power state of external HDD and ports when docked.

More info & debug messages at (1).

(1) http://www.linlap.com/asus_transformer_book_tx300
Comment 1 jkp 2013-09-10 08:06:31 UTC
With win8, "battery up" mode is automatically switched off when the power supply is plugged in, but on Linux, machine stays in "battery up" mode even when power supply is plugged in.
Comment 2 jkp 2013-09-20 08:02:58 UTC
Anyone with suggestions on how to progess? ACPI decompilation seems to give some info, would be useful if someone familiar with ACPI would take a look.

I ran the following to get some info on the ACPI messages above. Q86 is described as DOCK OUT EVENT. Can't find anything which would obviously tell something about how to control “BATTERY UP” mode, but I don't know much about ACPI so I'm not good at looking.

cat /sys/firmware/acpi/tables/DSDT > dsdt.dat
iasl -d dsdt.dat




Found what looks like a tablet (pad) / notebook (nb) mode switch, perhaps this is relevant.

                  If (LEqual (IIA0, 0x00120062))
                  {
                      MNIO (" call set PAD/NB MODE\n")
                      If (FSPM)
                      {
                          Return (Zero)
                      }

                      MNIO ("TO SER PAD/NB MODE :")
                      MNIO (IIA1)
                      MNIO ("\n")
                      If (IIA1)
                      {
                          ^^PCI0.LPCB.EC0.WRAM (0x07B1, Zero)
                      }
                      Else
                      {
                          ^^PCI0.LPCB.EC0.WRAM (0x07B1, One)
                      }

                      Return (One)
                  }
              }



Some code handling two batteries:

                  If (LEqual (IIA0, 0x00120047))
                  {
                      If (And (^^PCI0.LPCB.EC0.EPWS, 0x06))
                      {
                          Store (Zero, Local1)
                          If (LEqual (Local0, 0x02))
                          {
                              Store (^^PCI0.LPCB.EC0.B0DV, Local1)
                          }
                          Else
                          {
                              If (LEqual (Local0, 0x04))
                              {
                                  Store (^^PCI0.LPCB.EC0.B1DV, Local1)
                              }
                              Else
                              {
                                  Store (Add (^^PCI0.LPCB.EC0.B0DV, ^^PCI0.LPCB.EC0.B1DV), Local1)
                              }
                          }

                          Return (Add (Local1, 0x00010000))
                      }





This, too, seems to handle two batteries:

                  If (LEqual (IIA0, 0x00120049))
                  {
                      If (And (^^PCI0.LPCB.EC0.EPWS, 0x06))
                      {
                          Store (Zero, Local1)
                          If (LEqual (Local0, 0x02))
                          {
                              Store (^^PCI0.LPCB.EC0.B0FC, Local1)
                          }
                          Else
                          {
                              If (LEqual (Local0, 0x04))
                              {
                                  Store (^^PCI0.LPCB.EC0.B1FC, Local1)
                              }
                              Else
                              {
                                  Store (Add (^^PCI0.LPCB.EC0.B0FC, ^^PCI0.LPCB.EC0.B1FC), Local1)
                              }
                          }

                          Return (Add (Local1, 0x00010000))
                      }

Note You need to log in before you can comment on or make changes to this bug.