nexus511 / gpd-ubuntu-packages

This repository shall provide the base for building ubuntu packages from most of the patches currently used to get linux on the gpd-pocket.
GNU General Public License v3.0
73 stars 4 forks source link

Touchscreen stops working after suspend/resume on Echo Ubuntu 17.04 release #10

Open stephen-hocking opened 7 years ago

stephen-hocking commented 7 years ago

It no longer accepts input. Co-incidentally, the kernel is continually logging messages of the form [66626.291106] i2c_designware 808622C1:05: timeout waiting for bus ready [66626.291118] Goodix-TS i2c-GDIX1001:00: I2C transfer error: -110

nexus511 commented 7 years ago

Is it reproducible? Does this always happen?

I did not see this yet on my Xubuntu device, so I am not sure if it only happens on Ubuntu 17.04.

It sounds like a Kernel issue but might be something that needs to be "unloaded" before the device goes into suspend.

nexus511 commented 7 years ago

According to the kernel log, the touchscreen is indeed connected via I²C. So what happens most likely means that the I²C controller or the display does not get properly (re)initialized after leaving the suspend.

If it happens again, could you try to unload the kernel module and reload it? This should be possible by just calling

sudo modprobe -r goodix && sleep 5 && modprobe goodix

Then please check, if the screen is working again.

stephen-hocking commented 7 years ago

It's a bit hard to reproduce, but I'll try reloading that module when it does. On the other hand, I'm getting a bunch of sst errors in the logs from the audio module.

nexus511 commented 7 years ago

Okay. I looked into the kernel source. I doubt that reloading the touch driver will fix the issue as it looks like the I²C bus got stuck itself.

So what happens here is (for some reason) that the I²C bus does not properly resume after suspend. I guess that this only happens in rare occasions. I would be very helpful to get some input when this happens.

Debugging failures on the I²C sometimes is quite hard as some errors that evolve from HF interference do only happen randomly and are hard to trigger manually. I don't think that I will have the time to dig into that soon but it might be nice to have some numbers on that, how often this occurs.

Edit:

The error message is basically spawned at drivers/i2c/busses/i2c-designware-common.c in line 219 and indicates that the bus seems to be busy.

I don't understand enough about the I²C stuff in the kernel but from my understanding that indicates that the I²C bus stays busy and the module is not able to communicate with this anymore.

Herst commented 7 years ago

@nexus511 This sounds like something @jwrdegoede could know more about?

nexus511 commented 7 years ago

@Herst Yep. @jwrdegoede did actually some work around the I²C stuff. So this issue should basically be reported to him.

I actually wanted to ensure that this is a kernel issue before moving this onwards to him.

zardus commented 7 years ago

FWIW, I'm seeing this happen every once in a while on my 16.04 setup (though of course, the kernel is the same in this case).

On Thu, Aug 31, 2017 at 4:22 AM, nexus511 notifications@github.com wrote:

@Herst https://github.com/herst Yep. @jwrdegoede https://github.com/jwrdegoede did actually some work around the I²C stuff. So this issue should basically be reported to him.

I actually wanted to ensure that this is a kernel issue before moving this onwards to him.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nexus511/gpd-ubuntu-packages/issues/10#issuecomment-326266652, or mute the thread https://github.com/notifications/unsubscribe-auth/ADSzl4rZo7l8NcfLDXZol-CAhoCs9magks5sdpeIgaJpZM4PIcaQ .

luzhuomi commented 7 years ago

Hi, I am using 17.04 and hitting this again today. using this command fixes the problem after wake up; sudo modprobe -r goodix && sleep 5 && sudo modprobe goodix

Regards Kenny

nexus511 commented 7 years ago

@luzhuomi Interesting. Thank you for trying.

That basically means that retrying to initialize the touchscreen module does indeed work. I would have guessed that the I2C bus is the culprit.

I guess always unloading the touch before suspend might help as a workaround then, but I am afraid it will break multi-touch support, as touchegg will die then.

Anyway. This might be one for @jwrdegoede if he finds some time to look into that. I will not have the time to dig into the I2C kernel code for the next few weeks.

luzhuomi commented 7 years ago

@nexus511 You are welcome and thanks for responding. I hope @jwrdegoede will have time to fix this. To be more specific I am running kernel version 4.13.0-rc5.

