Skip to content

My hacks to make the C201 more usable on arch-arm

Notifications You must be signed in to change notification settings

urjaman/arch-c201

Repository files navigation

This is just assorted stuff i have for having a more usable system on _my_ C201 w/ arch...
---

# Keyboard
For Xorg: i have my .Xmodmap in this repo... note that i'm finnish with US keyboard C201s :P

For Wayland / KDE Plasma:
I have an xkb file deep in homedir/.config/xkb; it's roughly the same as the
.Xmodmap but in XKB language - loading XKB files from ~/.config only works
under wayland (X11 setxkbmap and folks don't look there by default).

For reference, this is how i managed to test the compilation of it
(in a wayland terminal with Xwayland available, in the home directory):
$ setxkbmap -print c201 usfibadesc | xkbcomp -I.config/xkb -
Note: this compiles the keymap to a file named stdin.xkm (just so you
know what that is, just rm it.)

To use it, i set these environment variables before running startplasma-wayland
$ export XKB_DEFAULT_LAYOUT=c201
$ export XKB_DEFAULT_VARIANT=usfibadesc

Skip setting the variant for standard US layout, or use "usfi" for
US layout plus öäå in Search-;'[, or usfibadesc for that plus Escape
in Search-~ (yep my C201 is falling apart).

To have the graphical UIs list these layouts and variants, i would
need to edit XML. Eww. So, I just set it with env vars instead.

Modifying/extending XKB files is quite ... weird, but also way better than .Xmodmap;
i hope they will make setxkbmap and folks look in ~/.config too, soon.
Here's the link that helped me most: 
https://github.com/xkbcommon/libxkbcommon/blob/master/doc/user-configuration.md
(in addition to just me grepping around /usr/share/X11/xkb for examples)

# Xorg
If you have this driver that arch-arm "provides", get rid of it:
pacman -R xf86-video-armsoc-rockchip

You likely want just the modesetting driver that comes with xorg, it's
pretty good and has multi-head support.

Mesa from the arch repos should work for OpenGL support.

In case of GL trouble this repo does have a xorg.conf.d fragment showing
how to disable glamor, but I hope you won't need that :)

(There is also the fbturbo driver, that does work but no multi-head,
and i dont know but I'd expect no GL either...)

# Sound
i made a systemd service for running alsaucm so you hopefully dont burn your speakers.

## 3.14
if you want to run that, copy the ROCKCHIPI2S alsa ucm
data from ChromeOS and adjust alsaucm-setup.service accordingly (it's commented out there)

## Mainline (4.x/5.x/6.x)
The upstream alsa ucm files should be ok.

# Wifi
linux-firmware has the firmware (.bin) but not the configuration (.txt);
I decided to put the things from CrOS lib/firmware/brcm that linux-firmware
doesn't have (the wifi .txt and the bluetooth patchfile) into lib-firmware.
License? Do crime, be gay. Also, i think atleast the .txt
qualifies as facts that are not copyrightable.
(same might be true for the .hcd, *shrug*)

# Bluetooth
Since my 6.1.69-2 (as in, just right now), bluetooth should just work(TM),
if you put the *.hcd from lib-firmware into /lib/firmware, and run that kernel.
(You will need to install and configure the normal amount of bt stuff,
but just read the arch wiki for that.)

# Kernels
(the linux-* folders here are quite abandoned, but are the original place for the kernel...)
I'll preface this that whilst these are what I run, I don't have the resources to do support.

Currently my C201 kernel is a 6.1.x (with some patches) built by my automated scripts
There's a copy of the scripts at https://github.com/urjaman/kbb
The built packages are at https://urja.dev/kbbpkgs/armv7h/
- or add this to pacman.conf:
[kbbpkgs]
SigLevel = Optional
Server = https://urja.dev/kbbpkgs/armv7h/

Do a sync (pacman -Syu) and install linux-c201 and unless you have u-boot
you also want linux-c201-chromebook.

# Backlight (and volume) controls
I have an udev ruleset to make it accessible for video group members,
and xbindkeys config + scripts to adjust it. These are just one way to do it,
but i really really wanted control of the adjustment curve to myself, so scripting works for that.

I also added volume controls to the .xbindkeysrc so i dont need the xfce pulseaudio widget - it's looking
like that was giving me problems with the panel capturing the keyboard...
(i use pasystray instead now, but it doesnt do keyboard controls).

# cbatticon-simplified
I simplified cbatticon code a bit because it was being unreliable and i got enough of waiting
for the maintainer to figure his stuff out - a pkgbuild to build my version
(just a git build pointed at my repo) is included.

# home-usbdevicenet
my "userspace" for a very hacky usb device mode hack in the kernel side

# Widevine CDM
If you're so interested (for me the killer app is spotify web player), the ChromeOS
widevine plugin can run under linux (atleast as of writing) - for chromium it is simple,
for firefox see widevine-mod directory here.

# emmc-microsd-combo
this is just an example/template for custom udev rule+systemd service+shell script for
putting parts of your system onto a microSD partition (if you're running
from eMMC and would like to use the space on it for better things)
(It's not usable as-is, you'll need to atleast fill in the partition UUID
 and adjust the script - obviously in addition to all the setup stuff of
 making partitions, moving files etc...)

About

My hacks to make the C201 more usable on arch-arm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages