Bug 115191 - Battery information is missing, GPIO dependency described in _DEP - Acer One 10 (S1002/Popcorn)
Summary: Battery information is missing, GPIO dependency described in _DEP - Acer One ...
Status: ASSIGNED
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: i386 (show other bugs)
Hardware: Intel Linux
: P1 high
Assignee: platform_i386
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-23 11:19 UTC by Stace A. Zacharov
Modified: 2024-01-13 14:18 UTC (History)
7 users (show)

See Also:
Kernel Version: 4.4.5 - 4.6-rc2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
full dmesg (222.60 KB, text/plain)
2016-03-23 11:19 UTC, Stace A. Zacharov
Details
Output of acpidump (441.02 KB, application/octet-stream)
2016-03-23 11:22 UTC, Stace A. Zacharov
Details
Original DSDT table (75.84 KB, application/x-ns-proxy-autoconfig)
2016-03-23 11:23 UTC, Stace A. Zacharov
Details
Decompiled with: iasl -e ssdt*.dat -d dsdt.dat (693.33 KB, text/x-dsl)
2016-03-23 11:26 UTC, Stace A. Zacharov
Details
dmesg output from 4.4.5 kernel (76.38 KB, text/plain)
2016-04-06 13:46 UTC, Stace A. Zacharov
Details
Config of 4.4.5 kernel (184.77 KB, application/octet-stream)
2016-04-06 13:47 UTC, Stace A. Zacharov
Details
Full dmesg for 4.6-rc3 (110.17 KB, text/plain)
2016-04-15 14:12 UTC, Stace A. Zacharov
Details
Kernel config for 4.6-rc3 (189.71 KB, application/octet-stream)
2016-04-15 14:13 UTC, Stace A. Zacharov
Details
Full dmesg for 4.4.6 from Ubuntu with same patches (67.49 KB, text/plain)
2016-04-15 14:16 UTC, Stace A. Zacharov
Details
Config of 4.4.6 kernel (185.07 KB, application/octet-stream)
2016-04-15 14:19 UTC, Stace A. Zacharov
Details
dmesg from latest drm-intel-next (112.13 KB, text/plain)
2016-05-10 12:23 UTC, Stace A. Zacharov
Details
Config of latest drm-intel-next kernel (189.59 KB, application/octet-stream)
2016-05-10 12:24 UTC, Stace A. Zacharov
Details
debug patch to probe battery driver after GPIO driver probed (715 bytes, patch)
2016-05-11 01:07 UTC, Zhang Rui
Details | Diff
dmesg from same kernel with patch (74.23 KB, text/plain)
2016-05-11 07:16 UTC, Stace A. Zacharov
Details
Dmesg from 4.4.8 with "i2c_designware 80860F41:00: i2c_dw_xfer_msg: invalid message length" (224.52 KB, text/plain)
2016-06-06 15:58 UTC, Stace A. Zacharov
Details
dmesg from same kernel before crash (55.15 KB, text/plain)
2016-06-06 15:59 UTC, Stace A. Zacharov
Details

Description Stace A. Zacharov 2016-03-23 11:19:20 UTC
Created attachment 210361 [details]
full dmesg

Good day!

I installing Ubuntu 14.04 to Acer Tablet/Netbook.
I try different versions of kernel and have some success with 4.5, but power/battery monitoring and sound does not works.

I thing root problem is:
---
[    1.153218] ACPI Error: No handler for Region [DVBQ] (ffff8800764c0c60) [GenericSerialBus] (20160108/evregion-166)
[    1.153230] ACPI Error: Region GenericSerialBus (ID=9) has no handler (20160108/exfldio-299)
[    1.153240] ACPI Error: Method parse/execution failed [\_SB.I2C1.BATC.PSRC] (Node ffff8800764c2780), AE_NOT_EXIST (20160108/psparse-542)
[    1.153258] ACPI Error: Method parse/execution failed [\_SB.ADP1._PSR] (Node ffff8800764c27f8), AE_NOT_EXIST (20160108/psparse-542)
[    1.153276] ACPI Exception: AE_NOT_EXIST, Error reading AC Adapter state (20160108/ac-128)
[    1.153484] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
[    1.153582] ACPI: Lid Switch [LID0]
[    1.158825] [Firmware Bug]: No valid trip found
---

