Skip to content

Instantly share code, notes, and snippets.

View nonkronk's full-sized avatar
:octocat:
g.dev/nonkronk

Irvan Tristian nonkronk

:octocat:
g.dev/nonkronk
View GitHub Profile
@nonkronk
nonkronk / Enable AMD RX 6600XT Resizable Bar on Unraid 6.12.md
Last active April 2, 2024 16:46
Enable AMD RX 6600XT Resizable Bar on Unraid 6.12

Enable AMD RX 6600XT Resizable Bar on Unraid 6.12

  • Add to UserScripts:

    # Change the PCI address and GPU ID accordingly (Unraid GUI -> Tools -> System Devices)
    echo -n "0000:0d:00.0" > /sys/bus/pci/drivers/vfio-pci/unbind
    echo 13 > /sys/bus/pci/devices/0000\:0d\:00.0/resource0_resize
    echo 3 > /sys/bus/pci/devices/0000\:0d\:00.0/resource2_resize

echo -n "1002 73ff" > /sys/bus/pci/drivers/vfio-pci/new_id || echo -n "0000:0d:00.0" > /sys/bus/pci/drivers/vfio-pci/bind

@nonkronk
nonkronk / Enable C6 Support for AMD Ryzen 5950x on Unraid with CoreFreq.md
Last active March 18, 2024 07:57
Enable C6 Support for AMD Ryzen 5950x on Unraid with CoreFreq

Enable C6 Support for AMD Ryzen 5950x on Unraid with CoreFreq

Requirements

  • Install CoreFreq via remote url plugin: unraid-corefreq

  • Go to settings > CoreFreq and run the pre test. *proceed to the next steps if it's successful

  • Create a file /boot/config/modprobe.d/corefreqk.conf with the following content:

    options corefreqk Register_ClockSource=1 Register_CPU_Freq=1 Register_Governor=1 Register_CPU_Idle=1 PkgCStateLimit=6
    
@nonkronk
nonkronk / easiest-command-snapshot-unraid-vm.md
Last active February 26, 2024 11:18
The easiest command to snapshot Unraid VM

The easiest command to snapshot Unraid VM

cd /mnt/primary_cache/domains/WORKING-VM
cp --reflink=always mac_hdd_ng.img mac_hdd_ng_$(date +%Y_%m_%d)img.
@nonkronk
nonkronk / install-macos-ventura-sonoma-unraid-amd-5950x-rx6600xt.md
Last active November 1, 2024 16:26
Install macOS Ventura/Sonoma as a VM on Unraid Server using AMD Ryzen 9 5950x + RX 6600 XT

Offline-Install macOS Ventura/Sonoma as a VM on Unraid Server using AMD Ryzen 9 5950x + RX 6600 XT

Installation Preparation

Tools and packages are from OSX-KVM repository.

On Unraid Server

# Download fetch-macOS-v2.py and run_offline.sh script
@nonkronk
nonkronk / fix-macos-ventura-usb-bluetooth-csr5810-hackintosh.md
Last active February 26, 2024 15:49
Fix macOS Ventura USB & Bluetooth CSR5810 Hackintosh

Fix macOS Ventura USB & Bluetooth CSR5810 Hackintosh Unraid

USB fix

Change the default USB Controller from EHCI to nec XHCI / qemu XHCI

Delete all the containing EHCI lines:

...
@nonkronk
nonkronk / fix-macos-ventura-rx6600-xt-gpu-passthrough-unraid.md
Last active February 25, 2024 00:28
Fix macOS Ventura RX 6600 XT GPU Passthrough on UnRaid

Fix macOS Ventura RX 6600 XT GPU Passthrough on Unraid

Add following qemu arg to the VM's XML::

...
  <qemu:commandline>
...
    <qemu:arg value='-global'/>
 
@nonkronk
nonkronk / WORKING-VM.xml
Last active February 25, 2024 04:17
macOS Ventura KVM definition
<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='102' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>WORKING-VM</name>
<uuid>caded4fe-929c-4759-7458-f8526e2c4bd1</uuid>
<description>macOS Ventura</description>
<metadata>
<vmtemplate xmlns="unraid" name="Arch" icon="Apple_old3.png" os="arch"/>
</metadata>
<memory unit='KiB'>16777216</memory>
<currentMemory unit='KiB'>16777216</currentMemory>
@nonkronk
nonkronk / config-plist-opencore-macos-disk-img-unraid.md
Last active February 27, 2024 02:15
Access config.plist OpenCore from a macos_disk.img on Unraid

Access config.plist OpenCore from a macos_disk.img on Unraid

Mount the EFI image with the following commands

modprobe nbd max_part=8
qemu-nbd --connect=/dev/nbd0 /mnt/user/domains/WORKING-VM/mac_hdd_ng.img
mkdir /mnt/nbd
mount /dev/nbd0p1 /mnt/nbd
@nonkronk
nonkronk / efootball-network-optimization-mikrotik.rsc
Last active May 30, 2024 13:53
eFootball Network Optimization on Mikrotik Router
# eFootball Network Optimization on Mikrotik
# Assuming the target PC/Console IP is 192.168.0.100 with network range of 192.168.0.1-254 and bandwidth of 30mbps/10mbps
# With ether1 as WAN and ether2 as LAN
# Create Mangle for eFootball Traffic
/ip firewall mangle
add action=mark-connection chain=prerouting comment="MARK CONN KONAMI - TCP" \
connection-state=new dst-port=30000-35000 new-connection-mark=konami_conn \
passthrough=yes protocol=tcp src-address=192.168.0.100
@nonkronk
nonkronk / shutdown-after-powerloss.sh
Created April 19, 2023 15:21
Script to auto-shutdown UNRAID after x minutes of power loss
#!/bin/bash
#set which hosts will be checked
CHECKHOST1="10.0.0.100"
CHECKHOST2="10.0.0.100"
MAX_FAILS=10
FAILCOUNT=0
GLOBALFAILCOUNT=0
PERIOD=30