2024-01-18 12:58:51

by Paul Menzel

[permalink] [raw]
Subject: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

#regzbot introduced v6.6.11..v6.7

Dear Linux folks,


There seems to be a regression in Linux 6.7 on the Dell XPS 13 9360
(Intel i7-7500U).

[ 0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0
06/02/2022

The PS/2 keyboard goes missing after S3 resume¹. The problem does not
happen with Linux 6.6.11.

[ 1.435071] i8042: PNP: PS/2 Controller
[PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[ 1.435409] i8042: Warning: Keylock active
[ 1.437624] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 1.437631] serio: i8042 AUX port at 0x60,0x64 irq 12
[…]
[ 1.439743] input: AT Translated Set 2 keyboard as
/devices/platform/i8042/serio0/input/input0

$ sudo libinput list-devices
[…]
Device: AT Translated Set 2 keyboard
Kernel: /dev/input/event0
Group: 15
Seat: seat0, default
Capabilities: keyboard
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: n/a
Nat.scrolling: n/a
Middle emulation: n/a
Calibration: n/a
Scroll methods: none
Click methods: none
Disable-w-typing: n/a
Disable-w-trackpointing: n/a
Accel profiles: n/a
Rotation: 0.0

`libinput list-devices` does not list the device after resuming from S3.
Some of the function keys, like brightness and airplane mode keys, still
work, as the events are probably transmitted over the embedded
controller or some other mechanism. An external USB keyboard also still
works.

I haven’t had time to further analyze this, but wanted to report it. No idea


Kind regards,

Paul


¹ s2idle is not working correctly on the device, in the sense, that
energy usage is very high in that state, and the full battery is at 20 %
after leaving it for eight hours.


Attachments:
=?UTF-8?Q?20240117=E2=80=93dell-xps-13-9360=E2=80=93linux-6=2E7-messages--after-s3-no-laptop-keyboard=2Etxt?= (131.20 kB)

2024-01-20 20:26:21

by Hans de Goede

[permalink] [raw]
Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

Hi Paul,

On 1/18/24 13:57, Paul Menzel wrote:
> #regzbot introduced v6.6.11..v6.7
>
> Dear Linux folks,
>
>
> There seems to be a regression in Linux 6.7 on the Dell XPS 13 9360 (Intel i7-7500U).
>
>     [    0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
>
> The PS/2 keyboard goes missing after S3 resume¹. The problem does not happen with Linux 6.6.11.

Thank you for reporting this.

Can you try adding "i8042.dumbkbd=1" to your kernel commandline?

This should at least lead to the device not disappearing from

"sudo libinput list-devices"

The next question is if the keyboard will still actually
work after suspend/resume with "i8042.dumbkbd=1". If it
stays in the list, but no longer works then there is
a problem with the i8042 controller; or interrupt
delivery to the i8042 controller.

If "i8042.dumbkbd=1" somehow fully fixes things, then I guess
my atkbd driver fix for other laptop keyboards is somehow
causing issues for yours.

If "i8042.dumbkbd=1" fully fixes things, can you try building
your own 6.7.0 kernel with commit 936e4d49ecbc:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=936e4d49ecbc8c404790504386e1422b599dec39

reverted?

Regards,

Hans








>
>     [    1.435071] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
>     [    1.435409] i8042: Warning: Keylock active
>     [    1.437624] serio: i8042 KBD port at 0x60,0x64 irq 1
>     [    1.437631] serio: i8042 AUX port at 0x60,0x64 irq 12
>     […]
>     [    1.439743] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
>
>     $ sudo libinput list-devices
>     […]
>     Device:           AT Translated Set 2 keyboard
>     Kernel:           /dev/input/event0
>     Group:            15
>     Seat:             seat0, default
>     Capabilities:     keyboard
>     Tap-to-click:     n/a
>     Tap-and-drag:     n/a
>     Tap drag lock:    n/a
>     Left-handed:      n/a
>     Nat.scrolling:    n/a
>     Middle emulation: n/a
>     Calibration:      n/a
>     Scroll methods:   none
>     Click methods:    none
>     Disable-w-typing: n/a
>     Disable-w-trackpointing: n/a
>     Accel profiles:   n/a
>     Rotation:         0.0
>
> `libinput list-devices` does not list the device after resuming from S3. Some of the function keys, like brightness and airplane mode keys, still work, as the events are probably transmitted over the embedded controller or some other mechanism. An external USB keyboard also still works.
>
> I haven’t had time to further analyze this, but wanted to report it. No idea
>
>
> Kind regards,
>
> Paul
>
>
> ¹ s2idle is not working correctly on the device, in the sense, that energy usage is very high in that state, and the full battery is at 20 % after leaving it for eight hours.



2024-01-21 14:27:34

by Paul Menzel

[permalink] [raw]
Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

Dear Hans,


As always thank you very much for taking the time to reply.


Am 20.01.24 um 21:26 schrieb Hans de Goede:

> On 1/18/24 13:57, Paul Menzel wrote:
>> #regzbot introduced v6.6.11..v6.7

>> There seems to be a regression in Linux 6.7 on the Dell XPS 13 9360 (Intel i7-7500U).
>>
>>     [    0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
>>
>> The PS/2 keyboard goes missing after S3 resume¹. The problem does not happen with Linux 6.6.11.
>
> Thank you for reporting this.
>
> Can you try adding "i8042.dumbkbd=1" to your kernel commandline?
>
> This should at least lead to the device not disappearing from
>
> "sudo libinput list-devices"
>
> The next question is if the keyboard will still actually
> work after suspend/resume with "i8042.dumbkbd=1". If it
> stays in the list, but no longer works then there is
> a problem with the i8042 controller; or interrupt
> delivery to the i8042 controller.
>
> If "i8042.dumbkbd=1" somehow fully fixes things, then I guess
> my atkbd driver fix for other laptop keyboards is somehow
> causing issues for yours.

Just a quick feedback, that booting with `i8042.dumbkbd=1` seems to fix
the issue.

> If "i8042.dumbkbd=1" fully fixes things, can you try building
> your own 6.7.0 kernel with commit 936e4d49ecbc:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=936e4d49ecbc8c404790504386e1422b599dec39
>
> reverted?

I am going to try that as soon as possible.


Kind regards,

Paul


>>     [    1.435071] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
>>     [    1.435409] i8042: Warning: Keylock active
>>     [    1.437624] serio: i8042 KBD port at 0x60,0x64 irq 1
>>     [    1.437631] serio: i8042 AUX port at 0x60,0x64 irq 12
>>     […]
>>     [    1.439743] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
>>
>>     $ sudo libinput list-devices
>>     […]
>>     Device:           AT Translated Set 2 keyboard
>>     Kernel:           /dev/input/event0
>>     Group:            15
>>     Seat:             seat0, default
>>     Capabilities:     keyboard
>>     Tap-to-click:     n/a
>>     Tap-and-drag:     n/a
>>     Tap drag lock:    n/a
>>     Left-handed:      n/a
>>     Nat.scrolling:    n/a
>>     Middle emulation: n/a
>>     Calibration:      n/a
>>     Scroll methods:   none
>>     Click methods:    none
>>     Disable-w-typing: n/a
>>     Disable-w-trackpointing: n/a
>>     Accel profiles:   n/a
>>     Rotation:         0.0
>>
>> `libinput list-devices` does not list the device after resuming
>> from S3. Some of the function keys, like brightness and airplane
>> mode keys, still work, as the events are probably transmitted over
>> the embedded controller or some other mechanism. An external USB
>> keyboard also still works.
>>
>> I haven’t had time to further analyze this, but wanted to report
>> it. No idea
>>
>>
>> Kind regards,
>>
>> Paul
>>
>>
>> ¹ s2idle is not working correctly on the device, in the sense, that
>> energy usage is very high in that state, and the full battery is at
>> 20 % after leaving it for eight hours.

2024-01-21 14:39:46

by Hans de Goede

[permalink] [raw]
Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

Hi Paul,

On 1/21/24 15:26, Paul Menzel wrote:
> Dear Hans,
>
>
> As always thank you very much for taking the time to reply.
>
>
> Am 20.01.24 um 21:26 schrieb Hans de Goede:
>
>> On 1/18/24 13:57, Paul Menzel wrote:
>>> #regzbot introduced v6.6.11..v6.7
>
>>> There seems to be a regression in Linux 6.7 on the Dell XPS 13 9360 (Intel i7-7500U).
>>>
>>>      [    0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
>>>
>>> The PS/2 keyboard goes missing after S3 resume¹. The problem does not happen with Linux 6.6.11.
>>
>> Thank you for reporting this.
>>
>> Can you try adding "i8042.dumbkbd=1" to your kernel commandline?
>>
>> This should at least lead to the device not disappearing from
>>
>> "sudo libinput list-devices"
>>
>> The next question is if the keyboard will still actually
>> work after suspend/resume with "i8042.dumbkbd=1". If it
>> stays in the list, but no longer works then there is
>> a problem with the i8042 controller; or interrupt
>> delivery to the i8042 controller.
>>
>> If "i8042.dumbkbd=1" somehow fully fixes things, then I guess
>> my atkbd driver fix for other laptop keyboards is somehow
>> causing issues for yours.
>
> Just a quick feedback, that booting with `i8042.dumbkbd=1` seems to fix the issue.
>
>> If "i8042.dumbkbd=1" fully fixes things, can you try building
>> your own 6.7.0 kernel with commit 936e4d49ecbc:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=936e4d49ecbc8c404790504386e1422b599dec39
>>
>> reverted?
>
> I am going to try that as soon as possible.

Ok, thank you.

I'm a bit surprised that my fix which skips sending
the getid command to the kbd during init would actually
cause this issue.

Can you retest with an unmodified 6.7.0 to make sure
that this was not some onetime glitch ?

Regards,

Hans





>>>      [    1.435071] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
>>>      [    1.435409] i8042: Warning: Keylock active
>>>      [    1.437624] serio: i8042 KBD port at 0x60,0x64 irq 1
>>>      [    1.437631] serio: i8042 AUX port at 0x60,0x64 irq 12
>>>      […]
>>>      [    1.439743] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
>>>
>>>      $ sudo libinput list-devices
>>>      […]
>>>      Device:           AT Translated Set 2 keyboard
>>>      Kernel:           /dev/input/event0
>>>      Group:            15
>>>      Seat:             seat0, default
>>>      Capabilities:     keyboard
>>>      Tap-to-click:     n/a
>>>      Tap-and-drag:     n/a
>>>      Tap drag lock:    n/a
>>>      Left-handed:      n/a
>>>      Nat.scrolling:    n/a
>>>      Middle emulation: n/a
>>>      Calibration:      n/a
>>>      Scroll methods:   none
>>>      Click methods:    none
>>>      Disable-w-typing: n/a
>>>      Disable-w-trackpointing: n/a
>>>      Accel profiles:   n/a
>>>      Rotation:         0.0
>>>
>>> `libinput list-devices` does not list the device after resuming
>>> from S3. Some of the function keys, like brightness and airplane
>>> mode keys, still work, as the events are probably transmitted over
>>> the embedded controller or some other mechanism. An external USB
>>> keyboard also still works.
>>>
>>> I haven’t had time to further analyze this, but wanted to report
>>> it. No idea
>>>
>>>
>>> Kind regards,
>>>
>>> Paul
>>>
>>>
>>> ¹ s2idle is not working correctly on the device, in the sense, that
>>> energy usage is very high in that state, and the full battery is at
>>> 20 % after leaving it for eight hours.
>


2024-01-22 13:44:56

by Hans de Goede

[permalink] [raw]
Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

Hi Paul,

On 1/21/24 15:26, Paul Menzel wrote:
> Dear Hans,
>
>
> As always thank you very much for taking the time to reply.
>
>
> Am 20.01.24 um 21:26 schrieb Hans de Goede:
>
>> On 1/18/24 13:57, Paul Menzel wrote:
>>> #regzbot introduced v6.6.11..v6.7
>
>>> There seems to be a regression in Linux 6.7 on the Dell XPS 13 9360 (Intel i7-7500U).
>>>
>>>      [    0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
>>>
>>> The PS/2 keyboard goes missing after S3 resume¹. The problem does not happen with Linux 6.6.11.
>>
>> Thank you for reporting this.
>>
>> Can you try adding "i8042.dumbkbd=1" to your kernel commandline?
>>
>> This should at least lead to the device not disappearing from
>>
>> "sudo libinput list-devices"
>>
>> The next question is if the keyboard will still actually
>> work after suspend/resume with "i8042.dumbkbd=1". If it
>> stays in the list, but no longer works then there is
>> a problem with the i8042 controller; or interrupt
>> delivery to the i8042 controller.
>>
>> If "i8042.dumbkbd=1" somehow fully fixes things, then I guess
>> my atkbd driver fix for other laptop keyboards is somehow
>> causing issues for yours.
>
> Just a quick feedback, that booting with `i8042.dumbkbd=1` seems to fix the issue.
>
>> If "i8042.dumbkbd=1" fully fixes things, can you try building
>> your own 6.7.0 kernel with commit 936e4d49ecbc:
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=936e4d49ecbc8c404790504386e1422b599dec39
>>
>> reverted?
>
> I am going to try that as soon as possible.

Assuming this was not some one time glitch with 6.7.0,
I have prepared a patch hopefully fixing this (1) as well
as a follow up fix to address another potential issue which
I have noticed.

Can you please give a 6.7.0 (2) kernel with the 2 attached
patches added a try ?

I know building kernels can be a bit of work / takes time,
sorry. If you are short on time I would prefer testing these 2
patches and see if they fix things over trying a plain revert.

Regards,

Hans



1) Assuming it is caused by this commit in the first place,
which seems likely

2) 6.8-rc1 has a follow up patch which is squashed into the
first patch here, so these patches will only apply cleanly
to 6.7.0 .





>>>      [    1.435071] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
>>>      [    1.435409] i8042: Warning: Keylock active
>>>      [    1.437624] serio: i8042 KBD port at 0x60,0x64 irq 1
>>>      [    1.437631] serio: i8042 AUX port at 0x60,0x64 irq 12
>>>      […]
>>>      [    1.439743] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
>>>
>>>      $ sudo libinput list-devices
>>>      […]
>>>      Device:           AT Translated Set 2 keyboard
>>>      Kernel:           /dev/input/event0
>>>      Group:            15
>>>      Seat:             seat0, default
>>>      Capabilities:     keyboard
>>>      Tap-to-click:     n/a
>>>      Tap-and-drag:     n/a
>>>      Tap drag lock:    n/a
>>>      Left-handed:      n/a
>>>      Nat.scrolling:    n/a
>>>      Middle emulation: n/a
>>>      Calibration:      n/a
>>>      Scroll methods:   none
>>>      Click methods:    none
>>>      Disable-w-typing: n/a
>>>      Disable-w-trackpointing: n/a
>>>      Accel profiles:   n/a
>>>      Rotation:         0.0
>>>
>>> `libinput list-devices` does not list the device after resuming
>>> from S3. Some of the function keys, like brightness and airplane
>>> mode keys, still work, as the events are probably transmitted over
>>> the embedded controller or some other mechanism. An external USB
>>> keyboard also still works.
>>>
>>> I haven’t had time to further analyze this, but wanted to report
>>> it. No idea
>>>
>>>
>>> Kind regards,
>>>
>>> Paul
>>>
>>>
>>> ¹ s2idle is not working correctly on the device, in the sense, that
>>> energy usage is very high in that state, and the full battery is at
>>> 20 % after leaving it for eight hours.
>


Attachments:
0001-Input-atkbd-Skip-ATKBD_CMD_SETLEDS-when-skipping-ATK.patch (2.91 kB)
0002-Input-atkbd-Do-not-skip-atkbd_deactivate-when-skippi.patch (1.46 kB)
Download all attachments

2024-01-26 08:55:31

by Paul Menzel

[permalink] [raw]
Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

Dear Hans,


Thank you for your reply, and sorry for the delay on my side. I needed
to set up an environment to easily build the Linux kernel.


Am 22.01.24 um 14:43 schrieb Hans de Goede:

> On 1/21/24 15:26, Paul Menzel wrote:

[…]

>> Am 20.01.24 um 21:26 schrieb Hans de Goede:
>>
>>> On 1/18/24 13:57, Paul Menzel wrote:
>>>> #regzbot introduced v6.6.11..v6.7
>>
>>>> There seems to be a regression in Linux 6.7 on the Dell XPS 13 9360 (Intel i7-7500U).
>>>>
>>>>      [    0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
>>>>
>>>> The PS/2 keyboard goes missing after S3 resume¹. The problem does not happen with Linux 6.6.11.
>>>
>>> Thank you for reporting this.
>>>
>>> Can you try adding "i8042.dumbkbd=1" to your kernel commandline?
>>>
>>> This should at least lead to the device not disappearing from
>>>
>>> "sudo libinput list-devices"
>>>
>>> The next question is if the keyboard will still actually
>>> work after suspend/resume with "i8042.dumbkbd=1". If it
>>> stays in the list, but no longer works then there is
>>> a problem with the i8042 controller; or interrupt
>>> delivery to the i8042 controller.
>>>
>>> If "i8042.dumbkbd=1" somehow fully fixes things, then I guess
>>> my atkbd driver fix for other laptop keyboards is somehow
>>> causing issues for yours.
>>
>> Just a quick feedback, that booting with `i8042.dumbkbd=1` seems to fix the issue.
>>
>>> If "i8042.dumbkbd=1" fully fixes things, can you try building
>>> your own 6.7.0 kernel with commit 936e4d49ecbc:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=936e4d49ecbc8c404790504386e1422b599dec39
>>>
>>> reverted?
>>
>> I am going to try that as soon as possible.
>
> Assuming this was not some one time glitch with 6.7.0,
> I have prepared a patch hopefully fixing this (1) as well
> as a follow up fix to address another potential issue which
> I have noticed.

Unfortunately, it wasn’t just a glitch.

> Can you please give a 6.7.0 (2) kernel with the 2 attached
> patches added a try ?
>
> I know building kernels can be a bit of work / takes time,
> sorry. If you are short on time I would prefer testing these 2
> patches and see if they fix things over trying a plain revert.

Applying both patches on v6.7.1

$ git log --oneline -3
053fa44c0de1 (HEAD -> v6.7.1) Input: atkbd - Do not skip
atkbd_deactivate() when skipping ATKBD_CMD_GETID
0e0fa0113c7a Input: atkbd - Skip ATKBD_CMD_SETLEDS when skipping
ATKBD_CMD_GETID
a91fdae50a6d (tag: v6.7.1, stable/linux-6.7.y, origin/linux-6.7.y)
Linux 6.7.1

I am unable to reproduce the problem in eight ACPI S3 suspend/resume
cycles. The DMAR errors [3] are also gone:

$ sudo dmesg --level alert,crit,err,warn
[ 0.065292] MDS CPU bug present and SMT on, data leak possible.
See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html
for more details.
[ 0.065292] MMIO Stale Data CPU bug present and SMT on, data
leak possible. See
https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html
for more details.
[ 0.092064] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[ 0.294522] hpet_acpi_add: no address or irqs in _CRS
[ 0.345003] i8042: Warning: Keylock active
[ 1.063807] usb: port power management may be unreliable
[ 1.178339] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is
disabled. Duplicate IMA measurements will not be recorded in the IMA log.
[ 37.712916] wmi_bus wmi_bus-PNP0C14:01: WQBC data block query
control method not found
[ 67.307070] warning: `atop' uses wireless extensions which will
stop working for Wi-Fi 7 hardware; use nl80211
[ 141.861803] ACPI Error: AE_BAD_PARAMETER, Returned by Handler
for [EmbeddedControl] (20230628/evregion-300)
[ 141.861808] ACPI Error: Aborting method \_SB.PCI0.LPCB.ECDV.ECR1
due to previous error (AE_BAD_PARAMETER) (20230628/psparse-529)
[ 141.861814] ACPI Error: Aborting method \_SB.PCI0.LPCB.ECDV.ECR2
due to previous error (AE_BAD_PARAMETER) (20230628/psparse-529)
[ 141.861818] ACPI Error: Aborting method \ECRW due to previous
error (AE_BAD_PARAMETER) (20230628/psparse-529)
[ 141.861821] ACPI Error: Aborting method \ECG1 due to previous
error (AE_BAD_PARAMETER) (20230628/psparse-529)
[ 141.861824] ACPI Error: Aborting method \NEVT due to previous
error (AE_BAD_PARAMETER) (20230628/psparse-529)
[ 141.861827] ACPI Error: Aborting method \_SB.PCI0.LPCB.ECDV._Q66
due to previous error (AE_BAD_PARAMETER) (20230628/psparse-529)

Please tell me, if I can do anything else.


Kind regards,

Paul


> 1) Assuming it is caused by this commit in the first place,
> which seems likely
>
> 2) 6.8-rc1 has a follow up patch which is squashed into the
> first patch here, so these patches will only apply cleanly
> to 6.7.0 .

[3]:
https://lore.kernel.org/all/[email protected]/

>>>>      [    1.435071] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
>>>>      [    1.435409] i8042: Warning: Keylock active
>>>>      [    1.437624] serio: i8042 KBD port at 0x60,0x64 irq 1
>>>>      [    1.437631] serio: i8042 AUX port at 0x60,0x64 irq 12
>>>>      […]
>>>>      [    1.439743] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
>>>>
>>>>      $ sudo libinput list-devices
>>>>      […]
>>>>      Device:           AT Translated Set 2 keyboard
>>>>      Kernel:           /dev/input/event0
>>>>      Group:            15
>>>>      Seat:             seat0, default
>>>>      Capabilities:     keyboard
>>>>      Tap-to-click:     n/a
>>>>      Tap-and-drag:     n/a
>>>>      Tap drag lock:    n/a
>>>>      Left-handed:      n/a
>>>>      Nat.scrolling:    n/a
>>>>      Middle emulation: n/a
>>>>      Calibration:      n/a
>>>>      Scroll methods:   none
>>>>      Click methods:    none
>>>>      Disable-w-typing: n/a
>>>>      Disable-w-trackpointing: n/a
>>>>      Accel profiles:   n/a
>>>>      Rotation:         0.0
>>>>
>>>> `libinput list-devices` does not list the device after resuming
>>>> from S3. Some of the function keys, like brightness and airplane
>>>> mode keys, still work, as the events are probably transmitted over
>>>> the embedded controller or some other mechanism. An external USB
>>>> keyboard also still works.
>>>>
>>>> I haven’t had time to further analyze this, but wanted to report
>>>> it. No idea
>>>>
>>>>
>>>> Kind regards,
>>>>
>>>> Paul
>>>>
>>>>
>>>> ¹ s2idle is not working correctly on the device, in the sense, that
>>>> energy usage is very high in that state, and the full battery is at
>>>> 20 % after leaving it for eight hours.

2024-01-26 13:33:19

by Hans de Goede

[permalink] [raw]
Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

Hi Paul,

On 1/26/24 08:03, Paul Menzel wrote:
> Dear Hans,
>
>
> Thank you for your reply, and sorry for the delay on my side. I needed to set up an environment to easily build the Linux kernel.

No problem thank you for testing this.

> Am 22.01.24 um 14:43 schrieb Hans de Goede:
>
>> On 1/21/24 15:26, Paul Menzel wrote:
>
> […]
>
>>> Am 20.01.24 um 21:26 schrieb Hans de Goede:
>>>
>>>> On 1/18/24 13:57, Paul Menzel wrote:
>>>>> #regzbot introduced v6.6.11..v6.7
>>>
>>>>> There seems to be a regression in Linux 6.7 on the Dell XPS 13 9360 (Intel i7-7500U).
>>>>>
>>>>>       [    0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
>>>>>
>>>>> The PS/2 keyboard goes missing after S3 resume¹. The problem does not happen with Linux 6.6.11.
>>>>
>>>> Thank you for reporting this.
>>>>
>>>> Can you try adding "i8042.dumbkbd=1" to your kernel commandline?
>>>>
>>>> This should at least lead to the device not disappearing from
>>>>
>>>> "sudo libinput list-devices"
>>>>
>>>> The next question is if the keyboard will still actually
>>>> work after suspend/resume with "i8042.dumbkbd=1". If it
>>>> stays in the list, but no longer works then there is
>>>> a problem with the i8042 controller; or interrupt
>>>> delivery to the i8042 controller.
>>>>
>>>> If "i8042.dumbkbd=1" somehow fully fixes things, then I guess
>>>> my atkbd driver fix for other laptop keyboards is somehow
>>>> causing issues for yours.
>>>
>>> Just a quick feedback, that booting with `i8042.dumbkbd=1` seems to fix the issue.
>>>
>>>> If "i8042.dumbkbd=1" fully fixes things, can you try building
>>>> your own 6.7.0 kernel with commit 936e4d49ecbc:
>>>>
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=936e4d49ecbc8c404790504386e1422b599dec39
>>>>
>>>> reverted?
>>>
>>> I am going to try that as soon as possible.
>>
>> Assuming this was not some one time glitch with 6.7.0,
>> I have prepared a patch hopefully fixing this (1) as well
>> as a follow up fix to address another potential issue which
>> I have noticed.
>
> Unfortunately, it wasn’t just a glitch.
>
>> Can you please give a 6.7.0 (2) kernel with the 2 attached
>> patches added a try ?
>>
>> I know building kernels can be a bit of work / takes time,
>> sorry. If you are short on time I would prefer testing these 2
>> patches and see if they fix things over trying a plain revert.
>
> Applying both patches on v6.7.1
>
>     $ git log --oneline -3
>     053fa44c0de1 (HEAD -> v6.7.1) Input: atkbd - Do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID
>     0e0fa0113c7a Input: atkbd - Skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID
>     a91fdae50a6d (tag: v6.7.1, stable/linux-6.7.y, origin/linux-6.7.y) Linux 6.7.1
>
> I am unable to reproduce the problem in eight ACPI S3 suspend/resume cycles. The DMAR errors [3] are also gone:

Thanks.

So thinking more about this I think the DMAR errors are actually the real cause of the issue here, specifically if we replace: f0 with 00 (I guess DMAR uses the high bits for its own purposes) in

`[INTR-REMAP] Request device [f0:1f.0] fault index 0x0`

then the device ID is 00:1f.0 which is the ISA bridge and [INTR-REMAP] errors are known to disable interrupts. The PS/2 controller (which sits behind the ISA bridge) interrupt getting disabled would explain the suspend/resume keyboard issue better then the atkbd.c changes I have been focusing on.

So then the question becomes why does the 6.7.1 kernel not show the DMAR errors. I don't see anything between 6.7.0 and 6.7.1 which explains this. But maybe your local build is using a different configuration which explains this.

Can you try your local 6.7.1 build without my 2 patches? The quickest way to do that would be to run: "git reset --hard HEAD~2" and then re-run the make commandos, this will re-use your previous build so it should be pretty quick.

If things still work after that then the problem is not with the atkbd code.

Regards,

Hans





2024-01-26 15:58:58

by Hans de Goede

[permalink] [raw]
Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

Hi Paul,

On 1/26/24 14:32, Hans de Goede wrote:
> Hi Paul,
>
> On 1/26/24 08:03, Paul Menzel wrote:
>> Dear Hans,
>>
>>
>> Thank you for your reply, and sorry for the delay on my side. I needed to set up an environment to easily build the Linux kernel.
>
> No problem thank you for testing this.
>
>> Am 22.01.24 um 14:43 schrieb Hans de Goede:
>>
>>> On 1/21/24 15:26, Paul Menzel wrote:
>>
>> […]
>>
>>>> Am 20.01.24 um 21:26 schrieb Hans de Goede:
>>>>
>>>>> On 1/18/24 13:57, Paul Menzel wrote:
>>>>>> #regzbot introduced v6.6.11..v6.7
>>>>
>>>>>> There seems to be a regression in Linux 6.7 on the Dell XPS 13 9360 (Intel i7-7500U).
>>>>>>
>>>>>>       [    0.000000] DMI: Dell Inc. XPS 13 9360/0596KF, BIOS 2.21.0 06/02/2022
>>>>>>
>>>>>> The PS/2 keyboard goes missing after S3 resume¹. The problem does not happen with Linux 6.6.11.
>>>>>
>>>>> Thank you for reporting this.
>>>>>
>>>>> Can you try adding "i8042.dumbkbd=1" to your kernel commandline?
>>>>>
>>>>> This should at least lead to the device not disappearing from
>>>>>
>>>>> "sudo libinput list-devices"
>>>>>
>>>>> The next question is if the keyboard will still actually
>>>>> work after suspend/resume with "i8042.dumbkbd=1". If it
>>>>> stays in the list, but no longer works then there is
>>>>> a problem with the i8042 controller; or interrupt
>>>>> delivery to the i8042 controller.
>>>>>
>>>>> If "i8042.dumbkbd=1" somehow fully fixes things, then I guess
>>>>> my atkbd driver fix for other laptop keyboards is somehow
>>>>> causing issues for yours.
>>>>
>>>> Just a quick feedback, that booting with `i8042.dumbkbd=1` seems to fix the issue.
>>>>
>>>>> If "i8042.dumbkbd=1" fully fixes things, can you try building
>>>>> your own 6.7.0 kernel with commit 936e4d49ecbc:
>>>>>
>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=936e4d49ecbc8c404790504386e1422b599dec39
>>>>>
>>>>> reverted?
>>>>
>>>> I am going to try that as soon as possible.
>>>
>>> Assuming this was not some one time glitch with 6.7.0,
>>> I have prepared a patch hopefully fixing this (1) as well
>>> as a follow up fix to address another potential issue which
>>> I have noticed.
>>
>> Unfortunately, it wasn’t just a glitch.
>>
>>> Can you please give a 6.7.0 (2) kernel with the 2 attached
>>> patches added a try ?
>>>
>>> I know building kernels can be a bit of work / takes time,
>>> sorry. If you are short on time I would prefer testing these 2
>>> patches and see if they fix things over trying a plain revert.
>>
>> Applying both patches on v6.7.1
>>
>>     $ git log --oneline -3
>>     053fa44c0de1 (HEAD -> v6.7.1) Input: atkbd - Do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID
>>     0e0fa0113c7a Input: atkbd - Skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID
>>     a91fdae50a6d (tag: v6.7.1, stable/linux-6.7.y, origin/linux-6.7.y) Linux 6.7.1
>>
>> I am unable to reproduce the problem in eight ACPI S3 suspend/resume cycles. The DMAR errors [3] are also gone:
>
> Thanks.
>
> So thinking more about this I think the DMAR errors are actually the real cause of the issue here, specifically if we replace: f0 with 00 (I guess DMAR uses the high bits for its own purposes) in
>
> `[INTR-REMAP] Request device [f0:1f.0] fault index 0x0`
>
> then the device ID is 00:1f.0 which is the ISA bridge and [INTR-REMAP] errors are known to disable interrupts. The PS/2 controller (which sits behind the ISA bridge) interrupt getting disabled would explain the suspend/resume keyboard issue better then the atkbd.c changes I have been focusing on.
>
> So then the question becomes why does the 6.7.1 kernel not show the DMAR errors. I don't see anything between 6.7.0 and 6.7.1 which explains this. But maybe your local build is using a different configuration which explains this.
>
> Can you try your local 6.7.1 build without my 2 patches? The quickest way to do that would be to run: "git reset --hard HEAD~2" and then re-run the make commandos, this will re-use your previous build so it should be pretty quick.
>
> If things still work after that then the problem is not with the atkbd code.

Never mind I just became aware of a bunch of other reports which don't have
the DMAR errors on resume, so I'm submitting the 2 fixes for this upstream
now.

Regards,

Hans



Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

On 18.01.24 13:57, Paul Menzel wrote:
> #regzbot introduced v6.6.11..v6.7

#regzbot introduced 936e4d49ecbc
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.


Subject: Re: PS/2 keyboard of laptop Dell XPS 13 9360 goes missing after S3

On 27.01.24 09:12, Linux regression tracking #update (Thorsten Leemhuis)
wrote:
> On 18.01.24 13:57, Paul Menzel wrote:
>> #regzbot introduced v6.6.11..v6.7
>
> #regzbot introduced 936e4d49ecbc
> #regzbot ignore-activity

#regzbot monitor:
https://lore.kernel.org/all/[email protected]/
#regzbot fix: 683cd8259a9b883a51
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.

2024-02-03 16:50:28

by Antoine

[permalink] [raw]
Subject: + XPS 13 9343

On 1/20/24 21:26, Hans de Goede wrote:
> Can you try adding "i8042.dumbkbd=1" to your kernel commandline?
>
> The next question is if the keyboard will still actually
> work after suspend/resume with "i8042.dumbkbd=1". If it
> stays in the list, but no longer works

Hi, thanks a lot for taking into account our hardware,
just a supplementary feedback:

In my case (Dell XPS 13 9343/i5-5200U):
- Dell Inc. XPS 13 9343/0TM99H, BIOS A19 12/24/2018
- Linux version 6.6.13-1 (2024-01-20)

commandline with `i8042.dumbkbd=1` fixes the issue,
with capslock functional but without led
+ as a side note, hibernate doesn't trigger any issue

(before getting informed of and testing `i8042.dumbkbd=1`)
I had attached logs before/after suspend against 6.6.11 and 6.6.13 :
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061521#30

I remain at your disposal for any further infos/testing
best regards,
Antoine

2024-02-04 07:25:16

by Hans de Goede

[permalink] [raw]
Subject: Re: + XPS 13 9343

Hi Antoine,

On 2/3/24 17:16, Antoine wrote:
> On 1/20/24 21:26, Hans de Goede wrote:
>> Can you try adding "i8042.dumbkbd=1" to your kernel commandline?
>>
>> The next question is if the keyboard will still actually
>> work after suspend/resume with "i8042.dumbkbd=1". If it
>> stays in the list, but no longer works
>
> Hi, thanks a lot for taking into account our hardware,
> just a supplementary feedback:
>
> In my case (Dell XPS 13 9343/i5-5200U):
> - Dell Inc. XPS 13 9343/0TM99H, BIOS A19 12/24/2018
> - Linux version 6.6.13-1 (2024-01-20)
>
> commandline with `i8042.dumbkbd=1` fixes the issue,
> with capslock functional but without led
> + as a side note, hibernate doesn't trigger any issue
>
> (before getting informed of and testing `i8042.dumbkbd=1`)
> I had attached logs before/after suspend against 6.6.11 and 6.6.13 :
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1061521#30
>
> I remain at your disposal for any further infos/testing

The issue of the kbd on some Dell XPS models no longer
working after a suspend/resume cycle should be fixed by
these 2 patches which are on their way to Linus' tree:

https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?h=for-linus&id=683cd8259a9b883a51973511f860976db2550a6e
https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?h=for-linus&id=9cf6e24c9fbf17e52de9fff07f12be7565ea6d61

Regards,

Hans


2024-02-04 13:18:45

by Antoine

[permalink] [raw]
Subject: Re: + XPS 13 9343

On 2/4/24 08:24, Hans de Goede wrote:
> The issue of the kbd on some Dell XPS models no longer
> working after a suspend/resume cycle should be fixed by
> these 2 patches which are on their way to Linus' tree:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?h=for-linus&id=683cd8259a9b883a51973511f860976db2550a6e
> https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?h=for-linus&id=9cf6e24c9fbf17e52de9fff07f12be7565ea6d61

Hi Hans, and thanks,

Just completing my feedback, I am also unable to reproduce the problem
in eight ACPI S3 suspend/resume cycles on my XPS 13 9343;

Tested from Linus' tree on 6.8.0-rc2 (cf attached dmesg)

And on top of debian's testing,unstable one 6.6.13-1,
with attached patch (thus including initial patch "Input: atkbd - skip
ATKBD_CMD_GETID in translated mode")

best regards,
Antoine


Attachments:
99_fix_keyboard_after_resume_on_dell_xps13-9343-9350-9360-9370.patch (1.82 kB)
dmesg.log (76.42 kB)
Download all attachments