I try to use ACPI 
When i try to replace DSDT via grub I have new error:
---
[    0.000109] ACPI: Core revision 20160108
[    0.047157] ACPI Error: [\_SB_.DPTF] Namespace lookup failure, AE_NOT_FOUND (20160108/dswload-210)
[    0.047190] ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20160108/psobject-227)
[    0.047268] ACPI Exception: AE_NOT_FOUND, (SSDT: LowPwrM) while loading table (20160108/tbxfload-193)
[    0.056458] ACPI Error: 1 table load failures, 8 successful (20160108/tbxfload-215)
---
This error occurs even if I do not I bring any changes (cat /sys/firmware/acpi/tables/DSDT > /boot/dsdt.aml).

Without DSDT override i see this:
---
[    0.000109] ACPI: Core revision 20160108
[    0.059614] ACPI: 9 ACPI AML tables successfully acquired and loaded
[    0.059633] 
---

I think it looks like a bug 83941 : https://bugzilla.kernel.org/show_bug.cgi?id=83941
But my kernel knowledge is not enough for port patches from https://bugzilla.kernel.org/show_bug.cgi?id=69011 to 4.5 kernel tree ;(
Comment 1 Stace A. Zacharov 2016-03-23 11:22:30 UTC
Created attachment 210371 [details]
Output of acpidump
Comment 2 Stace A. Zacharov 2016-03-23 11:23:22 UTC
Created attachment 210381 [details]
Original DSDT table
Comment 3 Stace A. Zacharov 2016-03-23 11:26:56 UTC
Created attachment 210391 [details]
Decompiled with: iasl -e ssdt*.dat -d dsdt.dat

# ls -lR /sys/firmware/acpi/tables/
/sys/firmware/acpi/tables/:
итого 0
-r-------- 1 root root   108 марта 23 17:14 APIC
-r-------- 1 root root   189 марта 23 17:14 BCFG
-r-------- 1 root root    56 марта 23 17:14 BGRT
-r-------- 1 root root   332 марта 23 17:14 CSRT
-r-------- 1 root root 77660 марта 23 17:14 DSDT
drwxr-xr-x 2 root root     0 марта 23 17:14 dynamic
-r-------- 1 root root   268 марта 23 17:14 FACP
-r-------- 1 root root    68 марта 23 17:14 FPDT
-r-------- 1 root root    56 марта 23 17:14 HPET
-r-------- 1 root root   260 марта 23 17:14 LPIT
-r-------- 1 root root    60 марта 23 17:14 MCFG
-r-------- 1 root root    85 марта 23 17:14 MSDM
-r-------- 1 root root  1539 марта 23 17:14 SSDT1
-r-------- 1 root root  9303 марта 23 17:14 SSDT2
-r-------- 1 root root    88 марта 23 17:14 SSDT3
-r-------- 1 root root   255 марта 23 17:14 SSDT4
-r-------- 1 root root  1891 марта 23 17:14 SSDT5
-r-------- 1 root root   656 марта 23 17:14 SSDT6
-r-------- 1 root root   378 марта 23 17:14 SSDT7
-r-------- 1 root root  1063 марта 23 17:14 SSDT8
-r-------- 1 root root    50 марта 23 17:14 TCPA
-r-------- 1 root root    52 марта 23 17:14 TPM2
-r-------- 1 root root    66 марта 23 17:14 UEFI

/sys/firmware/acpi/tables/dynamic:
итого 0
-r-------- 1 root root 1075 марта 23 17:14 SSDT10
-r-------- 1 root root  351 марта 23 17:14 SSDT11
-r-------- 1 root root  141 марта 23 17:14 SSDT12
-r-------- 1 root root 1281 марта 23 17:14 SSDT9
Comment 4 Stace A. Zacharov 2016-04-06 13:46:49 UTC
Created attachment 211941 [details]
dmesg output from 4.4.5 kernel

Some progress with patched 4.4.5 kernel & CONFIG_XPOWER_PMIC_OPREGION=y
Now I don't have this messages & have worked /sys/class/power_supply/ADP1/online
But its all:
---
stace@lin-acer10:/boot$ cat /sys/class/power_supply/ADP1/uevent 
POWER_SUPPLY_NAME=ADP1
POWER_SUPPLY_ONLINE=1
---

I don't see battery ;(
Comment 5 Stace A. Zacharov 2016-04-06 13:47:38 UTC
Created attachment 211951 [details]
Config of 4.4.5 kernel
Comment 6 Stace A. Zacharov 2016-04-15 14:09:55 UTC
Is IDTP9145 chip supported by Linux ?
How to turn it on?

