diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index 40bb15e7..fb4ec198 100644 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -154,10 +154,10 @@ export default { link: '/docs/installing/dualboot' }, { - 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..8791800b 100644 --- a/src/docs/installing/distros.md +++ b/src/docs/installing/distros.md @@ -1,162 +1,49 @@ -# Linux distro-specific Configuration - -## NixOS - -- 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"; - }; - }; - }; -}; -``` +# Notes for non-standard Linux distributions -- 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` - -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 - - mkdir -p $out/share/alsa - cp -r ucm ucm2 $out/share/alsa - - mkdir -p $out/share/alsa/ucm2/conf.d - cp -r $wttsrc/{hdmi,dmic}-common $wttsrc/GENERATION/* $out/share/alsa/ucm2/conf.d - - runHook postInstall - ''; - }); - }) - ]; -``` +::: warning +**Advanced users only!** +This page is not meant for troubleshooting +::: -- 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"; - }; -}; -``` +::: danger +**We will not help you if you get stuck while using an unsupported distribution!** +::: -- 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 -''; -``` +This page contains informations useful to get non-standard or niche Distros to work. + +## Audio + +### alsa-ucm2 for Chromebooks + +You need custon alsa-ucm2 configs that arent available upstream + +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 - - 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 -''; +```bash +export ALSA_CONFIG_UCM2 = "/share/alsa/ucm2"; ``` - - AVS modprobe config for Skylake, Kabylake, and Apollolake -```nix -# configuration.nix -boot.extraModprobeConfig = '' - options snd-intel-dspcfg dsp_driver=4 -''; +### Audio setup modprobes + +You can find the right modprobe configs by browsing [the audio script](https://github.com/WeirdTreeThing/chromebook-linux-audio/blob/main/setup-audio) + +## 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](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`.