Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit this to the kernel and get it in ASAP! #1

Open
atrauzzi opened this issue Feb 26, 2015 · 43 comments
Open

Submit this to the kernel and get it in ASAP! #1

atrauzzi opened this issue Feb 26, 2015 · 43 comments
Assignees

Comments

@atrauzzi
Copy link

What are you waiting for? :)

@atrauzzi atrauzzi changed the title Submit this to the kernel and get it in ASAP! :) Submit this to the kernel and get it in ASAP! Feb 26, 2015
@free5lot
Copy link
Owner

Hi. Nice issue)
I was reading about rules and requirements about making a patch and pulling it, so it wouldn't be rejected by the maintainer. It's a new thing for me and Jan (@JanmanX).
Are you familiar with sending patches to the kernel upstream?

This version of patch is quite simple and clean, so I do expect it to be admitted.

@free5lot free5lot self-assigned this Feb 26, 2015
@atrauzzi
Copy link
Author

Unfortunately I'm not familiar with it, I'm just really hopeful it gets in. Cannot believe it hasn't happened sooner.

@atrauzzi
Copy link
Author

Out of curiosity, which one should I be using? @JanmanX's or yours?

@free5lot
Copy link
Owner

Nice to hear it. I'm going to try within a week. The problem exists for years, so a week or two is a quite small time for waiting)

BTW, have you tried the patched version?

@free5lot
Copy link
Owner

Well, I would recommend this version, because it has a bit cleaner code and is up to date (about kernel source).

@free5lot
Copy link
Owner

Also, Jan (@JanmanX) has also tested my patch and found it good and uses it now.
Anyway he was a pioneer of solving this issue!

If you install this patched version, please public your results, does it work for you and what device do you have.

@atrauzzi
Copy link
Author

Any plans to support DKMS in the meantime?

@free5lot
Copy link
Owner

Well, it's a small patch for hid-apple. None of us is not an author of hid-apple module, so the question about DKMS is probably irrelevant.
If this patch is admitted to the upstream kernel then there'll be not need for DKMS, will it be?

@atrauzzi
Copy link
Author

Yeah, I just figured it might be nice as it could be a while before the patch gets into any actually released kernels (Ubuntu).

@free5lot
Copy link
Owner

I think, I'll update a Ubuntu's wiki here
https://help.ubuntu.com/community/AppleKeyboard
with a simple build&install instructions from git repo.

@JanmanX
Copy link
Contributor

JanmanX commented Feb 28, 2015

Good idea to update the Ubuntu's wiki. This might prove as a good testing ground for the patch, and even a proof of the quality of the patch :) (The maintainers usually want tested code, or else they might reject it instantly)

I figure that if the patch indeed proves to be bug-free, we can try contacting some of the previous authors or some maintainers of the HID modules and see if they are kind enough to help us push it through to the kernel.

I am somewhat busy right now, but when I get the time, I am ready to try to make valid Linux kernel patch of the code and see if I can manage to get a hold of some Linux kernel hackers to help us out.

/Jan

@free5lot
Copy link
Owner

free5lot commented Mar 1, 2015

Thanks everybody, I've added installation script, please take a look, it may have problems or simple typos as I've made it rather complicated and clever.
If it works OK for you, I'll update Ubuntu's wiki and send patch to maintainers.

@free5lot
Copy link
Owner

free5lot commented Mar 1, 2015

I not only made installation script, but also made changes for passing kernel guidelines checker (scripts/checkpatch.pl in Linux kernel), and prepared a patch to fit this kernel checkpatch.pl requirements.
So, I'm going to send this patch soon to an appropriate maintainer.

@JanmanX
Copy link
Contributor

JanmanX commented Mar 2, 2015

Great news!

Please keep us updated on the progress!

@free5lot
Copy link
Owner

free5lot commented May 1, 2015

Sorry guys for being away for two months.
I'm still using this patch and everything seems to work fine, no more nightmare with different control placement on MacBook Pro for me :)

@free5lot
Copy link
Owner

free5lot commented May 1, 2015

This patch was submitted to the kernel maintainers today!

I hope it'll be accepted. Thanks to everybody how helped and especially to Jan.

@JanmanX
Copy link
Contributor

JanmanX commented May 1, 2015

Amazing work!
Even with the slight hardware limitation on wireless devices (the hardware FN), I still think this patch will be widely used and enjoyed by many users!

@atrauzzi
Copy link
Author

atrauzzi commented May 1, 2015

Congrats guys! If there's any advocacy/bumping you need done, feel free to link to the destinations here.

@free5lot
Copy link
Owner

free5lot commented May 2, 2015

