Skip to content

Instantly share code, notes, and snippets.

View PatrickLang's full-sized avatar

Patrick Lang PatrickLang

  • Washington, USA
View GitHub Profile
@PatrickLang
PatrickLang / KDE-Plasma_in_Hyper-V.md
Last active July 25, 2024 09:39
Fedora Plasma Mobile experiments worklog

2024-06-25 Trying Plasma Mobile

I came across this and wanted to give it a try. I have some convertible laptops (Lenovo Yoga, Surface Go 2) and would be interested in a touch-first interface for music and creative work. https://fedoraproject.org/wiki/Changes/Fedora_KDE_Plasma_Mobile

Steps to set up are roughly documented at https://fedoraproject.org/wiki/SIGs/KDE/Mobile and also not quite at: https://discussion.fedoraproject.org/t/can-i-install-plasma-mobile-on-fedora-kinoite-39/104578

work-in-progress:

@PatrickLang
PatrickLang / WSL2-recovery.md
Created November 23, 2023 01:18
How to restore a WSL2 distribution and your data after a Windows Reset

I had some bad driver issues that led to me need to 'reset' Windows from the local recovery partition. This recovered my machine and got it bootable again. Afterwards, WSL2 wasn't installed, so I tried to install it. It rebooted, etc, then fetched Ubuntu 22.04 from the Microsoft Store as usual. However, instead of keeping my previous WSL2 content it started a new user:

Ubuntu is already installed.
Launching Ubuntu...
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
@PatrickLang
PatrickLang / README.md
Last active October 6, 2022 05:37
Testing SuSE Advanced Linux Platform (ALP) on Hyper-V

Background

The initial [ALP Announcement] was this week, and the [ALP Deployment] instructions only cover how to test it on KVM. Since all of the support needed for Hyper-V is in upstream Linux, I thought I would give it a try. Technically this is all feasible, it's just a matter of making sure the right kernel options (or modules) are compiled in, and that the VM is configured appropriately

What's Needed

  • Get the qcow image from [ALP Download]
  • Download a qemu-img build for Windows from my friends at CloudBase
@PatrickLang
PatrickLang / README.md
Last active November 12, 2023 04:46
Cleaning up Alsa + Pipewire for Focusrite Scarlett series

These are just some notes on how I'm trying to clean up Linux support a bit to make the Focusrite Scarlett 18i8 (gen2) and 2i4 a bit easier to use.

Getting UCM profiles

Currently having issues getting a clean test run on upstream project. See failing history

@PatrickLang
PatrickLang / systemd-oomd-learnings.md
Last active June 23, 2022 06:12
learning about systemd-oomd

systemd-oomd was enabled by default in Fedora 33, and more recently Ubuntu 22.04. After trying some large software builds on these distros, I ran into some unexpected problems.

Overall, I think this is a good thing for most users, but I need to tune the defaults for cases where I'm willing to give up some responsiveness for reliability under heavy load.

Hard learnings

Where'd my build go?

  • Don't run a huge build process with too many threads in Gnome Terminal. Each one has its own cgroup slice, and if too much memory/swap are consumed or too much pressure - the slice is killed. You can't see what was going on when it was killed unless you were tee'ing it to a file
  • Podman also creates 1 cgroup slice per container, but at least you may be able to get some clues from podman container ls and logs
@PatrickLang
PatrickLang / README.md
Last active July 8, 2021 05:41
CircuitPython on Adafruit RP2040 feather

Just a collection of snippets from when I was testing out the RP2040 feather

@PatrickLang
PatrickLang / _README.md
Last active September 24, 2024 07:04
Testing drm-hyperv driver in Fedora

Fedora 35

Both the issues mentioned below are solved! My PR to switch to hyperv_drm was accepted, and the kernel fix needed to boot the liveCD are in.

You can boot this as a generation 2 (UEFI) VM with secure boot enabled, using the Microsoft UEFI Certificate Authority setting. Resolution switching works in GNOME under Wayland, even when booted from the live media.

Fedora 34

This is a brief experiment I did to compare these two setups in a Hyper-V VM running Fedora 34

@PatrickLang
PatrickLang / Fedora34-VM.ps1
Last active September 27, 2023 10:31
Hyper-V example setup for Fedora 34
# Echo the commands as they're run
Set-PSDebug -Trace 1
# Dump Windows version
Get-ComputerInfo | Format-Table WindowsVersion, OsVersion
# Create a UEFI VM, secure boot enabled, use the secure boot settings for the
$vm = New-VM -Generation 2 -Name "Fedora 34 beta" -Path .
$vm | Set-VMFirmware -EnableSecureBoot On -SecureBootTemplate "MicrosoftUEFICertificateAuthority"
@PatrickLang
PatrickLang / Steps.md
Last active June 25, 2024 20:38
Tracing Bluetooth Audio in Windows 10

Collecting the trace

Windows has the tools needed to collect traces for the bluetooth stack built-in, they just need to be configured. There are step by step instructions and scripts at Microsoft/busiotools, but I have copied some of the relevant details below.

To start the trace, create a temporary directory, then run this from an admin PowerShell prompt:

wget https://github.com/Microsoft/busiotools/raw/master/bluetooth/tracing/BluetoothStack.wprp -outfile .\BluetoothStack.wprp
@PatrickLang
PatrickLang / Ardour-Issue.md
Last active April 9, 2021 06:14
Fedora 34 Jam Notes

Crash adding inputs - currently not repro

Investigating issue: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/796

@wtay suggested trying jack_lsp after a failure. Installing that.

sudo dnf download --downloadonly jack-audio-connection-kit-example-clients.x86_64
sudo rpm -i --nodeps jack-audio-connection-kit-example-clients-1.9.16-2.fc34.x86_64.rpm