Return to Level1Techs.com

Adding support for unsupported keyboard

#1

Hey all. First time poster here. Thought I’d start off with a tough one.

So lately I’ve been using Linux as my daily driver - at least for personal and IT related stuff (audio engineering workloads are still relegated to Windows 10). I stumbled across a lot of problems in regards to Linux supporting my laptop (the ASUS Zephyrus M GM501). Heck, Pop!_OS (the distro I’m currently using) is the only distro that worked for my laptop out of the box - mostly because I downloaded the live USB with the NVIDIA driver included (Nouveau causes the kernel to soft lock). Not only that, it’s the only distro that doesn’t require me to set the acpi_osi boot parameter (experimenting with it on Ubuntu, Fedora and Arch lead me to set either acpi_osi=! or acpi_osi=!'Windows 2015'). Needless to say I think I’m sticking with Pop!_OS.

There are a couple of more problems I can’t solve right off the bat, like controlling the RGB backlight of the keyboard (which in it self is a reverse-engineering project of sorts) and Linux is not aware of or capable of controlling thermals (which sucks, as this laptop has three fan modes - silent, balanced and overdrive - or F16 mode as I’d like to call it).

One problem I think I should be capable of solving however is getting the fn function keys working. I tried sending a bug to the evdev bug tracker, which got flagged as “not our bug”. I also filed a bug with the linux kernel bug tracker, but haven’t gotten any replies yet.

So I’m looking for ways to solve this issue. Note that I am not a programmer, but a sys admin - and would like some easy, quick fix that would work without having to fiddle with the kernel too much. Anyone have any experience with getting unsupported keyboards to work? Can you suggest an approach, tools and methods of doing so? Is it really necessary to fiddle with the kernel to get it working? And if so: what’s the best approach to do so? Again: I can’t code, but I’ve gotten an audio interface to work with Linux when it was unsupported back back in the day using quirks mode.

Thanks for reading!

0 Likes

#2

Basically, if the vendor has bugs in their ACPI implementation and/or the vendor does not support *nix machines, there is no quick and easy fixes.

In the world of alternative systems, it is important that you buy and support companies that adhere to open standards and provide basic level support for things that are not MS Windows.

Common offenders are Nvida, Apple, Most of your gaming brands, and laptop vendors that do not sell laptops with a *nix alternative.

I am not saying that you can’t get them to work, but if you cannot code or don’t know how to modify existing code, then you are SOL. You are at the mercy of those that enjoy hacking on things to get stuff working.

0 Likes

#3

Lmsensors should be reporting temps and cpufreqd can be setup with custom throttling. If it’s Intel based you can easily undervolt too.

0 Likes

#4

Well see, that’s the thing: it is an open source community. I’m not good at coding, but I can definitely do some testing, information gathering and even fire off some quirks if necessary. I see a lot of other machines also not being supported, but it took someone with gumption to step up and provide that information. I’m still trying to figure out a few things, like how to create a quirks mode for the input so I can get it to register the keystrokes. I’ve gotten some extra help and tools from the libinput bug tracker to get me a step closer. Next is to figure out how to put that into action - and where to direct it. I.e anyone can fix bugs or help add features without being a coder.

Yes, I should’ve supported a brand that is actually Linux friendly… but here we are. What am I supposed to do? Go back to Windows?! That sounds like defeatist talk to me :stuck_out_tongue:

Again: if you’ve got any tips about how I’m supposed to proceed I’m all ears - and I won’t give up.

0 Likes

#5

It should be, but this laptop has some special sensor arrays - probably due to the fact that it can change between those three fan speed modes (which I’m hoping is a variable I can flip in sysfs). Most likely the sensors aren’t working because the ACPI support for this laptop is not in the mainline kernel. asus_wmi is like a catchall of most asus laptops, but doesn’t fully support my laptop (yet). As a result I can’t get the thermals for the PCB or for anything else but the USB.

I have to check that undervolting thing though… sounds nice ^^ though it shouldn’t theoretically be possible with this processor (8750H).

0 Likes

#6

The H sku cpus are usable with XTU so undervolting in linux should not be a problem.

what happens when you run sensors-detect?

0 Likes

#7

Understood. I would recommend that you hang out in the libinput IRC and the kernel-dev IRC.

I used to make my own drivers for things back in the day but that was when hardware was more simple and you could find data sheets. Now all the peripherals run a microprocessor and sometimes even their own realtime OS.

Can you do an lsusb, lspci, and lsmod to figure out the vendor of the hardware that you are trying to support.

Also checking dmesg and /var/log/messages can let you see if you are getting any errors when the hardware is being probed.

0 Likes