this post was submitted on 29 Dec 2023
22 points (100.0% liked)

Linux

1258 readers
109 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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 ?

you are viewing a single comment's thread
view the rest of the comments
[–] Splatsune 5 points 10 months ago (1 children)

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:

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

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

[–] Corngood@lemmy.ml 4 points 10 months ago* (last edited 10 months ago) (1 children)

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 5 points 10 months ago (1 children)

Either way, this did it! Thank you so much!

[–] Corngood@lemmy.ml 3 points 10 months ago* (last edited 10 months ago) (1 children)

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

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

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 2 points 10 months ago (2 children)

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@lemmy.ml 1 points 10 months ago (1 children)
[–] Splatsune 2 points 10 months ago

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

[–] Corngood@lemmy.ml 1 points 10 months ago

That's great. Thanks!