There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Laptop keyboard unresponsive - I think my (unknown) laptop is affected by the kernel Zen IRQ regressions - how do I work around this?

I picked up a laptop a couple of months ago for the purpose of setting up Linux on (I chose NixOS for stability) to go with my existing desktop. It’s an Infinity E15-5A165-BM (Infinity being an Australian local manufacturer of gaming laptops) which features a Ryzen 5 6600H CPU and a GeForce 1650 GTX.

The keyboard uses a generic driver (i8042), which works great on Windows and when booting (including Grub/systemd-boot). However, once booted, I’ve found that the keyboard no longer responds to input - and in fact no longer shows up as an input device. Now, I’ve done a fair bit of debugging so far (for someone who’s not had to patch anything manually but knows how to do a proper search) and I’ve worked out the following:

  • The latest available kernel in which the keyboard is recognised is 5.10 LTS - but setting this as the kernel to use in NixOS results in me no longer being able to boot into a graphical interface.
  • I managed to find this lore.kernel thread ‪‬ in which I believe my issue is discussed. This tells me that it’s known and being worked on and that I can maybe wait for a future kernel version, and that theoretically I might just be able to patch the kernel myself, if I learn how to do that and use the right settings?

I’ve done a couple of commands and pulled some logs from the laptop, and detailed info - lshw, lspci, dmidecode, acpidump, etc - can be found in this folder on my web server.

To my understanding my options are to use the older kernel for now and figure out why the display manager is not working, or learn to patch the current kernel and hope that that works. What’s my best option, and is there anything else I might be missing ?

Cwilliams ,

I chose NixOS for stability

I think that’s the first time I’ve ever heard that

Corngood ,

Could you do:

Please share the output of grep -v /sys/class/dmi/id/* as a normal user (not root)

It looks like all the patches from that thread are in linux 6.6, so your board may still need quirks added.

Once you know the board name you try something like this:


<span style="color:#323232;">  boot.kernelPatches = [{
</span><span style="color:#323232;">      name = "acpi quirk";
</span><span style="color:#323232;">      patch = pkgs.writeText "acpi.patch" ''
</span><span style="color:#323232;">diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
</span><span style="color:#323232;">index 297a88587031..655332f3a5da 100644
</span><span style="color:#323232;">--- a/drivers/acpi/resource.c
</span><span style="color:#323232;">+++ b/drivers/acpi/resource.c
</span><span style="color:#323232;">@@ -524,6 +524,12 @@ static const struct dmi_system_id pcspecialist_laptop[] = {
</span><span style="color:#323232;"> 			DMI_MATCH(DMI_BOARD_NAME, "GM6BG0Q"),
</span><span style="color:#323232;"> 		},
</span><span style="color:#323232;"> 	},
</span><span style="color:#323232;">+	{
</span><span style="color:#323232;">+		/* [COMPUTER DESCRIPTION] */
</span><span style="color:#323232;">+		.matches = {
</span><span style="color:#323232;">+			DMI_MATCH(DMI_BOARD_NAME, "[BOARD_NAME]"),
</span><span style="color:#323232;">+		},
</span><span style="color:#323232;">+	},
</span><span style="color:#323232;"> 	{ }
</span><span style="color:#323232;"> };
</span><span style="color:#323232;">'';
</span><span style="color:#323232;">  }];
</span>

Just be careful that the indentation of the patch part doesn’t get changed.

Splatsune OP ,
@Splatsune@beehaw.org avatar

Figured I’d do the pre-setup before I went to bed, so I’ve run the grep command and put the board_name from that output such that the patch now reads thus:


<span style="color:#323232;">  boot.kernelPatches = [{
</span><span style="color:#323232;">      name = "acpi quirk";
</span><span style="color:#323232;">      patch = pkgs.writeText "acpi.patch" '' 
</span><span style="color:#323232;">diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c 
</span><span style="color:#323232;">index 297a88587031..655332f3a5da 100644 
</span><span style="color:#323232;">--- a/drivers/acpi/resource.c 
</span><span style="color:#323232;">+++ b/drivers/acpi/resource.c 
</span><span style="color:#323232;">@@ -524,6 +524,12 @@ static const struct dmi_system_id pcspecialist_laptop[] = {
</span><span style="color:#323232;">                        DMI_MATCH(DMI_BOARD_NAME, "GM6BG0Q"), 
</span><span style="color:#323232;">                }, 
</span><span style="color:#323232;">        }, 
</span><span style="color:#323232;">+       { 
</span><span style="color:#323232;">+               /* Infinity E15-5A165-BM */ 
</span><span style="color:#323232;">+               .matches = { 
</span><span style="color:#323232;">+                       DMI_MATCH(DMI_BOARD_NAME, "GM5RG1E0009COM"), 
</span><span style="color:#323232;">+               }, 
</span><span style="color:#323232;">+       }, 
</span><span style="color:#323232;">        { } 
</span><span style="color:#323232;"> }; 
</span><span style="color:#323232;">'';
</span><span style="color:#323232;">  }];
</span>

