Skip to content

Instantly share code, notes, and snippets.

View strzlee's full-sized avatar

Straussn strzlee

View GitHub Profile
@strzlee
strzlee / bash_strict_mode.md
Created July 11, 2024 08:31 — forked from rizerzero/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@strzlee
strzlee / _mesa-low-latency.md
Created June 28, 2024 10:30 — forked from gschintgen/_mesa-low-latency.md
AMD: Patching Mesa on Ubuntu for low-latency VA-API encoding

AMD VA-API encoding latency

As of this writing (2024-05), VA-API has no support for AMD's low-latency encoding mode. This is problematic for ultra low-latency applications like realtime game-streaming as implemented by Sunshine.

As a temporary fix, Mesa can be patched to unconditionally use the low-latency optimizations. This entails a higher power consumption and may not be suitable for all applications.

Patching Mesa for Ubuntu

I'm providing a basic shell script to re-build Ubuntu's Mesa from the official source .debs with the necessary patch. It has only seen some light testing (22.04 only) and is provided without support. For my own usage I'm executing this script in a throw-away Incus container based on Ubuntu 22.04. The script does not clean up after itself (i.e. no purging of build dependencies etc.). **Make sure to valid

#!/bin/bash
# Fix intel color corruption
# might come with some performance degradation but is better than a corrupted
# color image
export INTEL_DEBUG=norbc
# Some environment variables by default (taken from Deck session)
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
#!/bin/bash
##
## Session globals
##
# unset DISPLAY
export XDG_CURRENT_DESKTOP=gamescope # necessary for ryujinx to render properly
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
Setting, DefaultValue, INIValue, CurrentValue, Origin
sScreenShotBaseName:Display, <unimplemented>, <unimplemented>, <unimplemented>, INI
sScreenShotFolderName:Display, <unimplemented>, <unimplemented>, <unimplemented>, INI
sRuntimeLODDatabasePath:LODManager, <unimplemented>, <unimplemented>, <unimplemented>, INI
strPluginsFileHeader:General, <unimplemented>, <unimplemented>, <unimplemented>, INI
sLanguage:General, <unimplemented>, <unimplemented>, <unimplemented>, INI
sFailureMessage:LANGUAGE, <unimplemented>, <unimplemented>, <unimplemented>, INI
sResourcePrefixList:Archive, <unimplemented>, <unimplemented>, <unimplemented>, INI
sDLCDefaultVoiceSuffix:Archive, <unimplemented>, <unimplemented>, <unimplemented>, INI
sLocalMasterPath:General, <unimplemented>, <unimplemented>, <unimplemented>, INI
Setting, DefaultValue, INIValue, CurrentValue, Origin
fSpatialGraphSpaceCollectionGridDistance:Pathfinding, 15000.000000, 15000.000000, 15000.000000, INI
fSpatialGraphSpaceCollectionGridUpdateDistance:Pathfinding, 500.000000, 500.000000, 500.000000, INI
bMergeInstStatCol:Packin, True, True, True, INI
bSkipFurnitureMarkerVisualization:AI, False, False, False, INI
bShowFurnitureEntryMarkers:AI, True, True, True, INI
bShowFurnitureExitMarkers:AI, True, True, True, INI
bShowFurnitureMarkersForSelectedOnly:AI, False, False, False, INI
bPlanetContentLogDiffing:Planet, False, False, False, INI
bDebugCombatCoverReservations:Combat, False, False, False, INI
@strzlee
strzlee / mesa-howto.md
Created September 12, 2023 09:14 — forked from Venemo/mesa-howto.md
How to build and use mesa from source

Building and using mesa for development and testing

This explains how to build mesa from source, and how to use the custom built mesa to run some apps and games, without needing to replace the mesa libraries that your operating system runs on.

Let's assume that you are using an x86_64 system.

Building mesa

Overview

@strzlee
strzlee / steam_console_params.txt
Created July 14, 2023 08:30 — forked from davispuh/steam_console_params.txt
Steam client parameters, consoles commands and variables
-480p - Run tenfoot in 480p rather than 1080p
-720p - Run tenfoot in 720p rather than 1080p
-accesscode -
-all_languages - show longest loc string from any language
-batterytestmode - rapidly cycle battery percentages for testing
-bigpicture - Start in Steam Big Picture mode
-blefw -
-cafeapplaunch - Launch apps in a cyber cafe context
-candidates - Show libjingle candidates for local connection as they are processed
-ccsyntax - Spew details about the localized strings we load
@strzlee
strzlee / photoshop2021-wine-install.sh
Created May 17, 2023 13:00
create wine-prefix for photoshop 2021 on linux
#!/bin/bash
mkdir $1/Adobe-Photoshop
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod +x winetricks
WINEPREFIX=$1/Adobe-Photoshop wineboot
rm -rf $1/install.log
@strzlee
strzlee / german_locale_enabler.sh
Last active February 7, 2023 14:43 — forked from XargonWan/japanese_locale_enabler.sh
Enable German locale on Steam Deck
#!/bin/bash
# This script is enabling (uncommenting) the German locale and regenerates them
sudo steamos-readonly disable
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman -S glibc
sudo sed -i "s%#de_DE.UTF-8 UTF-8%de_DE.UTF-8 UTF-8%" /etc/locale.gen
sudo locale-gen