My first contribution to Linux
vkoskiv.com684 points by vkoskiv 7 days ago
684 points by vkoskiv 7 days ago
If I had no problem with devoting the time and money, contributing to the kernel (especially in a topic as obscure as making the extra buttons work on a 20-year-old laptop) is at the top of my bucket list, and I am definitely going to be doing it in the near future when my calendar clears up a bit.
Exquisite write-up and OP's simple writing has a motivating ring to it, and I'm now on the local used marketplace looking for pieces of tech like this :-)
What I did was buy a wifi router with a chipset supported by OpenWrt but with no build target yet. One of the OpenWrt maintainers then guided me in what I had to do to get the info he needed for a patch. I followed his instructions, he wrote the patch and there it was, a new build target. Later I wrote a patch myself to fix the LED control. It was a rewarding and educational experience. Later I even found someone using OpenWrt on the router I helped get supported which put a smile on my face.
Nice! That's something I've kind of thought I should try one day. Unsupported routers aren't exactly hard to come by these days.
If you want to find devices that still need hardware support under Linux, I highly recommend trying to get a mobile Linux distribution to work on an old smartphone or tablet.
postmarketOS in particular has a really good devices page [1] showing missing feature support at a glance, as well as guides for porting to new devices [2] and porting features from an outdated vendor-provided Linux fork to the upstream kernel [3].
[1] https://wiki.postmarketos.org/wiki/Devices [2] https://wiki.postmarketos.org/wiki/Porting_to_a_new_device [3] https://wiki.postmarketos.org/wiki/Mainlining
I genuinely want to work on postmarketOS but I don't have the technical know-how right now but one day.
I would prefer a sort of dual-boot or just a simple ability to run linux in "android phones"
Like, if we were to build a linux phone somehow hacking it through a raspberry pi or the alikes, they would be so much more costly and subpar.
Android phones have whole globalization working on it and the only reason why they don't work is lack of drivers support/software side, something which can be worked on.
I think if society rewards something like PostMarketOS more/make it easier to install it, then things can be so great as well.
I know I can run a terminal inside android but till now it was only possible through qemu which had its issues...
https://www.androidauthority.com/android-linux-terminal-app-...
I am not sure but I have never really appreciated having linux run inside a vm, I'd much rather run something like waydroid in a postmarketOS phone than linux inside android in an ideal world technically speaking from strictly performance but we don't live in one and installing waydroid on postmarketos or even installing postmarketos can be a very huge issue whereas installing linux on android can be a single step with termux or userLand.
It's possible to dual-boot. My favorite method is to have a device with a SD-card slot and have android on the eMMC but PostmarketOS on the SD-card.
Currently only do that on one of my older devices, would love to do it on my main device but when I bought it I was in a hurry to get it going and did not have time to unlock the bootloader. Unlocking the bootloader now means having to factory default the device but I simply have too much important stuff set up that it's not worth it. Apparently there's also no great way to backup all partitions of the Android device which I find to be quite strange.
You could also look into running mobile Linux on top of libhybris - it's a proprietary compatibility layer, but some people use it to get support for mobile Linux runtimes on more recent devices.
I'm actually trying this right now, but it is becoming much harder than I expected. The fact that I keep needing to recompile kernel and rebooting device doesn't help. I'm trying to make the display and touchscreen work consistently on a qualcomm soc.
And the pmos wiki is severely lacking IMHO.
I feel most laptops still don't work completely out of the box with Linux, so you don't have to hunt for old hardware.
Maybe you won't find an issue as simple as fixing a button, though.
> Maybe you won't find an issue as simple as fixing a button, though.
Every laptop I've used with linux has had a few non-functioning buttons and keys. I think you underestimate the widespread issue.
If someone wants to tackle this on a laptop where this is the case, WMI is where you want to start.
https://docs.kernel.org/next/wmi/driver-development-guide.ht...
I've never had that problem with a Thinkpad.
Lucky you! There are thousands of ThinkPad models and they're not magically exempt from this issue:
(Not a new issue... here's the problem on an R60) https://unix.stackexchange.com/questions/475968/thinkpad-vol...
E14 Gen4 https://forum.manjaro.org/t/thinkpad-e14-gen4-special-keys-m...
E14 Gen2 issues https://unix.stackexchange.com/questions/609942/thinkpad-spe...
T510 issues https://bbs.archlinux.org/viewtopic.php?id=268269
Fn Volume Control Keys Not Working https://forums.linuxmint.com/viewtopic.php?t=412947
It just takes a cursory glance of search results to see that your ThinkPad experience is not everyone's.
We might have a different definition of issue.. I think 100% compatibile working would be launching bloatware installed by the manufacturer. I'm happy not to have the pavlovian training that may some day cause me to click one of these things on someone's windows machine.
> I think 100% compatibile [sic] working would be launching bloatware installed by the manufacturer.
Making a physical button work requires bloatware in your understanding?
> I'm happy not to have the pavlovian training that may some day cause me to click one of these things on someone's windows machine.
Do you know what you're trying to say here? I do not.
I think it's more of the buttons perform specialized tricks to launch bloatware in Windows.
Some of the issue here is the keys themselves have almost no standardization, even across models. Hell, possibly in the same model sometimes. Some backend windows driver captures these signals via a 50 mile long series of if statements that make grown men weep when viewed. This later can mean your totally working fix for the kernel doesn't actually work on a 1/3rd of that fleet of laptops.
> I think it's more of the buttons perform specialized tricks to launch bloatware in Windows.
The linked article is discussing play/pause buttons as well as a "mode-switch" button that allows the play/pause button to have a second function. I do not understand how any of these regular functions become bloatware in your estimation.
> Some of the issue here is the keys themselves have almost no standardization, even across models.
There is actually widespread standardization, which is why many important keys work by default. Laptops sometimes have buttons to disable the internal wifi or adjust the keyboard brightness. These keys are less universal, but still hard to categorize as bloatware.
> ome backend windows driver captures these signals via a 50 mile long series of if statements that make grown men weep when viewed.
I don't know any grown men who would weep when viewing this. I'm confused that you do not like a simple solution (if statements, which a computer has zero problems following precisely even if it is complex to you) nor the complex solution ("bloatware")
> This later can mean your totally working fix for the kernel doesn't actually work on a 1/3rd of that fleet of laptops.
Most devices used in fleets are well-supported in linux after a few years, specifically because of users like the linked article who spend time making buttons worked when pressed.
I have a calculator button on my Dell laptop. Some of these keys are just macros.
The calculator button is one of the "standardized" buttons, it isn't even as complex as macro as it turns out!
And very handy
Really? I had assumed it was running calc.exe via some hidden command line window