NixOS Asahi on MBP
I managed to install NixOS on my M1 MacBook Pro.
The issues I had been having have been resolved. Here's a summary:
• No hardware GPU drivers by default
• Decent battery on hardware GPU drivers
• Sound by default
• Display and Keyboard Backlight works
• Trackpad is too sensitive
• All is well
The GPU
The biggest issue was the experimental GPU drivers which are not enabled by default. I had tried to enable them, and Xorg wouldn't start after that. Battery improved dramatically after getting those on, much like Arch did with the asahi-edge-kernel and hardware GPU drivers.
Initially they didn't work, and I'm not sure why the experimental drivers started working. I did do a T383838nix-channel --update and a T383838nixos-rebuild switch after some failed attempts to set T383838hardware.asahi.useExperimentalGPUDriver = true. The initial failures were strange, I could just set that back to false and do a T383838nixos-rebuild switch and Xorg would start back up.
Battery life
I need to measure it under load to come up with real numbers, I ran it for two hours and it dropped to 95% battery. Then I closed the lid and walked away for 7 hours and it dropped from 95% to 73%. But then over the next hour it went down to 65%.
Sound
I also have sound. The builtin speakers were not enabled under Arch, but they are under NixOS. I guess this is something that Fedora does now, too, and maybe even Arch if I had updated my system before switching to NixOS.
Backlights
Even more strangely, I can control both the display backlight and the keyboard backlight. When I started with Arch Asahi this wasn't possible. I didn't even see an announcement about this, I just have it.
Trackpad/Touchpad
I still have some sensitivity issues with the touchpad. To get around these, I've written a script that disables the touchpad when I hit the app key on the keyboard. It's vaguely where the disable touchpad key is on some other systems. Annoyingly the device name of the trackpad and Keyboard are identical. I came up with a convoluted grep to extract the numerical device ID.
T282828
Te6edf3DEVIDTff7b72=Ta5d6ff"Tff7b72$(xinput list Tb4b4b4|
grep -o Ta5d6ff'Trackpad.*id=\([0-9]\+\).*pointer' Tb4b4b4|
grep -Po Ta5d6ff'(?<=id=)[0-9]+'Tff7b72)Ta5d6ff"
Actually, here's the entirety of that script, no shebang because I call bash on it from T383838sxhkd bindings.
T282828
Te6edf3DEVIDTff7b72=Ta5d6ff"Tff7b72$(xinput list Tb4b4b4| grep -o Ta5d6ff'Trackpad.*id=\([0-9]\+\).*pointer' Tb4b4b4| grep -Po Ta5d6ff'(?<=id=)[0-9]+'Tff7b72)Ta5d6ff"
disabledTff7b72(Tff7b72)Tff7b72{
xinput list-props Tffd700${Te6edf3DEVIDTffd700} Tb4b4b4| grep Ta5d6ff'(129):.*0'
Tff7b72}
Tff7b72if disabled Tb4b4b4; Tff7b72then
xinput Tffa657enable Tffd700${Te6edf3DEVIDTffd700}
Tff7b72else
xinput disable Tffd700${Te6edf3DEVIDTffd700}
Tff7b72fi
Conclusion
Overall, I'm pretty happy with it.
the problems I was having, original impressions intact
• Battery life sucks
• can't launch Wayland
• Chinese input \~is missing\~ suddenly appeared
I can't launch Wayland. This is only a problem because of the error, I don't generally use Wayland as my WM of choice doesn't work under Wayland.
I suspect I don't have the Asahi beta kernel stuff that I would otherwise have from the asahi-linux-edge.
\~Chinese input isn't working. I don't have the Pinyin keyboard that I had under Arch, or on my x86 NixOS box. I have the same packages installed, but it's missing when I run T383838fcitx5-configtool.\~
I don't know why, but now the Pinyin entry is present in T383838fcitx-configtool and I'm able to input Chinese in most things. Kitty won't let me input Chinese. I'm not sure why it works one one of my systems but not others. Same configs everywhere.
The touch pad keeps getting accidentally triggered, but I can disable it with xinput.
Tags: nixos, index, asahi
Tags
Navigation