stockmind commented 7 years ago

@luzhuomi can you post the result of this:

ls /usr/local/sbin/

And

service --status-all | grep gpd
luzhuomi commented 7 years ago

@stockmind

$ ls /usr/local/sbin/ gpd-fan gpdfand $ sudo service --status-all |grep gpd

nexus511 commented 7 years ago

@stockmind If you are looking for a "gpd-rotate" script: This is not contained in the systems anymore as rotation should now be covered by X11 configuration (and wayland as soon as I figured that one out).

According the kernel log the goodix driver from the kernel is not able to communicate with the touchscreen anymore. See the output from the initial post:

[66626.291106] i2c_designware 808622C1:05: timeout waiting for bus ready
[66626.291118] Goodix-TS i2c-GDIX1001:00: I2C transfer error: -110

This basically indicates the I²C bus being and staying (marked) busy for some reason. For now I do not believe that this is a userspace problem. Even if xserver-xorg-input-evdev would be triggering the driver, the driver should not misbehave this way. As reloading the kernel module fixes the issue, I would guess that the goodix driver is either polluting the I²C bus or gets stuck in an invalid state.

nexus511 commented 7 years ago

Seen this on my device for the first time now. It is pretty sure a kernel problem (even if it might be triggered by the hardware).

Reloading of the goodix modules did not work. I2C completely stopped working for touch and caused kernel error. So I assume its best to wait for Hans 4.14.0 kernel rebase and see, if it still happens on that.

nexus511 commented 7 years ago

I just pushed a new kernel.

If anyone sees this behavior again on 4.13.0-2-generic #gpd, please leave a note here so I know that it is still present on the new kernel.

luzhuomi commented 7 years ago

@nexus511 Thank you. But after upgrading to the new kernel, the bluetooth device is gone.

sobukus commented 7 years ago

I can confirm the issue with 4.13.0-2. Just noticed the touchscreen not working and the i2c messages in dmesg. But reloading the goodix driver does not help. I got rid of the endlessly repeated error messages, but the touchscreen is not alive:

[20004.832233] i2c_designware 808622C1:05: timeout waiting for bus ready
[20004.832260] Goodix-TS i2c-GDIX1001:00: I2C transfer error: -110
[20004.860813] i2c_designware 808622C1:05: timeout waiting for bus ready
[20004.860837] Goodix-TS i2c-GDIX1001:00: I2C write end_cmd error
[20005.890120] i2c_designware 808622C1:05: timeout in disabling adapter
[20013.352022] i2c_designware 808622C1:05: timeout in disabling adapter
[20013.380864] i2c_designware 808622C1:05: timeout waiting for bus ready
[20013.380891] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -110
[20013.435003] i2c_designware 808622C1:05: timeout waiting for bus ready
[20013.435030] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -110
[20013.461571] Goodix-TS i2c-GDIX1001:00: I2C communication failure: -110
[20013.462012] Goodix-TS: probe of i2c-GDIX1001:00 failed with error -110
[20014.737042] i2c_designware 808622C1:05: timeout in disabling adapter
[20044.723541] i2c_designware 808622C1:05: timeout in disabling adapter
[20044.750900] i2c_designware 808622C1:05: timeout waiting for bus ready
[20044.750925] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -110
[20044.806343] i2c_designware 808622C1:05: timeout waiting for bus ready
[20044.806369] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -110
[20044.834123] Goodix-TS i2c-GDIX1001:00: I2C communication failure: -110
[20044.834974] Goodix-TS: probe of i2c-GDIX1001:00 failed with error -110
[20045.838025] i2c_designware 808622C1:05: timeout in disabling adapter
nexus511 commented 7 years ago

@sobukus Thank you for reporting this back.

And yes: It is not likely that you get touchscreen functionality back by reloading the goodix-driver as the problem seems to exist on the i2c bus or within the i2c driver which is the layer below the touchscreen driver.

When it happened on my device, I tried to reload the i2c driver. Unloading it failed due to an invalid state and a reboot has been necessary. So this remains open for now. If anyone finds a way to reproduce this error, please let me know.

sobukus commented 6 years ago

