Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cachyos-lego2

cachyos-lego2

Device OS Desktop License

Post-install setup for the Lenovo Legion Go 2 on CachyOS.
Brightness fix, persistent charge limit, and an optimized gaming stack — each as an idempotent, revertible script.

Requirements · Brightness fix · Charge limit · Gaming stack · Configs · Notes


Requirements

Device Lenovo Legion Go 2 with the Samsung AMS881KB01-0 OLED panel (SDC 0x4301)
OS CachyOS rolling, KDE Wayland
Pre-installed steam-jupiter-stable, cachyos-handheld
Charge limit fix HHD installed and active

Scripts

All scripts are idempotent and support --revert.

Script What it does
scripts/fix-brightness-oled.sh Installs the gamescope display script so the Steam brightness slider works in Game Mode
scripts/fix-charge-limit.sh Makes the 80% battery charge limit persistent via HHD
scripts/gaming-setup.sh Installs Proton, GameMode, MangoHud, launchers, and applies kernel tweaks

1 — Brightness fix

The Steam brightness slider does not reach the OLED panel in Game Mode by default. The panel is driven in PQ (HDR) by gamescope, which bypasses the standard /sys/class/backlight/amdgpu_bl0 sysfs node entirely. Installing a gamescope display script that registers the panel by its EDID signature (SDC 0x4301) is the correct fix — it is the same approach used by LeGo2BrightnessFix.

bash scripts/fix-brightness-oled.sh

Reboot into Game Mode, then verify:

journalctl --user -b 0 | grep "Matched SDC"

To revert:

bash scripts/fix-brightness-oled.sh --revert

Note

This installs configs/gamescope/lenovo.legiongo2.oled.lua into /usr/share/gamescope/scripts/00-gamescope/displays/. The script registers the correct BT2020/PQ colorimetry, 30–144 Hz VRR refresh rates, and EDID-derived HDR luminance (1107 cd/m² peak, 475 cd/m² frame average).


2 — Charge limit (80%)

PowerDevil writes ideapad conservation_mode, a volatile sysfs node that resets to 0 on every boot and is never restored. charge_control_end_threshold does not exist on this device. HHD applies the limit via WMI ACPI and re-applies it on every boot, so it survives reboots without any cron job or tmpfiles rule.

bash scripts/fix-charge-limit.sh

To revert to no limit:

bash scripts/fix-charge-limit.sh --revert

Warning

HHD and inputplumber are mutually exclusive — running both causes duplicate /dev/input devices and phantom inputs. If you rely on inputplumber for controller input, disable HHD first, but the charge limit fix will not be available.


3 — Gaming stack

Installs and configures everything needed for a performant gaming setup on CachyOS.

bash scripts/gaming-setup.sh
What it installs and configures

Packages

Package Why
proton-cachyos Proton build compiled with PGO + BOLT + LTO for CachyOS
gamemode + lib32-gamemode Per-game CPU/GPU governor boost (opt-in via Steam launch options)
lib32-mangohud 32-bit MangoHud support for older titles
lutris · heroic-games-launcher · bottles Non-Steam game launchers
winetricks Wine prefix helpers for Lutris/Bottles
btop · nvtop · cpu-x · kdiskmark · mesa-utils · vulkan-tools Monitoring and diagnostics

Kernel tweaks applied

Config Value Why
vm.compaction_proactiveness 0 Disables proactive memory compaction — reduces sporadic latency spikes
kernel.nmi_watchdog 0 Reduces interrupt overhead (~0.1–0.5%)
vm.page_lock_unfairness 1 Reduces latency under page lock contention
kernel.split_lock_mitigate 0 Reduces split lock detection overhead on AMD
NVMe I/O scheduler none The SSD has its own internal scheduler; a block-layer scheduler adds overhead
Transparent Hugepages madvise Avoids khugepaged hitches with Wine/DXVK/Proton on fragmented memory

Environment variables added to /etc/environment

Variable Value Why
AMD_VULKAN_ICD RADV Forces Mesa RADV over AMDVLK when both are installed
RADV_PERFTEST gpl Enables Graphics Pipeline Library — reduces shader compile stutters
KWIN_DRM_ALLOW_ASYNC_PAGE_FLIP 1 Async page flip in KDE Wayland — reduces input latency

After running, reboot, then in Steam:

Settings → Compatibility → Enable Steam Play for all titles → select proton-cachyos as default.

Verify:

vulkaninfo --summary   # check GPU and Vulkan driver
gamemoded -t           # verify GameMode daemon

Configs

All config files live under configs/. Scripts copy them to their system paths — inspect or edit before running.

File System path
configs/gamescope/lenovo.legiongo2.oled.lua /usr/share/gamescope/scripts/00-gamescope/displays/
configs/MangoHud.conf ~/.config/MangoHud/MangoHud.conf
configs/99-gaming.conf /etc/sysctl.d/99-gaming.conf
configs/60-ioschedulers.rules /etc/udev/rules.d/60-ioschedulers.rules
configs/thp.conf /etc/tmpfiles.d/thp.conf
configs/environment appended to /etc/environment

Notes

  • power-profiles-daemon conflicts with scx_lavd. Do not install it.
  • Do not install vkd3d-proton or dxvk-bin system-wide — Proton bundles its own versions; installing them at the system level breaks Proton.
  • swappiness=150 is correct for zram on CachyOS. Leave it.
  • The Legion Go 2 panel is 1920×1200 SDR in Desktop Mode. The gamescope script enables HDR in Game Mode only — do not enable KDE's experimental HDR in Desktop Mode.

License

MIT — © 2026 KnHack

About

CachyOS setup, kernel tweaks, brightness fix and gaming stack for the Lenovo Legion Go 2

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages