/legion-go-tricks

Tricks and Tips to get the Legion Go running best on Linux

Primary LanguagePython

Legion Go Tricks

This document serves to provide information, workarounds, and tricks to improving day-to-day use of Linux on the Legion Go.

Note that while a lot of things are working, Linux support for this device is very much a work in progress, developers are working on improving the experience.

Current Status of Linux on the Lenovo Legion Go

ChimeraOS unstable, Nobara Deck Edition, and Bazzite Deck Edition, all have a bunch of fixes for the LGO. It's mostly working, but still has bugs that need to be addressed.

However, that being said, Linux is good enough to be a daily driver on the Legion Go.

  • Using a PS5 Dualsense Edge Controller Emulator, you get access to the entire LGO controller (including gyro) via steam input
    • controller works detached too
  • TDP control can be done either via Decky Plugin or steam-patch
  • RGB control works via Decky Plugin or Steam Input + Dualsense emulation
  • suspend-resume works
  • all standard hardware (wifi, bluetooth, sound, etc) works

Some of the things you find in this document may be unofficial changes to original software

Read further below for more details

What Works?

At the moment, the following functions work out of the box

  • Screen orientation (fixed in NobaraOS Deck Edition, ChimeraOS 45 unstable, Bazzite OS)
  • suspend-resume functionality
    • suspend quirk: sound often is fuzzy on resume, usually clears up after 30 seconds or so.
  • Wifi and Bluetooth
  • Sound
  • Controllers, both attached and detached
  • FPS/Mouse mode
  • scroll wheel on controller works fine, scroll wheel press doesn't do anything. However, holding the scroll wheel for 5s will toggle the scroll wheel on/off
  • trackpad works, but cannot tap-to-click in game mode. Can tap to click on desktop mode, but must be enabled in the touchpad settings. Can be used in steam input with a workaround.

What Has Workarounds?

These functions are not working out of the box, but have workarounds

  • Steam/QAM Buttons/Rear back buttons - all buttons can be used in Steam via Dualsense Edge Virtual/Emulated Controller Video demo here.
  • Gyro - uses the same fix as buttons fix
    • Gyro performance is best with hhd
  • Trackpad - this previously already worked, but was not usable in steam input. With the latest version of the PS5 Dualsense edge emulators, it is now usable in steam input. Video Demo here
  • TDP - requires using either steam-patch or decky plugins
  • Controller RGB - requires decky plugin
  • GPU Frequency control - via SimpleDeckyTDP plugin

What has issues

  • Battery indicator - it doesn't consistently work, but has a usable workaround
  • Screen Refresh Rate - only refresh rates that work are 60Hz and 144Hz, everything else is not usable/has issues.

Known Bugs

  • Dec 9th 2023 - Nobara desktop mode shortcut is broken after fresh install + update, dev is working on a fix. This doc will be updated once the issue is resolved.
    • Manual fix at the bottom of the page here
  • related to v28 bios - STAMP might be bugged on both Windows and Linux - user on discord reported that they were getting hard crashes at 30W TDP on both Windows and Linux
    • crash was replicated on Nobara Linux 30W TDP STAMP
    • different user on Windows replicated at 30W TDP, suspects it's due to faster charging speed in bios
    • bug is still being investigated
    • if you encounter crashing at high TDPs, STT seems to still work fine without issues, so continue to use it for high TDP usage.
      • lower TDPs, below 20-22W, seem stable on STAMP
  • Due to an update for the Steam Deck OLED, FPS often gets artificially capped by Steam. Usually it's 72fps
    • to get max FPS available (usually 72fps), do the following:
      • in game mode settings, go to Display, and turn off Unified Frame Limit Management, option should be near the very bottom
      • then in the QAM, turn off the Framerate Limit
        • sometimes you need to turn on/off the framerate limit, it doesn't kick in initially
  • FPS slider isn't always accurate
  • (Nobara) Fuzzy screen issue - this happens when an invalid refresh rate is used for your game. As a workaround, run the disable_refresh_rates.sh script to remove problematic refresh rates from the fps slider (basically removes all values above 60Hz)
  • Bug for Pipewire EQ sound improvements - Pipewire EQ sound improvements are an optional sound fix for the LGO
    • the surround-effect.neutral option still seems to be working as-expected
    • the surround-effect.game option has a bug where volume cannot be controlled
    • This is most likely due to a recent Steam Deck OLED related update.
  • power button stops suspending - bug in the software that manages the power button, fixed by updating to the latest version. reinstall the latest version of steam-powerbuttond
    • note, this does not apply to hhd, only applies to rogue-enemy + steam-powerbuttond