I got another data point. This time after resume, the keyboard was gone from X11. Touchscreen worked, trackpoint worked. I could switch to console using keyboard and type there. Even connecting an USB keyboard only made it work in the console. Some hint in dmesg about irregularity:

[12477.845364] PM: Suspending system (freeze)
[12477.845366] Suspending console(s) (use no_console_suspend to debug)
[12477.867819] serial 00:01: disabled
[12478.177464] PM: suspend of devices complete after 318.719 msecs
[12478.186823] PM: late suspend of devices complete after 9.327 msecs
[12478.205588] i2c_designware 808622C1:05: timeout waiting for bus ready
[12478.205600] Goodix-TS i2c-GDIX1001:00: I2C transfer error: -110
[12478.227794] i2c_designware 808622C1:05: timeout waiting for bus ready
[12478.227799] Goodix-TS i2c-GDIX1001:00: I2C write end_cmd error
[12478.269077] PM: noirq suspend of devices complete after 82.220 msecs
[12478.269084] PM: suspend-to-idle
[13810.419518] Suspended for 1331.512 seconds
[14790.893850] Suspended for 980.999 seconds
[14790.933590] PM: noirq resume of devices complete after 39.126 msecs
[14790.933908] PM: resume from suspend-to-idle
[14790.956673] i2c_designware 808622C1:05: timeout waiting for bus ready
[14790.956693] Goodix-TS i2c-GDIX1001:00: I2C transfer error: -110
[14791.002160] PM: early resume of devices complete after 68.225 msecs
[14791.018899] Unclaimed read from register 0x1f0034
[14791.018992] ------------[ cut here ]------------
[14791.019075] WARNING: CPU: 0 PID: 3051 at /home/falk/Devel/gpd/gpd-ubuntu-packages/external/kernel/drivers/gpu/drm/i915/intel_uncore.c:805 __unclaimed_reg_debug+0x43/0x60 [i915]
[14791.019077] Modules linked in: input_leds bnep fusb302(C) tcpc_gen_mux(C) tcpm(C) typec mux_pi3usb30532 bq24190_charger cmdlinepart intel_spi_platform intel_spi snd_soc_sst_cht_bsw_rt5645 spi_nor mtd joydev intel_rapl gpio_keys intel_powerclamp coretemp kvm_intel kvm irqbypass punit_atom_debug nls_iso8859_1 intel_cstate i2c_cht_wc extcon_intel_cht_wc brcmfmac brcmutil mei_txe mux_intel_cht_usb_mux snd_hdmi_lpe_audio processor_thermal_device snd_intel_sst_acpi shpchp mei intel_soc_dts_iosf snd_intel_sst_core lpc_ich snd_soc_sst_atom_hifi2_platform snd_soc_sst_match snd_soc_rt5640 snd_soc_rt5645 snd_soc_rt5670 snd_soc_tlv320aic31xx snd_soc_rl6231 snd_soc_core axp20x_i2c dw_dmac snd_compress intel_hid dw_dmac_core ac97_bus extcon_intel_int3496 snd_pcm_dmaengine axp20x sparse_keymap intel_soc_pmic_bxtwc
[14791.019145]  snd_pcm kxcjk_1013 intel_pmc_ipc snd_seq_midi snd_seq_midi_event r8723bs(C) goodix industrialio_triggered_buffer kfifo_buf snd_rawmidi intel_cht_int33fe snd_seq industrialio cfg80211 hci_uart mux_core fdp_i2c rfkill_gpio serdev fdp btqca snd_seq_device nci nfc snd_timer max17042_battery snd tpm_crb soundcore 8250_dw spi_pxa2xx_platform mac_hid dptf_power int3400_thermal soc_button_array acpi_thermal_rel int3406_thermal int3403_thermal intel_int0002_vgpio int340x_thermal_zone acpi_pad parport_pc ppdev lp parport ip_tables x_tables autofs4 algif_skcipher af_alg dm_crypt overlay btusb btrtl btbcm btintel hid_generic bluetooth usbhid ecdh_generic mmc_block crct10dif_pclmul i915 crc32_pclmul ghash_clmulni_intel pcbc i2c_algo_bit drm_kms_helper aesni_intel syscopyarea sysfillrect aes_x86_64
[14791.019222]  crypto_simd sysimgblt glue_helper fb_sys_fops cryptd drm video i2c_hid hid sdhci_acpi pwm_lpss_platform sdhci pwm_lpss
[14791.019242] CPU: 0 PID: 3051 Comm: kworker/u8:14 Tainted: G         C      4.13.0-2-generic #gpd
[14791.019243] Hardware name: Default string Default string/Default string, BIOS 5.11 06/28/2017
[14791.019253] Workqueue: events_unbound async_run_entry_fn
[14791.019257] task: ffff9decf0adc200 task.stack: ffffaebc81294000
[14791.019325] RIP: 0010:__unclaimed_reg_debug+0x43/0x60 [i915]
[14791.019328] RSP: 0018:ffffaebc81297a40 EFLAGS: 00010086
[14791.019331] RAX: 0000000000000025 RBX: 0000000000000000 RCX: ffffffff856601c8
[14791.019333] RDX: 0000000000000000 RSI: 0000000000000082 RDI: 0000000000000002
[14791.019335] RBP: ffffaebc81297a58 R08: 0000000000000000 R09: 0000000000000025
[14791.019337] R10: 000000000000000c R11: 0000000000000000 R12: 00000000001f0034
[14791.019338] R13: 0000000000000001 R14: ffff9deceae806a0 R15: 0000000000000000
[14791.019341] FS:  0000000000000000(0000) GS:ffff9decffc00000(0000) knlGS:0000000000000000
[14791.019344] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[14791.019346] CR2: 00007fdde80010e6 CR3: 0000000139c09000 CR4: 00000000001006f0
[14791.019348] Call Trace:
[14791.019419]  fwtable_read32+0x17a/0x1d0 [i915]
[14791.019480]  vlv_program_watermarks+0x3f3/0x670 [i915]
[14791.019539]  vlv_optimize_watermarks+0xa4/0xc0 [i915]
[14791.019607]  intel_atomic_commit_tail+0x381/0x1020 [i915]
[14791.019675]  ? intel_atomic_commit_ready+0x48/0x5c [i915]
[14791.019733]  ? __i915_sw_fence_complete+0xfb/0x1a0 [i915]
[14791.019801]  intel_atomic_commit+0x1ef/0x240 [i915]
[14791.019840]  drm_atomic_commit+0x4b/0x50 [drm]
[14791.019860]  drm_atomic_helper_commit_duplicated_state+0xe6/0x110 [drm_kms_helper]
[14791.019930]  __intel_display_resume+0x86/0xd0 [i915]
[14791.019997]  intel_display_resume+0xd6/0x100 [i915]
[14791.020054]  i915_drm_resume+0xe7/0x190 [i915]
[14791.020111]  i915_pm_restore+0x1e/0x30 [i915]
[14791.020167]  i915_pm_resume+0xe/0x10 [i915]
[14791.020174]  pci_pm_resume+0x64/0xa0
[14791.020180]  dpm_run_callback+0x56/0x150
[14791.020184]  ? pci_pm_freeze+0xe0/0xe0
[14791.020187]  device_resume+0xe1/0x1f0
[14791.020191]  async_resume+0x1d/0x50
[14791.020195]  async_run_entry_fn+0x36/0x150
[14791.020201]  process_one_work+0x156/0x410
[14791.020207]  worker_thread+0x4b/0x410
[14791.020211]  kthread+0x109/0x140
[14791.020214]  ? process_one_work+0x410/0x410
[14791.020219]  ? kthread_create_on_node+0x70/0x70
[14791.020227]  ret_from_fork+0x25/0x30
[14791.020232] Code: fe ff ff 38 d8 76 2d 45 84 ed 48 c7 c0 68 6d 5f c0 48 c7 c6 72 6d 5f c0 48 0f 45 f0 44 89 e2 48 c7 c7 7b 6d 5f c0 e8 0e 3d 3a c4 <0f> ff 83 2d 88 f4 0e 00 01 5b 41 5c 41 5d 5d c3 0f 1f 00 66 2e 
[14791.020297] ---[ end trace abe9d264055972b0 ]---
[14791.126047] PM: resume of devices complete after 123.878 msecs
[14791.126742] PM: Finishing wakeup.
[14791.126743] OOM killer enabled.
[14791.126744] Restarting tasks ... done.
[14791.201677] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[14791.204110] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[14791.735842] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[14791.823043] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[14795.289806] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[14798.214578] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
[15261.518709] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[15262.249799] PM: Syncing filesystems ... done.
[15262.292312] PM: Preparing system for sleep (freeze)
[15262.294674] Freezing user space processes ... (elapsed 0.003 seconds) done.
[15262.297837] OOM killer disabled.
[15262.297840] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[15262.299600] PM: Suspending system (freeze)
[15262.299604] Suspending console(s) (use no_console_suspend to debug)
[15262.311431] serial 00:01: disabled
[15262.549384] PM: suspend of devices complete after 239.576 msecs
[15262.561827] PM: late suspend of devices complete after 12.419 msecs
[15262.580788] i2c_designware 808622C1:05: timeout waiting for bus ready
[15262.580809] Goodix-TS i2c-GDIX1001:00: I2C transfer error: -110
[15262.603217] i2c_designware 808622C1:05: timeout waiting for bus ready
[15262.603231] Goodix-TS i2c-GDIX1001:00: I2C write end_cmd error
[15262.644347] PM: noirq suspend of devices complete after 82.482 msecs
[15262.644357] PM: suspend-to-idle
[152434.003303] Suspended for 137173.244 seconds
[152434.058509] PM: noirq resume of devices complete after 54.478 msecs
[152434.058864] PM: resume from suspend-to-idle
[152434.087922] i2c_designware 808622C1:05: timeout waiting for bus ready
[152434.087943] Goodix-TS i2c-GDIX1001:00: I2C transfer error: -110
[152434.136138] PM: early resume of devices complete after 77.247 msecs
[152434.615667] PM: resume of devices complete after 479.514 msecs
[152434.617288] PM: Finishing wakeup.
[152434.617292] OOM killer enabled.
[152434.617295] Restarting tasks ... done.
[152434.676498] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[152434.679169] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[152435.214633] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[152435.310514] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[152438.800055] IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
[152454.720799] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
[152614.505319] usb 1-4: new low-speed USB device number 4 using xhci_hcd
[152614.652637] usb 1-4: New USB device found, idVendor=0dc6, idProduct=3412
[152614.652653] usb 1-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[152614.652662] usb 1-4: Product: USB keyboard
[152614.665810] input: USB keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:0DC6:3412.0003/input/input14
[152614.727478] hid-generic 0003:0DC6:3412.0003: input,hidraw2: USB HID v1.00 Keyboard [USB keyboard] on usb-0000:00:14.0-4/input0
[152614.733874] input: USB keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1/0003:0DC6:3412.0004/input/input15
[152614.794749] hid-generic 0003:0DC6:3412.0004: input,hidraw3: USB HID v1.00 Mouse [USB keyboard] on usb-0000:00:14.0-4/input1

