Skip to content

Instantly share code, notes, and snippets.

View ayufan's full-sized avatar

Kamil Trzciński ayufan

View GitHub Profile
@ayufan
ayufan / klipper-make
Last active February 17, 2024 09:28
Easily manage many klipper configs
#!/bin/bash
case "$1" in
config-*)
CONFIG_NAME="$1"
;;
configs)
cd ~/klippy-configs
ls -1 klipper-config-*
@ayufan
ayufan / taskset.sh
Last active January 4, 2024 10:56
KVM CPU pinning for Proxmox VE
#!/bin/bash
set -eo pipefail
VMID=200
cpu_tasks() {
expect <<EOF | sed -n 's/^.* CPU .*thread_id=\(.*\)$/\1/p' | tr -d '\r' || true
spawn qm monitor $VMID
expect ">"
@ayufan
ayufan / rpi0-2w.md
Last active October 3, 2023 21:26
RPI0/2W optimisation + Hyperpixel/Fsytec CTP

/boot

cp /boot/bcm2710-rpi-3-b.dtb /boot/bcm2710-rpi-zero-2.dtb /boot/bcm2710-rpi-zero-2-w.dtb

/boot/config.txt append

dtoverlay=disable-bt
@ayufan
ayufan / rockpro64-android.dts
Created May 23, 2018 16:49
RockPro64 Android DTS
/dts-v1/;
/memreserve/ 0x0000000005600000 0x0000000000014000;
/memreserve/ 0x0000000005bf0000 0x00000000001ad5a4;
/ {
compatible = "rockchip,rk3399-mid", "rockchip,rk3399";
interrupt-parent = <0x1>;
#address-cells = <0x2>;
#size-cells = <0x2>;
@ayufan
ayufan / rpi-4b-sd-usb3.md
Last active February 6, 2023 17:58
RaspberryPI 4B SD card tests over USB3 card reader

Sandisk 32GB Ultra A1 (2022)

	Command line used: iozone -e -I -a -s 100M -r 16k -r 512k -r 1024k -i 0 -i 1 -i 2 -f test
  
                                                              random    random     bkwd    record    stride                                    
              kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
          102400      16     9133     8666    21972    20186    19566     9457                                                                
          102400     512    18792    18809    68554    73029    65743    19684                                                                
          102400    1024    18777    15908    60207    65950    70765    18875    
@ayufan
ayufan / pinebookpro-power-usage.txt
Last active December 24, 2022 19:09
Pinebook Pro Power Usage
100% brightness - 7W
40% brightness - 4.8W
0% brightness - 3.5W
0% brightness, all cores - 8.5W
100% brightness, all cores - 12.2W
40% brightness, youtube 480p, vp9 - 7.3W
40% brightness, youtube 720p, drop frames, vp9 - 10W
40% brightness, youtube 1080p, choppy, vp9 - 10W
40% brightness, youtube 480p, avc1 - 6.7W
40% brightness, youtube 720p, avc1 - 7W
@ayufan
ayufan / bluetooth-copy.bash
Created October 14, 2022 15:08
Steam Deck dual-boot copy Windows Bluetooth Paring
#!/bin/bash
if [[ $# -ne 1 ]]; then
echo "usage: $0 <windows-partition>"
echo " ex.: $0 /dev/nvme0n1p10"
echo " ex.: $0 /dev/mmcblk0p3"
exit 1
fi
if [[ $(id -u) != 0 ]]; then
@ayufan
ayufan / build.prop
Created November 23, 2016 20:13
Mi Box 3 build properties
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=MHC19J
ro.build.display.id=once-user 6.0.1 MHC19J 540
ro.build.version.incremental=540
ro.build.version.sdk=23
ro.build.version.preview_sdk=0
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=6.0.1
@ayufan
ayufan / scores.md
Created February 2, 2018 08:35
Geekbench average scores for A64/H6/RK3328/RK3399

Allwinner A64

$ get-gb-scores.sh sun50iw1p1
Average Geekbench 4 scores for `sun50iw1p1`:

 -> Downloading page 10
Single-Core Score:	458.991
Multi-Core Score:	1133.27
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-device.dts b/arch/arm64/boot/dts/rockchip/rk3399-device.dts
index e4afa22cf658..3344ce45d5c8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-device.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-device.dts
@@ -658,6 +658,11 @@ accelerometer@68 {
interrupts = <RK_PC6 IRQ_TYPE_LEVEL_LOW>;
vdd-supply = <&vcc_1v8>;
vddio-supply = <&vcc_1v8>;
+
+ mount-matrix =