I’ll report back with the results when I’m able.

Corngood , (edited )

Nice. Also it occurred to me that there might be a way to set that quirk through the kernel command line instead of having to compile a patched kernel. I haven’t had a chance to look it up though.

Edit: I couldn’t find anything obvious. This behaviour is buried pretty deep.

Splatsune OP ,
@Splatsune@beehaw.org avatar
Corngood , (edited )

That’s great. If you get a chance, would you be able to test this patch?


<span style="color:#323232;">diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
</span><span style="color:#323232;">index 297a88587031..3204bed08b3c 100644
</span><span style="color:#323232;">--- a/drivers/acpi/resource.c
</span><span style="color:#323232;">+++ b/drivers/acpi/resource.c
</span><span style="color:#323232;">@@ -484,6 +484,18 @@ static const struct dmi_system_id tongfang_gm_rg[] = {
</span><span style="color:#323232;"> 			DMI_MATCH(DMI_BOARD_NAME, "GMxRGxx"),
</span><span style="color:#323232;"> 		},
</span><span style="color:#323232;"> 	},
</span><span style="color:#323232;">+	{
</span><span style="color:#323232;">+		.ident = "Infinity E15-5A165-BM"
</span><span style="color:#323232;">+		.matches = {
</span><span style="color:#323232;">+			DMI_MATCH(DMI_BOARD_NAME, "GM5RG1E0009COM"),
</span><span style="color:#323232;">+		},
</span><span style="color:#323232;">+	},
</span><span style="color:#323232;">+	{
</span><span style="color:#323232;">+		.ident = "Infinity E15-5A305-1M"
</span><span style="color:#323232;">+		.matches = {
</span><span style="color:#323232;">+			DMI_MATCH(DMI_BOARD_NAME, "GM5RGEE0016COM"),
</span><span style="color:#323232;">+		},
</span><span style="color:#323232;">+	},
</span><span style="color:#323232;"> 	{ }
</span><span style="color:#323232;"> };
</span><span style="color:#323232;"> 
</span>

I’d like to try to get it upstream, and that seems like the sanest way to do it.

You might need to be on linux 6.5+ for this patch to apply, and if you could verify that it’s still broken on 6.6 without the patch, that would be nice.

Splatsune OP ,
@Splatsune@beehaw.org avatar

I did try kernel 6.6 without either patch before installing the new one, and I can confirm that the issue was still present on that version.

With the new patch though (after adding a comma to the end of each .ident string), everything is working as expected.

Corngood ,

That’s great. Thanks!

Corngood ,

git.kernel.org/pub/scm/linux/kernel/…/commit/?h=b…

FYI, I think the fix will make it into 6.8.

Splatsune OP ,
@Splatsune@beehaw.org avatar

Exciting! Thank you so much for your help mate, it’s very much appreciated.

chaorace , (edited )
@chaorace@lemmy.sdf.org avatar

Your best bet is probably figuring out why the graphical session isn’t working and then going from there. Since you’re on NixOS odds are all the logs you need are right there in journald.

Worst case scenario: you might need to pin your system nixpkgs to ~January 2021 until the issue sorts itself out. You can still install newer userland packages if you separately manage them as a flake (this is a common and well-supported pattern in home-manager)

EDIT: found a discussion with good configuration.nix examples for pinning the system nixpkgs. Once you find a workable pin you could also try inching it up to get a better idea of what broke (January 2021 is a good starting point because it’s the last month before 5.11 released, a newer pin is very likely possible)

Splatsune OP ,
@Splatsune@beehaw.org avatar

I believe that the issue might be that the amdgpu driver is too new, judging by this string of errors:


<span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (II) AMDGPU(0): [KMS] Kernel modesetting enabled.
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (EE) AMDGPU(0): [drm] Failed to open DRM device for pci:0000:05:00.0: Invalid argument
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (II) AMDGPU(1): [KMS] Kernel modesetting enabled.
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (EE) AMDGPU(1): [drm] Failed to open DRM device for pci:0000:05:00.0: Invalid argument
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (EE) Screen 0 deleted because of no matching config section.
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (II) UnloadModule: "amdgpu"
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (EE) Screen 0 deleted because of no matching config section.
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (II) UnloadModule: "amdgpu"
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (EE) Device(s) detected, but none match those in the config file.
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (EE)
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: Fatal server error:
</span><span style="color:#323232;">Dec 20 21:30:54 minion xserver-wrapper[1080]: (EE) no screens found(EE)
</span>

So if this doesn’t end up working, I’ll definitely look into the pinning thing, because 5.10 seems like my best shot.

chaorace ,
@chaorace@lemmy.sdf.org avatar

Hmm… what’s the purpose of loading amdgpu at all if you’re using an NVIDIA card? Optimus?

samwwwblack , (edited )

The 6.5 kernel should have the fix for this included, so you could try using that kernel instead of 6.1?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines