Original article here: https://www.reddit.com/r/OrangePI/comments/1tlr6s2/comment/onhlvcw/
This document provides detailed instructions for setting up a local AI server with NPU acceleration on an RK3588 system using rk-llama.cpp.
Original article here: https://www.reddit.com/r/OrangePI/comments/1tlr6s2/comment/onhlvcw/
This document provides detailed instructions for setting up a local AI server with NPU acceleration on an RK3588 system using rk-llama.cpp.
ROG Flow Z13 2025 Audio fix
Disclaimer: I don't know much about kernel development, this fix was figured out with AI assistance.
My problem was that the speakers work but are way quieter than Windows. Kernel logs show:
cs35l41-hda: Falling back to default firmware.
The fix is simple: copy-paste the ROG Ally entry with a different device ID. It solves the audio problem subjectively (we're far from amazing sound, but at least twice as loud).
| import time | |
| import os | |
| import logging | |
| import random | |
| from datasets import load_dataset | |
| class QuantAutoGPTQ: | |
| def __init__(self, model_name_or_path, output_dir, dataset, | |
| num_samples=128, trust_remote_code=False, cache_examples=True, | |
| use_fast=True, use_triton=False, bits=[4], group_size=[128], damp=[0.01], |
| #!/bin/sh | |
| # This tool requires git and iucode_tool. | |
| # iucode_tool can be found at most repositories, or https://gitlab.com/iucode-tool/ | |
| # | |
| # This script is NOT DESIGNED to be run as root. You must manually copy the output at the | |
| # intel firmware folder. This is for security reasons. | |
| MICROCODE_DATA="/tmp/microcode_data" | |
| OUTPUT="microcodes" |
| How to connect USB through debug console | |
| device_add usb-host,vendorid=0xL33T,productid=0xDEMO,id=whatever | |
| (Obtain values from L33T and DEMO with lsusb) | |
| Make sure to provide QEMU access to /dev/bus/usb/X/Y, take X and Y from dmesg values |
| # Compress x265 with deinterlace using Cuda | |
| ffmpeg -hwaccel cuvid -i <INPUT> -pix_fmt p010le -vf yadif -c:v hevc_nvenc -preset slow -acodec copy <OUTPUT> #NOT WORKING ANYMORE | |
| ffmpeg -i <INPUT> -vf yadif=parity=auto -vcodec hevc_nvenc -acodec copy -preset slow <OUTPUT> | |
| # Merge Video+Audio | |
| ffmpeg -i <Video> -i <Audio> -codec copy -shortest <OUTPUT> | |
| # Extract audio from Video under Mono | |
| ffmpeg -i <VIDEO> -vn -ac 1 <Audio> |
| # Clear all sidekiq scheduled | |
| require 'sidekiq/api' | |
| Sidekiq::ScheduledSet.new.clear | |
| # Clear an specific queue by job name | |
| jobs = Sidekiq::ScheduledSet.new.select {|retri| retri.klass == 'job_name' } | |
| jobs.each(&:delete) |
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c and [c.
Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
| # Purge all Varnish cache | |
| varnishadm "ban req.url ~ /" |
| curl -XPUT <hostname-or-IP>:9200/_cluster/settings -H 'Content-Type: application/json' -d '{ | |
| "transient" :{ | |
| "cluster.routing.allocation.exclude._ip" : "X.X.X.X" | |
| } | |
| }' |