Repository: aarron-lee/legion-go-tricks
Branch: main
Commit: fc0b88c4d21c
Files: 51
Total size: 117.1 KB
Directory structure:
gitextract_1el0es44/
├── .github/
│ └── FUNDING.yml
├── README.md
├── bazzite-dualboot-partition-guide.md
├── bazzite-maliit-keyboard.sh
├── dev/
│ ├── bazzite_hhd_local_install.sh
│ └── bazzite_hhd_local_update.sh
├── experimental_sound_fix/
│ ├── README.md
│ ├── install_sound_fix_v2.sh
│ ├── manjaro/
│ │ ├── pipewire/
│ │ │ └── pipewire.conf.d/
│ │ │ └── convolver.conf
│ │ └── wireplumber/
│ │ └── wireplumber.conf.d/
│ │ ├── 51-preferHDMI.conf
│ │ └── 60-raise-internal-mic.conf
│ ├── mic_hdmi_audio_fix.conf
│ └── pipewire/
│ └── pipewire.conf.d/
│ ├── convolver.conf
│ └── convolver_mp_go.conf
├── fixed_bugs_changelog.md
├── fuzzy-sound-suspend-fix/
│ ├── README.md
│ ├── install.sh
│ └── uninstall.sh
├── hardware_documentation.md
├── icc_color/
│ ├── LegionGo_Linux_AWP.icc
│ ├── README.md
│ └── vkBasalt.conf
├── old_scripts/
│ ├── add-lgo-xpad-rule.sh
│ ├── add_return_to_desktop.sh
│ ├── bazzite-disable-swipe-gestures.sh
│ ├── bazzite-install-rollback-helper.sh
│ ├── bazzite-nested-desktop-resolution.sh
│ ├── bazzite-rollback-helper
│ ├── bazzite-waydroid-resolution.sh
│ ├── decky_v2_10_14_install.sh
│ ├── desktopmode-autoscale.sh
│ ├── disable_color_management.sh
│ ├── disable_refresh_rates.sh
│ ├── enable-acpi-call.sh
│ ├── enable_144hz.sh
│ ├── enable_60_144hz.sh
│ ├── enable_60hz.sh
│ ├── headphone-connection-monitor.sh
│ ├── increase_swap_zram.sh
│ ├── lgo_bazzite_setup.sh
│ ├── lgo_nobara_setup.sh
│ ├── setup_battery_indicator_overlay.sh
│ └── troubleshooting_report.sh
├── py_modules/
│ ├── disable_trackpad.py
│ └── enable_trackpad.py
├── resources/
│ └── egpu-pcie3speed.conf
├── ryzenadj-max-performance.sh
└── waydroid-restart/
├── README.md
├── install.sh
├── waydroid-force-restart
└── waydroid-force-restart.desktop
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: aarronlee
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: README.md
================================================
# Legion Go Tricks
Note that this document is solely for the Original Legion Go Z1E, NOT the Legion Go S.
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 official SteamOS on the Legion Go](#status-of-official-steamos)
- [Current Status of Linux on the LGO](#current-status-of-linux-on-the-lenovo-legion-go)
- [What Works?](#what-works)
- [What has Workarounds?](#what-has-workarounds)
- [What has issues?](#what-has-issues)
- [Known Bugs](#known-bugs)
- [Which Linux Distro Should I install?](#which-linux-distro-should-i-install)
- [Resources](#resources)
- [CSS Loader Themes](#css-loader-plugin---themes)
- [Tutorial Videos](#tutorial-videos)
- [Guides + Small Fixes](#guides--small-fixes)
- [Bazzite Deck Edition](#bazzite-deck-edition-guides)
- [NobaraOS](#nobaraos-guides)
- [Other Guides](#other-guides)
- [How to change display scaling on internal display](#how-to-change-display-scaling-on-internal-display)
- [How do gamescope scaling options work?](#how-to-use-steams-scaling-features-such-as-int-scaling-fsr-etc)
- [Calibrating gyro and joysticks](#calibrate-gyro-and-joysticks)
- [Refind bootloader for dual boot](#install-refind-bootloader-for-touchscreen-option-to-switch-between-windows-and-linux)
- [Emulator Info](#emulator-info)
- [TDP Control overview](#tdp-control)
- [Controller Support overview](#controller-support)
- [Quality of Life Fixes overview](#quality-of-life-fixes)
- [Resolved/won't fix bugs](#resolved-or-wont-fix-bugs-changelog-for-documentation-purposes)
- [3D prints](#3d-prints)
# Status of official SteamOS
The original Legion Go Z1E is mostly working with Official SteamOS's 3.7.8 stable release.
However, TDP Controls are missing at the moment. You can try enabling steamos-manager + reboot (`sudo systemctl enable --now steamos-manager`).
If that doesn't work, SimpleDeckyTDP and PowerControl Decky plugins should both be able to handle TDP controls.
# Current Status of Linux on the Lenovo Legion Go
ChimeraOS, Nobara Deck Edition, and Bazzite Deck Edition, all have a bunch of fixes for the LGO. Depending on the distro, Linux is either [feature complete](https://www.gamingonlinux.com/2024/02/bazzite-linux-adds-support-for-the-lenovo-legion-go-handheld/), or mostly working on the Legion Go.
Linux is good enough to be a daily driver on the Legion Go.
- Using a Steam Controller Emulator, or PS5 Dualsense Edge Controller Emulator, you get access to the entire LGO controller (including gyro) via steam input
- the entire controller works detached too, gyros in the controller are also usable
- TDP control can be done either via steamos-manager, Decky Plugin, or handheld daemon (hhd)
- relevant [lenovo kernel driver for TDP](https://lore.kernel.org/platform-driver-x86/20250428012029.970017-1-derekjohn.clark@gmail.com/T/#t) is required for steamos-manager
- RGB control works via Decky Plugin or Steam Input + Dualsense emulation or hhd
- suspend-resume works
- all standard hardware (wifi, bluetooth, sound, etc) works
- Fan curves can be managed via hhd-ui or the LegionGoRemapper Decky plugin.
- acpi_call kernel module required for fan control, kernel driver is a WIP with no ETA
- basically all hardware on the LGO is fully usable
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 SteamOS, NobaraOS Deck Edition, ChimeraOS 45 stable, Bazzite OS)
- suspend-resume functionality
- suspend quirk: sound often can be fuzzy on resume, usually clears up after 30 seconds or so.
- sometimes using the [Pause Games plugin](https://github.com/popsUlfr/SDH-PauseGames) with `Pause on Suspend` enabled can help with this issue
- other times, temporarily setting a high TDP value after resume could clear up audio issues
- Wifi and Bluetooth works
- Sound works
- Controllers, both attached and detached
- note, controllers work best in X-input mode. see [official Legion Go Userguide PDF](./legion_go_user_guide_en.pdf) to read more about controller modes
- SteamOS, ChimeraOS, NobaraOS, BazziteOS, CachyOS handheld edition, all ship with basic controller support ootb
- SteamOS ships InputPlumber for to handle the controller
- BazziteOS ships with HHD, which enables full gyro + back button + controller support in steam input
- NobaraOS ships with InputPlumber
- ~~misc: some other non-gaming distros may not include the udev rule for the controller, you can manually add it with [this script](../old_scripts/add-lgo-xpad-rule.sh)~~ controller xpad rule should now be upstream.
- FPS/Mouse mode works
- scroll wheel on controller works fine for scrolling websites, etc
- scroll wheel press doesn't do anything in game mode, registers as a scroll wheel click in desktop mode
- holding the scroll wheel for 5s will toggle the scroll wheel on/off, this is built-in lenovo provided functionality
- trackpad works, tap to click can be configured.
- Can tap to click on desktop mode, but must be enabled in the touchpad settings.
- Can be used in steam input with hhd and InputPlumber
- Battery Indicator in Game Mode - requires bios v29 or newer
## 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 Emulated Steam controller or Dualsense Edge Emulated Controller [Video demo here](https://www.youtube.com/watch?v=uMiXNKES2LM).
- SteamOS ships InputPlumber
- Bazzite ships hhd, which enables all buttons + gyro to work ootb.
- Nobara ships InputPlumber, which is an alternative to hhd
- Gyro - uses the same fix as buttons fix (emulate Dualsense or Steam Controller via hhd or InputPlumber)
- Trackpad - this hardware 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](https://www.youtube.com/watch?v=RuSboPkZob4)
- TDP - requires using either steamos-manager, hhd, or decky plugins
- Controller RGB Lights - requires decky plugin or HHD (HHD enables steam input RGB support) See [Video Demo here](https://youtu.be/HHubJ8AnkUk?si=oWLVultDKBMVOxlo&t=35)
- GPU Frequency control - via steamos-manager or SimpleDeckyTDP plugin or hhd
- Custom Fan Curves - via LegionGoRemapper plugin or HHD (you need to install hhd + hhd-ui)
- Fan curves control currently requires the acpi_call kernel module, there's a WIP kernel driver but no ETA.
- fan curves confirmed to work with bios v29, but bios v29.1 or newer is HIGHLY recommended due to some major bugs on v29
- Games can sometimes default to 800p, you will need to manually change the resolution per game in the `Steam Settings > Properties > Game Resolution` to either `Native` or other higher resolutions.
- adaptive/auto display brightness doesn't work yet
- manual brightness slider in steam UI works without issues
## What has issues
- **v29 bios - IMPORTANT BIOS BUG:** You cannot set custom fan curves and use Lenovo's custom TDP mode for TDP control simultaneously, the LGO bios has a bug
- this bug is fully resolved on bios v29.1 and newer
- Adaptive Brightness sensor - hardware is detectedby the OS, but not used for auto-brightness yet
- there's on-hold dev work for auto-brightness
- if you wish to test it out, see [here](https://github.com/corando98/LLG_Dev_scripts?tab=readme-ov-file#ltchipotles-adaptive-brightness-algorithm)
- the LegionGoRemapper Decky plugin also has experimental autobrightness controls
- microphone does not work
### Known bugs
- (08/2/2024) Bazzite - reports of an odd square-shaped rainbow colored visual artifact on the screen in game mode/gamescope-session
- visual artifacts disappear after a suspend-resume cycle
- focus issue after resume from suspend, where the controller seems to be stuck in Steam UI and not getting picked up by the game
- solution: disable custom wake movies, see github issues [here](https://github.com/ublue-os/bazzite/issues/1474) and [here](https://github.com/ValveSoftware/SteamOS/issues/1424) for more details
- If using Decky loader, shutdown can take an unusually long time
- this is because Decky sets an unusually long timeout time (45s)
- workaround: shorten the timeout time:
```
sudo sed -i 's~TimeoutStopSec=.*$~TimeoutStopSec=2~g' /etc/systemd/system/plugin_loader.service
sudo systemctl daemon-reload
```
- Occasionally steam game mode will flash white
- seems to be related to autoVRAM, recommend disabling autoVRAM and set 6GB or 8GB VRAM in the bios
- suspend-resume quirk: sound often is fuzzy on resume, usually clears up after 30 seconds or so, but not all the time.
- sometimes using the [Pause Games plugin](https://github.com/popsUlfr/SDH-PauseGames) with `Pause on Suspend` enabled can help with this issue
- sometimes temporarily increase TDP to a high value fixes the sound problem
- [this fix](https://github.com/aarron-lee/legion-go-tricks/tree/main/fuzzy-sound-suspend-fix) supposedly works on the Steam Deck, it may also work on the Legion Go
- occasionally, steam will register the attached controller as player 2 even when no other controller is attached
- reorder the controller from player 2 to player 1 in the QAM.
- user reports say wifi has lower download speeds on Linux vs Windows
- alternative resolutions while in desktop mode are buggy/broken
- instead of changing resolution in Desktop mode, change scaling for to enlarge/shrink UI elements
# Which Linux Distro should I Install?
If you want a SteamOS experience, there are 3 distros I would recommend
1. Bazzite Deck Edition
2. Official SteamOS
3. Nobara Deck Edition
4. ChimeraOS
As for which one you should install, here's a breakdown of the benefits and drawbacks of each.
## BazziteOS Deck Edition
**Pros**
- Highly recommended for more casual users who don't want to tinker much
- Has the best out-of-box experience on the Legion Go
- Tools such as Decky, Emudeck, HHD (for Controller Emulation), etc, are either pre-installed, or have an easy install process
- Excellent support from the Bazzite Devs and community
- Bazzite Discord is the place to go to for support and discussion, see [here](https://discord.bazzite.gg)
- Quick to provide OS updates
- also extremely easy to rollback to previous OS versions, so if an OS update breaks something, you can easily rollback to the prior OS version with a single command
- Read-only root filesystem helps with providing better security, more stability, and overall a very good stable console-like experience
- also has SE Linux configured out of the box
- Can configure Secure Boot, which allows for disk encryption and other security benefits
- Secure boot requires some additional configuration steps
- Has both a Gnome and KDE Desktop mode option
- supports distrobox for more flexibility in software install options
**Cons**
- Due to it's read-only root OS, it's harder to do more comprehensive tinkering
- e.g. running a custom Linux kernel, etc
- slow OS install + OS updates, they take a long time
# Official SteamOS
**Pros**
- support from Valve
- Is a very streamlined console-like experience, doesn't include lots of extra software, etc
- ships InputPlumber for controller support
- supports distrobox for more flexibility in software install options
- supports installing nix as a package manager, see [here](https://rasmuskirk.com/articles/2024-12-23_why-nix-is-the-perfect-package-manager-for-your-steam-deck/)
- Valve is pretty on pushing updates. The positive to this is that SteamOS versions are very stable and last a fairly long time
- downside is that you get updates at a slower cadence
**Cons**
- support is still a work in progress, you will encounter bugs and issues
- X11 KDE Desktop, whereas most other distros have already transitioned to Wayland
- certain functionality like TDP controls, custom fan curves, RGB lights, etc, currently require tinkering or 3rd party decky plugins
- older kernel + drivers
## Nobara Deck Edition
**Pros**
- Recommended for those more familiar with Linux, and don't mind troubleshooting a lot or tinkering
- Nobara is the most similar to a standard Linux distro, and does not have a read-only root filesystem
- This provides the most flexibility for running custom kernels, modifying system files, etc
- Can setup most workarounds and tools for a great experience on the Legion Go
- now ships with InputPlumber for to add support for the controller's gyro + extra buttons
**Cons**
- Nobara tends to run cutting edge kernels, and makes other frequent changes to the OS
- This often leads to updates introducing bugs or breaking features on the Legion Go
- while rollbacks after a borked update are possible, it's not easy for non-technical users
- Due to no read-only root FS, easier to accidentally mess up your device and put it into a borked state
- Nobara is basically run by one dev, GloriousEggroll (same guy behind GE-Proton), along with a few helpers
- While GloriousEggroll does excellent work, Nobara is understaffed and it will sometimes be difficult to get help or support if you run into problems
- Only Desktop is KDE, so if you prefer Gnome, you'll have to look elsewhere or manually install + manage it.
## ChimeraOS
**Pros**
- Aims to be a very streamlined console-like experience, doesn't include lots of extra software, etc
- very minimalist, very stable
- Very easy to pin your device to a stable OS version
- so once you get a good working setup, you can lock your OS version and then opt to manually update whenever you want
- great if you want a console like experience where you can "set-it-up-and-forget-it"
- Has a read-only root filesystem, but can also be fully unlocked if necessary
- note: filesystem unlock does not survive OS updates because it re-locks after an OS update.
- Excellent support for a variety of handhelds besides the Legion Go
- Good Dev and community support on their Discord
- Has it's own implementation of Emulator support, etc
- ships InputPlumber for controller support
- supports distrobox for more flexibility in software install options
**Cons**
- Installing some recommended tools, such as acpi_call for custom fan curves, requires unlocking the root filesystem
- ChimeraOS 45-1 now includes `acpi_call`, which is currently required for custom fan curves and Lenovo Custom TDP control
- ChimeraOS's emulation implementation interferes with Emudeck, you'll need to manually disable the ChimeraOS implementation
- Only desktop option is Gnome, so anyone that prefers KDE will have to look elsewhere
- ChimeraOS has a slower release cycle, a new version is released every 1-3 months.
- this means it takes longer to get OS improvements, driver updates, bug fixes, etc
# Resources
InputPlumber - Controller Emulator - https://github.com/ShadowBlip/InputPlumber/
HHD - Controller Emulator - https://github.com/hhd-dev/hhd
- has a desktop app https://github.com/hhd-dev/hhd-ui
- hhd also supports overlay mode in Steam Game mode, and offers a solution for TDP and fan curve control
- (deprecated) has a Decky plugin available for changing hhd settings: https://github.com/aarron-lee/hhd-decky
RGB Decky Plugin - https://github.com/aarron-lee/LegionGoRemapper/
Simple Decky TDP Plugin - https://github.com/aarron-lee/SimpleDeckyTDP
Controller-friendly Youtube app (with steam input community profile) - https://github.com/Haroon01/youtube-tv-client
Controller-friendly Crunchyroll app (with steam input community profile) - https://github.com/aarron-lee/crunchyroll-linux
Refind GUI - tool for setting up selection screen for dual-booted devices: https://github.com/jlobue10/rEFInd_GUI
(nobaraOS) Script that monitors CPU temps and blasts fans when temps are too high - see guide [here](#setup-monitor-script-that-blasts-fans-when-cpu-temps-climb-too-high-tested-on-nobaraos-only)
reverse engineering docs - https://github.com/antheas/hwinfo/tree/master/devices
powerbutton fix when using InputPlumber - https://github.com/ShadowBlip/steam-powerbuttond
Original Pipewire sound EQ improvement files (not maintained) - https://github.com/matte-schwartz/device-quirks/tree/legion-go/rog-ally-audio-fixes/usr/share/device-quirks/scripts/lenovo/legion-go
- updated version of sound improvements [here](./experimental_sound_fix/README.md)
Bios archive - https://github.com/aarron-lee/legion-go-bios
gyro increase sampling rate fix (advanced users only, not maintained) - https://github.com/antheas/llg_sfh
## 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
```
# Tutorial Videos
Updated Dual Boot Tutorial video for Bazzite: https://www.youtube.com/watch?v=OjqihbOrErM
- Partition guide for Dual boot with Bazzite: [see here](/bazzite-dualboot-partition-guide.md)
Bazzite Rollback tutorial video: https://www.youtube.com/watch?v=XvljabnzgVo
~~Dual Boot Tutorial Video (Bazzite + Windows) : https://www.youtube.com/watch?v=3jFnkcVBI_A~~
~~Dual Boot Tutorial Video (Nobara + Windows): https://www.youtube.com/watch?v=anc7hyPU6Lk~~
# Guides + small fixes
### Update Bios
Source: https://github.com/ChimeraOS/chimeraos/wiki/Community-Guides#lenovo-legion-go
The Lenovo Legion Go is compatible with the fwupd tool. To use it follow the following steps:
Note: Ensure your device is plugged into AC power before beginning.
1.) Download the latest BIOS exe from https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/legion-series/legion-go-8apu1/downloads/driver-list
2.) Extract the `isflash.bin` from the exe archive using file roller or some other archive tool.
3.) Go to the folder where the `isflash.bin` file is located. Right click, and select `open terminal here`. Then run `sudo fwupdtool install-blob isflash.bin`
4.) Select System Firmware from the options menu.
5.) It will ask you to reboot, Select `y`. The system will reboot multiple times. Leave the AC plugged in and wait for it to return to the OS.
## Bazzite Deck Guides
### FAQ on bazzite site for rollback, pinning OS version, etc
See official site at: https://universal-blue.discourse.group/docs?topic=36
### eGPU setup (AMD eGPU only)
If you notice eGPU not running at full pcie speeds, you might need an additional kernel arg before it works at full speed.
thanks to @krys on discord for the updated karg for the eGPU, read section 1.2.1 [here](https://wiki.archlinux.org/title/External_GPU) for more info
1. Open up your terminal (Ptyxis), run the following command
```
rpm-ostree kargs --append=amdgpu.pcie_gen_cap=0x80000
```
2. reboot
You can also see the conf file [here](./resources/egpu-pcie3speed.conf) for more details, thanks @Ariobeth on Discord!
### Buggy Sleep with an eGPU
thanks @Ariobeth on Discord
Here is a quick fix for the default bazzite sleep/suspend under a egpu condition connected to external monitor.
Run this in terminal:
`xdg-open /etc/systemd/sleep.conf`
edit the file, remove the hash (`#`) so that the end result looks like this:
```
[Sleep]
AllowSuspend=yes
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=yes
SuspendMode=suspend
SuspendState=standby freeze mem disk
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=
#SuspendEstimationSec=60min
```
save changes, reboot.
now when pc sleeps or when you press the power button of the legion go = sleep. at least it will not have a blank screen and cannot wake up. it is still energy saving though.
### Blank Screen on First Reboot
If you see a frozen or blank screen on first reboot after a fresh installation of Bazzite, you can permanently fix the issue via the following:
1. press `Ctrl + Alt + F2` to open a terminal
2. login via your username and password
3. once logged in, type `steamos-session-select plasma`
- if you are on deck-gnome, try swapping `plasma` with `gnome` if it doesn't work
4. the terminal command should switch you to desktop mode
5. from desktop mode, just press the `Return to Game Mode` shortcut on the Desktop
- for deck-gnome, the `return to game mode` shortcut will be in the menu that you see after you click the top-left corner of the screen
### Nested Desktop Screen is rotated incorrectly
Open terminal in Nested Desktop (NOT Desktop mode), and run the following:
```bash
kscreen-doctor output.1.rotation.normal
```
then restart nested desktop
### Nested Desktop fails to start, or freezes very frequently
User reported issue where Nested Desktop frequently fails. As a fix, set a `per game profile` for Nested Desktop with 60hz as the screen resolution.
If you still run into frequent freezes, please report the bug on the Bazzite Discord.
### Experimental Sound fix
see install instructions [here](./experimental_sound_fix/README.md)
Note that it should also work for NobaraOS, but will require a reboot
### Roll back to Bazzite image with specific Linux Kernel
let's say you want to revert Bazzite to an image with kernel 6.6
First, you can find the list of bazzite-deck images here: https://github.com/ublue-os/bazzite/pkgs/container/bazzite-deck/versions?filters%5Bversion_type%5D=tagged
Look for the version for specific dates, it'll look like `39-YYYYMMDD`
e.g. `39-20240205`
This will let you find the kernel version on that given image
`skopeo inspect docker://ghcr.io/ublue-os/bazzite:39-20240205 | grep ostree.linux`
if the number matches with the kernel version that you want to deploy, you can then deploy the image:
```
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:39-20240205
```
### How to figure out your current Bazzite Image
run `rpm-ostree status` in terminal, you'll see info on your current image.
### Change Desktop Steam UI scaling
First, try changing the following (original tip found [here](https://www.reddit.com/r/LegionGo/comments/1as75lf/comment/kqpau3c/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)):
`System Settings > Display and Monitor > Display Configuration > Legacy Applications: Scaled by the system`
If this doesn't work, then proceed to the next steps.
This is for Bazzite-Deck, not Bazzite-Deck-Gnome
thanks @noobeta on discord for this tip!
For technical users:
run `sudoedit /etc/environment`, and add `STEAM_FORCE_DESKTOPUI_SCALING=2` to the end of the file. save changes, and reboot afterwards.
for non-technical users:
run `xdg-open /etc/environment` in terminal, it will open up the file in a text editor. Add `STEAM_FORCE_DESKTOPUI_SCALING=2` to the end of the file, and save. You will be prompted for your password, save and then reboot.
Note that if you edit the `/etc/environment` file, it will change the scaling of the on screen keyboard in desktop mode.
### "failed to download gpg key" bug when trying to rebase
try running the following, then rebase again:
```
# note, changing the "nonfree" to free in this command might also fix the rebase.
cd /etc/pki/rpm-gpg
sudo ln -s RPM-GPG-KEY-rpmfusion-nonfree-fedora-2020 RPM-GPG-KEY-rpmfusion-nonfree-fedora-39
```
<!--
secure boot tpm unlock - `systemd-cryptenroll` -->
---
## NobaraOS Guides
### Setup lock screen for desktop mode only (KDE only)
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.
### Setup Monitor script that blasts fans when CPU temps climb too high (tested on NobaraOS only)
The Legion Go bios currently has behavior where if temps get too high, it manually forces TDP values to lower values until temps cool off
To mitgate this issue, you can setup a monitoring script that will blast the fans at full speed whenever it sees temps that are too high.
Install Instructions:
1. run `sudo modprobe acpi_call`, and see if this command errors out for you; if it does display an error, you need to install `acpi_call` on your linux distro
If it did not error out for you, we need to enable acpi_call by default so that you don't need to manually run `sudo modprobe acpi_call` on every boot.
You can do so via running the following script: [enable-acpi-call.sh](./enable-acpi-call.sh)
2. Download the files required
```
cd $HOME && git clone https://github.com/corando98/LLG_Dev_scripts.git
```
3. before installing, you can edit the `$HOME/LLG_Dev_scripts/fan-helper_install.sh` script if you'd like to change what temperature will trigger the fan
- in the file, you can replace the `85` in the line with `--temp_high 85 --temp_low 80`
4. run the install script, it will ask for your sudo password
```
cd $HOME/LLG_Dev_scripts && chmod +x ./fan-helper_install.sh && sudo ./fan-helper_install.sh
```
5. To verify that it's working, you can type in the following: `sudo systemctl status legion_fan_helper.service`
The result should look something like this:
```
Jan 03 21:03:19 nobaraLGO systemd[1]: Started legion_fan_helper.service - Legion Go Fan helper method.
Jan 03 21:03:19 nobaraLGO python3[10905]: 2024-01-03 21:03:19,473 - INFO - CPU Temperature: 46°C
Jan 03 21:03:19 nobaraLGO python3[10905]: 2024-01-03 21:03:19,473 - INFO - AC Status: Plugged In
```
6. You can now quit/close the terminal, and reboot
7. If you ever want to uninstall this temperature monitoring script, run the following one line at a time:
```
sudo systemctl disable --now legion_fan_helper.service
sudo rm /etc/systemd/system/legion_fan_helper.service
sudo rm -rf $HOME/LLG_Dev_scripts
```
### Install kernel on Nobara (untested)
These instructions are untested, but should work
```bash
sudo dnf copr enable sentry/kernel-fsync
sudo dnf update --refresh
# sudo dnf install kernel_goes_here
# e.g.
sudo dnf install kernel-6.6.14-202.fsync.fc39
```
### Change default boot kernel on Nobara v39
This will let you change your default kernel.
using this command to figure out the kernels you have installed:
```bash
sudo grubby --info=ALL | grep kernel
```
Look for the version number you want to make the default, it should be a number, something like `6.7.0-204`
Then run the following
```bash
sudo grubby --info=ALL | grep -i REPLACE_THIS_WITH_KERNEL_VERSION_NUMBER -B 1 | grep index
# example: if you're looking for 6.6.9-203
sudo grubby --info=ALL | grep -i 6.6.9-203 -B 1 | grep index
```
You should get an index number that shows up after running the command.
After having index number of the kernel you want as the default, run:
```bash
sudo grubby --set-default THIS_INDEX_NUMBER
# example: if the number is 3
sudo grubby --set-default 3
```
Then reboot, and verify it's working:
```bash
# reboot, this should print out your kernel version
uname -r
```
Thanks @cox on discord for the info, and @megabadd for recommending some improvements to the instructions
### Fix display-out not working for a display/monitor that previously worked
`~/.config/gamescope/modes.cfg` contains resolutions for monitors that have been configured.
Sometimes monitor settings in the file are set to erroneous values that the display could not handle.
To fix this, removing the display from the file allows it to be reconfigured. thanks @braymur on discord
### 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.
### Disable nobaraOS grub boot menu during boot
[Source](https://www.reddit.com/r/linux4noobs/comments/wzoiu4/comment/im5cfx7/?context=3)
Note, you should never change the content of `/boot/grub/grub.cfg`
What you probably want to do is to hide grub’s boot menu, you can do it two ways:
- By hiding the boot menu
- for non-technical users:
- go to your `/etc/default` folder, then open the `grub` file with kate.
- Edit the file and add `GRUB_TIMEOUT_STYLE=hidden`, then save. It'll prompt for your password.
- Afterwards, in terminal run `sudo update-grub`
- for technical users: `sudo vim /etc/default/grub` and set `GRUB_TIMEOUT_STYLE=hidden`. save changes, then run `sudo update-grub`
- Or by making the boot menu timeout 0, to do that:
- for non-technical users:
- go to your `/etc/default` folder, then open the `grub` file with kate.
- Edit the file and set `GRUB_TIMEOUT=0`, then save. It'll prompt for your password.
- Afterwards, in terminal run `sudo grub-mkconfig`
- for technical users:`sudo vim /etc/default/grub` and set `GRUB_TIMEOUT=0`. save changes, then run `sudo grub-mkconfig` to generate `/boot/grub/grub.cfg`
Tip: even if your boot menu is hidden, you can access it when your pc is starting:
If you have BIOS: press and hold SHIFT key right after you see you Motherboard/PC splash screen
If you have UEFI: start pressing ESC the moment you see your motherboard/pc splash screen.
---
## Other guides
### How to change display scaling on internal display
Follow the below steps to enable UI scaling for the internal display:
1. In Steam Game mode, under system settings enable Developer mode
2. A new section appears on the left hand side named "Developer", go in there and enable "Show display scaling settings for Internal Display".
3. The new display scaling options will now be available under Display.
4. Disable developer mode under Steam's System settings, the display scaling options will still be available after disabling developer mode. Enjoy!
source: https://www.reddit.com/r/SteamDeck/comments/17qhmpg/comment/k8dgjnq/
### How to use steam's scaling features, such as int scaling, FSR, etc

Full guide here: https://medium.com/@mohammedwasib/a-guide-to-a-good-docked-gaming-experience-on-the-steam-deck-346e393b657a
Reddit discussion [here](https://www.reddit.com/r/SteamDeck/comments/z90ca0/a_guide_to_a_good_docked_gaming_experience_on_the/)
PDF Mirror of guide [here](./steam-resolutions-guide.pdf)
### Calibrate Gyro and Joysticks
Requires updated controller firmware
1. hold LT+LS and RT+RS
2. once the rgb swirls blue, rotate the sticks fully deflected (calibrates sticks)
3. place the LGO on the floor and press LT and RT twice to signal you're done
4. the gyro will then begin calibration. once it stops blinking green and red and goes back to your normal rgb setting it will be done
### Install Refind bootloader for touchscreen option to switch between Windows and Linux
source: [reddit post](https://www.reddit.com/r/LegionGo/comments/1atag1z/comment/kqw3y05/?utm_source=share&utm_medium=web2x&context=3)
Resources:
https://sourceforge.net/projects/refind/
http://www.rodsbooks.com/refind/
Instructions:
1. Enter on Bazzite Desktop mode
2. Download the RPM on SourceForge (**file that ends with a** `x86_64.rpm`) and open a terminal (ex : Console on Bazzite). Note that you should **NOT** download the file that ends with`src.rpm`
3. cd into your Download directory (ex : `cd ~/Downloads/`)
4. Run `sudo rpm-ostree install refind-*.rpm` (This will install the rEFInd RPM using rpm-ostree). After installing the rpm successfully, reboot the device.
5. After reboot, run `sudo refind-install` (Read further into the resources if you want to enable Secure Boot)
6. Reboot into BIOS and set rEFInd as the first option in the boot order
Optional for Legion Go only:
1. Download [custom rEFInd theme](https://drive.google.com/drive/folders/1QJBljL_8QPeaMhQ0-qXAc9U8f3AcgNBs?usp=sharing) (credits goes to Yannis Vierkötter and his rEFInd-Minimalist for the original theme) (download mirror link [here](./resources/rEFInd-Minimalist-LGO_Bazzite.zip))
2. Unzip then run `sudo sh -c 'mkdir /boot/efi/EFI/refind/themes/ ; set -euo pipefail cp -r rEFInd-Minimalist-LGO_Bazzite/ /boot/efi/EFI/refind/themes/ && grep -qFx "include themes/rEFInd-Minimalist-LGO_Bazzite/theme.conf" "/boot/efi/EFI/refind/refind.conf" || echo "include themes/rEFInd-Minimalist-LGO_Bazzite/theme.conf" >> /boot/efi/EFI/refind/refind.conf ' ` (make sure rEFInd-Minimalist-LGO_Bazzite/ is present in the directory you are currently in, type in the command `ls` to see all available files)
### Trick to rotate Legion Go screen for REFIND
Thanks @ariobeth on discord for this guide
not offical instructions, but seems to work fine
setup refind in linux, then run the following via Terminal:
- sudo nano /boot/efi/EFI/refind/refind.conf (requires root to edit. else, sudo -i first to enter root, then issue the sudo nano)
- scroll down and find the "#resolution 1024 768" section.
- add "resolution 2560 1600". (notice it is 2560 wide and 1600 height, it is not 1600 wide and 2560 height. This simple trick rotate the refind boot menu screen correctly on the legion go.)
- also "enable_touch" and "enable_mouse" for Touchscreen and mouse to work.
- you might also want to increase the icon size. "big_icon_size 256" (your preference)
- No idea how to increase font size. (you might need to change the theme for refind)
# Emulator Info
Emulator related documentation, including recommended settings, etc.
## Gyro configuration in CEMU
Configure gyro according to [this guide](https://emudeck.github.io/emulators/steamos/cemu/cemu-native/#how-to-configure-gyro-with-external-controllers) on the emudeck documentation, and use dualsense edge as your controller emulator
- note that this requires disabling steam input for the emulator
Thanks to @Paper on Discord for this tip
## Emudeck
On Bazzite, install via the ujust script in terminal.
For to install on ChimeraOS or NobaraOS, go to https://www.emudeck.com, and scroll down to the section that shows installer options.
If the `Linux` install option doesn't work for you, the `ChimeraOS` install instructions should also work fine on other Linux distros.
## Dolphin (Gamecube)
For to improve stability, you can disable V-sync in the Dolphin settings
- open Dolphin on desktop mode
- select `Graphics`
- disable V-sync, save changes
# TDP Control:
TDP on the Legion Go must be set via Lenovo's wmi methods, which currently aren't accessible without acpi_call on Linux. There is a work in progress driver for the LGO, but it is not ready yet.
### `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 by default is 30W TDP with everything maxed out
And it resets every time you switch modes
### HHD
hhd now ships with an overlay that has TDP control support. Requires acpi_call installed on your Linux distro.
### SimpleDeckyTDP
Decky Plugin that provides TDP and GPU controls. Also has an option to fix Steam's TDP + GPU Sliders. Note that there's 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
### hhd
Link: https://github.com/antheas/hhd
Controller emulator, currently supports all buttons on the LGO controller except the back scrollwheel (scrollwheel already worked previously). 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.
It is preinstalled on Bazzite for the Legion Go, ROG Ally, abd several other PC handheld devices.
Install instructions are available on the github.
### InputPlumber
Link - https://github.com/ShadowBlip/InputPlumber/
Controller emulator, used to provide controller support on Nobara and ChimeraOS
# Quality Of Life Fixes
### CSS Loader Plugin - Themes
- note, requires `CSS Loader` Decky Plugin
- manually install by downloading the theme + placing in `$HOME/homebrew/themes/` folder
- sometimes themes require a reboot before they start working.
- the themes are intended to work with hhd's dualsense edge controller emulator
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
### Other Linux Distro theme install instructions
```
# 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
```
# 3D prints
https://makerworld.com/en/models/88724#profileId-94984
https://www.thingiverse.com/thing:6364915/files
https://makerworld.com/en/models/57312#profileId-94578
https://www.thingiverse.com/thing:4675734
https://www.reddit.com/r/LegionGo/comments/17s8rv8/3d_printed_steamclip_kickstand_released/
https://www.thingiverse.com/thing:6311208/
https://www.thingiverse.com/thing:6444531
https://makerworld.com/en/models/157429#profileId-172767
controller adapter - https://www.printables.com/model/645576-legion-go-controller-adapter-remix
controller caryy case - https://www.thingiverse.com/thing:6499314
travel cover
https://cults3d.com/en/3d-model/gadget/legion-go-front-cover
<!--
https://steamcommunity.com/groups/SteamClientBeta/discussions/3/3775742015037677494/
misc:
change between s2idle and s3, if s3 is available
to change it temporarily, run:
echo s2idle | sudo tee /sys/power/mem_sleep
but it'll reset on reboot
so you'll probably need a startup systemd service to enable it on boot
add a kernel arg
rpm-ostree kargs --append=mem_sleep_default=s2idle
misc thing to investigate:
# mkdir -p ~/.config/wireplumber/bluetooth.lua.d/
# cat ~/.config/wireplumber/bluetooth.lua.d/61-bluez-monitor.lua
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.codecs"] = "[sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex]",
}
https://web.archive.org/web/20230710001521/https://steamdecki.org/Steam_Deck/Wireless/Bluetooth
-->
<!--
distrobox dev env vscode setup
https://github.com/89luca89/distrobox/blob/main/docs/posts/integrate_vscode_distrobox.md#from-flatpak -->
================================================
FILE: bazzite-dualboot-partition-guide.md
================================================
source: https://universal-blue.discourse.group/t/dual-boot-preliminary-setup-and-post-setup-guide/2743#p-6361-manual-partitioning-to-the-same-drive-for-dual-boot-setups-6
# Bazzite Dualboot partition guide
**Be careful! Follow this guide at your own discretion because you can break your system attempting any of this! Upstream does not recommend manual partitioning and neither does Universal Blue!**
Dual booting can work through two methods:
1. Installing the other operating system(s) on a separate drive and booting (recommended)
2. Manual partitioning, which is not supported by upstream, on the same drive
# General Guide for the Same Drive
Special thanks to ChaiQi for writing this portion of the guide!
**This is about as much support as you will get for dual booting on the same drive as Bazzite:**
If you do not have multiple drives, then there is an advanced method that requires manual partitioning
## This is unsupported if you run into any issues!
Dual booting Bazzite with Windows on the same drive works better with Windows already installed before Bazzite.
1. Shrink partitions.
2. Write ISO to USB drive.
3. Boot into ISO via BIOS.
4. Use installer - for partitioning select “custom” or “advanced custom” to be absolutely sure.
5. Create partitions and devices
```
Manual Partitioning Scheme:
mount point: /boot/efi
format: EFI system partition (also known as vfat)
size: 300MB
mount point: /boot
format: ext4
size: 1GB
mount point:
format: btrfs
size: [max]
mount point: /
format: btrfs (subvolume)
mount point: /var
format: btrfs (subvolume)
mount point: /var/home
format: btrfs (subvolume)
```
6. Boot into Bazzite and complete the Bazzite Portal.
7. Reboot
8. Should have both OSes on the same drive
Note: Steam Deck, HTPC, and Handheld PC images hide GRUB by default, enter:
```
ujust unhide-grub
```
If you do not see your Windows boot in the GRUB menu, then open a host terminal and enter:
```
ujust regenerate-grub
``````
Also, if you want to dual boot another Fedora OSTree image (like Bluefin) installed alongside Bazzite, then you would have to make an additional EFI partition and switch between them through the BIOS boot menu.
================================================
FILE: bazzite-maliit-keyboard.sh
================================================
# enable maliit kb script on bazzite
# After install, make sure you enable the Maliit keyboard in your Keyboard > Virtual Keyboard Settings
echo "enabling + fixing Maliit virtual keyboard in bazzite desktop mode"
mkdir -p $HOME/.local/share/applications
# desktop entry source: https://github.com/maliit/keyboard/blob/master/com.github.maliit.keyboard.desktop
cat <<EOF > "$HOME/.local/share/applications/com.github.maliit.keyboard.desktop"
[Desktop Entry]
Name=Maliit
Exec=maliit-keyboard
Type=Application
X-KDE-Wayland-VirtualKeyboard=true
Icon=input-keyboard-virtual
NoDisplay=true
EOF
# bugfix kb source: https://www.youtube.com/watch?v=Dp0QhmtIP6k
# mkdir -p ~/.config/plasma-workspace/env/
# cat << EOF > "$HOME/.config/plasma-workspace/env/immodule_temp_fix.sh"
# #!/bin/bash
# unset GTK_IM_MODULE
# unset QT_IM_MODULE
# EOF
# sudo chcon -u system_u -r object_r --type=bin_t "$HOME/.config/plasma-workspace/env/immodule_temp_fix.sh"
echo "Install complete!"
echo "READ THIS!!!"
echo "Make sure you enable the Maliit keyboard in your Keyboard > Virtual Keyboard Settings, then reboot"
================================================
FILE: dev/bazzite_hhd_local_install.sh
================================================
#!/bin/bash
if [ "$EUID" -eq 0 ]; then
echo "This script must be not be run as root, don't use sudo" >&2
exit 1
fi
# horipad steam controller:
# edit ~/.steam/steam/config/config.vdf
# add to SDL_GamepadBind
# 060000000d0f00009601000000000000,Steam Controller (HHD),a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,paddle1:b13,paddle2:b12,paddle3:b15,paddle4:b14,misc2:b11,misc3:b16,misc4:b17,crc:ea35,
# disable built in bazzite service
sudo systemctl disable --now hhd@$USER.service
# disable built-in hhd on reboots
sudo systemctl mask hhd@$USER.service
cd $HOME/.local/bin
git clone https://github.com/hhd-dev/hhd.git && cd hhd
python -m venv --system-site-packages venv
source ./venv/bin/activate
./venv/bin/pip install -e .
# cannot directly cat into /etc/systemd/system/ (probably due to se linux)
cat << EOF > "./hhd_local.service"
[Unit]
Description=hhd local service
[Service]
Type=simple
Nice = -15
Restart=always
RestartSec=5
WorkingDirectory=/var/home/$USER/.local/bin/hhd/venv/bin
ExecStart=/var/home/$USER/.local/bin/hhd/venv/bin/hhd --user $USER
Environment="HHD_HORI_STEAM=1"
Environment="HHD_PPD_MASK=0"
Environment="HHD_GS_STANDBY=0"
[Install]
WantedBy=default.target
EOF
sudo cp ./hhd_local.service /etc/systemd/system/
# handle for SE linux
sudo chcon -u system_u -r object_r --type=bin_t /var/home/$USER/.local/bin/hhd/venv/bin/hhd
sudo systemctl daemon-reload
sudo systemctl enable --now hhd_local.service
================================================
FILE: dev/bazzite_hhd_local_update.sh
================================================
#!/bin/bash
cd $HOME/.local/bin/hhd
git pull
# disable hhd_dev if already running
sudo systemctl disable --now hhd_local.service
sudo systemctl disable --now hhd@$USER.service
./venv/bin/pip install -e .
# handle for SE linux
sudo chcon -u system_u -r object_r --type=bin_t /var/home/$(whoami)/.local/bin/hhd/venv/bin/hhd
sudo systemctl daemon-reload
sudo systemctl enable --now hhd_local.service
================================================
FILE: experimental_sound_fix/README.md
================================================
# Experimental Sound Fix v2
## IF ON BAZZITE OS, THIS FIX HAS BEEN ADDED TO THE OS ALREADY.
## IF ON CHIMERA OS, THIS FIX HAS BEEN ADDED
> This sound fix 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.
credit to @matte-schwartz for developing the initial fix, found [here](https://github.com/matte-schwartz/device-quirks/tree/main/usr/share/device-quirks/scripts/lenovo/legion-go)
credit to @adolfotregosa on discord for developing an improved version of the audio fix!
credit to @KyleGospo for fixing default sound options and other configuration updates
# Install instructions
run the following in terminal:
```bash
bash <(curl -fsSL https://raw.githubusercontent.com/aarron-lee/legion-go-tricks/main/experimental_sound_fix/install_sound_fix_v2.sh)
# alternative command for the Legion Go, if the one above doesn't work for you
curl -L https://raw.githubusercontent.com/aarron-lee/legion-go-tricks/main/experimental_sound_fix/install_sound_fix_v2.sh | sh
```
Afterwards, you will see an additional Playback device in your audio options `Legion GO`
## WARNING!
Before you switch to the `Legion GO` option, make sure to max out the audio of your regular speakers sound option! The max volume of your audio speakers affects the volume of the `Legion GO` option.
# Uninstall instructions
run the following in terminal:
```
rm $HOME/.config/pipewire/pipewire.conf.d/convolver.conf
rm $HOME/.config/pipewire/multiwayCor48.wav
systemctl --user restart --now wireplumber pipewire pipewire-pulse
```
================================================
FILE: experimental_sound_fix/install_sound_fix_v2.sh
================================================
#!/usr/bin/bash
# Lenovo Legion Go setup script
# does the following:
# - Modified Pipewire EQ fixes
# updated with new convolver from @adolfotregosa on discord. thanks!
# original fix from here:
# git clone https://github.com/matte-schwartz/device-quirks.git
# cd device-quirks/usr/share/device-quirks/scripts/lenovo/legion-go
# mv pipewire /etc
# Notes:
# pw-cli info all | grep 'node.name = "alsa_output'
# wpctl status
# coppwr app
# qpwgraph app
# Ensure not running as root
if [ "$EUID" -eq 0 ]; then
echo "This script must not be run as root." >&2
exit 1
fi
product_name=$(cat /sys/devices/virtual/dmi/id/product_name)
product_name=$(echo "$product_name" | tr -d '[:space:]')
if [ "$product_name" = "83E1" ]; then
echo "Legion Go detected. Continuing install"
else
echo "Device $product_name is not a Legion Go"
echo "This fix is NOT intended for your device. If you decided to proceed with installing it,"
echo "note that it is NOT supported and can potentially cause issues on your device."
echo "no support or help will be provided by developers for this"
read -p "Would you like to proceed? (y/n)" yn
case $yn in
[Yy]) echo "Continuing install...";;
*) echo "Exiting." && exit 1;;
esac
fi
echo "installing pipewire EQ sound improvements"
# download + setup pipewire EQ sound improvements
cd /tmp
git clone --depth=1 https://github.com/aarron-lee/legion-go-tricks.git
cd /tmp/legion-go-tricks/experimental_sound_fix
PIPEWIRE_DIR=$HOME/.config/pipewire
PIPEWIRE_CONF_DIR=$PIPEWIRE_DIR/pipewire.conf.d
mkdir -p $PIPEWIRE_DIR
mkdir -p $PIPEWIRE_CONF_DIR
cat << EOF > "$PIPEWIRE_CONF_DIR/convolver.conf"
# Convolver Configuration for Pipewire
#
# This configuration applies separate left and right convolver effects using the corresponding impulse response files
# to the entire system audio output.
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Legion GO"
media.name = "Legion GO"
filter.graph = {
nodes = [
{
type = builtin
label = convolver
name = convFL
config = {
filename = "$HOME/.config/pipewire/multiwayCor48.wav"
channel = 0
}
}
{
type = builtin
label = convolver
name = convFR
config = {
filename = "$HOME/.config/pipewire/multiwayCor48.wav"
channel = 1
}
}
]
inputs = [ "convFL:In" "convFR:In" ]
outputs = [ "convFL:Out" "convFR:Out" ]
}
capture.props = {
node.name = "Legion GO"
media.class = "Audio/Sink"
priority.driver = 1000
priority.session = 1000
audio.channels = 2
audio.position = [ FL FR ]
}
playback.props = {
node.name = "Legion GO corrected"
node.passive = true
audio.channels = 2
audio.position = [ FL FR ]
node.target = "alsa_output.pci-0000_c2_00.6.analog-stereo"
}
}
}
]
# wav file is 48000 khz, so you must set allowed-rates accordingly
context.properties = {
default.clock.allowed-rates = [ 48000 ]
}
EOF
cp /tmp/legion-go-tricks/experimental_sound_fix/multiwayCor48.wav $PIPEWIRE_DIR/multiwayCor48.wav
systemctl --user restart --now wireplumber pipewire pipewire-pulse
rm -rf /tmp/legion-go-tricks
echo "Installation complete. Change your audio source to 'Legion GO'"
echo "-------------
READ THE FOLLOWING!
-------------"
echo "note that this fix itself is a bit odd.
the volume of your regular speakers affects the max volume of the 'Legion GO' sound option.
so basically install this fix, then max out/adjust audio volume on regular speakers, then swap to other audio source"
================================================
FILE: experimental_sound_fix/manjaro/pipewire/pipewire.conf.d/convolver.conf
================================================
# Convolver Configuration for Pipewire
#
# This configuration applies separate left and right convolver effects using the corresponding impulse response files
# to the entire system audio output.
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Legion GO"
media.name = "Legion GO"
filter.graph = {
nodes = [
{
type = builtin
label = convolver
name = convFL
config = {
filename = "/home/deck/.config/pipewire/multiwayCor48.wav"
channel = 0
}
}
{
type = builtin
label = convolver
name = convFR
config = {
filename = "/home/deck/.config/pipewire/multiwayCor48.wav"
channel = 1
}
}
]
inputs = [ "convFL:In" "convFR:In" ]
outputs = [ "convFL:Out" "convFR:Out" ]
}
capture.props = {
node.name = "Legion GO"
media.class = "Audio/Sink"
priority.driver = 1010
priority.session = 1010
audio.channels = 2
audio.position = [ FL FR ]
}
playback.props = {
node.name = "Legion GO.corrected"
node.passive = true
audio.channels = 2
audio.position = [ FL FR ]
node.target = "alsa_output.pci-0000_c2_00.6.analog-stereo"
}
}
}
]
================================================
FILE: experimental_sound_fix/manjaro/wireplumber/wireplumber.conf.d/51-preferHDMI.conf
================================================
monitor.alsa.rules = [
{
matches = [
{
node.name = "~alsa_output.pci-0000_c2_00.1.hdmi*"
}
]
actions = {
update-props = {
priority.driver = 1100
priority.session = 1100
}
}
}
]
================================================
FILE: experimental_sound_fix/manjaro/wireplumber/wireplumber.conf.d/60-raise-internal-mic.conf
================================================
monitor.alsa.rules = [
{
matches = [
{
node.name = "alsa_input.pci-0000_c2_00.6.analog-stereo"
}
]
actions = {
update-props = {
priority.driver = 8901
priority.session = 8901
}
}
}
]
================================================
FILE: experimental_sound_fix/mic_hdmi_audio_fix.conf
================================================
monitor.alsa.rules = [
{
matches = [
{
node.name = "alsa_input.pci-0000_c2_00.6.analog-stereo"
}
]
actions = {
update-props = {
priority.driver = 8901
priority.session = 8901
}
}
}
]
monitor.alsa.rules = [
{
matches = [
{
node.name = "alsa_output.pci-0000_c2_00.1.hdmi-stereo"
}
]
actions = {
update-props = {
priority.driver = 1010
priority.session = 1010
}
}
}
]
================================================
FILE: experimental_sound_fix/pipewire/pipewire.conf.d/convolver.conf
================================================
# Convolver Configuration for Pipewire
#
# This configuration applies separate left and right convolver effects using the corresponding impulse response files
# to the entire system audio output.
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Legion GO"
media.name = "Legion GO"
filter.graph = {
nodes = [
{
type = builtin
label = convolver
name = convFL
config = {
filename = "/home/deck/.config/pipewire/multiwayCor48.wav"
channel = 0
}
}
{
type = builtin
label = convolver
name = convFR
config = {
filename = "/home/deck/.config/pipewire/multiwayCor48.wav"
channel = 1
}
}
]
inputs = [ "convFL:In" "convFR:In" ]
outputs = [ "convFL:Out" "convFR:Out" ]
}
capture.props = {
node.name = "Legion GO"
media.class = "Audio/Sink"
priority.driver = 1000
priority.session = 1000
audio.channels = 2
audio.position = [ FL FR ]
}
playback.props = {
node.name = "Legion GO corrected"
node.passive = true
audio.channels = 2
audio.position = [ FL FR ]
node.target = "alsa_output.pci-0000_c2_00.6.analog-stereo"
}
}
}
]
================================================
FILE: experimental_sound_fix/pipewire/pipewire.conf.d/convolver_mp_go.conf
================================================
# Convolver Configuration for Pipewire
#
# This configuration applies separate left and right convolver effects using the corresponding impulse response files
# to the entire system audio output.
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Legion GO"
media.name = "Legion GO"
filter.graph = {
nodes = [
{
type = builtin
label = convolver
name = convFL
config = {
filename = "/home/deck/.config/pipewire/multiwayCor48.wav"
channel = 0
}
}
{
type = builtin
label = convolver
name = convFR
config = {
filename = "/home/deck/.config/pipewire/multiwayCor48.wav"
channel = 1
}
}
]
inputs = [ "convFL:In" "convFR:In" ]
outputs = [ "convFL:Out" "convFR:Out" ]
}
capture.props = {
node.name = "Legion GO"
media.class = "Audio/Sink"
audio.channels = 2
audio.position = [ FL FR ]
}
playback.props = {
node.name = "Legion GO corrected"
node.passive = true
audio.channels = 2
audio.position = [ FL FR ]
node.target = "alsa_output.pci-0000_c2_00.6.analog-stereo"
}
}
}
]
================================================
FILE: fixed_bugs_changelog.md
================================================
# Bugs changelog
<!-- - (06/30/24) Bazzite 3.5 bug - user reports of booting into a black screen.
- temporary workaround for now is to rollback to an older image.
- instructions:
- try booting unti you see a blank screen. then press `ctrl + alt + f2` for to get a terminal. login + run `steamos-session-select plasma`
which should log you into desktop mode
- then in terminal there, run `bazzite-rollback-helper list` to see available bazzite versions, then run `bazzite-rollback-helper rebase replace-this-with-older-bazzite-version`
- e.g. `bazzite-rollback-helper rebase 40-stable-20240627`
- once the bug is fixed, run `bazzite-rollback-helper rebase stable` to go back to regular updates
- (2024/5/12) Bazzite - some users are reporting issues where they boot into a black screen
- cause is currently unknown and being investigated, most likely related to new gamescope
- if you encounter problems, recommendation is to rollback to a stable image with old gamescope such as 04/27, 04/06, 03/15. see tutorial video https://www.youtube.com/watch?v=gE1ff72g2Gk
- rollback instructions: press esc during boot to get the grub menu, and boot your prior bazziteOS version
- once booted into the previous version, rebase to an older bazzite
- e.g. run `bazzite-rollback-helper rebase 40-20240427` to rebase to Bazzite with old gamescope
- if you want to return to regular updates later, run `bazzite-rollback-helper rebase stable` -->
- (2024/5/12) Bazzite - some users are reporting issues where they boot into a black screen
- cause is currently unknown and being investigated, most likely related to new gamescope
- if you encounter problems, recommendation is to rollback to a stable image with old gamescope such as 04/27, 04/06, 03/15. see tutorial video https://www.youtube.com/watch?v=gE1ff72g2Gk
- rollback instructions: press esc during boot to get the grub menu, and boot your prior bazziteOS version
- once booted into the previous version, rebase to an older bazzite
- e.g. run `bazzite-rollback-helper rebase 40-20240427` to rebase to Bazzite with old gamescope
- if you want to return to regular updates later, run `bazzite-rollback-helper rebase stable`
- (2024/5/5) Bazzite - some users are reporting bugs related to recent new gamescope changes, usually related to refresh rate and fps caps
- try enabling developer mode, then enable Force Compositing in the Developer options
- if force compositing doesn't work, then the recommendation is to rollback to a stable image with old gamescope such as 04/27, 04/06, 03/15.
- if you encounter a failed gpg key error during rebase, please try [this](#failed-to-download-gpg-key-bug-when-trying-to-rebase)
- (2024/04/03) - Steam Client update now causing a bug where after resume, the active game isn't focused properly
- controller after resume will instead interact with SteamUI
- temporary workarounds:
- tap the screen to bring the game back into focus
- press `Steam` or `B/Circle` button a few times to return focus back to the game
- set a Security Pin on Resume. After inputting your pin, it should bring focus back to the game properly.
- disable wake movie in customization settings, see here for github issue: https://github.com/ValveSoftware/SteamOS/issues/1222
- according to github bug report, this issue only happens when "Startup Steam Deck Default" is selected AND "Use as Wake Movie" is enabled, even when there are more custom videos downloaded.
- It does not happen when custom video from Points Shop is selected.
- (2024/03/28) BazziteOS - Ptyxis terminal app might be crashing
- if crashing, switch to the Konsole terminal until the bug gets fixed.
- instructions can be found [here](#enable-konsole-application)
Bazzite - hhd 2.0 bug - game controller stops working when detached/reattached.
- fixed, update to the latest bazzite
(2024-03-13) bazzite suspend bug is fixed, you can go back to regular updates by going back to `stable` via running the following in terminal:
- `rpm-ostree rebase ostree-image-signed:docker://ghcr.io/ublue-os/bazzite-deck:stable`
- (resolved 2/28/2024) Decky Loader has some bugs that are causing issues with menus like the power button menu, exiting games, etc. [bug report](https://github.com/SteamDeckHomebrew/decky-loader/issues/586)
- bugs are being investigated by the Decky devs
- temporary workaround: rollback to Decky v2.10.14
- install script for v2.10.14 [here](./decky_v2_10_14_install.sh)
- nobara now ships unified framelimiter fix + 60fps 30hz bugfix
- SimpleDeckyTDP Plugin - bug where GPU slider is broken, and breaks setting TDP.
- temporary workaround: delete the `$HOME/homebrew/settings/SimpleDeckyTDP/settings.json` file, and then update to the latest SimpleDeckyTDP plugin
- this bug is being actively investigated
- Nobara 39 - bug where controller doesn't work after a clean install or upgrade from Nobara 38.
- fix:
- run this script on Desktop mode
- `curl -L https://raw.githubusercontent.com/aarron-lee/legion-go-tricks/main/add-lgo-xpad-rule.sh | sudo sh`
- if planning on running a dualsense emulator (hhd or rogue), disable handycon too.
- `sudo systemctl disable --now handycon.service`
- then reboot
- Bazzite
- Nested Desktop orientation might be wonky
- Dec 9th 2023 - Nobara desktop mode shortcut might break for users that update their Nobara installation. This should not apply to brand new, clean installations.
- this issue has been fixed on NobaraOS 39
- recent installations by users indicate that this bug has been resolved on Nobara 38
- Manual fix at the bottom of the page [here](#nobara-desktop-mode-switch-temporary-fix)
- (won't fix) Bugs for Pipewire EQ sound improvements - Pipewire EQ sound improvements are an optional sound fix for the LGO, currently is buggy and not recommended
- This is most likely due to a Steam Deck OLED related update.
# outdated guides
### Nobara desktop mode switch temporary fix
- Note, should be fixed now
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
- type in `startplasma-wayland` to start desktop mode
- once in desktop mode, type in `cat /etc/sddm.conf` and confirm whether it looks like the following:
```
[Autologin]
Relogin=true
User=deck(or whatever your username is)
Session=gamescope-session
```
- if it doesn't look correct, edit the file so that it looks correct
- you'll probably need to delete some `#` characters, as well as maybe change `Session` to `gamescope-session`
- save changes
- reboot, and see if the issue is fixed.
If the issue is not fixed, then try the following.
- 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
### 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
### Uninstall Rogue + Install HHD (NobaraOS)
for those that have rogue already installed on NobaraOS and want to try hhd, do the following:
- download + run the uninstall script for rogue: https://github.com/corando98/ROGueENEMY/blob/main/uninstall.sh
- disable handycon: `sudo systemctl disable --now handycon.service`
- disable steam-powerbutton: `sudo systemctl disable --now steam-powerbuttond.service`
- follow the pypi install instructions to install hhd: https://github.com/antheas/hhd#pypi-based-installation-nobararead-only-fs
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.
### 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.
### fix 60hz 144hz nobara
Massive thanks to all the devs who helped diagnose, troubleshoot, and and investigate this issue.
Install Instructions:
1. update NobaraOS from the desktop mode via the `update system` app. then, after rebooting, run the [enable_60_144hz.sh script](./enable_60_144hz.sh) in terminal.
- This script will cleanup old files and setup some extra environment variables you need to enable 144hz
2. Go back to game mode, and in `Display` settings, and turn off `Unified Frame Limit Management`, also make sure you enable/turn on `Use Native Color Temperature` as well.
3. If this fixes your 144Hz, you can stop here
- you should see no artificial 72fps cap in games, and fps limiter should work
- swapping to 60hz should work, and fps limiter should similarly work here
- note that steamUI forces 144hz, you won't see 60hz in steam UI
- WARNING FOR THE REFRESH SLIDER: any values other than 60hz and 144hz is dangerous, make sure to be careful when changing the screen refresh rate
- Update: there's now a fix for the refresh rate slider in BazziteOS, the fixes should eventually be available on NobaraOS and ChimeraOS
4. If steps 1-3 didn't fix your 144hz, continue on to the following:
Download Valve's Neptune Kernel with acpi_call precompiled (thanks [@corando98](https://github.com/corando98/) for compiling the rpm!) [download link, should be the 1.51GB file](https://drive.filen.io/f/9271e6eb-95e7-4deb-bc80-a90a620ebf53#175zrewF3URWgsnNfQMzETlJA4Auy5xo)
```
# (optional) for those that want to verify the file integrity of the download, here's the md5sum
$ md5sum kernel-6.1.52_valve14_1_neptune_acpi_call.x86_64.rpm
bd51cbb23972171026b6219b705f2127 kernel-6.1.52_valve14_1_neptune_acpi_call.x86_64.rpm
```
5. Open the folder where your download is in terminal, and run:
```
sudo dnf install kernel-6.1.52_valve14_1_neptune_acpi_call.x86_64.rpm
```
After install is complete, reboot and go back to desktop mode
6. Run `uname -r` in terminal, and verify that you are running the valve kernel. You should see:
```
6.1.52-valve14-1-neptune-61
```
Also run `sudo modprobe acpi_call` in terminal, you should see no errors
7. Retest and see if you're seeing any issues on 144Hz
# Deprecated Resources
steam-patch (for TDP control, some steam glyphs, etc) - https://github.com/corando98/steam-patch
rogue-enemy (deprecated, no longer maintained) - PS5 Dualsense Edge Emulator - https://github.com/corando98/ROGueENEMY/
LegionGoRefreshRates Decky Plugin - experimental plugin for changing default screen resolution in game mode. https://github.com/aarron-lee/LegionGoRefreshRate
================================================
FILE: fuzzy-sound-suspend-fix/README.md
================================================
# Fuzzy sound after suspend fix
Source: https://www.reddit.com/r/SteamDeck/comments/1eh99as/distorted_audio_after_waking_up_your_steam_deck/
This fix reportedly fixes distorted audio after waking up the steam deck.
It might help on other devices too
You should also consider using the "Pause Games" Decky Plugin, which helps with sound suspend issues.
# For SteamOS users
Make sure to set up your user password (skip this step if you already have it):
1. Open terminal of your choice (Konsole is the default one on SteamOS)
- Note that the letters won't be visible while entering password, this is normal
- DO NOT FORGET YOUR PASSWORD, IT'S NOT EASY TO RECOVER.
- This password is separate from your steam password, this is a password for your local device account.
2. Inside the terminal, type passwd and create your new user password
# Install
Make sure you have a sudo password set, you'll need it for the install/uninstall process
Run in terminal:
```bash
curl -L https://github.com/aarron-lee/legion-go-tricks/raw/main/fuzzy-sound-suspend-fix/install.sh | sudo sh
```
# Uninstall
Run in terminal
```bash
curl -L https://github.com/aarron-lee/legion-go-tricks/raw/main/fuzzy-sound-suspend-fix/uninstall.sh | sudo sh
```
================================================
FILE: fuzzy-sound-suspend-fix/install.sh
================================================
#/bin/bash
# workaround for fuzzy sound on resume
# source: https://www.reddit.com/r/SteamDeck/comments/1eh99as/distorted_audio_after_waking_up_your_steam_deck/
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root, use sudo" >&2
exit 1
fi
systemctl disable --now pipewire-fix-audio-after-suspend.service
HOME_DIR=$(getent passwd "$SUDO_USER" | cut -d: -f6)
HOME_USER="${SUDO_USER:-${USER}}"
cat <<EOF > "/etc/systemd/system/pipewire-fix-audio-after-suspend.service"
[Unit]
Description=A workaround for distorted audio after suspend
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
[Service]
Type=oneshot
User=$HOME_USER
Environment="XDG_RUNTIME_DIR=/run/user/1000"
ExecStart=/bin/bash "$HOME_DIR/.local/bin/pipewire-fix-audio-after-suspend.sh"
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
EOF
mkdir -p $HOME_DIR/.local/bin
SCRIPT_PATH=$HOME_DIR/.local/bin/pipewire-fix-audio-after-suspend.sh
cat <<'EOF' > "$SCRIPT_PATH"
#!/bin/env bash
set -o errexit
cmd_output="$(pw-metadata -n settings 0 clock.force-quantum)"
regex="^.{1,}value:'([[:digit:]]{1,})'.{1,}$"
[[ $cmd_output =~ $regex ]] && old_quantum="${BASH_REMATCH[1]}" || exit 1
[ $old_quantum != 0 ] && temp_quantum=$(( $old_quantum - 1 )) || temp_quantum=16
pw-metadata -n settings 0 clock.force-quantum $temp_quantum
pw-metadata -n settings 0 clock.force-quantum $old_quantum
EOF
chmod +x $SCRIPT_PATH
if [[ -f "$json_file" ]]; then
image_name=$(grep -oP '"image-name"\s*:\s*"\K[^"]+' "$json_file")
if [[ "$image_name" =~ bazzite ]]; then
echo "bazzite detected, handling for SE Linux"
chcon -u system_u -r object_r --type=bin_t $SCRIPT_PATH
else
echo "The image-name is not 'bazzite', it is '$image_name'."
fi
else
echo "Bazzite not detected, skipping Bazzite steps"
fi
systemctl daemon-reload
systemctl enable --now pipewire-fix-audio-after-suspend.service
================================================
FILE: fuzzy-sound-suspend-fix/uninstall.sh
================================================
#/bin/bash
# workaround for fuzzy sound on resume
# source: https://www.reddit.com/r/SteamDeck/comments/1eh99as/distorted_audio_after_waking_up_your_steam_deck/
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root, use sudo" >&2
exit 1
fi
HOME_DIR=$(getent passwd "$SUDO_USER" | cut -d: -f6)
# Uninstall
sudo systemctl disable --now pipewire-fix-audio-after-suspend.service
sudo rm /etc/systemd/system/pipewire-fix-audio-after-suspend.service
sudo rm $HOME_DIR/.local/bin/pipewire-fix-audio-after-suspend.sh
================================================
FILE: hardware_documentation.md
================================================
## Documentation for which Antenna Cable inside the GO does what.
White and Black cables are Wifi. Gray is Bluetooth.
The Top empty connector is actually really just a free connector.
credit to @n1GHT on discord

## FPS mode pin.
> So you can completely remove the board and cable if you short the two red points together the larger one is ground the next one is the pin that represents the FPS switch if you connect that PIN to ground it's the same as putting it in gamepad mode.
Credit to @rahlquist on discord

================================================
FILE: icc_color/README.md
================================================
# ICC color profiles
thanks @adolfotregosa on discord!
icc color profiles tuned for sRGB on the LGO display
ICC works only under linux and only wayland. KDE6 and GNOME 46/47 should also correct gamut.
# Apply lut to gamescope-session
vkBasalt must be installed. Bazzite ships with vkBasalt.
download vkBasalt.conf, and place it here:
`~/.config/vkBasalt/vkBasalt.conf`
also, download the `lut_18.png` file, and place it in the `~/.config/vkBasalt` folder.
Then, edit the `vkBasalt.conf` file and update the lutFile to the correct path
```
lutFile = "/path/to/lut_file/lut_18.png"
```
to enable it globally, edit the `/etc/environment` file and add the following:
```bash
ENABLE_VKBASALT=1
```
Then in gamescope-session, the `home` button (on a keyboard) will toggle it on/off.
If you do not want it enabled globally, you must add `ENABLE_VKBASALT=1 %command%` for each game.
It currently only works for applications that use Vulkan. For OpenGL games, you can try using Zink with the following command:
`ENABLE_VKBASALT=1 MESA_LOADER_DRIVER_OVERRIDE=zink %command%`
================================================
FILE: icc_color/vkBasalt.conf
================================================
#effects is a colon seperated list of effect to use
#e.g.: effects = fxaa:cas
#effects will be run in order from left to right
#one effect can be run multiple times e.g. smaa:smaa:cas
#cas - Contrast Adaptive Sharpening
#dls - Denoised Luma Sharpening
#fxaa - Fast Approximate Anti-Aliasing
#smaa - Enhanced Subpixel Morphological Antialiasing
#lut - Color LookUp Table
effects = lut
reshadeTexturePath = "/path/to/reshade-shaders/Textures"
reshadeIncludePath = "/path/to/reshade-shaders/Shaders"
depthCapture = off
#toggleKey toggles the effects on/off
toggleKey = Home
#enableOnLaunch sets if the effects are enabled when started
enableOnLaunch = True
#casSharpness specifies the amount of sharpning in the CAS shader.
#0.0 less sharp, less artefacts, but not off
#1.0 maximum sharp more artefacts
#Everything in between is possible
#negative values sharpen even less, up to -1.0 make a visible difference
casSharpness = 0.4
#dlsSharpness specifies the amount of sharpening in the Denoised Luma Sharpening shader.
#Increase to sharpen details within the image.
#0.0 less sharp, less artefacts, but not off
#1.0 maximum sharp more artefacts
dlsSharpness = 0.5
#dlsDenoise specifies the amount of denoising in the Denoised Luma Sharpening shader.
#Increase to limit how intensely film grain within the image gets sharpened.
#0.0 min
#1.0 max
dlsDenoise = 0.17
#fxaaQualitySubpix can effect sharpness.
#1.00 - upper limit (softer)
#0.75 - default amount of filtering
#0.50 - lower limit (sharper, less sub-pixel aliasing removal)
#0.25 - almost off
#0.00 - completely off
fxaaQualitySubpix = 0.75
#fxaaQualityEdgeThreshold is the minimum amount of local contrast required to apply algorithm.
#0.333 - too little (faster)
#0.250 - low quality
#0.166 - default
#0.125 - high quality
#0.063 - overkill (slower)
fxaaQualityEdgeThreshold = 0.125
#fxaaQualityEdgeThresholdMin trims the algorithm from processing darks.
#0.0833 - upper limit (default, the start of visible unfiltered edges)
#0.0625 - high quality (faster)
#0.0312 - visible limit (slower)
#Special notes: due to the current implementation you
#Likely want to set this to zero.
#As colors that are mostly not-green
#will appear very dark in the green channel!
#Tune by looking at mostly non-green content,
#then start at zero and increase until aliasing is a problem.
fxaaQualityEdgeThresholdMin = 0.0312
#smaaEdgeDetection changes the edge detection shader
#luma - default
#color - might catch more edges, but is more expensive
smaaEdgeDetection = luma
#smaaThreshold specifies the threshold or sensitivity to edges
#Lowering this value you will be able to detect more edges at the expense of performance.
#Range: [0, 0.5]
#0.1 is a reasonable value, and allows to catch most visible edges.
#0.05 is a rather overkill value, that allows to catch 'em all.
smaaThreshold = 0.05
#smaaMaxSearchSteps specifies the maximum steps performed in the horizontal/vertical pattern searches
#Range: [0, 112]
#4 - low
#8 - medium
#16 - high
#32 - ultra
smaaMaxSearchSteps = 32
#smaaMaxSearchStepsDiag specifies the maximum steps performed in the diagonal pattern searches
#Range: [0, 20]
#0 - low, medium
#8 - high
#16 - ultra
smaaMaxSearchStepsDiag = 16
#smaaCornerRounding specifies how much sharp corners will be rounded
#Range: [0, 100]
#25 is a reasonable value
smaaCornerRounding = 25
#lutFile is the path to the LUT file that will be used
#supported are .CUBE files and .png with width == height * height
lutFile = "/path/to/lut"
================================================
FILE: old_scripts/add-lgo-xpad-rule.sh
================================================
#/bin/bash
echo 'adding missing x-box gamepad udev rule'
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root, use sudo" >&2
exit 1
fi
touch /etc/udev/rules.d/50-lenovo-legion-controller.rules
cat <<EOF >> "/etc/udev/rules.d/50-lenovo-legion-controller.rules"
# Lenovo Legion Go
ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6182", RUN+="/sbin/modprobe xpad" RUN+="/bin/sh -c 'echo 17ef 6182 > /sys/bus/usb/drivers/xpad/new_id'"
EOF
udevadm control --reload-rules
udevadm trigger
echo 'complete!'
================================================
FILE: old_scripts/add_return_to_desktop.sh
================================================
#/bin/bash
echo "Nobara OS v39 repair"
echo 'adding return to desktop icon'
if [ "$EUID" -eq 0 ]; then
echo "This script must be not be run as root, don't use sudo" >&2
exit 1
fi
cat <<EOF >> "$HOME/Desktop/return.desktop"
[Desktop Entry]
Name=Return to Gaming Mode
Exec=steamos-desktop-return
Icon=steamdeck-gaming-return
Terminal=false
Type=Application
StartupNotify=false
EOF
chmod +x $HOME/Desktop/return.desktop
echo "done!"
================================================
FILE: old_scripts/bazzite-disable-swipe-gestures.sh
================================================
#!/usr/bin/bash
echo "disabling swipe gestures for QAM and HOME"
mkdir -p $HOME/.config/environment.d
cat <<EOF > "$HOME/.config/environment.d/bazzite-disable-gamescope-gestures.conf"
export GAMESCOPE_DISABLE_TOUCH_GESTURES=1
EOF
echo "Done. Please restart Steam Game Mode to see changes"
echo "if you wish to undo these change, delete the $HOME/.config/environment.d/bazzite-disable-gamescope-gestures.conf file"
================================================
FILE: old_scripts/bazzite-install-rollback-helper.sh
================================================
#!/usr/bin/bash
# Ensure not running as root
if [ "$EUID" -eq 0 ]; then
echo "This script must not be run as root." >&2
exit 1
fi
echo "installing bazzite rollback helper"
# download + setup rollback helper
cd /tmp
git clone https://github.com/aarron-lee/legion-go-tricks.git
cd /tmp/legion-go-tricks/old_scripts
mkdir -p $HOME/.local/bin
chmod +x ./bazzite-rollback-helper
cp bazzite-rollback-helper ~/.local/bin/
sudo chcon -u system_u -r object_r --type=bin_t $HOME/.local/bin/bazzite-rollback-helper
rm -rf /tmp/legion-go-tricks
echo "Installation complete. run 'bazzite-rollback-helper -h' in terminal"
================================================
FILE: old_scripts/bazzite-nested-desktop-resolution.sh
================================================
#!/usr/bin/bash
WIDTH=1920
HEIGHT=1200
echo "Enabling resolution $WIDTH $HEIGHT. If you wish to use different values, edit the script"
mkdir -p $HOME/.config/environment.d
cat <<EOF > "$HOME/.config/environment.d/bazzite-nested-desktop-resolution.conf"
export STEAMOS_NESTED_DESKTOP_WIDTH=$WIDTH
export STEAMOS_NESTED_DESKTOP_HEIGHT=$HEIGHT
EOF
echo "Done. Please restart Steam Game Mode to see changes"
echo "make sure you change the Steam resolution setting to match the resolution you set"
================================================
FILE: old_scripts/bazzite-rollback-helper
================================================
#!/bin/bash
image="$(echo $2 | cut -d ':' -f1)"
branch="$(echo $2 | cut -d ':' -f2)"
IMAGE_INFO="/usr/share/ublue-os/image-info.json"
DEFAULT_IMAGE=$(jq -r '."image-name"' < $IMAGE_INFO)
DEFAULT_BRANCH=stable
helptext=$(cat << EOF
====== Experimental Bazzite Rollback Helper Util ======
This Tool is not made or supported by Bazzite devs,
but aims to help with rollbacks and rebases
Usage: ./bazzite-rollback-helper [OPTION] [ARGUMENT]
Usage: bazzite-rollback-helper [OPTION] [ARGUMENT]
Options:
list List available Bazzite images, Default is "$DEFAULT_BRANCH"
rollback Rolls back to previously installed Bazzite image. alias for "rpm-ostree rollback"
current Show currently active Bazzite image
rebase Rebase/rollback to specified Bazzite image, Default is $DEFAULT_IMAGE:$DEFAULT_BRANCH
Examples:
bazzite-rollback-helper list stable
bazzite-rollback-helper rollback
bazzite-rollback-helper current
bazzite-rollback-helper rebase bazzite-deck:39-20240315
bazzite-rollback-helper rebase bazzite-deck:stable
For help, visit https://discord.bazzite.gg.
EOF
)
if [[ "$1" == "list" ]]; then
if [ -z "$2" ]; then
echo "Listing images for $DEFAULT_BRANCH"
skopeo list-tags docker://ghcr.io/ublue-os/bazzite | grep -E "\"$DEFAULT_BRANCH-[0-9]+\.[0-9]+|-$DEFAULT_BRANCH-[0-9]+" | sort -rV
else
echo "Listing images for $2"
skopeo list-tags docker://ghcr.io/ublue-os/bazzite | grep -E "\"$2-[0-9]+\.[0-9]+|-$2-[0-9]+" | sort -rV
fi
elif [[ "$1" == "rollback" ]]; then
rpm-ostree rollback
elif [[ "$1" == "current" ]]; then
# current image
rpm-ostree status | grep ●
# current version
rpm-ostree status | grep -A 5 "●" | tail -n +2
elif [[ "$1" == "rebase" ]]; then
base_image=ostree-image-signed:docker://ghcr.io/ublue-os
rebase_target=$DEFAULT_IMAGE:$DEFAULT_BRANCH
if [ -z "$2" ]; then
rebase_target=$DEFAULT_IMAGE:$DEFAULT_BRANCH
else
if [ "$image" == "$branch" ]; then
# only branch was provided as an arg, use default image
rebase_target=$DEFAULT_IMAGE:$branch
else
rebase_target=$image:$branch
fi
fi
full_image_path=$base_image/$rebase_target
question=$(cat <<EOF
Rebasing to $full_image_path. Continue? [y/N]:
EOF
)
read -p "$question" yn
case $yn in
[Yy]) echo "rebasing to $rebase_target" && rpm-ostree rebase $full_image_path;;
*) echo "Unknown option, exiting.";;
esac
# display the helptext
elif [[ "$1" == "-h" || "$1" == "--h" || "$1" == "-help" || "$1" == "--help" || "$1" == "help" || -z "$1" ]]; then
echo "$helptext"
else
echo "Unsupported Option: $1"
echo "run 'bazzite-rollback-helper help' for more details"
fi
================================================
FILE: old_scripts/bazzite-waydroid-resolution.sh
================================================
#!/usr/bin/bash
WIDTH=1920
HEIGHT=1200
DPI=340
echo "Enabling resolution $WIDTH $HEIGHT, and DPI $DPI for waydroid. If you wish to use different values, edit the script"
mkdir -p $HOME/.config/environment.d
cat <<EOF > "$HOME/.config/environment.d/bazzite-waydroid-resolution.conf"
export WAYDROID_WIDTH=$WIDTH
export WAYDROID_HEIGHT=$HEIGHT
export WAYDROID_DENSITY=$DPI
EOF
echo "Done. Please restart Steam Game Mode to see changes"
echo "make sure you change the Steam resolution setting to match the resolution you set"
================================================
FILE: old_scripts/decky_v2_10_14_install.sh
================================================
#!/bin/sh
[ "$UID" -eq 0 ] || exec sudo "$0" "$@"
# check if JQ is installed
if ! command -v jq &> /dev/null
then
echo "JQ could not be found, please install it"
echo "Info on how to install it can be found at https://stedolan.github.io/jq/download/"
exit 1
fi
# check if github.com is reachable
if ! curl -Is https://github.com | head -1 | grep 200 > /dev/null
then
echo "Github appears to be unreachable, you may not be connected to the internet"
exit 1
fi
echo "Installing Steam Deck Plugin Loader release..."
USER_DIR="$(getent passwd $SUDO_USER | cut -d: -f6)"
HOMEBREW_FOLDER="${USER_DIR}/homebrew"
# Create folder structure
rm -rf "${HOMEBREW_FOLDER}/services"
sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/services"
sudo -u $SUDO_USER mkdir -p "${HOMEBREW_FOLDER}/plugins"
sudo -u $SUDO_USER touch "${USER_DIR}/.steam/steam/.cef-enable-remote-debugging"
# if installed as flatpak, put .cef-enable-remote-debugging there
[ -d "${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/" ] && sudo -u "$SUDO_USER touch ${USER_DIR}/.var/app/com.valvesoftware.Steam/data/Steam/.cef-enable-remote-debugging"
# Download latest release and install it
RELEASE=$(curl -s 'https://api.github.com/repos/SteamDeckHomebrew/decky-loader/releases' | jq -r '.[] | select(.tag_name == "v2.10.14")')
VERSION=$(jq -r '.tag_name' <<< ${RELEASE} )
DOWNLOADURL=$(jq -r '.assets[].browser_download_url | select(endswith("PluginLoader"))' <<< ${RELEASE})
printf "Installing version %s...\n" "${VERSION}"
curl -L $DOWNLOADURL --output ${HOMEBREW_FOLDER}/services/PluginLoader
chmod +x ${HOMEBREW_FOLDER}/services/PluginLoader
echo "Check for SELinux presence and if it is present, set the correct permission on the binary file..."
hash getenforce 2>/dev/null && getenforce | grep "Enforcing" >/dev/null && chcon -t bin_t ${HOMEBREW_FOLDER}/services/PluginLoader
echo $VERSION > ${HOMEBREW_FOLDER}/services/.loader.version
systemctl --user stop plugin_loader 2> /dev/null
systemctl --user disable plugin_loader 2> /dev/null
systemctl stop plugin_loader 2> /dev/null
systemctl disable plugin_loader 2> /dev/null
curl -L https://raw.githubusercontent.com/SteamDeckHomebrew/decky-loader/main/dist/plugin_loader-release.service --output ${HOMEBREW_FOLDER}/services/plugin_loader-release.service
cat > "${HOMEBREW_FOLDER}/services/plugin_loader-backup.service" <<- EOM
[Unit]
Description=SteamDeck Plugin Loader
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
Restart=always
ExecStart=${HOMEBREW_FOLDER}/services/PluginLoader
WorkingDirectory=${HOMEBREW_FOLDER}/services
KillSignal=SIGKILL
Environment=PLUGIN_PATH=${HOMEBREW_FOLDER}/plugins
Environment=LOG_LEVEL=INFO
[Install]
WantedBy=multi-user.target
EOM
if [[ -f "${HOMEBREW_FOLDER}/services/plugin_loader-release.service" ]]; then
printf "Grabbed latest release service.\n"
sed -i -e "s|\${HOMEBREW_FOLDER}|${HOMEBREW_FOLDER}|" "${HOMEBREW_FOLDER}/services/plugin_loader-release.service"
cp -f "${HOMEBREW_FOLDER}/services/plugin_loader-release.service" "/etc/systemd/system/plugin_loader.service"
else
printf "Could not curl latest release systemd service, using built-in service as a backup!\n"
rm -f "/etc/systemd/system/plugin_loader.service"
cp "${HOMEBREW_FOLDER}/services/plugin_loader-backup.service" "/etc/systemd/system/plugin_loader.service"
fi
mkdir -p ${HOMEBREW_FOLDER}/services/.systemd
cp ${HOMEBREW_FOLDER}/services/plugin_loader-release.service ${HOMEBREW_FOLDER}/services/.systemd/plugin_loader-release.service
cp ${HOMEBREW_FOLDER}/services/plugin_loader-backup.service ${HOMEBREW_FOLDER}/services/.systemd/plugin_loader-backup.service
rm ${HOMEBREW_FOLDER}/services/plugin_loader-backup.service ${HOMEBREW_FOLDER}/services/plugin_loader-release.service
systemctl daemon-reload
systemctl start plugin_loader
systemctl enable plugin_loader
================================================
FILE: old_scripts/desktopmode-autoscale.sh
================================================
#!/usr/bin/env bash
SCALE=1.5
IS_GAMEMODE="$(cat /proc/*/comm | grep gamescope-ses*)"
# this is to prevent the autoscale from kicking in on nested desktop
if [[ -z "$IS_GAMEMODE" ]] ;
then
# This script was modified for to set the screen scale in the Desktop Mode in KDE
# Original Author: d3Xt3r
# source: https://github.com/d3-X-t3r/LinuxThings/blob/main/bazzite-rotation-fix.sh
#
# - Save this script somewhere and mark it as executabe (chmod +x ./desktopmode-autoscale.sh)
# - Add it to your KDE Autostart config (Menu > search for Autostart > Add)
sleep 8
echo $(date '+%Y-%m-%d %H:%M:%S') Starting Autoscale Fix script...| tee -a /tmp/desktop-mode-scale.log
# This bit is needed to allow enough time for the desktop to load, otherwise the fix won't work
# Since Steam launches automatically in the Desktop mode in Bazzite-Deck, we can use it
# to determine whether or not the desktop has loaded.
while ! pgrep -x "steam" > /dev/null; do
echo $(date '+%Y-%m-%d %H:%M:%S') Waiting for Steam to start.. | tee -a /tmp/desktop-mode-scale.log
sleep 1.5
done
sleep 1
# Debug: Get current outputs
kscreen-doctor --outputs 2>&1 | tee -a /tmp/desktop-mode-scale.log
# Fix desktop orientation
# Rotation options: right, normal, left, inverted
echo $(date '+%Y-%m-%d %H:%M:%S') Fixing desktop scale... | tee -a /tmp/desktop-mode-scale.log
kscreen-doctor output.1.scale.$SCALE 2>&1 | tee -a /tmp/desktop-mode-scale.log
echo $(date '+%Y-%m-%d %H:%M:%S') Ending Desktop Scale Fix script >> /tmp/desktop-mode-scale.log
echo -e '\n' >> /tmp/desktop-mode-scale.log
echo "complete!"
fi
================================================
FILE: old_scripts/disable_color_management.sh
================================================
#!/usr/bin/bash
# Lenovo Legion Go script
# does the following:
# - disable steam color management
echo "Before trying this fix, did you try enabling the 'Use Native Color Temperature' toggle in the 'Display' settings in game mode?"
echo "disabling steam color management"
# disable steam color management
mkdir -p $HOME/.config/environment.d
cat <<EOF > "$HOME/.config/environment.d/disable-steam-color-management.conf"
export STEAM_GAMESCOPE_COLOR_MANAGED=0
EOF
================================================
FILE: old_scripts/disable_refresh_rates.sh
================================================
#!/usr/bin/bash
echo "force enabling 60Hz mode"
mkdir -p $HOME/.config/environment.d
rm -f $HOME/.config/environment.d/disable-refresh-rates.conf
cat <<EOF > "$HOME/.config/environment.d/override-gamescopecmd.conf"
export GAMESCOPECMD="\$GAMESCOPECMD -r 60 "
export STEAM_DISPLAY_REFRESH_LIMITS=""
EOF
echo "done, please reboot"
================================================
FILE: old_scripts/enable-acpi-call.sh
================================================
#/bin/bash
echo 'enabling acpi call on boot'
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root, use sudo" >&2
exit 1
fi
touch /etc/modules-load.d/acpi-call.conf
cat <<EOF >> "/etc/modules-load.d/acpi-call.conf"
acpi_call
EOF
echo 'complete, reboot for changes to take effect'
================================================
FILE: old_scripts/enable_144hz.sh
================================================
#!/usr/bin/bash
echo "Enabling 144Hz in Game Mode (Note, 144Hz is still buggy in Game mode)"
mkdir -p $HOME/.config/environment.d
rm -f $HOME/.config/environment.d/disable-refresh-rates.conf
cat <<EOF > "$HOME/.config/environment.d/override-gamescopecmd.conf"
export GAMESCOPECMD="\$GAMESCOPECMD -r 144 "
export STEAM_DISPLAY_REFRESH_LIMITS="60,144"
EOF
echo "Done. Please restart Steam Game Mode to see changes"
================================================
FILE: old_scripts/enable_60_144hz.sh
================================================
#!/usr/bin/bash
echo "Enabling 60hz + 144hz."
mkdir -p $HOME/.config/environment.d
rm -f $HOME/.config/environment.d/disable-refresh-rates.conf
rm -f $HOME/.config/environment.d/override-gamescopecmd.conf
# remove previous workaround plugin
sudo rm -rf $HOME/homebrew/plugins/LegionGoRefreshRate
cat <<EOF > "$HOME/.config/environment.d/override-gamescopecmd.conf"
export ENABLE_GAMESCOPE_WSI=1
export STEAM_DISPLAY_REFRESH_LIMITS=60,144
EOF
sudo systemctl restart plugin_loader.service
echo "Done. Please restart Steam Game Mode to see changes"
================================================
FILE: old_scripts/enable_60hz.sh
================================================
#!/usr/bin/bash
echo "Enabling 60Hz in Game Mode"
mkdir -p $HOME/.config/environment.d
rm -f $HOME/.config/environment.d/disable-refresh-rates.conf
cat <<EOF > "$HOME/.config/environment.d/override-gamescopecmd.conf"
export GAMESCOPECMD="\$GAMESCOPECMD -r 60 "
export STEAM_DISPLAY_REFRESH_LIMITS=""
EOF
echo "Done. Please restart Steam Game Mode to see changes"
================================================
FILE: old_scripts/headphone-connection-monitor.sh
================================================
#!/usr/bin/bash
DECK_SINK=37
DECK_SOURCE=$(wpctl status | grep Echo | grep Source | cut -d " " -f 7 | cut -d "." -f 1)
DECK_SINK_VOL=$(wpctl get-volume $DECK_SINK | cut -d " " -f 2)
DECK_SOURCE_VOL=$(wpctl get-volume $DECK_SOURCE | cut -d " " -f 2)
SINK_LIST=$(pactl list sinks | grep 'Sink #' | cut -d "#" -f 2)
SOURCE_LIST=$(pactl list sources | grep 'Source #' | cut -d "#" -f 2)
max_device_volumes()
{
for SINK in $SINK_LIST
do
if [[ $SINK != $DECK_SINK) ]]; then
wpctl set-volume $SINK 1.0
fi
done
for SOURCE in $SOURCE_LIST
do
if [[ $SINK != $DECK_SINK $DECK_SOURCE) ]]; then
wpctl set-volume $SOURCE 1.0
fi
done
}
while true; do
if [[ -z $(pactl list sinks | grep "Active Port: analog-output-headphones") ]]; then
max_device_volumes
else
max_device_volumes
fi
sleep 1
done
================================================
FILE: old_scripts/increase_swap_zram.sh
================================================
#!/usr/bin/bash
echo "increasing zram swap"
sudo cat <<EOF > "/etc/systemd/zram-generator.conf"
[zram0]
zram-size=ram*2
compression-algorithm=lz4
EOF
echo "done. reboot required"
================================================
FILE: old_scripts/lgo_bazzite_setup.sh
================================================
#!/usr/bin/bash
# Lenovo Legion Go Bazzite setup script
# does the following:
# - basic TDP control via SimpleDeckyTDP plugin
# - RGB control via LegionGoRemapper Decky Plugin
# - Pipewire EQ fixes from matt_schartz
BUILD_DIR="/tmp/LGO_bazzite_setup"
# Define the user's home directory
# This ensures that we get the original user's home directory, not root's
if [ "$SUDO_USER" ]; then
HOME_DIR=$(getent passwd "$SUDO_USER" | cut -d: -f6)
else
HOME_DIR=$HOME
fi
# Ensure running as root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root." >&2
exit 1
fi
mkdir -p $BUILD_DIR
cd $BUILD_DIR
echo "installing SimpleDeckyTDP plugin"
# download + install Simple TDP Decky Plugin
curl -L $(curl -s https://api.github.com/repos/aarron-lee/SimpleDeckyTDP/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o $BUILD_DIR/SimpleDeckyTDP.tar.gz
tar -xzf SimpleDeckyTDP.tar.gz -C $HOME_DIR/homebrew/plugins
echo "installing LegionGoRemapper plugin for RGB control"
# download + install Legion go remapper
curl -L $(curl -s https://api.github.com/repos/aarron-lee/LegionGoRemapper/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o $BUILD_DIR/LegionGoRemapper.tar.gz
tar -xzf LegionGoRemapper.tar.gz -C $HOME_DIR/homebrew/plugins
echo "installing pipewire EQ sound improvements"
# download + setup pipewire EQ sound improvements
git clone https://github.com/matte-schwartz/device-quirks.git
cd device-quirks/usr/share/device-quirks/scripts/lenovo/legion-go
mv pipewire /etc
cd $BUILD_DIR
# install complete, remove build dir
cd /
rm -rf $BUILD_DIR
echo "Installation complete"
================================================
FILE: old_scripts/lgo_nobara_setup.sh
================================================
#!/usr/bin/bash
# Lenovo Legion Go setup script
# does the following:
# - headphone connection-monitor script fix
# - basic TDP control via SimpleDeckyTDP plugin
# - RGB control via LegionGoRemapper Decky Plugin
# - Pipewire EQ fixes from matt_schartz
BUILD_DIR="/tmp/LGO_nobara_setup"
# Define the user's home directory
# This ensures that we get the original user's home directory, not root's
if [ "$SUDO_USER" ]; then
HOME_DIR=$(getent passwd "$SUDO_USER" | cut -d: -f6)
else
HOME_DIR=$HOME
fi
# Ensure running as root
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root." >&2
exit 1
fi
echo "Installing Headphone Connection fix for Pipewire EQ..."
# backup old version
cp /usr/bin/headphone-connection-monitor.sh /usr/bin/headphone-connection-monitor.sh.bak
# add fixed up headphone connection monitor for Pipewire EQ sound fix
cp ./headphone-connection-monitor.sh /usr/bin/headphone-connection-monitor.sh
mkdir -p $BUILD_DIR
cd $BUILD_DIR
echo "installing SimpleDeckyTDP plugin"
# download + install Simple TDP Decky Plugin
curl -L $(curl -s https://api.github.com/repos/aarron-lee/SimpleDeckyTDP/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o $BUILD_DIR/SimpleDeckyTDP.tar.gz
tar -xzf SimpleDeckyTDP.tar.gz -C $HOME_DIR/homebrew/plugins
echo "installing LegionGoRemapper plugin for RGB control"
# download + install Legion go remapper
curl -L $(curl -s https://api.github.com/repos/aarron-lee/LegionGoRemapper/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -o $BUILD_DIR/LegionGoRemapper.tar.gz
tar -xzf LegionGoRemapper.tar.gz -C $HOME_DIR/homebrew/plugins
echo "installing pipewire EQ sound improvements"
# download + setup pipewire EQ sound improvements
git clone https://github.com/matte-schwartz/device-quirks.git
cd device-quirks/usr/share/device-quirks/scripts/lenovo/legion-go
mv pipewire /etc
cd $BUILD_DIR
# install complete, remove build dir
cd /
rm -rf $BUILD_DIR
echo "Installation complete"
================================================
FILE: old_scripts/setup_battery_indicator_overlay.sh
================================================
#!/usr/bin/bash
echo "configuring preset 1 of performance overlay to display battery levels"
# configure mangohud 1st preset for battery
mkdir -p $HOME/.config/MangoHud
cat <<EOF > "$HOME/.config/MangoHud/presets.conf"
[preset 1]
battery=1
fps=0
cpu_stats=0
gpu_stats=0
frame_timing=0
EOF
================================================
FILE: old_scripts/troubleshooting_report.sh
================================================
#!/bin/bash
# Determine the username of the non-root user who invoked sudo, or use the current user if not run with sudo
if [ -n "$SUDO_USER" ]; then
USERNAME=$SUDO_USER
else
USERNAME=$(whoami)
fi
# Define user's home directory
USER_HOME=$(getent passwd "$USERNAME" | cut -d: -f6)
# Define the output file
OUTPUT_FILE="$USER_HOME/gathered_info.txt"
# Clear the output file or create it if it doesn't exist
> "$OUTPUT_FILE"
# Gather information from various sources
{
echo "----- $USER_HOME/.gamescope-cmd.log -----"
cat "$USER_HOME/.gamescope-cmd.log" 2>/dev/null || echo "File not found: $USER_HOME/.gamescope-cmd.log"
echo "----- $USER_HOME/.gamescope-stdout.log -----"
cat "$USER_HOME/.gamescope-stdout.log" 2>/dev/null || echo "File not found: $USER_HOME/.gamescope-stdout.log"
echo "----- drm_info Output -----"
drm_info
echo "----- Device Quirks -----"
cat /usr/share/gamescope-session-plus/device-quirks 2>/dev/null || echo "File not found: /usr/share/gamescope-session-plus/device-quirks"
echo "----- ls -al /usr/bin | grep mango -----"
ls -al /usr/bin | grep mango
echo "----- Contents of $USER_HOME/.config/environment.d/ -----"
mkdir -p $USER_HOME/.config/environment.d
cat "$USER_HOME/.config/environment.d/"* 2>/dev/null || echo "No files found in $USER_HOME/.config/environment.d/"
} >> "$OUTPUT_FILE"
# Display a message
echo "Information gathered in $OUTPUT_FILE"
================================================
FILE: py_modules/disable_trackpad.py
================================================
import hid
import time
# Global variables
vendor_id = 0x17EF
product_id_match = lambda x: x & 0xFFF0 == 0x6180
usage_page = 0xFFA0
global_config = None # Global configuration for the device
try:
# Enumerate and set the global configuration
for dev in hid.enumerate(vendor_id):
if product_id_match(dev["product_id"]) and dev["usage_page"] == usage_page:
global_config = dev
break
except Exception as e:
print(e)
if not global_config:
print(e)
else:
print(global_config)
def send_command(command):
assert len(command) == 64 and global_config
try:
with hid.Device(path=global_config['path']) as device:
device.write(command)
print("Command sent successfully.")
except IOError as e:
print(f"Error opening HID device: {e}")
def create_touchpad_command(enable):
"""
Create a command to enable or disable the touchpad.
:param enable: bool - True to enable, False to disable the touchpad
:return: bytes - The command byte array
"""
enable_byte = 0x01 if enable else 0x00
command = [
0x05,
0x06, # Report ID and Length
0x6B, # Command (Nibble 6 + b)
0x02, # Command sub-parameter
0x04, # Right Controller
enable_byte, # Enable/Disable flag
0x01 # All commands end with 0x01
]
byte_command = bytes(command)
# Pad the byte_command with 0xCD to meet the length of 64 bytes
buffered_command = byte_command + bytes([0xCD] * (64 - len(byte_command)))
return buffered_command
def create_rgb_control_command(controller, mode, color, brightness, speed, profile=0x01, on=True):
"""
Create a command to control the RGB LEDs, including setting the profile and turning them on or off.
:param controller: byte - The controller byte (0x03 for left, 0x04 for right)
:param mode: byte - The mode of the LED (e.g., 0x01 for solid, 0x02 for blinking)
:param color: bytes - The RGB color value (e.g., b'\xFF\x00\x00' for red)
:param brightness: byte - The brightness value (0x00 to 0x64)
:param speed: byte - The speed setting for dynamic modes (0x00 to 0x64, higher is slower)
:param profile: byte - The profile number
:param on: bool - True to turn on, False to turn off the RGB LEDs
:return: bytes - The command byte array
"""
on_off_byte = 0x01 if on else 0x00
command = [
0x05, 0x0c if on else 0x06, # Report ID and Length (0x0c for setting profile, 0x06 for on/off)
0x72 if on else 0x70, # Command (Nibble 7 + 2 for profile, 7 + 0 for on/off)
0x01, controller
]
if on:
# Adding profile settings when turning on
command += [mode] + list(color) + [brightness, speed, profile, 0x01]
else:
# Adding the on/off byte when turning off
command += [on_off_byte, 0x01]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_rgb_on_off_command(controller, on):
"""
Create a command to turn the RGB LEDs on or off.
:param controller: byte - The controller byte (e.g., 0x03 for left, 0x04 for right)
:param on: bool - True to turn on, False to turn off
:return: bytes - The command byte array
"""
on_off_byte = 0x01 if on else 0x00
command = [
0x05, 0x06, # Report ID and Length
0x70, # Command (Nibble 7 + 0)
0x02, # Sub-parameter
controller, # Controller
on_off_byte, # On/Off
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_gyro_remap_command(gyro, joystick):
"""
Create a command for gyro remapping.
:param gyro: byte - The gyro setting (e.g., 0x01, 0x02)
:param joystick: byte - The joystick value (e.g., 0x00, 0x01, 0x02)
:return: bytes - The command byte array
"""
command = [
0x05, 0x08, # Report ID and Length
0x6a, # Command (Nibble 6 + a)
0x06, 0x01, 0x01, # Sub-parameters
gyro, joystick,
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_button_remap_command(controller, button, action):
"""
Create a command for button remapping.
:param controller: byte - The controller byte (0x03 for left, 0x04 for right)
:param button: byte - The button to remap. Button codes:
0x1c: Y1, 0x1d: Y2, 0x1e: Y3, 0x21: M2, 0x22: M3
:param action: byte - The action to assign to the button. Action codes:
0x00: Disabled, 0x03: Left Stick Click, 0x04: Left Stick Up,
0x05: Left Stick Down, 0x06: Left Stick Left, 0x07: Left Stick Right,
0x08: Right Stick Click, 0x09: Right Stick Up, 0x0a: Right Stick Down,
0x0b: Right Stick Left, 0x0c: Right Stick Right, 0x0d: D-Pad Up,
0x0e: D-Pad Down, 0x0f: D-Pad Left, 0x10: D-Pad Right,
0x12: A, 0x13: B, 0x14: X, 0x15: Y, 0x16: Left Bumper,
0x17: Left Trigger, 0x18: Right Bumper, 0x19: Right Trigger,
0x23: View, 0x24: Menu
:return: bytes - The command byte array
"""
command = [
0x05, 0x07, # Report ID and Length
0x6c, # Command (Nibble 6 + c)
0x02, controller, button, action,
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_vibration_command(controller, vibration_level):
"""
Create a command to control the vibration of the controller.
:param controller: byte - The controller byte (0x03 for left, 0x04 for right)
:param vibration_level: byte - Vibration level (0x00: Off, 0x01: Weak, 0x02: Medium, 0x03: Strong)
:return: bytes - The command byte array
"""
command = [
0x05, 0x06, # Report ID and Length
0x67, # Command (Nibble 6 + 7)
0x02, # Sub-parameter
controller, vibration_level,
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_fps_remap_command(controller, profile, button, action):
"""
Create a command for FPS remapping.
:param controller: byte - The controller byte (0x03 for left, 0x04 for right)
:param profile: byte - The profile number (from 0x01 to 0x04)
:param button: byte - The button to remap
:param action: byte - The action to assign to the button
:return: bytes - The command byte array
"""
command = [
0x05, 0x08, # Report ID and Length
0x6c, # Command (Nibble 6 + c)
0x04, # Sub-parameter
controller, profile, button, action,
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
# # vibration_command = create_vibration_command(0x04, 0x01) # Strong vibration on right
# # send_command(vibration_command)
# # vibration_command = create_vibration_command(0x03, 0x03) # Strong vibration on right controller
# send_command(vibration_command)
# gyro_left = create_gyro_remap_command(0x02, 0x02)
# send_command(gyro_left)
# gyro_right = create_gyro_remap_command(0x01, 0x00)
# send_command(gyro_right)
cmd = create_touchpad_command(False)
send_command(cmd)
================================================
FILE: py_modules/enable_trackpad.py
================================================
import hid
import time
# Global variables
vendor_id = 0x17EF
product_id_match = lambda x: x & 0xFFF0 == 0x6180
usage_page = 0xFFA0
global_config = None # Global configuration for the device
try:
# Enumerate and set the global configuration
for dev in hid.enumerate(vendor_id):
if product_id_match(dev["product_id"]) and dev["usage_page"] == usage_page:
global_config = dev
break
except Exception as e:
print(e)
if not global_config:
print(e)
else:
print(global_config)
def send_command(command):
assert len(command) == 64 and global_config
try:
with hid.Device(path=global_config['path']) as device:
device.write(command)
print("Command sent successfully.")
except IOError as e:
print(f"Error opening HID device: {e}")
def create_touchpad_command(enable):
"""
Create a command to enable or disable the touchpad.
:param enable: bool - True to enable, False to disable the touchpad
:return: bytes - The command byte array
"""
enable_byte = 0x01 if enable else 0x00
command = [
0x05,
0x06, # Report ID and Length
0x6B, # Command (Nibble 6 + b)
0x02, # Command sub-parameter
0x04, # Right Controller
enable_byte, # Enable/Disable flag
0x01 # All commands end with 0x01
]
byte_command = bytes(command)
# Pad the byte_command with 0xCD to meet the length of 64 bytes
buffered_command = byte_command + bytes([0xCD] * (64 - len(byte_command)))
return buffered_command
def create_rgb_control_command(controller, mode, color, brightness, speed, profile=0x01, on=True):
"""
Create a command to control the RGB LEDs, including setting the profile and turning them on or off.
:param controller: byte - The controller byte (0x03 for left, 0x04 for right)
:param mode: byte - The mode of the LED (e.g., 0x01 for solid, 0x02 for blinking)
:param color: bytes - The RGB color value (e.g., b'\xFF\x00\x00' for red)
:param brightness: byte - The brightness value (0x00 to 0x64)
:param speed: byte - The speed setting for dynamic modes (0x00 to 0x64, higher is slower)
:param profile: byte - The profile number
:param on: bool - True to turn on, False to turn off the RGB LEDs
:return: bytes - The command byte array
"""
on_off_byte = 0x01 if on else 0x00
command = [
0x05, 0x0c if on else 0x06, # Report ID and Length (0x0c for setting profile, 0x06 for on/off)
0x72 if on else 0x70, # Command (Nibble 7 + 2 for profile, 7 + 0 for on/off)
0x01, controller
]
if on:
# Adding profile settings when turning on
command += [mode] + list(color) + [brightness, speed, profile, 0x01]
else:
# Adding the on/off byte when turning off
command += [on_off_byte, 0x01]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_rgb_on_off_command(controller, on):
"""
Create a command to turn the RGB LEDs on or off.
:param controller: byte - The controller byte (e.g., 0x03 for left, 0x04 for right)
:param on: bool - True to turn on, False to turn off
:return: bytes - The command byte array
"""
on_off_byte = 0x01 if on else 0x00
command = [
0x05, 0x06, # Report ID and Length
0x70, # Command (Nibble 7 + 0)
0x02, # Sub-parameter
controller, # Controller
on_off_byte, # On/Off
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_gyro_remap_command(gyro, joystick):
"""
Create a command for gyro remapping.
:param gyro: byte - The gyro setting (e.g., 0x01, 0x02)
:param joystick: byte - The joystick value (e.g., 0x00, 0x01, 0x02)
:return: bytes - The command byte array
"""
command = [
0x05, 0x08, # Report ID and Length
0x6a, # Command (Nibble 6 + a)
0x06, 0x01, 0x01, # Sub-parameters
gyro, joystick,
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_button_remap_command(controller, button, action):
"""
Create a command for button remapping.
:param controller: byte - The controller byte (0x03 for left, 0x04 for right)
:param button: byte - The button to remap. Button codes:
0x1c: Y1, 0x1d: Y2, 0x1e: Y3, 0x21: M2, 0x22: M3
:param action: byte - The action to assign to the button. Action codes:
0x00: Disabled, 0x03: Left Stick Click, 0x04: Left Stick Up,
0x05: Left Stick Down, 0x06: Left Stick Left, 0x07: Left Stick Right,
0x08: Right Stick Click, 0x09: Right Stick Up, 0x0a: Right Stick Down,
0x0b: Right Stick Left, 0x0c: Right Stick Right, 0x0d: D-Pad Up,
0x0e: D-Pad Down, 0x0f: D-Pad Left, 0x10: D-Pad Right,
0x12: A, 0x13: B, 0x14: X, 0x15: Y, 0x16: Left Bumper,
0x17: Left Trigger, 0x18: Right Bumper, 0x19: Right Trigger,
0x23: View, 0x24: Menu
:return: bytes - The command byte array
"""
command = [
0x05, 0x07, # Report ID and Length
0x6c, # Command (Nibble 6 + c)
0x02, controller, button, action,
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_vibration_command(controller, vibration_level):
"""
Create a command to control the vibration of the controller.
:param controller: byte - The controller byte (0x03 for left, 0x04 for right)
:param vibration_level: byte - Vibration level (0x00: Off, 0x01: Weak, 0x02: Medium, 0x03: Strong)
:return: bytes - The command byte array
"""
command = [
0x05, 0x06, # Report ID and Length
0x67, # Command (Nibble 6 + 7)
0x02, # Sub-parameter
controller, vibration_level,
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
def create_fps_remap_command(controller, profile, button, action):
"""
Create a command for FPS remapping.
:param controller: byte - The controller byte (0x03 for left, 0x04 for right)
:param profile: byte - The profile number (from 0x01 to 0x04)
:param button: byte - The button to remap
:param action: byte - The action to assign to the button
:return: bytes - The command byte array
"""
command = [
0x05, 0x08, # Report ID and Length
0x6c, # Command (Nibble 6 + c)
0x04, # Sub-parameter
controller, profile, button, action,
0x01 # Command end marker
]
return bytes(command) + bytes([0xCD] * (64 - len(command)))
# # vibration_command = create_vibration_command(0x04, 0x01) # Strong vibration on right
# # send_command(vibration_command)
# # vibration_command = create_vibration_command(0x03, 0x03) # Strong vibration on right controller
# send_command(vibration_command)
# gyro_left = create_gyro_remap_command(0x02, 0x02)
# send_command(gyro_left)
# gyro_right = create_gyro_remap_command(0x01, 0x00)
# send_command(gyro_right)
cmd = create_touchpad_command(True)
send_command(cmd)
================================================
FILE: resources/egpu-pcie3speed.conf
================================================
# A fix has been found, it turns out it was most likely the amdgpu driver detecting the weakest link
# in the chain and setting itself to 2.5 GT/s. And due to how Thunderbolt works, the root ports always
# report as 2.5 GT/s it seems. Thus the GPU got confused and set itself to 2.5 GT/s max which ideally
# can goes up to 8 GT/s max.
# The fix is to create a file in /etc/modprobe.d/egpu-pcie3speed.conf with the following content:
# "options amdgpu pcie_gen_cap=0x40000". Which will override this auto-detection and tell the GPU it
# can run at PCI-E 3.0 speeds 8 GT/s
# use command "lspci -vv" output all devices. check for thunderbolt and gpu device with LNKSTA:2.5 GT/s
# (downgrade)
# use command "dmesg | grep limited" will shows a short report of anything "limited" adnormal identified
# by numbers like 0063,0065,0067,0068 which directly refers to the device slot number assigned.
# affecting Intel chipsets -- Alpine Ridge and Titan Ridge are Thunderbolt 3 chipsets.
# Tiger Lake and Goshen Ridge is Intel’s Thunderbolt 4 chipset.
# OS: almost all linux distro. if its weird sometimes, it can detect and assign the speed properly.
# Sometimes it work and detects normally. majority times, it does not.
# what it affects: Games FPS especially.
options amdgpu pcie_gen_cap=0x40000
================================================
FILE: ryzenadj-max-performance.sh
================================================
#/bin/bash
# credit to adolforegosa on discord for this
echo 'sets ryzenadj --max-performance whenever AC status changes to battery from plugged-in'
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root, use sudo" >&2
exit 1
fi
# LGO battery info: sudo udevadm info --attribute-walk --path=/sys/class/power_supply/ACAD
# udevadm info --attribute-walk --path=/sys/class/power_supply/AC0
RYZENADJ_PATH="/usr/bin/ryzenadj"
if [ -e "$RYZENADJ_PATH" ]; then
echo "ryzenadj exists at $RYZENADJ_PATH"
touch /etc/udev/rules.d/99-power-source-change.rules
cat <<EOF > "/etc/udev/rules.d/99-power-source-change.rules"
ACTION=="add|change", SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/bin/sh -c '/usr/bin/ryzenadj --max-performance'"
EOF
udevadm control --reload-rules
echo 'installation complete. If you wish to remove the changes later on, delete the /etc/udev/rules.d/99-power-source-change.rules and reboot'
else
echo "ryzenadj does not exist at $RYZENADJ_PATH. Exiting."
fi
================================================
FILE: waydroid-restart/README.md
================================================
This will add a `Force Waydroid Restart` app shortcut to your applications menu
This should work regardless of distro or device, assuming you have waydroid already installed.
# Install
run the following in terminal, it will prompt you for your sudo password:
```bash
curl -L https://raw.githubusercontent.com/aarron-lee/legion-go-tricks/main/waydroid-restart/install.sh | sudo sh
```
# Uninstall
For to uninstall, delete the following files:
```
sudo rm /usr/local/bin/waydroid-force-restart
sudo rm $HOME/.local/share/applications/waydroid-force-restart.desktop
sudo rm /etc/sudoers.d/waydroid-force-restart
```
================================================
FILE: waydroid-restart/install.sh
================================================
#!/usr/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root with sudo"
exit
fi
cd /tmp
git clone --depth=1 https://github.com/aarron-lee/legion-go-tricks.git
cd /tmp/legion-go-tricks/waydroid-restart
HOME_DIR=$(getent passwd "$SUDO_USER" | cut -d: -f6)
WAYDROID_RESTART_BIN=/usr/local/bin/waydroid-force-restart
cp ./waydroid-force-restart.desktop "$HOME_DIR/.local/share/applications/waydroid-force-restart.desktop"
cp ./waydroid-force-restart $WAYDROID_RESTART_BIN
chmod +x $WAYDROID_RESTART_BIN
sudo chcon -u system_u -r object_r --type=bin_t $WAYDROID_RESTART_BIN
cat <<-EOF > "/etc/sudoers.d/waydroid-force-restart"
ALL ALL=(ALL) NOPASSWD: $WAYDROID_RESTART_BIN
EOF
rm -rf /tmp/legion-go-tricks
================================================
FILE: waydroid-restart/waydroid-force-restart
================================================
#!/bin/bash
sudo waydroid container restart
================================================
FILE: waydroid-restart/waydroid-force-restart.desktop
================================================
[Desktop Entry]
Type=Application
Name=Waydroid Force Restart
Exec=sudo /usr/local/bin/waydroid-force-restart
Categories=X-WayDroid-App;
X-Purism-FormFactor=Workstation;Mobile;
Icon=waydroid
NoDisplay=false
gitextract_1el0es44/
├── .github/
│ └── FUNDING.yml
├── README.md
├── bazzite-dualboot-partition-guide.md
├── bazzite-maliit-keyboard.sh
├── dev/
│ ├── bazzite_hhd_local_install.sh
│ └── bazzite_hhd_local_update.sh
├── experimental_sound_fix/
│ ├── README.md
│ ├── install_sound_fix_v2.sh
│ ├── manjaro/
│ │ ├── pipewire/
│ │ │ └── pipewire.conf.d/
│ │ │ └── convolver.conf
│ │ └── wireplumber/
│ │ └── wireplumber.conf.d/
│ │ ├── 51-preferHDMI.conf
│ │ └── 60-raise-internal-mic.conf
│ ├── mic_hdmi_audio_fix.conf
│ └── pipewire/
│ └── pipewire.conf.d/
│ ├── convolver.conf
│ └── convolver_mp_go.conf
├── fixed_bugs_changelog.md
├── fuzzy-sound-suspend-fix/
│ ├── README.md
│ ├── install.sh
│ └── uninstall.sh
├── hardware_documentation.md
├── icc_color/
│ ├── LegionGo_Linux_AWP.icc
│ ├── README.md
│ └── vkBasalt.conf
├── old_scripts/
│ ├── add-lgo-xpad-rule.sh
│ ├── add_return_to_desktop.sh
│ ├── bazzite-disable-swipe-gestures.sh
│ ├── bazzite-install-rollback-helper.sh
│ ├── bazzite-nested-desktop-resolution.sh
│ ├── bazzite-rollback-helper
│ ├── bazzite-waydroid-resolution.sh
│ ├── decky_v2_10_14_install.sh
│ ├── desktopmode-autoscale.sh
│ ├── disable_color_management.sh
│ ├── disable_refresh_rates.sh
│ ├── enable-acpi-call.sh
│ ├── enable_144hz.sh
│ ├── enable_60_144hz.sh
│ ├── enable_60hz.sh
│ ├── headphone-connection-monitor.sh
│ ├── increase_swap_zram.sh
│ ├── lgo_bazzite_setup.sh
│ ├── lgo_nobara_setup.sh
│ ├── setup_battery_indicator_overlay.sh
│ └── troubleshooting_report.sh
├── py_modules/
│ ├── disable_trackpad.py
│ └── enable_trackpad.py
├── resources/
│ └── egpu-pcie3speed.conf
├── ryzenadj-max-performance.sh
└── waydroid-restart/
├── README.md
├── install.sh
├── waydroid-force-restart
└── waydroid-force-restart.desktop
SYMBOL INDEX (16 symbols across 2 files) FILE: py_modules/disable_trackpad.py function send_command (line 24) | def send_command(command): function create_touchpad_command (line 34) | def create_touchpad_command(enable): function create_rgb_control_command (line 58) | def create_rgb_control_command(controller, mode, color, brightness, spee... function create_rgb_on_off_command (line 87) | def create_rgb_on_off_command(controller, on): function create_gyro_remap_command (line 106) | def create_gyro_remap_command(gyro, joystick): function create_button_remap_command (line 123) | def create_button_remap_command(controller, button, action): function create_vibration_command (line 149) | def create_vibration_command(controller, vibration_level): function create_fps_remap_command (line 166) | def create_fps_remap_command(controller, profile, button, action): FILE: py_modules/enable_trackpad.py function send_command (line 24) | def send_command(command): function create_touchpad_command (line 34) | def create_touchpad_command(enable): function create_rgb_control_command (line 58) | def create_rgb_control_command(controller, mode, color, brightness, spee... function create_rgb_on_off_command (line 87) | def create_rgb_on_off_command(controller, on): function create_gyro_remap_command (line 106) | def create_gyro_remap_command(gyro, joystick): function create_button_remap_command (line 123) | def create_button_remap_command(controller, button, action): function create_vibration_command (line 149) | def create_vibration_command(controller, vibration_level): function create_fps_remap_command (line 166) | def create_fps_remap_command(controller, profile, button, action):
Condensed preview — 51 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (127K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 836,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": "README.md",
"chars": 40142,
"preview": "# Legion Go Tricks\n\nNote that this document is solely for the Original Legion Go Z1E, NOT the Legion Go S.\n\nThis documen"
},
{
"path": "bazzite-dualboot-partition-guide.md",
"chars": 2295,
"preview": "source: https://universal-blue.discourse.group/t/dual-boot-preliminary-setup-and-post-setup-guide/2743#p-6361-manual-pa"
},
{
"path": "bazzite-maliit-keyboard.sh",
"chars": 1099,
"preview": "# enable maliit kb script on bazzite\n# After install, make sure you enable the Maliit keyboard in your Keyboard > Virtua"
},
{
"path": "dev/bazzite_hhd_local_install.sh",
"chars": 1627,
"preview": "#!/bin/bash\n\nif [ \"$EUID\" -eq 0 ]; then\n echo \"This script must be not be run as root, don't use sudo\" >&2\n exit 1"
},
{
"path": "dev/bazzite_hhd_local_update.sh",
"chars": 403,
"preview": "#!/bin/bash\n\ncd $HOME/.local/bin/hhd\n\ngit pull\n\n# disable hhd_dev if already running\nsudo systemctl disable --now hhd_lo"
},
{
"path": "experimental_sound_fix/README.md",
"chars": 1905,
"preview": "# Experimental Sound Fix v2\n\n## IF ON BAZZITE OS, THIS FIX HAS BEEN ADDED TO THE OS ALREADY.\n\n## IF ON CHIMERA OS, THIS "
},
{
"path": "experimental_sound_fix/install_sound_fix_v2.sh",
"chars": 4262,
"preview": "#!/usr/bin/bash\n# Lenovo Legion Go setup script\n# does the following:\n# - Modified Pipewire EQ fixes\n\n# updated with new"
},
{
"path": "experimental_sound_fix/manjaro/pipewire/pipewire.conf.d/convolver.conf",
"chars": 1870,
"preview": "# Convolver Configuration for Pipewire\n#\n# This configuration applies separate left and right convolver effects using th"
},
{
"path": "experimental_sound_fix/manjaro/wireplumber/wireplumber.conf.d/51-preferHDMI.conf",
"chars": 247,
"preview": "monitor.alsa.rules = [\n {\n matches = [\n {\n node.name = \"~alsa_output.pci-0000_c2_00.1.hdmi*\"\n }\n "
},
{
"path": "experimental_sound_fix/manjaro/wireplumber/wireplumber.conf.d/60-raise-internal-mic.conf",
"chars": 253,
"preview": "monitor.alsa.rules = [\n {\n matches = [\n {\n node.name = \"alsa_input.pci-0000_c2_00.6.analog-stereo\"\n "
},
{
"path": "experimental_sound_fix/mic_hdmi_audio_fix.conf",
"chars": 506,
"preview": "monitor.alsa.rules = [\n {\n matches = [\n {\n node.name = \"alsa_input.pci-0000_c2_00.6.analog-stereo\"\n "
},
{
"path": "experimental_sound_fix/pipewire/pipewire.conf.d/convolver.conf",
"chars": 1870,
"preview": "# Convolver Configuration for Pipewire\n#\n# This configuration applies separate left and right convolver effects using th"
},
{
"path": "experimental_sound_fix/pipewire/pipewire.conf.d/convolver_mp_go.conf",
"chars": 1792,
"preview": "# Convolver Configuration for Pipewire\n#\n# This configuration applies separate left and right convolver effects using th"
},
{
"path": "fixed_bugs_changelog.md",
"chars": 13082,
"preview": "# Bugs changelog\n\n<!-- - (06/30/24) Bazzite 3.5 bug - user reports of booting into a black screen.\n - temporary workaro"
},
{
"path": "fuzzy-sound-suspend-fix/README.md",
"chars": 1238,
"preview": "# Fuzzy sound after suspend fix\n\nSource: https://www.reddit.com/r/SteamDeck/comments/1eh99as/distorted_audio_after_wakin"
},
{
"path": "fuzzy-sound-suspend-fix/install.sh",
"chars": 1997,
"preview": "#/bin/bash\n\n# workaround for fuzzy sound on resume\n# source: https://www.reddit.com/r/SteamDeck/comments/1eh99as/distort"
},
{
"path": "fuzzy-sound-suspend-fix/uninstall.sh",
"chars": 535,
"preview": "#/bin/bash\n\n# workaround for fuzzy sound on resume\n# source: https://www.reddit.com/r/SteamDeck/comments/1eh99as/distort"
},
{
"path": "hardware_documentation.md",
"chars": 614,
"preview": "## Documentation for which Antenna Cable inside the GO does what.\n\nWhite and Black cables are Wifi. Gray is Bluetooth.\n\n"
},
{
"path": "icc_color/README.md",
"chars": 1081,
"preview": "# ICC color profiles\n\nthanks @adolfotregosa on discord!\n\nicc color profiles tuned for sRGB on the LGO display\n\nICC works"
},
{
"path": "icc_color/vkBasalt.conf",
"chars": 3516,
"preview": "#effects is a colon seperated list of effect to use\n#e.g.: effects = fxaa:cas\n#effects will be run in order from left to"
},
{
"path": "old_scripts/add-lgo-xpad-rule.sh",
"chars": 524,
"preview": "#/bin/bash\n\necho 'adding missing x-box gamepad udev rule'\n\nif [ \"$(id -u)\" -ne 0 ]; then\n echo \"This script must be r"
},
{
"path": "old_scripts/add_return_to_desktop.sh",
"chars": 444,
"preview": "#/bin/bash\n\necho \"Nobara OS v39 repair\"\n\necho 'adding return to desktop icon'\n\nif [ \"$EUID\" -eq 0 ]; then\n echo \"This"
},
{
"path": "old_scripts/bazzite-disable-swipe-gestures.sh",
"chars": 418,
"preview": "#!/usr/bin/bash\n\necho \"disabling swipe gestures for QAM and HOME\"\n\nmkdir -p $HOME/.config/environment.d\n\ncat <<EOF > \"$H"
},
{
"path": "old_scripts/bazzite-install-rollback-helper.sh",
"chars": 627,
"preview": "#!/usr/bin/bash\n\n# Ensure not running as root\nif [ \"$EUID\" -eq 0 ]; then\n echo \"This script must not be run as root.\""
},
{
"path": "old_scripts/bazzite-nested-desktop-resolution.sh",
"chars": 498,
"preview": "#!/usr/bin/bash\n\nWIDTH=1920\nHEIGHT=1200\n\necho \"Enabling resolution $WIDTH $HEIGHT. If you wish to use different values, "
},
{
"path": "old_scripts/bazzite-rollback-helper",
"chars": 2678,
"preview": "#!/bin/bash\n\nimage=\"$(echo $2 | cut -d ':' -f1)\"\nbranch=\"$(echo $2 | cut -d ':' -f2)\"\n\nIMAGE_INFO=\"/usr/share/ublue-os/i"
},
{
"path": "old_scripts/bazzite-waydroid-resolution.sh",
"chars": 528,
"preview": "#!/usr/bin/bash\n\nWIDTH=1920\nHEIGHT=1200\nDPI=340\n\necho \"Enabling resolution $WIDTH $HEIGHT, and DPI $DPI for waydroid. If"
},
{
"path": "old_scripts/decky_v2_10_14_install.sh",
"chars": 3894,
"preview": "#!/bin/sh\n\n[ \"$UID\" -eq 0 ] || exec sudo \"$0\" \"$@\"\n\n# check if JQ is installed\nif ! command -v jq &> /dev/null\nthen\n "
},
{
"path": "old_scripts/desktopmode-autoscale.sh",
"chars": 1589,
"preview": "#!/usr/bin/env bash\n\nSCALE=1.5\n\n\nIS_GAMEMODE=\"$(cat /proc/*/comm | grep gamescope-ses*)\"\n\n# this is to prevent the autos"
},
{
"path": "old_scripts/disable_color_management.sh",
"chars": 466,
"preview": "#!/usr/bin/bash\n# Lenovo Legion Go script\n# does the following:\n# - disable steam color management\n\necho \"Before trying "
},
{
"path": "old_scripts/disable_refresh_rates.sh",
"chars": 333,
"preview": "#!/usr/bin/bash\n\necho \"force enabling 60Hz mode\"\n\nmkdir -p $HOME/.config/environment.d\n\nrm -f $HOME/.config/environment."
},
{
"path": "old_scripts/enable-acpi-call.sh",
"chars": 307,
"preview": "#/bin/bash\n\necho 'enabling acpi call on boot'\n\nif [ \"$(id -u)\" -ne 0 ]; then\n echo \"This script must be run as root, "
},
{
"path": "old_scripts/enable_144hz.sh",
"chars": 417,
"preview": "#!/usr/bin/bash\n\necho \"Enabling 144Hz in Game Mode (Note, 144Hz is still buggy in Game mode)\"\n\nmkdir -p $HOME/.config/en"
},
{
"path": "old_scripts/enable_60_144hz.sh",
"chars": 552,
"preview": "#!/usr/bin/bash\n\necho \"Enabling 60hz + 144hz.\"\n\nmkdir -p $HOME/.config/environment.d\nrm -f $HOME/.config/environment.d/d"
},
{
"path": "old_scripts/enable_60hz.sh",
"chars": 367,
"preview": "#!/usr/bin/bash\n\necho \"Enabling 60Hz in Game Mode\"\n\nmkdir -p $HOME/.config/environment.d\nrm -f $HOME/.config/environment"
},
{
"path": "old_scripts/headphone-connection-monitor.sh",
"chars": 881,
"preview": "#!/usr/bin/bash\n\nDECK_SINK=37\nDECK_SOURCE=$(wpctl status | grep Echo | grep Source | cut -d \" \" -f 7 | cut -d \".\" -f 1)\n"
},
{
"path": "old_scripts/increase_swap_zram.sh",
"chars": 182,
"preview": "#!/usr/bin/bash\n\necho \"increasing zram swap\"\n\nsudo cat <<EOF > \"/etc/systemd/zram-generator.conf\"\n[zram0]\nzram-size=ram*"
},
{
"path": "old_scripts/lgo_bazzite_setup.sh",
"chars": 1635,
"preview": "#!/usr/bin/bash\n# Lenovo Legion Go Bazzite setup script\n# does the following:\n# - basic TDP control via SimpleDeckyTDP p"
},
{
"path": "old_scripts/lgo_nobara_setup.sh",
"chars": 1992,
"preview": "#!/usr/bin/bash\n# Lenovo Legion Go setup script\n# does the following:\n# - headphone connection-monitor script fix\n# - ba"
},
{
"path": "old_scripts/setup_battery_indicator_overlay.sh",
"chars": 289,
"preview": "#!/usr/bin/bash\n\necho \"configuring preset 1 of performance overlay to display battery levels\"\n# configure mangohud 1st p"
},
{
"path": "old_scripts/troubleshooting_report.sh",
"chars": 1450,
"preview": "#!/bin/bash\n\n# Determine the username of the non-root user who invoked sudo, or use the current user if not run with sud"
},
{
"path": "py_modules/disable_trackpad.py",
"chars": 7381,
"preview": "import hid\nimport time\n# Global variables\nvendor_id = 0x17EF\nproduct_id_match = lambda x: x & 0xFFF0 == 0x6180\nusage_pag"
},
{
"path": "py_modules/enable_trackpad.py",
"chars": 7380,
"preview": "import hid\nimport time\n# Global variables\nvendor_id = 0x17EF\nproduct_id_match = lambda x: x & 0xFFF0 == 0x6180\nusage_pag"
},
{
"path": "resources/egpu-pcie3speed.conf",
"chars": 1295,
"preview": "# A fix has been found, it turns out it was most likely the amdgpu driver detecting the weakest link\n# in the chain and "
},
{
"path": "ryzenadj-max-performance.sh",
"chars": 1014,
"preview": "#/bin/bash\n\n# credit to adolforegosa on discord for this\n\necho 'sets ryzenadj --max-performance whenever AC status chang"
},
{
"path": "waydroid-restart/README.md",
"chars": 620,
"preview": "This will add a `Force Waydroid Restart` app shortcut to your applications menu\n\nThis should work regardless of distro o"
},
{
"path": "waydroid-restart/install.sh",
"chars": 722,
"preview": "#!/usr/bin/bash\n\nif [ \"$EUID\" -ne 0 ]\n then echo \"Please run as root with sudo\"\n exit\nfi\n\ncd /tmp\n\ngit clone --depth=1"
},
{
"path": "waydroid-restart/waydroid-force-restart",
"chars": 45,
"preview": "#!/bin/bash\n\nsudo waydroid container restart\n"
},
{
"path": "waydroid-restart/waydroid-force-restart.desktop",
"chars": 206,
"preview": "[Desktop Entry]\nType=Application\nName=Waydroid Force Restart\nExec=sudo /usr/local/bin/waydroid-force-restart\nCategories="
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the aarron-lee/legion-go-tricks GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 51 files (117.1 KB), approximately 33.4k tokens, and a symbol index with 16 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.