Windows 10 drivers for this model contained file idtp9145.inf with strings:
---
...
Driver_Service.Desc = "Intel(R) Power Management IC Device Service" 
IDTP9145.DeviceDesc.IDTP9145 ="IDT P9145 Device"
...
%IDTP9145.DeviceDesc.IDTP9145%=Driver, ACPI\VEN_INT&DEV_33FD&REV_FFFF
...
---

I build 4.6-rc3 kernel with new patches:
1) https://cgit.freedesktop.org/cgit/?url=~miku/drm-intel/commit/&h=rc6_test&id=7e6c3f36563d133cff5b700d9c36b12ac2a0c643,
2) https://cgit.freedesktop.org/~miku/drm-intel/commit/?h=rc6_test&id=b2f08adb19fcb18fea7cda9908fa52e2b9db5e7f
3) https://cgit.freedesktop.org/~miku/drm-intel/commit/?h=rc6_test&id=e564271291fa70265b53fa34c01cbb0ae6282e81

And have some devices recognized:
---
# ls -l /sys/devices/platform/80860F41:04/i2c-4/i2c-INT33FD:00
drwxr-xr-x 3 root root    0 Apr 15 20:04 crystal_cove_adc
drwxr-xr-x 3 root root    0 Apr 15 20:04 crystal_cove_bcu
drwxr-xr-x 3 root root    0 Apr 15 20:04 crystal_cove_gpio
drwxr-xr-x 3 root root    0 Apr 15 20:04 crystal_cove_pmic
drwxr-xr-x 4 root root    0 Apr 15 20:04 crystal_cove_pwm
drwxr-xr-x 3 root root    0 Apr 15 20:04 crystal_cove_pwrsrc
drwxr-xr-x 3 root root    0 Apr 15 20:04 crystal_cove_thermal
lrwxrwxrwx 1 root root    0 Apr 15 20:04 driver -> ../../../../../bus/i2c/drivers/intel_soc_pmic_i2c
lrwxrwxrwx 1 root root    0 Apr 15 20:04 firmware_node -> ../../../../LNXSYSTM:00/LNXSYBUS:00/80860F41:04/INT33FD:00
drwxr-xr-x 3 root root    0 Apr 15 20:04 gpio
drwxr-xr-x 3 root root    0 Apr 15 20:04 gpiochip3
-r--r--r-- 1 root root 4096 Apr 15 20:04 modalias
-r--r--r-- 1 root root 4096 Apr 15 20:04 name
drwxr-xr-x 2 root root    0 Apr 15 20:04 power
lrwxrwxrwx 1 root root    0 Apr 15 20:04 subsystem -> ../../../../../bus/i2c
-rw-r--r-- 1 root root 4096 Apr 15 20:04 uevent
---

