Readit News logoReadit News
pankalog · 2 months 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 :-)

MaKey · 2 months ago
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.
a96 · 2 months ago
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.
antonok · 2 months ago
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

Imustaskforhelp · 2 months ago
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.

mercenario · 2 months ago
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.

dmurray · 2 months ago
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.

leakycap · 2 months ago
> 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.

akdor1154 · 2 months ago
Yep, it definitely is well above 'basememt full of model trains' on my (sadly far-off) list of retirement activities.
kees99 · 2 months ago
That's the spirit! :-)

By the way, delving into obscure and hardware-specific kernel code, sometimes yields quite interesting generally-applicable problems. For example, @dougg3 did an (excellent!) series of articles about his work on bringing mainline kernel support to "Chumby 8", a somewhat obscure, but historically significant piece of hardware, and as a side-quest he stumbled into this:

https://www.downtowndougbrown.com/2024/04/why-is-my-cpu-usag...

...which is applicable to quite a few other machines.

bojle · 2 months ago
I am doing the same but with LLVM. For starters, I filtered issues with the "good first issue" label and found something to work on [1]. It took 2 months in review and about a month to research and write the code. Finally got merged yesterday. I am writing about it so that when someone else bumps into the same problem, they hopefully take 1 hour instead of 1 month. Compilers, like the kernel, are a lot of fun!

[1] https://github.com/llvm/llvm-project/pull/154914

MomsAVoxell · 2 months ago
My favourite contribution to the Linux kernel, which I witnessed myself, was a 1-character fix to a macro that my boss found, related to reading ADC, and which we spent two weeks checking and double-checking and re-double-checking to be sure that it was actually a bug.

It was, he submitted it, and that one character fix got him into the contributors file .. we were all highly amused, because that particular boss didn't program much, but found the bug during testing and it was, nevertheless, a huge win for him .. ;)

EDIT: it was a 2-character fix. ;)

https://lkml.iu.edu/2103.2/08109.html

(W., if you read this, I still love telling the story of how you found this bug..)

fragmede · 2 months ago
you can't say that and then keep the story to yourself!
MomsAVoxell · 2 months ago
Lets just say that it involved a lot of fluidic particulate quantification.

All over the desk.

jw_cook · 3 months ago
This was a fun read, and well written. Thanks for sharing! Adding/improving support for some niche piece of hardware sounds like an ideal way to get started with kernel development, and something I'd like to try myself sometime.
kwar13 · 2 months ago
Having your name as a Linux contributor is the highest level of accolade I can think of when it comes to being a programmer.
dmix · 2 months ago
Even if it's small it demonstrates a level of commitment to working with a human system of senior engineers and ambition for software to become better just because. Always good on a resume.
Jalad · 2 months ago
Agreed. There's also getting a hexadollar from Donald Knuth for finding errors in The Art of Computer Programming

I've never done either, so I'm not bragging or anything

caminanteblanco · 2 months ago
This was an absolutely awesome post, and it makes me want to do the work to fix the functionality on my Lenovo laptop. Though I'm sure the Lenovo drivers are a little more closely watched, so I'll make sure to do my due diligence first. Thank you for the write up!
matheusmoreira · 2 months ago
That was so cool!

I too went on this adventure with my laptop. Sadly I hit a wall while reverse engineering the ACPI stuff. With no logs, error messages or tools on the Windows side to intercept the ACPI events, I was at a loss but eventually gave up. Massive respect for managing it with your own laptop!!

I did manage to reverse engineer the keyboard's LEDs and drive them from user space! Studied the kernel to make a contribution but decided not to do so when I saw comments saying it is better to keep functionality in user space if at all possible.

schnitzelstoat · 3 months ago
This was really interesting! I've often wondered how one would do such a thing.

Seeing your name in the Linux changelog must be awesome!

henrym · 2 months ago
> Seeing your name in the Linux changelog must be awesome!

Years ago when I was a teenager I had a couple patches accepted for ksnake and gedit.

Certainly not as prestigious as a patch to Linux, but still the idea of code I'd written running on millions of PCs around the world felt amazing.

sgarland · 2 months ago
I got a patch to Debian’s vixie-cron accepted [0], which thus far has been my proudest achievement. It’s tiny and stupid, and should never happen to anyone reasonable, but nevertheless, you can now change your server’s TZ without restarting crond or waiting for a DST shift, and your jobs will fire at the new correct time.

Contributing to the kernel is definitely on my list of things to eventually do.

0: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019716

johnisgood · 2 months ago
Same. I found serious bugs in a couple of games, exploited some, had fun, wrote a patch and sent it to whoever. Problem is, I was so anxious I did it under an alias. I have my different aliases in the changelog of some games. Nice to look at them, like "wow, that's my contribution", and then it hits "but no one will believe it was me, it was not under my name". God damn it. :(

You know, back when I confused "hash function" with "encryption" and whatnot.

Deleted Comment

npteljes · 2 months ago
I'd be very proud of that myself. Nice job!
vkoskiv · 3 months ago
Thank you! It is indeed!
sxzygz · 3 months ago
Bravo. Awesome work.