Resources

PS5 Dualsense Edge Emulator - https://github.com/antheas/hhd

PS5 Dualsense Edge Emulator - https://github.com/corando98/ROGueENEMY/

RGB Decky Plugin - https://github.com/aarron-lee/LegionGoRemapper/

Simple Decky TDP Plugin - https://github.com/aarron-lee/SimpleDeckyTDP

steam-patch (for TDP control, some steam glyphs, etc) - https://github.com/corando98/steam-patch

powerbutton fix when not using handycon - https://github.com/aarron-lee/steam-powerbuttond

Pipewire sound EQ improvement files - https://github.com/matte-schwartz/device-quirks/tree/legion-go/rog-ally-audio-fixes/usr/share/device-quirks/scripts/lenovo/legion-go

gyro increase sampling rate fix (advanced users only) - https://github.com/antheas/llg_sfh

(ChimeraOS only) Legion Go installer tool - https://github.com/linuxgamingcentral/legion-go-tools-for-linux

reverse engineering docs - https://github.com/antheas/hwinfo/tree/master/devices

CSS Loader Plugin - Themes

  • note, requires CSS Loader Decky Plugin
  • manually install by downloading the theme + placing in $HOME/homebrew/themes/ folder
  • these themes may require a reboot for them to work

Legion Go Theme - https://github.com/frazse/SBP-Legion-Go-Theme

PS5 to Xbox Controller Glyph Theme - https://github.com/frazse/PS5-to-Xbox-glyphs

  • If you'd like to manually edit mappings, you can find glyphs at $HOME/.local/share/Steam/controller_base/images/api/dark/
    • manual mapping can be done by editing the css file with the svg/png paths you want
# quick install, CSS Loader Decky Plugin must already be installed and enabled

# Legion Go Theme Install
cd $HOME/homebrew/themes && git clone https://github.com/frazse/SBP-Legion-Go-Theme.git

# PS5 to Xbox Controller Glyph Theme
cd $HOME/homebrew/themes && git clone https://github.com/frazse/PS5-to-Xbox-glyphs

Videos

Dual Boot Tutorial Video (Nobara + Windows): https://www.youtube.com/watch?v=aODkGjjiD6U&

Guides + small fixes

Setup lock screen for desktop mode only (NobaraOS)

Currently, Desktop mode does not have a lock screen during suspend-resume cycles on NobaraOS.

To fix this, go into Desktop mode, then configure Screen Locking in KDE desktop settings. You can optionally configure it for after waking from sleep.

This should show a login screen for suspend/resume in desktop mode only. In game mode, you should still get the expected regular behavior.

Fix dark colored screen tone shift when moving mouse/trackpad

Before trying the following fix, first try enabling the Use Native Color Temperature toggle in the Display settings in game mode.

In Game mode, enable Developer mode under the System settings.

Then, in the Developer settings option that shows up in the Steam settings, make sure to Enable Steam Color Management.

Enabling Steam Color management should fix the issue.

NOTE, this is DIFFERENT from the other method to disable Steam Color management listed below. It's odd that there's two separate options with similar names, but it is what it is.

Fix orange colored hue to game mode UI

Before trying the following fix, first try enabling the Use Native Color Temperature toggle in the Display settings in game mode.

Sometimes Steam game mode will have a bug where the color of the screen is slightly orange in tone.

disabling steam color management will fix this, but this will also remove night mode functionality.

Add the following:

export STEAM_GAMESCOPE_COLOR_MANAGED=0