One note about suspend: I'd really like to be able to suspend properly, to disk, but that seems to be anonther battlefield, as that just doesn't work at all. I also wonder if there is a better suspend mode in between that doesn't suck a full battery dry in two days. Is this how the Atom SoC is designed? Is this the same under Windows?

Razumihin commented 6 years ago

Interestingly, I had this problem with the newest BIOS for like 1/10 times. After downgrading it to the "unlocked" bios version and applying the settings to have the memory running at 1600MHz I have not had a single i2c fail anymore. I just thought this might be interesting and helpful for people suffering from this.

nexus511 commented 6 years ago

@Razumihin Thank you for reporting back. I am actually running the device on exactly the settings you describe. I have seen the issue only one time since I use it. So that might be a valid workaround for now.

jwrdegoede commented 6 years ago

Hi All,

I can no longer reproduce this with 4.14-rc2+ and this patch (which is in my master branch):

https://github.com/jwrdegoede/linux-sunxi/commit/aafbd7da10c66cfc2d4ac6b2e84dceb0972d861b

Regards,

Hans

stephen-hocking commented 6 years ago

Well, that's good news! When's it likley to make it into the repos?

On 3 October 2017 at 02:54, Hans de Goede notifications@github.com wrote:

Hi All,

I can no longer reproduce this with 4.14-rc2+ and this patch (which is in my master branch):

