Skip to content

Instantly share code, notes, and snippets.

View Binary-Eater's full-sized avatar

Rahul Rameshbabu Binary-Eater

View GitHub Profile
@Binary-Eater
Binary-Eater / rust-book-update.log
Created December 21, 2025 04:30
Rust toolchain instability rant
new-user@pop-os:~/Documents/rust-book$ git pull
remote: Enumerating objects: 988, done.
remote: Counting objects: 100% (310/310), done.
remote: Compressing objects: 100% (147/147), done.
remote: Total 988 (delta 217), reused 163 (delta 163), pack-reused 678 (from 4)
Receiving objects: 100% (988/988), 5.67 MiB | 4.35 MiB/s, done.
Resolving deltas: 100% (516/516), completed with 9 local objects.
From github.com:rust-lang/book
3e9dc46a..39aeceaa main -> origin/main
* [new branch] 3rd-print-edition -> origin/3rd-print-edition
@Binary-Eater
Binary-Eater / nvidia-modeset-heads-dp.txt
Created November 11, 2025 19:26
nvidia-modeset heads DisplayPort LG
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX Open Kernel Module for x86_64 580.105.08 Release Build (notroot@) Wed Nov 5 02:43:24 UTC 2025
GCC version: Selected multilib: .;@m64
cat /proc/driver/nvidia-modeset/heads
deviceId : 00
pLockGroup : 00000000b68f7e9c
flipLock : no
head 0 : inactive
head 1 : inactive
@Binary-Eater
Binary-Eater / drm_client_rotation.bpftrace.log
Created August 9, 2025 20:56
drm_client_rotation.bpftrace Example
~/Documents/bpftrace-scripts/drm trunk
❯ sudo bpftrace ./drm_client_rotation.bpftrace
Attaching 1 probe...
drm_client_rotation: rotation: 0x2, return: 0
drm_client_rotation: rotation: 0x0, return: 0
drm_client_rotation: rotation: 0x0, return: 0
drm_client_rotation: rotation: 0x0, return: 0
drm_client_rotation: rotation: 0x2, return: 0
drm_client_rotation: rotation: 0x0, return: 0
drm_client_rotation: rotation: 0x0, return: 0
@Binary-Eater
Binary-Eater / ubuntu_rust_for_linux_setup.txt
Last active May 5, 2025 01:51
Non-NixOS Rust for Linux setup experience
new-user@pop-os:~/Documents/linux$ make rustavailable
***
*** Rust bindings generator 'bindgen' could not be found.
***
***
*** Please see Documentation/rust/quick-start.rst for details
*** on how to set up the Rust support.
***
make[1]: *** [/home/new-user/Documents/linux/Makefile:1798: rustavailable] Error 1
make: *** [Makefile:251: __sub-make] Error 2
@Binary-Eater
Binary-Eater / macro-backtrace.sh
Created March 3, 2025 02:48
Rust kernel compile invokes
make -j $(nproc) KRUSTFLAGS='-Z macro-backtrace' bzImage modules
@Binary-Eater
Binary-Eater / .gdbinit
Last active November 17, 2024 03:39
WA2 gdb debug session
set follow-fork-mode child
set substitute-path ../src-wine /home/binary-eater/Documents/Proton/wine
set substitute-path ../src-dxvk /home/binary-eater/Documents/Proton/dxvk
[ 60.178529] joy_bonnet_i2c: Firmware adafruit,joy-bonnet from open_firmware_table.
[ 60.178556] joy_bonnet_i2c: Id joy-bonnet-rpi-hat from id_table.
@Binary-Eater
Binary-Eater / ddcmd-hid-nvidia-shield.sh
Created November 4, 2024 07:04
A hid-nvidia-shield dynamic debug demo
sudo su -
less /proc/dynamic_debug/control
alias ddcmd='echo $* > /proc/dynamic_debug/control'
ddcmd '-p; module hid_nvidia_shield func * +p'
# Show dmesg/play around with the controller
# Discuss various dynamic debug modifiers
@Binary-Eater
Binary-Eater / ftrace-hid-nvidia-shield.sh
Created November 4, 2024 05:30
A hid-nvidia-shield ftrace demo
# Initial setup
sudo su -
mount -t tracefs nodev /sys/kernel/tracing
cat /sys/kernel/tracing/available_tracers
# Function tracer
echo function > /sys/kernel/tracing/current_tracer
echo 0 > /sys/kernel/tracing/tracing_on
echo > /sys/kernel/tracing/trace
@Binary-Eater
Binary-Eater / config-rust-aarch64
Last active October 6, 2024 21:43
rust-for-linux aarch64 command scratch
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 6.11.0-rc4 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="aarch64-unknown-linux-gnu-gcc (GCC) 13.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=130200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24100