Thanks, guys! I made it like in patching rules - sent it by email (using real name as it's required by rules) to maintainers. I was put to mail-lists, I've found it here today:
https://lkml.org/lkml/2015/5/1/213
https://www.mail-archive.com/[email protected]/msg878295.html
So, it'll be probably discussed there. I think, the main maintainer for hid-apple is Jiri Kosina ([email protected]). Probably we will wait his response there.

@danihodovic
Copy link

What is the status of the kernel patch?

@free5lot
Copy link
Owner

free5lot commented Jan 1, 2016

1 of May 2015 - the patch was sent to the maintainers according to all kernel code rules.
The responsible hid and hid-apple maintainer never replied there, neither did anyone else: https://lkml.org/lkml/2015/5/1/213

Since then the code was changed to fit newer kernels and new MacBooks, so in fact, not sure how it could get to the Linux upstream if patches are simply ignored there.
Any ideas?

@danihodovic
Copy link

I have no clue on how the kernel contribution process works. I'm a little surprised that this doesn't get more attention though, are there that few people running Linux on Macbook Pro?

FYI: I tried this patch with 4.4.0-040400rc7-generic and it seems to be working fine. It seems like hid-apple.c didn't change between 4.2 and 4.4.0-040400rc7-generic.

@free5lot
Copy link
Owner

free5lot commented Jun 14, 2016

@free5lot what is the status of current patch?
https://lkml.org/lkml/2015/5/1/213 - I can't see anything there?

Status is something like - "Ignored by maintainer".
About lkml.org link - I see nothing there, too, not sure why.

Patched version was sent to kernel's maillists, so it's mentioned online at many places, like: http://www.kernelhub.org/?msg=739170&p=2

Anyway, since then the patched version moved forward and supports the new kernel with a few new features.
I'll be able to check it with the last LTS Ubuntu soon and maybe try another patch sending according to kernel's code-rules.

@adam-ce
Copy link

adam-ce commented Oct 3, 2016

any updates?

@benjeffery
Copy link

Seems a shame this is being ignored - I was really pleased to find a solution and using DKMS it worked perfectly. Thanks!

@fancywriter
Copy link

Should be in gentoo-sources from version 4.12 - one more reason to switch to Gentoo if someone is in doubt. https://gitweb.gentoo.org/proj/linux-patches.git/commit/?h=4.12&id=593358522f8e378eb4cc0e20efa2e57d6669adfd

@vilian
Copy link

vilian commented Jul 15, 2017

Works great with ubuntu 16, 4.4.0-83-generic on macbook late 2008 with french keyboard layout. This would've saved me some frustration 3 years ago!

@free5lot
Copy link
Owner

Thanks @benjeffery , @fancywriter , @vilian and everyone else. I'll try to make an updated patch for mainstream Linux kernel and try to push it there again.

@free5lot
Copy link
Owner

The patch is still working fine and in demand by people, so on holidays in January I'll try to make a version based on latest kernel code checking kernel code guidelines and will try to report it as a patch to mainstream one more time. I will keep you updated on this.

@peerchemist
Copy link

Hi, are you still trying to get this into mainline?

@free5lot
Copy link
Owner

free5lot commented Apr 29, 2020

@peerchemist today I sent letters to the responsible maintainers (according to get_maintainer.pl script):

Jiri Kosina (maintainer:HID CORE LAYER)
Benjamin Tissoires (maintainer:HID CORE LAYER)

and I hope at least one of them will reply and I will be able to provide patches without being ignored. For start I plan to provide patch for only swapping fn and ctrl. And if everything goes smooth then other patches that are included in this repo.

@peerchemist
Copy link

That is the most important patch indeed. Okay, good luck.

@free5lot
Copy link
Owner

Jiri Kosina replied. So the process started, maybe in a week it will be done.

@free5lot
Copy link
Owner

The patch was submitted to the kernel's developers (Jiri in particular).
I will let you know more as the situation will be changing.

@almson
Copy link
Contributor

almson commented Aug 20, 2021

I see the patch was merged for Linux 5.8. Congrats! I've updated README in PR #75

Any plans to merge rightalt_as_rightctrl?

@free5lot
Copy link
Owner

Yes, but I had no time or perseverance to prepare proper rightalt_as_rightctrl patch for the maintainer.
Are you willing to help with it, it will be great?

@almson
Copy link
Contributor

almson commented Aug 23, 2021

I've never done that. Can you tell me what's involved? Besides making and testing a minimal commit, of course.

@captn3m0
Copy link

Working on creating a patch for rightalt_as_rightctrl against the AsahiLinux fork.

@free5lot
Copy link
Owner

After the swap_fn_leftctrl feature was accepted upstream I was kind of satisfied enought with upstream hid-apple.
But maybe I should still send other patches from the project to upstream, it will make no need to implement rightalt_as_rightctrl in fork, even on M2, is it right? Or do they use completely different hid-apple sources?

@captn3m0
Copy link

It's the same source, with a few extra commits to add M1 support. I did a diff locally, and it was mostly just magic numbers for the M1/M2 keyboards.

https://github.com/AsahiLinux/linux/commits/asahi/drivers/hid/hid-apple.c

@free5lot
Copy link
Owner

free5lot commented Jan 19, 2023

Hmm, I see. So is it preferable to push patches to upstream ASAP and take them to the M1/M2 fork or you prefer to support these patches separately?

@captn3m0
Copy link

It's preferable to push them upstream, as Asahi runs close to upstream, and can easily adopt new patches.

@free5lot
Copy link
Owner

I tried to contact upstream maintainers that are responsible for hid-apple but nobody responded. The original maintainer that was available via email is not active for now. If somebody knows the better contact to any maintainer who can accept patches or PRs, please say. The ways changes are getting into the kernel do not seem optimal nowadays: submitted patches are ignored, maintainers are not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests