$ cd ../articles/

Purpose

This document is a collection of practical notes from running Gentoo Linux on the Lenovo Legion Go — kernel configuration, AMD drivers, and optimizations for gaming and development. The Legion Go is not just a gaming handheld — with Gentoo it becomes a compact AMD-powered workstation where every package, kernel option, and optimization has a reason.

Hardware Specifications

ComponentModel
CPUAMD Ryzen Z1 Extreme (8C/16T, Zen 4, 4nm)
GPUAMD Radeon 780M (RDNA 3, 12 CU)
RAM16 GB LPDDR5X-7500
Storage512 GB NVMe PCIe 4.0
Display8.8" IPS, 2560×1600, 144 Hz, 500 nit
WiFiMediaTek MT7922 (WiFi 6E)
ControllersWbudowane pady (XInput), detachable
Battery49.2 Wh

Configuration and Settings

1. Media Preparation

Download the amd64 minimal installation CD from gentoo.org. Write to USB via dd:

# dd if=install-amd64-minimal.iso of=/dev/sdX bs=4M status=progress

2. Kernel Configuration

Key options for Legion Go — all built-in (not modules), zero initramfs:

# AMD Ryzen Z1 Extreme / Phoenix
CONFIG_X86_AMD_PLATFORM_DEVICE=y
CONFIG_AMD_NB=y
CONFIG_AMD_PMC=y
CONFIG_SENSORS_K10TEMP=y

# GPU — AMDGPU + RDNA 3 firmware
CONFIG_DRM_AMDGPU=y
CONFIG_DRM_AMDGPU_SI=n
CONFIG_DRM_AMDGPU_CIK=n
CONFIG_EXTRA_FIRMWARE="amdgpu/gc_11_0_1_mes_2.bin amdgpu/psp_14_0_0.bin ..."

# Input — wbudowane kontrolery (Xbox 360/XInput)
CONFIG_HID_XINMO=n
CONFIG_JOYSTICK_XPAD=y
CONFIG_JOYSTICK_XPAD_FF=y

# WiFi — MediaTek MT7922
CONFIG_MT76x2E=m
CONFIG_MT7921E=m

# Display — 2560×1600 @ 144Hz przez eDP
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
CONFIG_FB_EFI=y

2b. Kernel Versions — What Works

Tested kernel versions on Legion Go:

  • 6.18.x — stable, everything works
  • 7.0.13 — last known working kernel. Everything functional, clean shutdown
  • 7.0.14+ — freezes. After poweroff, LEDs stay on, system fails to shut down properly

3. Compilation

The Z1 Extreme has 16 threads, but Gentoo can choke without swap. 8-10 threads — depending on the package being compiled:

# echo 'MAKEOPTS="-j10 -l8"' >> /etc/portage/make.conf  # -j8 dla ciężkich pakietów (GCC, LLVM)
# echo 'EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=8"' >> /etc/portage/make.conf

USE flags for a gaming handheld:

USE="X vulkan pipewire pulseaudio udev dbus
     elogind -wayland -systemd -gnome -kde -qt5 -qt6
     gaming joystick steamruntime
     amdgpu radeonsi llvm lto pgo"

4. X11 + dwm / bandw-wm — Custom Window Manager on Handheld

No Wayland — just proven X11. Two window managers in rotation:

  • dwm — minimal fallback, patched for handheld (no bar, keys for pads)
  • bandw-wm — author's own, deterministic tiling WM written for old hardware. Works correctly with Steam. Major update soon (currently old version on repo). Used in rotation with dwm.
# Dwm / bandw-wm — both compiled from source, zero dependencies beyond Xlib
# Keybinds for controllers: Super + keys
{ MODKEY, XK_g, spawn, {.v = gamescope_cmd } },
{ MODKEY, XK_Return, spawn, {.v = term_cmd } },
{ MODKEY, XK_w, spawn, {.v = bandw_wm_cmd } },

5. Gaming: Steam + Proton

Steam on Gentoo via steam-overlay:

# emerge --ask games-util/steam-launcher
# emerge --ask app-emulation/proton-ge-custom

Gamescope for game window management:

# emerge --ask games-util/gamescope
$ gamescope -W 1920 -H 1200 -r 144 -- %command%

Swap — Mandatory

Without swap, Gentoo on Legion Go can freeze when compiling large packages (GCC, LLVM, WebKit). 8 GB swap on NVMe:

# dd if=/dev/zero of=/swapfile bs=1M count=8192
# chmod 600 /swapfile
# mkswap /swapfile
# swapon /swapfile
# echo "/swapfile none swap sw 0 0" >> /etc/fstab

Performance Optimizations

CPU Governor — Performance vs Powersave

# Tryb gaming: pełna moc
# cpupower frequency-set -g performance
# Tryb bateria: oszczędzanie
# cpupower frequency-set -g powersave

GPU — AMDGPU Tuning

# Wymuś wysoki clock GPU podczas gamingu
# echo "high" > /sys/class/drm/card0/device/power_dpm_force_performance_level
# Wyłącz panel self refresh (PSR) — eliminuje tearing
# echo 0 > /sys/kernel/debug/dri/0/amdgpu_dm_psr

ZRAM — Virtual RAM Expansion

# emerge --ask sys-block/zram-init
# echo 'zram0) size=8192' >> /etc/conf.d/zram-init

Known Issues and Solutions

ProblemSolution
No sound after suspendmodprobe -r snd_hda_intel && modprobe snd_hda_intel
Controllers not working in SteamAdd user to input group, reload udev
GPU crash on Vulkan (RADV)Update mesa to >=24.1, linux-firmware to latest
WiFi disappears after suspendecho "options mt7921e disable_aspm=1" > /etc/modprobe.d/mt7921e.conf
2560×1600 too small (scaling)xrandr --output eDP-1 --mode 1920x1200 or gamescope -W 1920 -H 1200

Summary

Gentoo on Legion Go is not an experiment — it is a daily driver. Compiling everything from source on the Z1 Extreme takes an acceptable amount of time (kernel ~8 minutes, weekly @world update ~30 min to 1h). The system is absolutely minimal — there is nothing unnecessary. Every USE flag, every kernel option is a conscious choice.

A Lenovo Legion Go running Gentoo is probably the only such configuration in the world — a compact AMD Linux workstation built from scratch for this specific hardware.

Fun fact: FreeBSD -CURRENT also ran on this hardware. Sound worked, web browser worked. So it can be done — but why, when Gentoo is right there.

❯ cd ../articles/