https://github.com/jwrdegoede/linux-sunxi/commit/ aafbd7da10c66cfc2d4ac6b2e84dceb0972d861b

Regards,

Hans

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nexus511/gpd-ubuntu-packages/issues/10#issuecomment-333577939, or mute the thread https://github.com/notifications/unsubscribe-auth/AM84bA7KkRIwgRA35YdMh7A-yANaoeREks5soQcygaJpZM4PIcaQ .

--

"I and the public know what all schoolchildren learn Those to whom evil is done Do evil in return" W.H. Auden, "September 1, 1939"

nexus511 commented 6 years ago

@jwrdegoede That's good. I have actually seen this only once, so it would be hard for me to check, if this is really gone.

I started rebasing your changes into 4.14-rc3 and cherry-picked the change on top of it. There are still some issues with the bluetooth stuff that need to be sorted out. Maybe I can provide a new kernel version later this day.

nexus511 commented 6 years ago

@jwrdegoede I have seen it again some days ago. I will double check, that your patch is in the kernel we are using.

stephen-hocking commented 6 years ago

I saw it again the other day as well. Mind you, I haven't been using the box as much lately.

On 28 October 2017 at 21:27, nexus511 notifications@github.com wrote:

@jwrdegoede https://github.com/jwrdegoede I have seen it again some days ago. I will double check, that your patch is in the kernel we are using.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nexus511/gpd-ubuntu-packages/issues/10#issuecomment-340172292, or mute the thread https://github.com/notifications/unsubscribe-auth/AM84bM0SyDYsGTGCXiQpWk26yaPVPQbbks5swwGMgaJpZM4PIcaQ .