But no battery status:
---
root@lin-acer10:~# upower -i
root@lin-acer10:~# upower -d
DDevice: /org/freedesktop/UPower/devices/line_power_ADP1
  native-path:          ADP1
  power supply:         yes
  updated:              Fri Apr 15 19:25:13 2016 (2608 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    online:             yes

Daemon:
  daemon-version:  0.9.23
  can-suspend:     no
  can-hibernate:   yes
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  yes
  is-docked:       no
---

In dmesg:
---
...
[    0.588290] gpiochip_find_base: found new base at 410
[    0.588402] gpio gpiochip0: (INT33FC:00): added GPIO chardev (254:0)
[    0.588564] gpiochip_setup_dev: registered GPIOs 410 to 511 on device: gpiochip0 (INT33FC:00)
[    0.589436] gpiochip_find_base: found new base at 382
[    0.589541] gpio gpiochip1: (INT33FC:01): added GPIO chardev (254:1)
[    0.589693] gpiochip_setup_dev: registered GPIOs 382 to 409 on device: gpiochip1 (INT33FC:01)
[    0.590119] gpiochip_find_base: found new base at 338
[    0.590260] gpio gpiochip2: (INT33FC:02): added GPIO chardev (254:2)
[    0.590395] gpiochip_setup_dev: registered GPIOs 338 to 381 on device: gpiochip2 (INT33FC:02)
...
[    4.006760] intel_soc_pmic_i2c i2c-INT33FD:00: probe
[    4.006805] intel_soc_pmic_i2c i2c-INT33FD:00: GPIO lookup for consumer intel_soc_pmic
[    4.006810] intel_soc_pmic_i2c i2c-INT33FD:00: using ACPI for GPIO lookup
[    4.006815] acpi INT33FD:00: GPIO: looking up intel_soc_pmic-gpios
[    4.006821] acpi INT33FD:00: GPIO: looking up intel_soc_pmic-gpio
[    4.006825] acpi INT33FD:00: GPIO: looking up 0 in _CRS
[    4.006886] intel_soc_pmic_i2c i2c-INT33FD:00: using lookup tables for GPIO lookup
[    4.006891] intel_soc_pmic_i2c i2c-INT33FD:00: lookup for GPIO intel_soc_pmic failed
[    4.006901] i2c i2c-4: master_xfer[0] W, addr=0x5e, len=1
[    4.006905] i2c i2c-4: master_xfer[1] R, addr=0x5e, len=1
[    4.016167] gpiochip_find_base: found new base at 243
[    4.016490] gpio gpiochip3: (gpio_crystalcove): added GPIO chardev (254:3)
[    4.017580] gpiochip_setup_dev: registered GPIOs 243 to 337 on device: gpiochip3 (gpio_crystalcove)
[    4.017959] i2c i2c-4: master_xfer[0] W, addr=0x5e, len=1
[    4.017966] i2c i2c-4: master_xfer[1] R, addr=0x5e, len=1
[    4.022980] i2c i2c-4: master_xfer[0] W, addr=0x5e, len=2
[    4.032013] i2c i2c-4: client [INT33FD:00] registered with bus id i2c-INT33FD:00
[    4.035414] [Firmware Bug]: No valid trip found
[    4.038776]   Magic number: 12:768:133
...
Comment 7 Stace A. Zacharov 2016-04-15 14:12:15 UTC
Created attachment 212881 [details]
Full dmesg for 4.6-rc3
Comment 8 Stace A. Zacharov 2016-04-15 14:13:45 UTC
Created attachment 212901 [details]
Kernel config for 4.6-rc3
Comment 9 Stace A. Zacharov 2016-04-15 14:16:50 UTC
Created attachment 212921 [details]
Full dmesg for 4.4.6 from Ubuntu with same patches
Comment 10 Stace A. Zacharov 2016-04-15 14:19:17 UTC
Created attachment 212931 [details]
Config of 4.4.6 kernel
Comment 11 Jan M. 2016-04-24 08:23:46 UTC
Same Problem here with Archlinux and Kernel 4.5.2. on a Asus eeePC 1005PX. In the archlinux.org forum is a topic about this problem on several note-/netbook models like eeePC 1015PX and Macbook Pro. The lts kernel 4.4.8 works fine.
Comment 12 Zhang Rui 2016-05-10 08:28:43 UTC
hmm, what issue do you have after CONFIG_XPOWER_PMIC_OPREGION=y?

the only problem is that battery information is missing, right?
Comment 13 Zhang Rui 2016-05-10 08:38:26 UTC
Please make sure CONFIG_PINCTRL_BAYTRAIL is set.
Comment 14 Stace A. Zacharov 2016-05-10 08:43:30 UTC
CONFIG_PINCTRL_BAYTRAIL is set in all configs:
---
root@lin-acer10:/home/stace# grep CONFIG_PINCTRL_BAYTRAIL /boot/config-4.*
/boot/config-4.4.0-21-generic:CONFIG_PINCTRL_BAYTRAIL=y
/boot/config-4.4.0-22-generic:CONFIG_PINCTRL_BAYTRAIL=y
/boot/config-4.4.8-acer10-v2:CONFIG_PINCTRL_BAYTRAIL=y
/boot/config-4.4.8-acer10-v3:CONFIG_PINCTRL_BAYTRAIL=y
/boot/config-4.6.0-rc5-acer10-drm-intel-v1:CONFIG_PINCTRL_BAYTRAIL=y
/boot/config-4.6.0-rc5-acer10-drm-intel-v2:CONFIG_PINCTRL_BAYTRAIL=y
/boot/config-4.6.0-rc5-acer10-drm-intel-v3:CONFIG_PINCTRL_BAYTRAIL=y
/boot/config-4.6.0-rc5-acer10-v1:CONFIG_PINCTRL_BAYTRAIL=y
---

Answer to first question:
Main issue - battery information.
I try all current kernels including drm-intel (4.6.0-rc5) and "Ubuntu 4.4.0-22.39-generic 4.4.8" with this config, but nothing changed.

Battery info & suspend/resume is very critical for me.

Not critical for me, but also not worked:
1) Internal sound - Bluetooth sound works
2) Backlight control
But, "cat /sys/class/backlight/intel_backlight/actual_brightness" show 100 if screen on, and 0 if screen off.
3) Both cameras not worked also
Comment 15 Zhang Rui 2016-05-10 09:19:59 UTC
please attach the output of "ls /sys/bus/acpi/drivers/battery/"
Comment 16 Stace A. Zacharov 2016-05-10 09:21:41 UTC
root@lin-acer10:/home/stace# ls /sys/bus/acpi/drivers/battery/
bind  uevent  unbind
root@lin-acer10:/home/stace# LC_TIME=C ls -l /sys/bus/acpi/drivers/battery/
итого 0
--w------- 1 root root 4096 May 10 15:21 bind
--w------- 1 root root 4096 May 10 15:21 uevent
--w------- 1 root root 4096 May 10 15:21 unbind
root@lin-acer10:/home/stace#
Comment 17 Stace A. Zacharov 2016-05-10 12:23:36 UTC
Created attachment 215751 [details]
dmesg from latest drm-intel-next

