diff options
author | graysky | 2022-07-20 15:10:56 -0400 |
---|---|---|
committer | graysky | 2022-07-20 15:10:56 -0400 |
commit | 365f0a84130208b1ec98d842f1e48ff660842d21 (patch) | |
tree | f2a5ca97f7d4f0686939334a16bc086b19a29a58 | |
parent | a8f1d9cad4d00b388e493cc16c329acab1fec533 (diff) | |
download | aur-365f0a84130208b1ec98d842f1e48ff660842d21.tar.gz |
Update to 5.18.13rc1-1
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | 0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch | 107 | ||||
-rw-r--r-- | PKGBUILD | 10 |
3 files changed, 122 insertions, 11 deletions
@@ -1,5 +1,5 @@ pkgbase = linux-rc - pkgver = 5.18.9rc1 + pkgver = 5.18.13rc1 pkgrel = 1 url = https://www.kernel.org/ arch = x86_64 @@ -12,22 +12,24 @@ pkgbase = linux-rc makedepends = tar makedepends = xz options = !strip - source = https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.9-rc1.xz - source = https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.9-rc1.sign - source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.18.8.tar.xz - source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.18.8.tar.sign + source = https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.13-rc1.xz + source = https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.18.13-rc1.sign + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.18.12.tar.xz + source = https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.18.12.tar.sign source = config source = 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + source = 0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E validpgpkeys = A2FF3A36AAA56654109064AB19802F8B0D70FC30 validpgpkeys = C7E7849466FE2358343588377258734B41C31549 - b2sums = fea4fb176e35df06a34e06e9dcc96894b9ba9f514c69495c6bb3aa61cc678cf6e2d6b712f456fc4d00e539943cf46fed682909c276d5014cc28a6bc08a4962d7 + b2sums = cc22236a1dca4a41b2ad4be072555b3618d308e12d13badb541346ad37aa3e880d45cadb1169bdc475003479900fe046a7bd5e5b5fd6f326418d505d0a74acbc b2sums = SKIP - b2sums = 92231982abac349aa682fc1af12a3707ac1b68ffc970a0679134f03e2c56a46ae6273c67c05d20bed100dda1c58cb9916de2757552405c280b52b1973f2da7a8 + b2sums = 000df730f6651173292a43745edd615b501d959f4d963a11df600a6bcb378db0750023c9025c8d63091658d7540693cc0e486f3bae3b49610135ca34f0b8edd4 b2sums = SKIP b2sums = aeffb500a9cf0f1265fc62fa9260bdddac8ba47bf01e3b2732d961ea7d58ae4886563bc7076fe920d4fca3ad19588bfe8f9368e77fdc61336c894488bab41638 b2sums = e226fb1f498a739a9a65cf8bb542978b0573ba7630e82516d2393dcdcdd42910adc7107d6174eed349a513643092a737acf552c19d27f896f4f771de3d1e00f1 + b2sums = 35e8ef4806040797f2844d076c92728ad55adb0c29e906399afe6155e2657a2784ffea61e49ef6a9910ed392b621663a180fa0d7750e92a01afd5446bce46a5a pkgname = linux-rc pkgdesc = The release candidate kernel and modules diff --git a/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch b/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch new file mode 100644 index 000000000000..3fa5fe6ec37b --- /dev/null +++ b/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch @@ -0,0 +1,107 @@ +From 759410cbc43568775113a7d1c6bff1286a0d2a91 Mon Sep 17 00:00:00 2001 +From: Bryan Cain <bryancain3@gmail.com> +Date: Thu, 5 May 2022 13:12:21 -0600 +Subject: [PATCH 2/3] HID: apple: Properly handle function keys on Keychron + keyboards +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Keychron's C-series and K-series of keyboards copy the vendor and +product IDs of an Apple keyboard, but only behave like that device when +set to "Mac" mode. In "Windows" mode, the Fn key doesn't generate a +scancode, so it's impossible to use the F1-F12 keys when fnmode is set +to its default value of 1. + +To fix this, make fnmode default to the new value of 3, which behaves +like fnmode=2 for Keychron keyboards and like fnmode=1 for actual Apple +keyboards. This way, Keychron devices are fully usable in both "Windows" +and "Mac" modes, while behavior is unchanged for everything else. + +Signed-off-by: Bryan Cain <bryancain3@gmail.com> +Reviewed-by: Hans de Goede <hdegoede@redhat.com> +Tested-by: José Expósito <jose.exposito89@gmail.com> +Signed-off-by: Jiri Kosina <jkosina@suse.cz> +--- + drivers/hid/hid-apple.c | 22 ++++++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) + +diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c +index 0cf35caee9fa..42a568902f49 100644 +--- a/drivers/hid/hid-apple.c ++++ b/drivers/hid/hid-apple.c +@@ -21,6 +21,7 @@ + #include <linux/module.h> + #include <linux/slab.h> + #include <linux/timer.h> ++#include <linux/string.h> + + #include "hid-ids.h" + +@@ -35,16 +36,17 @@ + #define APPLE_NUMLOCK_EMULATION BIT(8) + #define APPLE_RDESC_BATTERY BIT(9) + #define APPLE_BACKLIGHT_CTL BIT(10) ++#define APPLE_IS_KEYCHRON BIT(11) + + #define APPLE_FLAG_FKEY 0x01 + + #define HID_COUNTRY_INTERNATIONAL_ISO 13 + #define APPLE_BATTERY_TIMEOUT_MS 60000 + +-static unsigned int fnmode = 1; ++static unsigned int fnmode = 3; + module_param(fnmode, uint, 0644); + MODULE_PARM_DESC(fnmode, "Mode of fn key on Apple keyboards (0 = disabled, " +- "[1] = fkeyslast, 2 = fkeysfirst)"); ++ "1 = fkeyslast, 2 = fkeysfirst, [3] = auto)"); + + static int iso_layout = -1; + module_param(iso_layout, int, 0644); +@@ -349,6 +351,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input, + const struct apple_key_translation *trans, *table; + bool do_translate; + u16 code = 0; ++ unsigned int real_fnmode; + + u16 fn_keycode = (swap_fn_leftctrl) ? (KEY_LEFTCTRL) : (KEY_FN); + +@@ -359,7 +362,13 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input, + return 1; + } + +- if (fnmode) { ++ if (fnmode == 3) { ++ real_fnmode = (asc->quirks & APPLE_IS_KEYCHRON) ? 2 : 1; ++ } else { ++ real_fnmode = fnmode; ++ } ++ ++ if (real_fnmode) { + if (hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI || + hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO || + hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS || +@@ -406,7 +415,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input, + + if (!code) { + if (trans->flags & APPLE_FLAG_FKEY) { +- switch (fnmode) { ++ switch (real_fnmode) { + case 1: + do_translate = !asc->fn_on; + break; +@@ -660,6 +669,11 @@ static int apple_input_configured(struct hid_device *hdev, + asc->quirks &= ~APPLE_HAS_FN; + } + ++ if (strncmp(hdev->name, "Keychron", 8) == 0) { ++ hid_info(hdev, "Keychron keyboard detected; function keys will default to fnmode=2 behavior\n"); ++ asc->quirks |= APPLE_IS_KEYCHRON; ++ } ++ + return 0; + } + +-- +2.36.1 + @@ -7,7 +7,7 @@ _srcname=linux-5.18 _major=5.18 ### on initial release this is null otherwise it is the current stable subversion ### ie 1,2,3 corresponding $_major.1, $_major.3 etc -_minor=8 +_minor=12 _minorc=$((_minor+1)) ### on initial release this is just $_major [[ -z $_minor ]] && _fullver=$_major || _fullver=$_major.$_minor @@ -30,6 +30,7 @@ source=( https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_fullver.tar.{xz,sign} config # the main kernel config file 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + 0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds @@ -37,12 +38,13 @@ validpgpkeys=( 'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) 'C7E7849466FE2358343588377258734B41C31549' # David Runge <dvzrv@archlinux.org> ) -b2sums=('fea4fb176e35df06a34e06e9dcc96894b9ba9f514c69495c6bb3aa61cc678cf6e2d6b712f456fc4d00e539943cf46fed682909c276d5014cc28a6bc08a4962d7' +b2sums=('cc22236a1dca4a41b2ad4be072555b3618d308e12d13badb541346ad37aa3e880d45cadb1169bdc475003479900fe046a7bd5e5b5fd6f326418d505d0a74acbc' 'SKIP' - '92231982abac349aa682fc1af12a3707ac1b68ffc970a0679134f03e2c56a46ae6273c67c05d20bed100dda1c58cb9916de2757552405c280b52b1973f2da7a8' + '000df730f6651173292a43745edd615b501d959f4d963a11df600a6bcb378db0750023c9025c8d63091658d7540693cc0e486f3bae3b49610135ca34f0b8edd4' 'SKIP' 'aeffb500a9cf0f1265fc62fa9260bdddac8ba47bf01e3b2732d961ea7d58ae4886563bc7076fe920d4fca3ad19588bfe8f9368e77fdc61336c894488bab41638' - 'e226fb1f498a739a9a65cf8bb542978b0573ba7630e82516d2393dcdcdd42910adc7107d6174eed349a513643092a737acf552c19d27f896f4f771de3d1e00f1') + 'e226fb1f498a739a9a65cf8bb542978b0573ba7630e82516d2393dcdcdd42910adc7107d6174eed349a513643092a737acf552c19d27f896f4f771de3d1e00f1' + '35e8ef4806040797f2844d076c92728ad55adb0c29e906399afe6155e2657a2784ffea61e49ef6a9910ed392b621663a180fa0d7750e92a01afd5446bce46a5a') export KBUILD_BUILD_HOST=archlinux |