[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG]i2c_hid_acpi broken with 4.17.2 on Framework Laptop 13 AMD


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Mario Limonciello <mario.limonciello@xxxxxxx>
  • Date: Wed, 6 Mar 2024 16:04:55 -0600
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HNKQ2BtUCgV7nAkl0lAO02dCSCRS3Cbf7EoQOeptuC8=; b=HxaPcL1FB+nKEI/WdREuBhamt4+z46e9QT1JEE5/7Iciv1qVx1b/SG6o7fMCtscDRYhRFede8YAAjVMnT/uNz4CjD+HuYm0qmx6eF/HFpFqm4Gw15CQctB4wZeDMVa5HAaXwDmdblhRu9x7fecpyBODuEdW/ZFl601gw36GPOXDp2/QNbK4jUVIaZmd8TGEhehRuHUThyefRmrwxxJ1E3LSQyISgiN1GuYDrcpJAdgrHVRqVa9QoBRWOXDrlHFWwdw8RI5kAMdkiEL1dPgT1rsKHaqHU41TizhxRSAOfngvIgXFg/wAHE/9V6JgHSKeLJccAffoH3KGQTbAVEQZRBQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ip1jrczsOLPsvsrj5u2d782eoljZdoFc80qAsc1hPCA3yP/TorirlmkbbNiFs1OSq/FWGVcaoEp1yJUi1ItD/2bu8LjId1yXdbu6OeH9AkcHUlE0GAwiy20XBuPz2fzuHuEw2jQlo/CKdqpGnWd8Rz5aHmLHgyjbOfvC9oo+4NZhX8KcYAA6ZC8VPDiokGyqp5qPGpu4VrlIoYESfzzoneb1BpitHeiocizAXOvd/YW4yW1E+i9eJOi+lTwe2NDFBsM5NXXFpjlTh8hEF+QTAEnXQGbx3o6JG7/Ez/nPYeMBKZlfEHZE43YjEnLOx9DJZYMO+/Un02aMax4z0m3k4g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Sébastien Chaumat <euidzero@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Wed, 06 Mar 2024 22:05:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 3/6/2024 15:31, Marek Marczykowski-Górecki wrote:
On Wed, Mar 06, 2024 at 02:37:20PM -0600, Mario Limonciello wrote:
On 3/6/2024 14:34, Sébastien Chaumat wrote:


Le mer. 6 mars 2024 à 19:51, Mario Limonciello
<mario.limonciello@xxxxxxx <mailto:mario.limonciello@xxxxxxx>> a écrit :

     On 3/6/2024 12:49, Sébastien Chaumat wrote:
      >
      >
      > Le mer. 6 mars 2024 à 19:08, Mario Limonciello
      > <mario.limonciello@xxxxxxx <mailto:mario.limonciello@xxxxxxx>
     <mailto:mario.limonciello@xxxxxxx
     <mailto:mario.limonciello@xxxxxxx>>> a écrit :
      >
      >     On 3/6/2024 12:05, Sébastien Chaumat wrote:
      >      >
      >      >
      >      > Le mer. 6 mars 2024 à 18:33, Mario Limonciello
      >      > <mario.limonciello@xxxxxxx
      >      >     Also; I'd be really interested to hear what happens with
      >     s2idle with
      >      >     Xen
      >      >     now (if it works).
      >      >
      >      >
      >      > suspend to RAM now works :)
      >
      >     Do you see /sys/power/suspend_stats/last_hw_sleep increasing
     with your
      >     suspend cycle?
      >
      >
      > No,  it does not increase (0).
      >

     OK, then in that case I suggest you run
     https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py 
<https://gitlab.freedesktop.org/drm/amd/-/blob/master/scripts/amd_s2idle.py>
     in the hypervisor to find out what's wrong.


It fails with xen (not bare metal) during the prerequisite tests :


The script might need some modifications for tests that don't make sense in
the context of Xen.

✅ GPIO driver `pinctrl_amd` available
Traceback (most recent call last):
    File "/home/sch/Downloads/amd_s2idle.py", line 2447, in <module>
      test = app.prerequisites()
             ^^^^^^^^^^^^^^^^^^^
    File "/home/sch/Downloads/amd_s2idle.py", line 1938, in prerequisites
      if not check():
             ^^^^^^^
    File "/home/sch/Downloads/amd_s2idle.py", line 826, in check_msr
      val = read_msr(reg, 0)
            ^^^^^^^^^^^^^^^^
    File "/home/sch/Downloads/amd_s2idle.py", line 813, in read_msr
      val = struct.unpack("Q", os.read(f, 8))[0]
                               ^^^^^^^^^^^^^
OSError: [Errno 5] Input/output error

Last line in the log is :
2024-03-06 21:29:33,146 DEBUG: Lockdown: [none] integrity confidentiality


Do you have userspace MSR support compiled in?  If not; that could explain
that problem.  But it's very unlikely you changed the MSRs.
For the purpose of finding where the suspend problem is, I'd comment out
that specific check for now.

The s2idle isn't supported in Xen yet. Only S3 is. In fact, I have some
work-in-progress patches for that, I may try testing them on this
system.


OK; the "most important parts" I want to point out that are on bare metal and might not be obvious:
 * Infra from drivers/acpi/x86/s2idle.c
 * amd-pmc driver
 * USB4 driver (thunderbolt.ko)
 * NVME needs to use "simple suspend"

FYI - I'm going to be MIA for a while on personal leave starting this weekend, please keep me on CC on your progress and if you need help when I get back from my leave I'll comment on it.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.