Source: http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2016-05-09-wily/
Compiled without any additional patches (Internal WiFi & Bluetouth not work)
Comment 18 Stace A. Zacharov 2016-05-10 12:24:35 UTC
Created attachment 215761 [details]
Config of latest drm-intel-next kernel
Comment 19 Zhang Rui 2016-05-11 01:07:23 UTC
Created attachment 215891 [details]
debug patch to probe battery driver after GPIO driver probed

Please apply this patch and check if the battery information is available.
Comment 20 Stace A. Zacharov 2016-05-11 07:16:02 UTC
Created attachment 215911 [details]
dmesg from same kernel with patch

Working! Thank you so much!!!

"ACPI: Battery Slot [BATC] (battery present)"

---
root@lin-acer10:/var/log# LC_ALL=C ls -l /sys/bus/acpi/drivers/battery/
total 0
lrwxrwxrwx 1 root root    0 May 11 13:03 PNP0C0A:00 -> ../../../../devices/LNXSYSTM:00/LNXSYBUS:00/80860F41:00/PNP0C0A:00
--w------- 1 root root 4096 May 11 13:03 bind
--w------- 1 root root 4096 May 11 13:03 uevent
--w------- 1 root root 4096 May 11 13:03 unbind
root@lin-acer10:/boot# LC_ALL=C upower -d
Device: /org/freedesktop/UPower/devices/battery_BATC
  native-path:          BATC
  vendor:               LION
  model:                Battery
  serial:               Battery
  power supply:         yes
  updated:              Wed May 11 13:02:42 2016 (736 seconds ago)
  has history:          yes
  has statistics:       yes
  battery
    present:             yes
    rechargeable:        yes
    state:               fully-charged
    energy:              27.232 Wh
    energy-empty:        0 Wh
    energy-full:         27.232 Wh
    energy-full-design:  31.08 Wh
    energy-rate:         0.2738 W
    voltage:             4.149 V
    percentage:          100%
    capacity:            87.619%
    technology:          lithium-ion

Device: /org/freedesktop/UPower/devices/line_power_ADP1
  native-path:          ADP1
  power supply:         yes
  updated:              Wed May 11 13:02:37 2016 (741 seconds ago)
  has history:          no
  has statistics:       no
  line-power
    online:             yes

Daemon:
  daemon-version:  0.9.23
  can-suspend:     no
  can-hibernate:   yes
  on-battery:      no
  on-low-battery:  no
  lid-is-closed:   no
  lid-is-present:  yes
  is-docked:       no
