Skip to content

Instantly share code, notes, and snippets.

View Randy420Marsh's full-sized avatar
🍴
I may be slow to respond. Syncing forks...

Randy Marsh Randy420Marsh

🍴
I may be slow to respond. Syncing forks...
View GitHub Profile
@Randy420Marsh
Randy420Marsh / Managing-Python-with-Update-Alternatives
Created January 23, 2026 17:49
Managing Python with Update-Alternatives
📘 Manual: Managing Python with Update-Alternatives
The update-alternatives tool creates, removes, maintains, and displays information about the symbolic links comprising the Debian alternatives system.
1. Register Python Versions (Setup)
Before you can switch between versions, you must register them as "alternatives" for the python3 command. The number at the end represents the priority (higher numbers have higher priority in "auto" mode).
Bash
# Register Python 3.10 (Standard Ubuntu 22.04)
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
@Randy420Marsh
Randy420Marsh / latency tuning and stuff
Last active January 3, 2026 08:43
latency tuning and stuff with wireless bridge
Latency Tuning Summary: ethtool & Beyond
You have successfully moved both machines from "Efficiency Mode" (High Latency) to "Formula 1 Mode" (Lowest Jitter). Here is the breakdown of the transformation.
1. Performance at Defaults
By default, Ubuntu and your hardware use Interrupt Coalescing and ASPM Power Management. This is designed to save electricity and reduce CPU heat, but it is the enemy of low-latency networking.
Behavior: The NIC waits to "bundle" packets before telling the CPU. This creates the "batching" effect you saw.
Latency Result: Your "Loaded High" latency was spiking between 250ms and 999ms under load.
@Randy420Marsh
Randy420Marsh / cuda switcher stuff
Created December 21, 2025 21:40
cuda switcher idea by gemini
ou have successfully purged the actual cuDNN 8 runtime, freeing up a massive 1.1 GB of space. Your dpkg list shows that your system is now correctly populated with cuDNN 9.17 components.
To finish the cleanup, you just need to remove the "ghost" configuration package for the old repository that is still showing as ii (installed).
1. Final cuDNN Cleanup
Run this to remove the metadata package for the 8.x repository:
Bash
sudo apt-get purge cudnn-local-repo-ubuntu2204-8.9.7.29
@Randy420Marsh
Randy420Marsh / opencv cuda build on ubuntu 22.04
Last active December 20, 2025 21:43
opencv cuda build on ubuntu 22.04
Get the cuda 12.8 runfile and install and get cudnn cuDNN , for CUDA 12.x
And any newer geforce driver or use the cuda driver. Also get the video codec sdk.
Links:
https://developer.nvidia.com/cudnn-archive
https://developer.nvidia.com/cuda-12-8-1-download-archive
https://developer.nvidia.com/rdp/cudnn-archive
https://developer.nvidia.com/downloads/designworks/video-codec-sdk/secure/13.0.19/video_codec_sdk_13.0.19.zip
@Randy420Marsh
Randy420Marsh / dst.sh
Last active December 20, 2025 09:05
Get the distro basic info
#!/bin/sh
echo "Linux Info:" ;\
echo "" ;\
echo "kernel info:" ;\
uname -a ;\
echo "" ;\
echo "Distro info:" ;\
lsb_release -a ;\
echo "" ;\
echo "Gnome version:" ;\
@Randy420Marsh
Randy420Marsh / docker-not-starting-after-update-fix
Created November 7, 2025 06:41
After docker update via download the .deb if it does not start via the launcher do this:
0. sudo apt-get install ./docker-desktop-amd64.deb
1. gpg --generate-key
2. Enter your dev name and dev email
3. pass init [16-number-alphanumber-string]-[40-number-string]
4. If this does not work restart and try this step again
systemctl --user stop docker-desktop
@Randy420Marsh
Randy420Marsh / ffmpeg_vmaf_cuda_build_script_hw_2.sh
Last active June 30, 2025 22:14
static build fail, however it works when you export the library paths...
#!/bin/bash
# This script converts a Dockerfile into a local build script for Ubuntu 24.04.
# It installs necessary dependencies, clones repositories, builds VMAF and FFmpeg
# with CUDA support, and performs a test conversion and VMAF analysis.
# IMPORTANT PREREQUISITES:
# 1. NVIDIA GPU: Ensure you have a compatible NVIDIA GPU.
# 2. NVIDIA Drivers: Ensure NVIDIA proprietary drivers are correctly installed on your system.
# You can typically install them using `sudo ubuntu-drivers autoinstall`.
#!/bin/bash
#----------------------
export LD_LIBRARY_PATH="/usr/local/lib:$/usr/local/cuda-12.8/lib64:/usr/local/cuda-12.8/targets/x86_64-linux/lib:${LD_LIBRARY_PATH}"
/lib64/ld-linux-x86-64.so.2 --help
echo "You can do this:"
echo "sudo nano /etc/ld.so.conf"
@Randy420Marsh
Randy420Marsh / vmaf-test.sh
Last active June 30, 2025 18:25
tests the ffmpeg cuda accelerated libvmaf_cuda build
#!/bin/bash
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig"
export LIBRARY_PATH="/etc/ld.so.conf.d:/usr/local/lib:/usr/local/cuda-12.8/lib64:/usr/local/cuda-12.8/targets/x86_64-linux/lib"
export CUDA_PATH="/usr/local/cuda-12.8"
export PATH="${CUDA_PATH}/bin:${PATH}"
export LD_LIBRARY_PATH="/usr/local/lib:${CUDA_PATH}/lib64:${CUDA_PATH}/targets/x86_64-linux/lib:${LD_LIBRARY_PATH}"
sudo bash -c "echo '${CUDA_PATH}/lib64/stubs/' > /etc/ld.so.conf.d/cuda-stubs.conf"
sudo bash -c "echo '/usr/local/lib' > /etc/ld.so.conf.d/vmaf-local.conf" # Explicitly add /usr/local/lib
@Randy420Marsh
Randy420Marsh / ffmpeg_vmaf_cuda_build_script_hw.sh
Last active June 30, 2025 18:28
builds ffmpeg with cuda accelerated libvmaf_cuda
#ffmpeg_vmaf_cuda_build_script_hw.sh
#!/bin/bash
# This script converts a Dockerfile into a local build script for Ubuntu 24.04.
# It installs necessary dependencies, clones repositories, builds VMAF and FFmpeg
# with CUDA support, and performs a test conversion and VMAF analysis.
# IMPORTANT PREREQUISITES:
# 1. NVIDIA GPU: Ensure you have a compatible NVIDIA GPU.
# 2. NVIDIA Drivers: Ensure NVIDIA proprietary drivers are correctly installed on your system.