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.
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].
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:
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!
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 .. ;)
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.
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.
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!
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.
Thank you for this. I have a USB desktop speaker whose volume controls don't work and I was thinking of writing a patch, but didn't know where to start; now I do.
I've been procrastinating a trivial fix for years, thanks for having listed the commands to run to format and send the patch, that might help me find my way out from procrastination because this is exactly what's been blocking me.
I've never really done anything with the kernel, and at this point it feels kind of overwhelming to start contributing.
I'm sure if I went to the source tree and asked people for a low-hanging-fruit task someone would be kind enough to guide me to get started, but it's still kind of overwhelming to a point where I've just avoided it.
I should probably should stop coming up with excuses and just do it, as I would like to do a lot more with filesystems and having an understanding of the kernel would probably help with that.
This is the easiest way to hire engineers with high quality open source contributions with a public track record.
All it takes is just to check that the commit shows up in upstream projects such as Linux and anyone can see the code, the reviews and the authors email in the AUTHORS file which verify that this contribution / patch is indeed from the author who committed that change.
This is a very old form of social proof which saves lots time and makes Leetcode redundant. (Which can now be completely cheated with LLMs.)
Be careful.. any measure becomes a target, and in doing so voids its usefulness. Getting a kernel patch in is probably already somewhat afflicted by this, but imagine the lkml if every Bay Area wannabe company started soft-requiring this as a screen!
as others have warned..
a scary counterexample is the npm ecosystem, where people are gaming it with questionable npm package spam, to get the 'astroturf footprint' of being the author of widely installed packages. (which get their footprint by piggybacking on actual useful packages, akin to stapled-together law packages in the us congress).
Neat! I don't know much about the Linux ecosystem so I didn't realize how Linus himself is still so deeply involved in the day-to-day review and release process.
Fantastic read! I've alas been frightened of contributing to the Linux kernel in spite of my interests, this instills both confidence and inspiration while serving as a simple "guide" on how to even approach debugging a hardware issue. I particularly like how the author expresses his nervousness in submitting the patch as he recognizes the importance of the work of the maintainers
Wait… Koskivuori? Well of course they took his Linux patch right away, this is blatant Finnish favoritism! Imagine if some poor Estonian tried similar…
;-)
Just kidding, very cool to see a blow by blow of landing a Linux patch. I felt similar excitement landing a mere emacs patch.
Thanks! I haven't, but I probably should, since you're the second person asking about it. The site is built with Zola[0], and it's using the Radion[1] theme, with small modifications.
I also got my first and so far only kernel patch submitted years ago:
On my MacBook Pro 2010 with GeForce 320M running any OpenGL application, even glxgears, would crash because it ran out of memory. So I dug into nouveau drm code and found out that some memory related function was using wrong code path for that GPU.
It took some time to figure out how to submit a patch but it felt nice after I got it accepted.
I didn't even know about those patch sanity-checking scripts back then, they look useful for potential future patches!
congratulations. as someone who is a bit of a finnaboo and lives there, it's my dream to have had contributed something to the linux kernel. I was wondering if you used the same email for the commit as your github profile so that it shows up in the contributor list in the github mirror of the kernel and on your profile? I don't think I see the contribution when taking a quick glance at your github
I just checked this, and it seems like GitHub is a bit weird about tracking these. It didn't show up on my profile at all until I just now forked[0] torvalds/linux on GitHub. Now it shows up on my profile on May 9th (author date), but the link to the commit is broken, because repository authors page it points to filters on the commit date, not the author date.
pankalog|4 months ago
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|4 months ago
antonok|4 months ago
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
dmurray|4 months ago
Maybe you won't find an issue as simple as fixing a button, though.
akdor1154|4 months ago
kees99|4 months ago
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|4 months ago
[1] https://github.com/llvm/llvm-project/pull/154914
MomsAVoxell|4 months ago
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|4 months ago
jw_cook|4 months ago
kwar13|4 months ago
dmix|4 months ago
Jalad|4 months ago
I've never done either, so I'm not bragging or anything
caminanteblanco|4 months ago
matheusmoreira|4 months ago
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|4 months ago
Seeing your name in the Linux changelog must be awesome!
henrym|4 months ago
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.
vkoskiv|4 months ago
sph|4 months ago
throwaway2037|4 months ago
At the bottom, there is a timeline, and I noticed this entry with a LWN link:
https://lwn.net/Articles/1020203/ ... which leads to a LKML link: https://lwn.net/ml/all/aBj_SEgFTXfrPVuj@lappy/The new version of this tool (AUTOSEL) looks very interesting!
embedding technology to provide significantly more accurate recommendations.jraph|4 months ago
tombert|4 months ago
I'm sure if I went to the source tree and asked people for a low-hanging-fruit task someone would be kind enough to guide me to get started, but it's still kind of overwhelming to a point where I've just avoided it.
I should probably should stop coming up with excuses and just do it, as I would like to do a lot more with filesystems and having an understanding of the kernel would probably help with that.
degamad|4 months ago
rvz|4 months ago
All it takes is just to check that the commit shows up in upstream projects such as Linux and anyone can see the code, the reviews and the authors email in the AUTHORS file which verify that this contribution / patch is indeed from the author who committed that change.
This is a very old form of social proof which saves lots time and makes Leetcode redundant. (Which can now be completely cheated with LLMs.)
akdor1154|4 months ago
fifticon|4 months ago
alexchantavy|4 months ago
VALTIELENTINE|4 months ago
zephyreon|4 months ago
whoami730|4 months ago
eduction|4 months ago
;-)
Just kidding, very cool to see a blow by blow of landing a Linux patch. I felt similar excitement landing a mere emacs patch.
vkoskiv|4 months ago
ddtaylor|4 months ago
indigodaddy|4 months ago
vkoskiv|4 months ago
[0]: https://www.getzola.org/ [1]: https://github.com/micahkepe/radion
glaze|4 months ago
I also got my first and so far only kernel patch submitted years ago:
On my MacBook Pro 2010 with GeForce 320M running any OpenGL application, even glxgears, would crash because it ran out of memory. So I dug into nouveau drm code and found out that some memory related function was using wrong code path for that GPU.
It took some time to figure out how to submit a patch but it felt nice after I got it accepted.
I didn't even know about those patch sanity-checking scripts back then, they look useful for potential future patches!
sim7c00|4 months ago
CrossVR|4 months ago
vkoskiv|4 months ago
asimovDev|4 months ago
vkoskiv|4 months ago
Broken link points here and shows no commits: https://github.com/torvalds/linux/commits?author=vkoskiv&sin...
If I correct the date range to include the maintainer commit date (May 15th), the commit shows up: https://github.com/torvalds/linux/commits?author=vkoskiv&sin...
Also strange that if I only filter on author[1], nothing shows up. Though I suspect that dataset might only be updated periodically.
[0]: https://docs.github.com/en/account-and-profile/reference/pro...
[1]: https://github.com/torvalds/linux/commits?author=vkoskiv
raybb|4 months ago
Did you try to use any AI tools during their process?
turol|4 months ago
vkoskiv|4 months ago
Havoc|4 months ago
pantalaimon|4 months ago
jkhanlar|4 months ago
malkia|4 months ago
bhasi|4 months ago
abrookewood|4 months ago
mattbillenstein|4 months ago
petetnt|4 months ago
stanguc|4 months ago
[deleted]