From 1352d0c46875aca6d793c87a932056df8024a8d1 Mon Sep 17 00:00:00 2001 From: ninelore <9l@9lo.re> Date: Sun, 21 Apr 2024 22:32:14 +0200 Subject: [PATCH 1/5] unsupported Distros --- src/.vuepress/config.js | 4 +- src/docs/installing/distros.md | 167 ++++----------------------------- 2 files changed, 19 insertions(+), 152 deletions(-) diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index f57d2150..8d5b48f1 100644 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -150,10 +150,10 @@ export default { collapsible: true, children: [ { - text: 'Linux Distro Specific Configuration', + text: 'Notes for non-standard distros', link: '/docs/installing/distros', } - ] + ] // */ }, { text: 'Installing MacOS', diff --git a/src/docs/installing/distros.md b/src/docs/installing/distros.md index c8ff37a4..c0e5209a 100644 --- a/src/docs/installing/distros.md +++ b/src/docs/installing/distros.md @@ -1,162 +1,29 @@ -# Linux distro-specific Configuration +# Notes for non-standard Linux distributions -## NixOS +::: danger +''We will not help you if you get stuck while using an unsupported distribution!** +::: -- Enable and configure keyd (Example is cros-standard. Adjust as you need!) -```nix -# configuration.nix -services.keyd = { - enable = true; - keyboards.internal = { - ids = [ - "k:0001:0001" - "k:18d1:5044" - "k:18d1:5052" - "k:0000:0000" - "k:18d1:5050" - "k:18d1:504c" - "k:18d1:503c" - "k:18d1:5030" - "k:18d1:503d" - "k:18d1:505b" - "k:18d1:5057" - "k:18d1:502b" - "k:18d1:5061" - ]; - settings = { - main = { - f1 = "back"; - f2 = "forward"; - f3 = "refresh"; - f4 = "f11"; - f5 = "scale"; - f6 = "brightnessdown"; - f7 = "brightnessup"; - f8 = "mute"; - f9 = "volumedown"; - f10 = "volumeup"; - back = "back"; - forward = "forward"; - refresh = "refresh"; - zoom = "f11"; - scale = "scale"; - brightnessdown = "brightnessdown"; - brightnessup = "brightnessup"; - mute = "mute"; - volumedown = "volumedown"; - volumeup = "volumeup"; - sleep = "coffee"; - }; - meta = { - f1 = "f1"; - f2 = "f2"; - f3 = "f3"; - f4 = "f4"; - f5 = "f5"; - f6 = "f6"; - f7 = "f7"; - f8 = "f8"; - f9 = "f9"; - f10 = "f10"; - back = "f1"; - forward = "f2"; - refresh = "f3"; - zoom = "f4"; - scale = "f5"; - brightnessdown = "f6"; - brightnessup = "f7"; - mute = "f8"; - volumedown = "f9"; - volumeup = "f10"; - sleep = "f12"; - }; - alt = { - backspace = "delete"; - meta = "capslock"; - brightnessdown = "kbdillumdown"; - brightnessup = "kbdillumup"; - f6 = "kbdillumdown"; - f7 = "kbdillumup"; - }; - control = { - f5 = "print"; - scale = "print"; - }; - controlalt = { - backspace = "C-A-delete"; - }; - }; - }; -}; -``` +## Audio -- Audio setup (Does the same as the audio script) -**Change the `GENERATION` to your board generation!** -Possible options: `adl` | `jsl` | `tgl` | `cml` | `glk` | `apl` | `avs` | `bsw` | `byt` | `mendocino` | `cezanne` | `picasso` | `stoney` +### alsa-ucm2 for Chromebooks -If your generation isn't listed above, you can skip this section -```nix -# configuration.nix - nixpkgs.overlays = with pkgs; [ (final: prev: - { - alsa-ucm-conf = prev.alsa-ucm-conf.overrideAttrs (old: { - wttsrc = (fetchFromGitHub { - owner = "WeirdTreeThing"; - repo = "chromebook-ucm-conf"; - rev = "484f5c581ac45c4ee6cfaf62bdecedfa44353424"; - hash = "sha256-Jal+VfxrPSAPg9ZR+e3QCy4jgSWT4sSShxICKTGJvAI="; - }); - installPhase = '' - runHook preInstall +You need custon alsa-ucm2 configs that arent available upstream - mkdir -p $out/share/alsa - cp -r ucm ucm2 $out/share/alsa +You can get them [here (Github)](https://github.com/WeirdTreeThing/alsa-ucm-conf-cros) - mkdir -p $out/share/alsa/ucm2/conf.d - cp -r $wttsrc/{hdmi,dmic}-common $wttsrc/GENERATION/* $out/share/alsa/ucm2/conf.d +If your distro isnt FHS-compliant, you can specify the ucm location via an enviromental variable - runHook postInstall - ''; - }); - }) - ]; +```bash +export ALSA_CONFIG_UCM2 = "/share/alsa/ucm2"; ``` -- Install and export the ucm config as a session variable -```nix -# configuration.nix -environment = { - systemPackages = with pkgs; [\ - alsa-ucm-conf - ]; - sessionVariables = { - ALSA_CONFIG_UCM2 = "${pkgs.alsa-ucm-conf}/share/alsa/ucm2"; - }; -}; -``` +### Audio setup modprobes -- Audio setup modprobes - - SOF modprobe config for Alderlake, Jasperlake, Tigerlake, Cometlake, and Geminilake -```nix -# configuration.nix -boot.extraModprobeConfig = '' - options snd-intel-dspcfg dsp_driver=3 -''; -``` +You can find the right modprobe configs by browsing [the audio script](https://github.com/WeirdTreeThing/chromebook-linux-audio/blob/main/setup-audio) - - SOF modprobe config for Braswell and Baytrail -```nix -# configuration.nix -boot.extraModprobeConfig = '' - options snd-intel-dspcfg dsp_driver=3 - options snd-sof sof_debug=1 -''; -``` +## Keyboard mapping - - AVS modprobe config for Skylake, Kabylake, and Apollolake -```nix -# configuration.nix -boot.extraModprobeConfig = '' - options snd-intel-dspcfg dsp_driver=4 -''; -``` +Install [keyd (Github)](https://github.com/rvaiya/keyd) + +A configuration file can be accuired with [cros-keyboard-map (Github)](https://github.com/WeirdTreeThing/cros-keyboard-map). Some special cases have configs in the configs folder. For all other devices use `cros-keyboard-map.py`. From 04e99f6e63d4da2f3a63196124a1968b5b7b4552 Mon Sep 17 00:00:00 2001 From: ninelore <9l@9lo.re> Date: Sun, 21 Apr 2024 22:51:30 +0200 Subject: [PATCH 2/5] formatting --- src/docs/installing/distros.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/installing/distros.md b/src/docs/installing/distros.md index c0e5209a..216363ce 100644 --- a/src/docs/installing/distros.md +++ b/src/docs/installing/distros.md @@ -1,7 +1,7 @@ # Notes for non-standard Linux distributions ::: danger -''We will not help you if you get stuck while using an unsupported distribution!** +**We will not help you if you get stuck while using an unsupported distribution!** ::: ## Audio From c654aa649c26391a441c2ec3777aa09f55df0403 Mon Sep 17 00:00:00 2001 From: ninelore <9l@9lo.re> Date: Sat, 27 Apr 2024 10:34:32 +0200 Subject: [PATCH 3/5] text changes --- src/docs/installing/distros.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/docs/installing/distros.md b/src/docs/installing/distros.md index 216363ce..caab787c 100644 --- a/src/docs/installing/distros.md +++ b/src/docs/installing/distros.md @@ -1,9 +1,15 @@ # Notes for non-standard Linux distributions +::: warning +This page is not meant to help with fixing issues but instead meant for advanced users +::: + ::: danger **We will not help you if you get stuck while using an unsupported distribution!** ::: +This page contains informations useful to get non-standard or niche Distros to work. + ## Audio ### alsa-ucm2 for Chromebooks From b2110984d4cdc2bb58c738b93de9a230951c383c Mon Sep 17 00:00:00 2001 From: ninelore <9l@9lo.re> Date: Sat, 27 Apr 2024 10:37:18 +0200 Subject: [PATCH 4/5] wording --- src/docs/installing/distros.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/docs/installing/distros.md b/src/docs/installing/distros.md index caab787c..1e9a3902 100644 --- a/src/docs/installing/distros.md +++ b/src/docs/installing/distros.md @@ -1,7 +1,8 @@ # Notes for non-standard Linux distributions ::: warning -This page is not meant to help with fixing issues but instead meant for advanced users +**Advanced users only!** +This page is not meant for troubleshooting ::: ::: danger From a281259c3016d754540500e4eeea40874098b8eb Mon Sep 17 00:00:00 2001 From: ninelore <9l@9lo.re> Date: Sat, 27 Apr 2024 11:45:27 +0200 Subject: [PATCH 5/5] libinput --- src/docs/installing/distros.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/docs/installing/distros.md b/src/docs/installing/distros.md index 1e9a3902..8791800b 100644 --- a/src/docs/installing/distros.md +++ b/src/docs/installing/distros.md @@ -17,7 +17,7 @@ This page contains informations useful to get non-standard or niche Distros to w You need custon alsa-ucm2 configs that arent available upstream -You can get them [here (Github)](https://github.com/WeirdTreeThing/alsa-ucm-conf-cros) +You can get them [here](https://github.com/WeirdTreeThing/alsa-ucm-conf-cros) If your distro isnt FHS-compliant, you can specify the ucm location via an enviromental variable @@ -31,6 +31,19 @@ You can find the right modprobe configs by browsing [the audio script](https://g ## Keyboard mapping +### libinput configuration + +Put this in `/etc/libinput/local-overrides.quirks`: ([Source](https://github.com/WeirdTreeThing/cros-keyboard-map/blob/main/local-overrides.quirks)) + +```ini +[keyd virtual keyboard] +MatchName=keyd virtual keyboard +AttrKeyboardIntegration=internal +ModelTabletModeNoSuspend=1 +``` + +### keyd keymap + Install [keyd (Github)](https://github.com/rvaiya/keyd) -A configuration file can be accuired with [cros-keyboard-map (Github)](https://github.com/WeirdTreeThing/cros-keyboard-map). Some special cases have configs in the configs folder. For all other devices use `cros-keyboard-map.py`. +A configuration file can be accuired with [cros-keyboard-map](https://github.com/WeirdTreeThing/cros-keyboard-map). Some special cases have configs in the configs folder. For all other devices use `cros-keyboard-map.py`.