to a disable-steam-color-management.conf file in $HOME/.config/environment.d. To remove this fix later, simply delete the file

(NobaraOS only) additional script for to fix the Pipewire sound, fix issue where volume gets stuck on max volume

after installing the pipewire sound fix files, replace the /usr/bin/headphone-connection-monitor.sh file with the same file downloadable from this git repo. Note that you'll have to make the script executable too with chmod +x.

Use MangoHud for battery indicator

Battery indicator is inconsistent on the Legion go. As a workaround, you can change mangohud to show just the battery on one of the presets.

example preset, file should be in the $HOME/.config/MangoHud/presets.conf

[preset 1]
battery=1
fps=0
cpu_stats=0
gpu_stats=0
frame_timing=0

Fuzzy screen issue

If you're seeeing a fuzzy screen, it means that the you're somehow using an invalid refresh rate. The only valid refresh rates for a game are 60 and 144Hz.

You can work around this somewhat by disabling the 144hz refresh rate. You can either run the script in this repo, or do the following:

create an disable-refresh-rate.conf file in $HOME/config/environment.d, and add the following to the file:

export STEAM_DISPLAY_REFRESH_LIMITS=""

Nobara desktop mode switch temporary fix

a quick step-by-step for how you fix game mode/desktop switching if you updated gamescope-session after Dec 9th 2023, for KDE/SD Edition only atm (thanks matt_schwartz on the Nobara Discord):

  • open up a terminal console with Ctrl + Alt + F2 (Ctrl + Alt + F3 may also work)
  • login with your user name and password
  • run the command sudo mv /etc/sddm.conf /etc/sddm.conf.d/kde_settings.conf to move the sddm.conf file to kde_settings.conf
  • reboot, then go to Desktop mode
  • (to fix Desktop mode => Game Mode switch) go to your /etc/sddm.conf.d/kde_settings.conf file and add in Relogin=true under [Autologin].
    • The file should look something like this under the [Autologin] section after you save your changes
[Autologin]
Relogin=true
User=deck(or whatever your username is)
Session=gamescope-session
  • Save changes, then reboot

Uninstall Rogue + Install HHD (NobaraOS)

for those that have rogue already installed on NobaraOS and want to try hhd, do the following:

note that hhd defaults to Steam/QAM on the Legion buttons. If you want to swap them with start/select, similar to rogue, then you will need to edit the config file and set swap_legion to True

if you want to disable steam input LED, you can similarly disable it by setting it to False. yaml config file is in the $HOME/.config/hhd/plugins folder

Manual full reinstall of RogueEnemy PS5 Dualsense emulator (nobaraOS)

if you want to try a manual clean install of rogue, you can do the following:

sudo systemctl disable --now rogue-enemy.service
sudo rm /usr/bin/rogue-enemy
sudo rm /usr/lib/udev/rules.d/99-rogue.rules
sudo rm /usr/lib/udev/rules.d/99-disable-sonypad.rules
sudo rm /etc/systemd/system/rogue-enemy.service
sudo systemctl enable --now handycon.service
sudo udevadm control --reload-rules
sudo udevadm trigger

reboot, then download the latest install.sh from the rogue github repo, and run the install.sh + reboot again.

TDP Control:

Note that the Legion Go (LGO) has an issue in STT mode (vs STAMP mode in the bios), where custom TDP values will eventually get changed by the bios while in STT mode. STAMP mode fixes this, but there are users reporting crashing while in STAMP mode. STT does not have this stability issue.

There's a few options for TDP Control on the Legion Go.

Legion_L + Y combo

source: https://linuxgamingcentral.com/posts/chimeraos-on-legion-go/

You can switch colors (of the power LED) by holding Legion L + Y. Each time you press this combination, you change the performance mode:

quiet: blue LED; uses about 8 W balanced: white LED; uses about 15 W performance: red LED; uses about 20 W custom: purple LED; uses anywhere from 5-30 W; although at default it seems to be around 20 W

For custom on the new bios (bios v28) Custom is 30W TDP with everything maxed out And it resets every time you switch modes