--

"I and the public know what all schoolchildren learn Those to whom evil is done Do evil in return" W.H. Auden, "September 1, 1939"

Razumihin commented 6 years ago

I can confirm, it still seems to happen time to time even with the new package kernel. Haven't looked any more into it.

kiney commented 6 years ago

just happened to me for the first Time. Kernel Version:

root@kiney-pocket ~ $ uname -a
Linux kiney-pocket 4.14.0-11-generic #gpd SMP Thu Oct 12 09:34:06 CEST 2017 x86_64 x86_64 x86_64 GNU/Linux

reloading "goodix" module did stop the message flood in dmesg but touchscreen still does not work. There are some timeouts in dmesg shortly after reloading attempt:

[So Okt 29 15:38:00 2017] Goodix-TS i2c-GDIX1001:00: I2C write end_cmd error
[So Okt 29 15:38:02 2017] i2c_designware 808622C1:05: timeout in disabling adapter
[So Okt 29 15:38:05 2017] i2c_designware 808622C1:05: timeout in disabling adapter
[So Okt 29 15:38:05 2017] i2c_designware 808622C1:05: timeout waiting for bus ready
[So Okt 29 15:38:05 2017] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -110
[So Okt 29 15:38:05 2017] i2c_designware 808622C1:05: timeout waiting for bus ready
[So Okt 29 15:38:05 2017] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -110
[So Okt 29 15:38:05 2017] Goodix-TS i2c-GDIX1001:00: I2C communication failure: -110
[So Okt 29 15:38:05 2017] Goodix-TS: probe of i2c-GDIX1001:00 failed with error -110
[So Okt 29 15:38:07 2017] i2c_designware 808622C1:05: timeout in disabling adapter

edit: typo

Sonique commented 6 years ago

Absolutely same issue like Kinley wrote. I get this behavior after single sleep cycle, modprobe didn't help.

4.14.0-11-generic

ноя 03 17:07:47 pocket kernel: i2c_designware 808622C1:05: timeout in disabling ad
ноя 03 17:09:16 pocket kernel: i2c_designware 808622C1:05: timeout in disabling ad
ноя 03 17:09:16 pocket kernel: i2c_designware 808622C1:05: timeout waiting for bus
ноя 03 17:09:16 pocket kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 
ноя 03 17:09:16 pocket kernel: i2c_designware 808622C1:05: timeout waiting for bus
ноя 03 17:09:16 pocket kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 
ноя 03 17:09:16 pocket kernel: Goodix-TS i2c-GDIX1001:00: I2C communication failur
ноя 03 17:09:16 pocket kernel: Goodix-TS: probe of i2c-GDIX1001:00 failed with err
ноя 03 17:09:18 pocket kernel: i2c_designware 808622C1:05: timeout in disabling ad
mcbridet commented 6 years ago

