Skip to content

Instantly share code, notes, and snippets.

View trinitronx's full-sized avatar
⛩️
Zazen

James Cuzella trinitronx

⛩️
Zazen
View GitHub Profile
@trinitronx
trinitronx / LIFX Lights, Connectivity Issues and hostapd Configuration.md
Last active May 23, 2025 07:53
LIFX Lights & Connectivity Issues: hostapd (mis)Configuration

LIFX Lights & Connectivity Issues: hostapd (mis)configuration

There are some issues with LIFX lights reliability that can be fixed on home routers by using Open Source firmware such as OpenWrt.

As I've recently observed on my network, the LIFX bulbs often don't respond to the AP frequently enough to avoid being disassociated for inactivity (see notes later about ap_max_inactivity and max_listen_interval). Another issue common to OpenWrt or any Linux-based router that uses hostapd is that disassoc_low_ack=1 is the default setting unless you turn it off explicitly with disassoc_low_ack=0.

The comments in the default example hostapd.conf explain what this setting does:

# Disassociate stations based on excessive transmission failures or other
May 17 13:42:40 examplehost kernel: usb 1-3: new full-speed USB device number 12 using xhci_hcd
May 17 13:42:40 examplehost kernel: usb 1-3: New USB device found, idVendor=0403, idProduct=6015, bcdDevice=10.00
May 17 13:42:40 examplehost kernel: usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
May 17 13:42:40 examplehost kernel: usb 1-3: Product: Infinite Noise TRNG
May 17 13:42:40 examplehost kernel: usb 1-3: Manufacturer: 13-37.org
May 17 13:42:40 examplehost kernel: usb 1-3: SerialNumber: 1337-XXXXXXXX
May 17 13:42:40 examplehost kernel: ftdi_sio 1-3:1.0: FTDI USB Serial Device converter detected
May 17 13:42:40 examplehost kernel: usb 1-3: Detected FT-X
May 17 13:42:40 examplehost kernel: usb 1-3: FTDI USB Serial Device converter now attached to ttyUSB0
May 17 13:42:40 examplehost mtp-probe[4012024]: checking bus 1, device 12: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3"
@trinitronx
trinitronx / GVT-d-xnu-kernel-panic-IGGuC.cpp_1698.log
Created May 7, 2025 05:34
macOS Sequoia 15.4.1 OSX-KVM kernel panic - com.apple.driver.AppleIntelKBLGraphics IGGuc.cpp:1698
BdsDxe: failed to start Boot0008 "EFI Internal Shell" from Fv(7CB8BDC9-F8EB-4F34-AAEA-3EE4AF6516A1)/FvFile(7C04A583-9E3E-4F1C-AD65-E05268D0B4D1): Invalid Parameter
BdsDxe: loading Boot0003 "UEFI QEMU HARDDISK QM00021 " from PciRoot(0x0)/Pci(0x6,0x0)/Sata(0x4,0xFFFF,0x0)
BdsDxe: starting Boot0003 "UEFI QEMU HARDDISK QM00021 " from PciRoot(0x0)/Pci(0x6,0x0)/Sata(0x4,0xFFFF,0x0)
OCC: No compatible mode for 1344x840@0 (max: 0) resolution
OC: Changed resolution to 1344x840@0 (max: 0, force: 0) from 1344x840@32 - Not Found
#[EB|LOG:EXITBS:END] _
#[EB.BST.FBS|-]
#[EB|B:BOOT]
#[EB|LOG:HANDOFF TO XNU] _
======== End of efiboot serial output. ========
@trinitronx
trinitronx / xfs_pre_reboot_failure.log
Created March 7, 2025 00:02
XFS errors - pre-reboot
Mar 01 06:47:44 examplehost.internal kernel: 00000040: 3a 35 3e 14 bc 41 1a d2 ab 75 8b cc 9f 6f b5 74 :5>..A...u...o.t
Mar 01 06:47:44 examplehost.internal kernel: 00000050: 65 39 12 fa 5c b0 6c bc 15 7d 59 74 88 54 96 f2 e9..\.l..}Yt.T..
Mar 01 06:47:44 examplehost.internal kernel: 00000060: 69 f2 38 59 ec 1f 5a 42 31 01 8f 1f 93 a3 45 81 i.8Y..ZB1.....E.
Mar 01 06:47:44 examplehost.internal kernel: 00000070: 3a d3 96 3a d8 fb 97 97 53 e9 c6 1d 6a 62 07 66 :..:....S...jb.f
Mar 01 06:47:44 examplehost.internal kernel: XFS (md0): Metadata corruption detected at xfs_buf_ioend+0x1a0/0x5e0 [xfs], xfs_inode block 0x4d3d1d80 xfs_inode_buf_verify
Mar 01 06:47:44 examplehost.internal kernel: XFS (md0): Unmount and run xfs_repair
Mar 01 06:47:44 examplehost.internal kernel: XFS (md0): First 128 bytes of corrupted metadata buffer:
Mar 01 06:47:44 examplehost.internal kernel: 00000000: 41 06 81 bb 31 15 ee 55 d2 fc e7 32 d7 ac 0a 5d A...1..U...2...]
Mar 01 06:47:44 examplehost.internal kernel: 00000010: da ee db 3
@trinitronx
trinitronx / xfs_mount_failure.log
Created March 6, 2025 19:19
XFS mount failure - mdadm, xfs_info & dmesg logs
$ cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md0 : active raid6 sdf1[2] sda1[1] sdb[0] nvme0n1p6[3] nvme1n1p6[4]
5860540224 blocks level 6, 64k chunk, algorithm 2 [5/5] [UUUUU]
unused devices: <none>
$ sudo mdadm --detail /dev/md0
/dev/md0:
Version : 0.90
@trinitronx
trinitronx / pcloud-reinstall-test.log
Created February 28, 2025 13:48
pcloud clean reinstall tests with appimagelauncher-git version r1329.3d42d4c-2 (fails to start) AND old semi-broken appimagelauncher version 2.2.0-8
# Old checksums
$ sha256sum ~/Downloads/pcloud /usr/bin/pcloud
209cee76dcd39b776bb6bdb7e8309ef41c739f34c3301cbe0c9c58420c302e40 /home/exampleuser/Downloads/pcloud
209cee76dcd39b776bb6bdb7e8309ef41c739f34c3301cbe0c9c58420c302e40 /usr/bin/pcloud
$ ls -lA ~/.config/pcloud
total 72
drwx------ 3 exampleuser exampleuser 4096 Feb 28 04:23 blob_storage
drwx------ 3 exampleuser exampleuser 12288 Nov 26 18:10 Cache
-rw------- 1 exampleuser exampleuser 20480 Nov 26 18:10 Cookies
@trinitronx
trinitronx / strace-pcloud.log
Created February 27, 2025 09:10
strace of pcloud with appimagelauncher-git version r1329.3d42d4c-2
execve("/usr/bin/pcloud", ["/usr/bin/pcloud"], 0x7ffec7b79740 /* 158 vars */) = 0
brk(NULL) = 0xf2c2000
brk(0xf2c2d80) = 0xf2c2d80
arch_prctl(ARCH_SET_FS, 0xf2c2400) = 0
set_tid_address(0xf2c26d0) = 2634759
set_robust_list(0xf2c26e0, 24) = 0
rseq(0xf2c2320, 0x20, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/usr/lib/appimagelauncher/binfmt"..., 4096) = 44
getrandom("\xa9\x0c\x3d\xc0\x56\xc6\x70\x73", 8, GRND_NONBLOCK) = 8
@trinitronx
trinitronx / OSX-KVM - Fixing the SSDT-EHCI for working usb-kbd and usb-tablet.md
Last active May 21, 2025 12:08
Diagnosing and fixing mismatched SSDT USB controller PCI addresses in OSX-KVM

Problem

When adding and removing devices to a QEMU VM created from OSX-KVM, I encountered some device problems.

While tinkering and fiddling with adding and removing different QEMU devices to the VM, the order of -device flags passed caused PCI addresses to keep changing. This, in turn caused keyboard and mouse support to stop working for me, until I found out what the problem was.

@trinitronx
trinitronx / install-vagrant-libvirt.sh
Created December 30, 2024 22:38
Workaround script to install vagrant-libvirt + vagrant 2.4.3 on Arch Linux & Arch-based distros
#!/bin/bash
export VAGRANT_DEBUG=1
export VAGRANT_DEBUG_LAUNCHER=1
export VAGRANT_LOG=debug
## Setting above debug options reveals vagrant substrate's default environment:
#2024/12/17 09:02:16 launcher: env "CFLAGS" = "-I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include/libxml2 -lcurl -I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include/libxml2"
#2024/12/17 09:02:16 launcher: env "CONFIGURE_ARGS" = "with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib with-curl-include=/usr/include/curl with-curl-lib=/usr/lib "
#2024/12/17 09:02:16 launcher: env "CPPFLAGS" = "-I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include/libxml2"
[2024-09-11T17:48:17-0600] [PACMAN] Running 'pacman -Sy'
[2024-09-11T17:48:17-0600] [PACMAN] synchronizing package lists
[2024-09-11T17:57:56-0600] [PACMAN] Running 'pacman -Syu'
[2024-09-11T17:57:56-0600] [PACMAN] synchronizing package lists
[2024-09-11T17:57:56-0600] [PACMAN] starting full system upgrade
[2024-09-11T17:58:11-0600] [ALPM] transaction started
[2024-09-11T17:58:11-0600] [ALPM] upgraded tzdata (2024b-1 -> 2024b-2)
[2024-09-11T17:58:11-0600] [ALPM] upgraded gcc-libs (14.2.1+r32+geccf707e5ce-1 -> 14.2.1+r134+gab884fffe3fc-1)
[2024-09-11T17:58:11-0600] [ALPM] upgraded systemd-libs (256.5-1 -> 256.6-1)
[2024-09-11T17:58:12-0600] [ALPM] upgraded systemd (256.5-1 -> 256.6-1)