Skip to content

Instantly share code, notes, and snippets.

View antoniopicone's full-sized avatar

Antonio Picone antoniopicone

View GitHub Profile
@antoniopicone
antoniopicone / wakeup-bt-zenbook.sh
Created September 16, 2026 11:33
A script to make Asus Zenbook wake up from suspend via Bluetooth Devices
# wake up via Bluetooth devices on Zenbook
sudo tee /etc/udev/rules.d/90-bluetooth-wakeup.rules << 'EOF'
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="8087", ATTR{idProduct}=="0037", ATTR{power/wakeup}="enabled"
EOF
sudo udevadm control --reload-rules
sudo udevadm trigger
@antoniopicone
antoniopicone / fix-howdy-zenbook.sh
Created August 25, 2026 18:48
Fix for howdy on cachyos with Asus Zenbook
#!/usr/bin/env bash
#
# fix-howdy-zenbook.sh
#
# Ripristina il funzionamento di Howdy (face unlock) su CachyOS dopo
# un aggiornamento del pacchetto "howdy", che sovrascrive le patch
# manuali applicate qui sotto.
#
# Contesto (ASUS Zenbook UX3405CA, badrobot):
# - Webcam: /dev/video0 = RGB (MJPG), /dev/video2 = IR (GREY),
@antoniopicone
antoniopicone / setup-usbguard.sh
Created August 4, 2026 18:01
Installer/configurator for USBGuard on CachyOS/Arch, including the desktop notifier (interactive Allow/Reject prompt for new USB devices) and autostart entry. Safe to re-run after kernel/system updates.
#!/usr/bin/env bash
#
# setup-usbguard.sh
#
# Idempotent installer/configurator for USBGuard on CachyOS/Arch, including
# the desktop notifier (interactive Allow/Reject prompt for new USB devices)
# and autostart entry. Safe to re-run after kernel/system updates.
#
# Usage:
# chmod +x setup-usbguard.sh
@antoniopicone
antoniopicone / setup-bt-wakeup.sh
Created August 4, 2026 17:34
Configures Wake-on-Bluetooth on CachyOS/Arch (and installs a service that automatically enables WakeAllowed on every paired Bluetooth device)
#!/usr/bin/env bash
#
# setup-bt-wakeup.sh
#
# Configures Wake-on-Bluetooth on CachyOS/Arch (Intel CNVi, e.g. Zenbook
# Arrow Lake-H) and installs a service that automatically enables
# WakeAllowed on every paired Bluetooth device (existing and future),
# so any paired mouse/keyboard can wake the laptop from suspend
# (useful in clamshell mode).
#
@antoniopicone
antoniopicone / setup_xe_gpu.sh
Last active September 26, 2026 23:06
Install Intel xe drivers for GPU (on Arrow Lake) on Fedora, replacing legacy i915 drivers
#!/usr/bin/env bash
set -euo pipefail
# ---------------------------------------------------------------------------
# Intel Xe GPU driver + video acceleration setup for Fedora 44
# Target: Intel Arrow Lake-H / Arc 140T (Xe2/Xe-LPG+ iGPU), e.g. Core Ultra
# 7 255H. Should also work on other Intel Gen8+ iGPUs (Meteor Lake, Lunar
# Lake, Battlemage-based) with no changes.
#
# What this script does:
# 1. Detects the Intel GPU PCI device ID automatically (no hardcoded IDs).
@antoniopicone
antoniopicone / build_intel_npu_driver.sh
Created July 13, 2026 13:15
Build Intel NPU dirver from source on Fedora 44
#!/usr/bin/env bash
set -euo pipefail
REPO_DIR="$HOME/linux-npu-driver"
JOBS="$(nproc)"
MAX_GTEST_RETRIES=3
VENV_DIR="$HOME/npu-env"
MODEL_ID="Qwen/Qwen2.5-1.5B-Instruct"
MODEL_DIR="$HOME/qwen-npu-test"
@antoniopicone
antoniopicone / bt-wakeup-setup-fedora.sh
Last active August 4, 2026 17:51
Script to enables wake-from-Bluetooth on Intel Meteor Lake laptops (e.g. ASUS Zenbook # UX3405CA) running Fedora with s2idle (modern standby / S0ix).
#!/usr/bin/env bash
#
# bt-wakeup-setup.sh
#
# Enables wake-from-Bluetooth on Intel Meteor Lake laptops (e.g. ASUS Zenbook
# UX3405CA) running Fedora with s2idle (modern standby / S0ix).
#
# Fixes two things that are NOT persisted across reboot by default:
# 1. USB wakeup flag on the Intel Bluetooth USB device (8087:0037)
# 2. ACPI CNVW node (Intel CNVi Wi-Fi/BT combo) wakeup, which controls
@antoniopicone
antoniopicone / user.js
Created May 14, 2026 18:00
Zen Browser user.js scroll value to slow down on touchpad
user_pref("apz.gtk.pangesture.pixel_delta_mode_multiplier", 10);
@antoniopicone
antoniopicone / config.ghostty
Last active June 20, 2026 09:05
Ghostty configuration
# Font
font-family = Hack Nerd Font Mono
font-size = 14
language = it
window-padding-x = 10
theme = Catppuccin Mocha
shell-integration-features = no-cursor
cursor-style = underline
@antoniopicone
antoniopicone / wake-on-usb_or_bt.sh
Last active May 14, 2026 06:55
An udev script to enable wake on USB/Bluetooth
sudo tee /etc/udev/rules.d/90-wakeup.rules << 'EOF'
# Wake on USB
ACTION=="add", SUBSYSTEM=="usb", ATTR{power/wakeup}="enabled"
# Wake on Bluetooth
ACTION=="add", SUBSYSTEM=="bluetooth", ATTR{power/wakeup}="enabled"
# Wake on HID (tastiere/mouse bluetooth)
ACTION=="add", SUBSYSTEM=="hid", ATTR{power/wakeup}="enabled"
EOF