Same issue, reloading module after wake does not fix the problem.

[20802.434481] Goodix-TS i2c-GDIX1001:00: I2C write end_cmd error
[20803.856959] i2c_designware 808622C1:05: timeout in disabling adapter
[20821.999607] i2c_designware 808622C1:05: timeout in disabling adapter
[20822.028145] i2c_designware 808622C1:05: timeout waiting for bus ready
[20822.028173] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -110
[20822.078823] i2c_designware 808622C1:05: timeout waiting for bus ready
[20822.078848] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -110
[20822.100643] Goodix-TS i2c-GDIX1001:00: I2C communication failure: -110
[20822.100925] Goodix-TS: probe of i2c-GDIX1001:00 failed with error -110
[20823.115041] i2c_designware 808622C1:05: timeout in disabling adapter

Kernel:

tmcbride@Hikari:~$ uname -a
Linux Hikari 4.14.0-rc5-audio-gpdpocket #1 SMP Wed Nov 15 05:12:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
stephen-hocking commented 6 years ago

Yes, I have to admit that this is my last bugbear, otherwise things are very good.

On 19 December 2017 at 15:30, Tim McBride notifications@github.com wrote:

Same issue, reloading module after wake does not fix the problem.

[20802.434481] Goodix-TS i2c-GDIX1001:00: I2C write end_cmd error [20803.856959] i2c_designware 808622C1:05: timeout in disabling adapter [20821.999607] i2c_designware 808622C1:05: timeout in disabling adapter [20822.028145] i2c_designware 808622C1:05: timeout waiting for bus ready [20822.028173] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -110 [20822.078823] i2c_designware 808622C1:05: timeout waiting for bus ready [20822.078848] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -110 [20822.100643] Goodix-TS i2c-GDIX1001:00: I2C communication failure: -110 [20822.100925] Goodix-TS: probe of i2c-GDIX1001:00 failed with error -110 [20823.115041] i2c_designware 808622C1:05: timeout in disabling adapter

Kernel:

tmcbride@Hikari:~$ uname -a Linux Hikari 4.14.0-rc5-audio-gpdpocket #1 SMP Wed Nov 15 05:12:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nexus511/gpd-ubuntu-packages/issues/10#issuecomment-352636922, or mute the thread https://github.com/notifications/unsubscribe-auth/AM84bCNd-tdfKET_nXxtx6t_0aiRPAX4ks5tBzvjgaJpZM4PIcaQ .

--

"I and the public know what all schoolchildren learn Those to whom evil is done Do evil in return" W.H. Auden, "September 1, 1939"

jwrdegoede commented 6 years ago

Hi all,

Yes I'm still seeing this myself occasionally too.

Not sure if/when I will have time to debug this.

It would be good if someone can file a bug against the designware i2c driver for this at: https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers

(component i2c)

If you file a bug for this, please report the link back here in this github issue.

Regards,

Hans

sigboe commented 6 years ago

Here is a workaround as described in suggestion to include the workaround in njkli/gpd-pocket repo.

https://github.com/njkli/gpd-pocket/issues/20#issuecomment-354670583

Should work fine on Ubuntu as well, you can make your own deb, or just add the files to the right places. And make the script it self executable. Systemd will take care of the rest.

sobukus commented 6 years ago

I'm not sure that this is totally fixed. I tried jwrdegoede/linux-sunxi ae718bc recently (4.16.0-rc5+) and seemed successful at pm-hibernating the system, but on resume things went south, X11 crashing (apparently) and a stream of the i2c messages on the console. But without suspend to disk, I did not observe it during 2 days of intensive use.

What I did observe a lot are lots of video issues … we got a separat issue open for that.

Herst commented 6 years ago

@sobukus Hans is rebasing his repo regularly, is it possible that this particular patch was not part of the tree you cloned?

sobukus commented 6 years ago

I might be wrong about the X11 crash (being confused by two screen locks in succession by Xfce, triggered by suspend and lid closing, perhaps) … but I do remember this stream of i2c errors.