root@lin-acer10:/boot# 
---
Comment 21 Stace A. Zacharov 2016-05-11 17:21:57 UTC
Suspend & hibernate does not work ;(

Can You help me?

When i run "pm-suspend" screen turned off, turned on, and ask me to enter password for session restore.

When I run "pm-hibernate" screen turned off, turned on, and system hung.
I need to press "power" key for 10 seconds to switch system off.
Next boot i have message about "System error" in suspend/resume processing.

I try latest drm-intel-next kernel and Ubuntu latest 4.4.8 kernel (Ubuntu 4.4.0-22.39-generic 4.4.8) with your patch.

Ending lines in /var/log/pm-suspend.log:
---
...
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate:
Kernel modesetting video driver detected, not using quirks.
/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate: success.

Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:
/usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.

Running hook /etc/pm/sleep.d/novatel_3g_suspend hibernate hibernate:
/etc/pm/sleep.d/novatel_3g_suspend hibernate hibernate: success.

Ср. мая 11 16:51:55 NOVT 2016: performing hibernate
---
Comment 22 Stace A. Zacharov 2016-06-02 16:41:15 UTC
Things are not so good. Periodically there are errors, then the system says that the battery has reached a critical level (0%).
In DMCG it looks like this:
---
[   53.353045] i2c_designware 80860F41:00: i2c_dw_xfer_msg: invalid message length
[   53.757594] i2c_designware 80860F41:00: timeout in disabling adapter
[   53.757621] i2c i2c-0: i2c read failed
[   53.837620] i2c_designware 80860F41:00: timeout waiting for bus ready
[   53.917588] i2c_designware 80860F41:00: timeout waiting for bus ready
[   53.917605] i2c i2c-0: i2c read failed
...
[   53.353045] i2c_designware 80860F41:00: i2c_dw_xfer_msg: invalid message length
[   53.757594] i2c_designware 80860F41:00: timeout in disabling adapter
[   53.757621] i2c i2c-0: i2c read failed
[   53.837620] i2c_designware 80860F41:00: timeout waiting for bus ready
[   53.917588] i2c_designware 80860F41:00: timeout waiting for bus ready
[   53.917605] i2c i2c-0: i2c read failed
...
---
Tested on kernel 4.4.8 and 4.6
Comment 23 Zhang Rui 2016-06-03 04:42:35 UTC
(In reply to Stace A. Zacharov from comment #21)
> Suspend & hibernate does not work ;(
> 
do suspend & hibernate work before applying the patch?
If no, this is a different issue. Please file a new bug report.
Comment 24 Zhang Rui 2016-06-03 04:44:02 UTC
(In reply to Stace A. Zacharov from comment #22)
> Things are not so good. Periodically there are errors, then the system says
> that the battery has reached a critical level (0%).
> In DMCG it looks like this:
> ---
> [   53.353045] i2c_designware 80860F41:00: i2c_dw_xfer_msg: invalid message
> length
> [   53.757594] i2c_designware 80860F41:00: timeout in disabling adapter
> [   53.757621] i2c i2c-0: i2c read failed
> [   53.837620] i2c_designware 80860F41:00: timeout waiting for bus ready
> [   53.917588] i2c_designware 80860F41:00: timeout waiting for bus ready
> [   53.917605] i2c i2c-0: i2c read failed
> ...
> [   53.353045] i2c_designware 80860F41:00: i2c_dw_xfer_msg: invalid message
> length
> [   53.757594] i2c_designware 80860F41:00: timeout in disabling adapter
> [   53.757621] i2c i2c-0: i2c read failed
> [   53.837620] i2c_designware 80860F41:00: timeout waiting for bus ready
> [   53.917588] i2c_designware 80860F41:00: timeout waiting for bus ready
> [   53.917605] i2c i2c-0: i2c read failed
> ...

@lv.zheng@intel.com and @yu.c.chen@intel.com

is this the same ACPICA issue?
Comment 25 Stace A. Zacharov 2016-06-03 10:21:22 UTC
Suspend & hibernate still does not work, but it's the same battery information problem.

With your patch battery is determined when loading and charging correctly displayed, but after some time (5 minutes - 2 hours) the system says that the critical charge, and there are such in the log records.

After turning off the power and restart, the battery charge display is restored.
Comment 26 Lv Zheng 2016-06-06 10:45:17 UTC
Yes, I can help to figure out if this is an issue:
i2c_dw_xfer_msg: invalid message length

Is that possible for you to enable the AML tracer before triggering the above error:
  # echo "enable" > /sys/module/parameters/acpi/parameters/trace_state

Or you could even use it as a boot parameter, if the dmesg output wasn't huge.
  acpi.trace_state=enable

The tracer facility need CONFIG_ACPI_DEBUG to be enabled.

Thanks and best regards
-Lv
Comment 27 Stace A. Zacharov 2016-06-06 15:58:10 UTC
Created attachment 219201 [details]
Dmesg from 4.4.8 with "i2c_designware 80860F41:00: i2c_dw_xfer_msg: invalid message length"

dmesg after battery 0%
Comment 28 Stace A. Zacharov 2016-06-06 15:59:44 UTC
Created attachment 219211 [details]
dmesg from same kernel before crash

Start of dmesg from same kernel
Comment 29 Stace A. Zacharov 2016-06-06 16:05:03 UTC
After restart system show 52% battery charge
Comment 30 Lv Zheng 2016-06-12 02:26:13 UTC
Hi, I can see this:

[ 3169.698437]   exdebug-0435 ex_trace_point        : Method End [0xffffc9000000f4b5:\_SB.ADP1._PSR] execution.
[ 3169.702229] i2c_designware 80860F41:00: i2c_dw_xfer_msg: invalid message length
[ 3169.723780]   exdebug-0435 ex_trace_point        : Method Begin [0xffffc9000000f4b5:\_SB.ADP1._PSR] execution.

It is:
            Method (_PSR, 0, NotSerialized)  // _PSR: Power Source
            {
                Store (^^I2C1.BATC.PSRC (), Local0)
                If (LEqual (Local0, One))
                {
                    Return (One)
                }
                Else
                {
                    Return (Zero)
                }
            }
And the PSRC() is:
            Method (PSRC, 0, NotSerialized)
            {
                Store (BQ08, TES2)
                If (LNotEqual (And (E002, 0x04), Zero))
                {
                    Store (0x57, Local0)
                    Store (Local0, XXK1)
                    Store (0x57, Local0)
                    Store (Local0, XXK2)
                    Return (One)
                }
                Else
                {
                    Store (0x57, Local0)
                    Store (Local0, XXK1)
                    Store (0x75, Local0)
                    Store (Local0, XXK2)
                    Return (0x02)
                }
            }
The named objects accessed in it:
BQ08: GenericSerialBus OperationRegion field
TES2: Buffer
E002: Byte field of TES2
XXK1: SystemIo OperationRegion field

So this log is related to BQ08:
        OperationRegion (DVBQ, GenericSerialBus, Zero, 0x20)
        Field (DVBQ, BufferAcc, NoLock, Preserve)
        {
            Connection (BQBC), 
            AccessAs (BufferAcc, AttribByte), 
            BQ00,   8, 
            BQ01,   8, 
            BQ02,   8, 
            BQ03,   8, 
            BQ04,   8, 
            BQ05,   8, 
            BQ06,   8, 
            BQ07,   8, 
            BQ08,   8, 
            BQ09,   8, 
            BQ0A,   8
        }

So no additional test steps are required for this issue.
Let me dig futher to see if this is an issue in ACPICA.

Thanks
-Lv
Comment 31 Lv Zheng 2016-06-12 02:40:01 UTC
Before further confirmation, let me write down something here.
The error log is between the ACPI entry method invocations and issued from the i2c ISR.
This looks weird to me because there shouldn't be IRQs between the entry methods.
Looks like a driver bug to me.

Thanks and best regards
-Lv
Comment 32 Keith Miller 2016-08-08 14:02:45 UTC
All,

I am having the same issue on Arch Linux (using the Mainline Kernel. AUR Package: linux-mainline).

Is there anything I can do, or any information I can to help resolve this issues?

Thanks.
Comment 33 Stace A. Zacharov 2016-08-25 15:34:49 UTC
Small question to the Lv Zheng: Maybe the problem "IRQs between input methods" to be associated with the chip RTL8723bs Wi-Fi?

I noticed a strange thing: with kernels (4.4 and 4.8-rc2) on which WiFi patches  (https://github.com/hadess/rtl8723bs) have been installed, battery indication may not be lost in a few hours, while the kernels without these patches battery disappears in a few minutes.

P.S. Hibernate works after switching to Ubintu 16.04.
Suspend does not work still.
Sound and control the brightness of the screen do not work either.
Comment 34 Lv Zheng 2017-01-16 05:35:40 UTC
This bug still looks like an I2C issue to me.
Could you find i2c_designware owner to do a further debugging?

I'm re-assigning this to platform specific hardware.

Thanks
Lv
Comment 35 quackzy 2024-01-13 14:18:13 UTC
battery still an issue in 2024 (6.6.10), the device is mostly working oob now, just sensors are missing (but not that important) and the battery is not detected, which make it usable with ac adapter only

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