Steam Patch

Steam Patch enables Steam's TDP slider + GPU sliders to work. Note that this works by patching the Steam client, which means that any Steam updates from Valve can potentially break this fix.

https://github.com/corando98/steam-patch

SimpleDeckyTDP

Decky Plugin that provides a very simple TDP bar. Note that there's similarly a risk that Decky Plugins can stop working from any Steam updates from Valve

https://github.com/aarron-lee/SimpleDeckyTDP

Simple Ryzen TDP

Basic Desktop app for TDP control, but can also be added to game mode as a backup option

https://github.com/aarron-lee/simple-ryzen-tdp/

Controller support

HandyGCCS (aka handycon)

Default installed OOTB on ChimeraOS, Nobara Deck Edition, and Bazzite. It supports all the standard Xbox controls, Legion_L + X for Steam/Home, Legion_L + A for QAM. Back buttons are not supported.

Note that you can get back buttons to work with the LegionGoRemapper plugin, but it has the same limitations as the LegionSpace app on Windows; you can only remap back buttons to other controller buttons, and they cannot be managed individually in Steam Input.

hhd

Link: https://github.com/antheas/hhd

PS5 Dualsense Edge controller emulator, currently supports all buttons on the LGO controller except the back scrollwheel (scrollwheel already worked previously). Has improvements vs rogue, such as more consistently working rumble, config file for configuring different options, RGB LED control via steam input, etc. It also supports managing the power button, so no extra program is necessary.

Install instructions are available on the github.

rogue-enemy

Link: https://github.com/corando98/ROGueENEMY

PS5 Dualsense Edge controller emulator, currently manages all hardware buttons except the back scrollwheel (scrollwheel already works). Back buttons are usable in Steam Input, same for the trackpad.

Note that rogue-enemy has conflicts with handygccs, so it must be disabled. Also, since handygccs handles for the power button, you'll need a separate solution for power button suspend. You can use this, which was extracted from handygccs: https://github.com/aarron-lee/steam-powerbuttond

Quality Of Life Fixes

LegionGORemapper Decky Plugin - RGB control + backbutton remapping

Link: https://github.com/aarron-lee/LegionGoRemapper/

Allows for managing back button remaps, controller RGB lights, toggle touchpad on/off, etc

  • note that this uses the exact same functionality as LegionSpace on Windows, so it has the same limitations
  • back button remapping should not be used w/ PS5 controller emulation

CSS Loader Plugin - Themes

  • note, requires CSS Loader Decky Plugin
  • manually install by downloading the theme + placing in $HOME/homebrew/themes/ folder

Legion Go Theme - https://github.com/frazse/SBP-Legion-Go-Theme

PS5 to Xbox Controller Glyph Theme - https://github.com/frazse/PS5-to-Xbox-glyphs

  • If you'd like to manually edit mappings, you can find glyphs at $HOME/.local/share/Steam/controller_base/images/api/dark/
    • manual mapping can be done by editing the css file with the svg/png paths you want
# quick install, CSS Loader Decky Plugin must already be installed and enabled

# Legion Go Theme Install
cd $HOME/homebrew/themes && git clone https://github.com/frazse/SBP-Legion-Go-Theme.git

# PS5 to Xbox Controller Glyph Theme
cd $HOME/homebrew/themes && git clone https://github.com/frazse/PS5-to-Xbox-glyphs

Pipewire EQ sound options

Link: https://github.com/matte-schwartz/device-quirks/tree/legion-go/rog-ally-audio-fixes/usr/share/device-quirks/scripts/lenovo/legion-go

Quote from reddit:

This applies a surround sound convolver profile, similar to Dolby Atmos for Built-In Speakers

The built-in speakers with a volume slider that acts as master gain, and then the virtual sink sliders that apply surround sound profiles on top of the master gain sink. Basically, this lets you adjust the overall gain separate from the sinks themselves to give a wider level of control. It’s not the most seamless solution but it seems to do the job.

3D prints

https://makerworld.com/en/models/88724#profileId-94984

https://www.thingiverse.com/thing:6364915/files