I do see the "Input: goodix - disable IRQs while suspended" in my git log (commit faec44b).

sobukus commented 6 years ago

During testing of video issues, I got into a state where I get one of these each second:

[11107.259106] i2c_designware 808622C1:01: controller timed out
[11108.283058] i2c_designware 808622C1:01: controller timed out
[11109.307002] i2c_designware 808622C1:01: controller timed out
[11110.330983] i2c_designware 808622C1:01: controller timed out
[11111.354974] i2c_designware 808622C1:01: controller timed out
[11112.378965] i2c_designware 808622C1:01: controller timed out
[11113.402941] i2c_designware 808622C1:01: controller timed out
[11114.426965] i2c_designware 808622C1:01: controller timed out
[11115.451067] i2c_designware 808622C1:01: controller timed out
[11116.474867] i2c_designware 808622C1:01: controller timed out
[11117.498852] i2c_designware 808622C1:01: controller timed out

The touchscreen still works, though. But maybe it is still releated to the same i2c issues?

sobukus commented 6 years ago

Hm, this i2c error seems to relate to the audio part … I noticed that the audio chip got fully stuck. And there was some message about media out, too. Hm, and after reboot, the mouse and keyboard don't work anymore (kernel complains that it cannot enable usb device), while the touchscreen is fine. Well, the keyboard worked fine to enter the decryption password. Another reboot. Hm, maybe the device not accepting addresses is the USB C hub. After some time, it comes up (with Realtek Ethernet), but apparently unreliably so. There are so many issues, where should one start?

sobukus commented 6 years ago

I was able to kill of the touchscreen again with a hibernation cycle. Both the usual i2c errors are back. An endless stream of

[ 1194.623845] i2c_designware 808622C1:05: timeout waiting for bus ready
[ 1194.623856] Goodix-TS i2c-GDIX1001:00: I2C write end_cmd error
[ 1194.646926] i2c_designware 808622C1:05: timeout waiting for bus ready
[ 1194.646943] Goodix-TS i2c-GDIX1001:00: I2C transfer error: -110

(full log on https://sobukus.de/gpd/kernelmsg.20180325-suspendcyclebrokentouchscreen.txt)

So the commits by @jwrdegoede sadly did not fix this for good. Or is there a chance that my hardware is faulty instead? Can others confirm?

jwrdegoede commented 6 years ago

Hi all,

Hibernation is not something which is quite often broken with Linux, on many devices. In general I advice against using hibernation and to use either normal suspend, or actually turn the device off.

Note that often booting is faster then resume from hibernate (if you disable unnecessary services from starting at boot).

Regards,

Hans

sobukus commented 6 years ago

@jwrdegoede Your advice of avoiding hibernation would be easier to follow if there would be a usable low-power S3 mode on the device. I would not like missing the convenience of being able to continue where I left off, with possibly lots of windows open, terminals and editors arranged over several virtual desktops … even if resuming takes more time than rebooting, there is a productivity advantage I do not want to miss, back from the times when I always patched my kernels with software suspend/Tux On Ice (heck, it worked reliably with APM on a Pentium MMX laptop in the past century:-/).

Anyway, thanks for your hard work to make the device usable at all! But I still hope you're proven wrong in this case and suspend/resume will be unproblematic on the Pocket once final kinks are ironed out;-)

sobukus commented 6 years ago

I followed Hans' earlier recommendation and created a report on https://bugzilla.kernel.org/show_bug.cgi?id=199207 .

nevyn commented 6 years ago

dunno if it helps, but I'm also getting this issue and modprobe stops the spamming but doesn't fix the touch screen.

Linux yuuichi 4.14.0-11-generic #gpd SMP Thu Oct 12 09:34:06 CEST 2017 x86_64 x86_64 x86_64 GNU/Linux
jwrdegoede commented 4 years ago

I have just pushed a series of patches to my linux-sunxi git-repo, master branch, which fix some suspend/resume issues with Goodix touchscreens which might help here. I'm not sure these fix this though, as some of the debugging done in: https://bugzilla.kernel.org/show_bug.cgi?id=199207 suggests that this is a i2c controller or suspend-ordering issue, rather then an issue with the touchscreen driver.