First experiences with Honeycomb LX2K
Tags: linux, arm64, porting
Published: 2020-05-13 15:21:09

I last wrote about arm64 [two months ago](https://dev.to/lizthegrey/year-of-aarch64-arm64-on-the-desktop-5ddf) when I was excited for my Honeycomb LX2K board.

Well, it's arrived! and it's glorious! Everything is just working, after some config tweaks and patching. I can stay connected with my team via Slack, write code, and deploy to Graviton2 in the cloud without touching an amd64 machine.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6dx6dtosp76dxqckjmqw.png)

[Here are the photos of the board and its installed setup inside the chassis](https://photos.app.goo.gl/NdfxWvuaFQE32EDBA)!

Here's the missing manual, written on the very same Honeycomb LX2K arm64 board I did this setup on!

## Initial setup 
* Set up the hardware
 * Insert the NVMe boot drive
 * Insert RAM sticks
 * Plug in the PicoPSU
 * Plug in the GPU
 * Attach a low-noise fan adapter inline with the CPU fan to avoid the jet engine sounds (PWM isn't working yet).
 * Attach the case button(s) to the power and reset jumpers; reset is more important than power.
 * Do _not_ yet attach a monitor or mouse/keyboard.
* Flash the [latest UEFI firmware](https://drive.google.com/file/d/1WS3ZuXHP_iNLt7Eaxu8PcO5FbffsdqEP/view) to a micro SD card
 * Untar the image folder
 * `dd if=lx2160acex7_2200_700_2400_8_5_2.img of=/dev/sda` where `sda` is the SD card (make sure it's not mounted, and really is your SD card and not some other load-bearing device)
 * Plug the SD card into the board. Make sure the firmware source jumpers are set `off-ON-ON-ON-ON-off` (or otherwise as indicated by silkscreen on board).
* Boot for the first time.
 * Plug an Ubuntu ARM64 20.04 USB stick into the board (created with Startup Disk Creator & the [latest 20.04 ARM image](http://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04-live-server-arm64.iso))
 * Plug in an ethernet cable via USB adapter (the ports on the board won't work yet)
 * Plug in the micro-USB serial console port to an existing machine, and run minicom configured to talk to /dev/ttyUSB0 with hardware/software buffering OFF (very important!)
 * Power on the device by inserting the power cable or turning on the PSU
* Install Ubuntu 20.04
 * If Ubuntu installer GRUB menu doesn't show, hit `esc` during boot and manually select the USB stick as the boot device.
 * At GRUB menu, select `install` rather than `try live`
 * You'll need to update the installer snap when prompted, as the base ISO doesn't install on ARM64 properly
 * Make sure you enable SSH, so you can do the next bit of work comfortably from a desktop environment
 * Disk encryption just works.
 * Reboot when prompted; if it doesn't cleanly shut down, kick the reset button after the prompt to remove the USB stick.
* Boot the second time.
 * Enter the FDE password over serial console
 * Once system is booted, ssh to it from your desktop to make sure everything works.

## Prepare to enable graphical mode
* Configure AMD PCIe settings: set `GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.pcie_gen_cap=0x00040004"` in `/etc/default/grub` then run `sudo update-grub`
* Install the PCIe bug patched kernel image PPA: https://launchpad.net/~lizthegrey/+archive/ubuntu/kernel and install the `linux-image-unsigned-5.4.0-42-generic` package.
* Now, reboot, with display and mouse/keyboard attached. If it doesn't work, you can disconnect display and fall back to serial console to debug (and ask for help in SolidRun Discord)

## Enabling graphical mode
* Log in after rebooting (verifying the new kernel is loaded)
* `sudo apt install ubuntu-desktop`
* `mkdir -p ~/.config/environment.d && echo 'export MESA_EXTENSION_OVERRIDE=-GL_ARB_buffer_storage' > ~/.config/environment.d/00-mesa.conf`
* If needed, run `sudo service gdm3 restart` and/or `sudo systemctl isolate graphical.target`. GDM should be showing. If not, reboot.
* You will want to log in _with wayland_, not with the default Xorg; click the gear icon in the lower right hand corner to use `Ubuntu with Wayland` after clicking your name, before entering your password.
* Congratulations, you have a working Gnome3 desktop.

## Helpful things to install
* First off, you probably want a web browser. `sudo apt install chromium-browser` will give you a chromium updated with snap, supported by Ubuntu, for arm64, if you don't like Firefox.
 * `sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /snap/bin/chromium 200` will make it your default.
 * Yes, security keys work out of the box!
 * You can get graphics acceleration by running `snap refresh chromium --channel=candidate/vaapi`
* Everything else should just work to taste when running `apt install` -- e.g. golang-1.14, openjdk, etc.