{"slug": "omarchy-hyprland-fix-for-asus-rog-zephyrus-g14-amd-igpu-nvidia-dgpu", "title": "Omarchy / Hyprland Fix for ASUS ROG Zephyrus G14 (AMD iGPU + NVIDIA dGPU)", "summary": "A developer has published a bash script that fixes multiple Hyprland and Omarchy display issues on the ASUS ROG Zephyrus G14 with AMD iGPU and NVIDIA dGPU. The script addresses the Aquamarine atomic DRM commit freeze by setting AQ_NO_ATOMIC=1, forces a software cursor fallback for invisible cursors, creates persistent udev symlinks for GPU routing, and corrects HiDPI scaling in Omarchy's Lua configuration.", "body_md": "| #!/usr/bin/env bash | |\n| # ============================================================================== | |\n| # Omarchy / Hyprland Setup & Fix for ASUS ROG Zephyrus G14 | |\n| # Hardware: AMD Ryzen AI 9 HX 370 (Radeon 890M iGPU) + NVIDIA GeForce RTX dGPU | |\n| # Display: 14\" 2.8K/3K 120Hz OLED Panel (eDP-1) | |\n| # ============================================================================== | |\n| # This script resolves: | |\n| # 1. Aquamarine atomic DRM commit freeze ([AQ] atomic drm request: failed to commit) | |\n| # by setting AQ_NO_ATOMIC=1 across UWSM, PAM, and shell environments. | |\n| # 2. Invisible/frozen cursor on legacy DRM by forcing software cursor fallback. | |\n| # 3. Colon-safe, persistent GPU device routing via udev symlinks (/dev/dri/amd-igpu). | |\n| # 4. Omarchy Lua configuration errors in monitors.lua (proper 1.5x HiDPI scaling). | |\n| # 5. Early KMS module loading in mkinitcpio and Limine bootloader DRM modesetting. | |\n| # | |\n| # Usage: | |\n| # curl -sL <your-new-gist-raw-url> | bash | |\n| # ============================================================================== | |\n| set -eo pipefail | |\n| RED='\\033[0;31m' | |\n| GREEN='\\033[0;32m' | |\n| YELLOW='\\033[1;33m' | |\n| BLUE='\\033[0;34m' | |\n| BOLD='\\033[1m' | |\n| NC='\\033[0m' | |\n| info() { echo -e \"${BLUE}[INFO]${NC} $*\"; } | |\n| success() { echo -e \"${GREEN}[SUCCESS]${NC} $*\"; } | |\n| warn() { echo -e \"${YELLOW}[WARN]${NC} $*\"; } | |\n| error() { echo -e \"${RED}[ERROR]${NC} $*\"; } | |\n| echo -e \"${BOLD}${BLUE}======================================================${NC}\" | |\n| echo -e \"${BOLD}${BLUE} Omarchy / Hyprland G14 Hybrid Graphics Fix ${NC}\" | |\n| echo -e \"${BOLD}${BLUE}======================================================${NC}\" | |\n| # ------------------------------------------------------------------------------ | |\n| # 1. GPU Detection & Persistent Udev Symlinks | |\n| # ------------------------------------------------------------------------------ | |\n| info \"Detecting AMD iGPU and NVIDIA dGPU PCI addresses...\" | |\n| AMD_PCI=$(lspci -D -d 1002::03xx 2>/dev/null | awk '{print $1}' | head -n 1 || true) | |\n| NVIDIA_PCI=$(lspci -D -d 10de::03xx 2>/dev/null | awk '{print $1}' | head -n 1 || true) | |\n| # Fallback detection via VGA/3D controller strings if class filter missed | |\n| if [[ -z \"$AMD_PCI\" ]]; then | |\n| AMD_PCI=$(lspci -D 2>/dev/null | grep -i -E \"VGA|3D|Display\" | grep -i -E \"AMD|ATI\" | awk '{print $1}' | head -n 1 || true) | |\n| fi | |\n| if [[ -z \"$NVIDIA_PCI\" ]]; then | |\n| NVIDIA_PCI=$(lspci -D 2>/dev/null | grep -i -E \"VGA|3D|Display\" | grep -i \"NVIDIA\" | awk '{print $1}' | head -n 1 || true) | |\n| fi | |\n| info \"Detected AMD iGPU at PCI: ${AMD_PCI:-'Not found'}\" | |\n| info \"Detected NVIDIA dGPU at PCI: ${NVIDIA_PCI:-'Not found'}\" | |\n| UDEV_RULE_FILE=\"/etc/udev/rules.d/99-hyprland-drm.rules\" | |\n| if command -v sudo &>/dev/null && [[ -n \"$AMD_PCI\" ]]; then | |\n| info \"Configuring persistent udev rules in ${UDEV_RULE_FILE}...\" | |\n| sudo bash -c \"cat << 'UDEV' > ${UDEV_RULE_FILE} | |\n| # Persistent symlinks for Hyprland/Aquamarine (avoids colon-delimiter PCI path bug) | |\n| KERNEL==\\\"card*\\\", SUBSYSTEM==\\\"drm\\\", SUBSYSTEMS==\\\"pci\\\", KERNELS==\\\"${AMD_PCI}\\\", SYMLINK+=\\\"dri/amd-igpu\\\" | |\n| UDEV\" | |\n| if [[ -n \"$NVIDIA_PCI\" ]]; then | |\n| sudo bash -c \"cat << UDEV >> ${UDEV_RULE_FILE} | |\n| KERNEL==\\\"card*\\\", SUBSYSTEM==\\\"drm\\\", SUBSYSTEMS==\\\"pci\\\", KERNELS==\\\"${NVIDIA_PCI}\\\", SYMLINK+=\\\"dri/nvidia-dgpu\\\" | |\n| UDEV\" | |\n| fi | |\n| sudo udevadm control --reload-rules 2>/dev/null || true | |\n| sudo udevadm trigger --subsystem-match=drm 2>/dev/null || true | |\n| # Create immediate symlinks right now | |\n| AMD_CARD=$(readlink -f \"/dev/dri/by-path/pci-${AMD_PCI}-card\" 2>/dev/null || true) | |\n| if [[ -n \"${AMD_CARD}\" && -e \"${AMD_CARD}\" ]]; then | |\n| sudo ln -sfn \"${AMD_CARD}\" /dev/dri/amd-igpu | |\n| fi | |\n| if [[ -n \"$NVIDIA_PCI\" ]]; then | |\n| NVIDIA_CARD=$(readlink -f \"/dev/dri/by-path/pci-${NVIDIA_PCI}-card\" 2>/dev/null || true) | |\n| if [[ -n \"${NVIDIA_CARD}\" && -e \"${NVIDIA_CARD}\" ]]; then | |\n| sudo ln -sfn \"${NVIDIA_CARD}\" /dev/dri/nvidia-dgpu | |\n| fi | |\n| fi | |\n| success \"Udev rules and /dev/dri symlinks configured.\" | |\n| fi | |\n| # Set target primary display device | |\n| if [[ -e /dev/dri/amd-igpu ]]; then | |\n| AQ_DEVICES=\"/dev/dri/amd-igpu\" | |\n| else | |\n| AQ_DEVICES=\"/dev/dri/card0\" | |\n| fi | |\n| info \"Using primary display device: ${AQ_DEVICES}\" | |\n| # ------------------------------------------------------------------------------ | |\n| # 2. Configure UWSM & Session Environment Variables | |\n| # ------------------------------------------------------------------------------ | |\n| info \"Configuring environment variables for Aquamarine and software cursor...\" | |\n| set_env_var() { | |\n| local file=\"$1\" | |\n| local key=\"$2\" | |\n| local val=\"$3\" | |\n| mkdir -p \"$(dirname \"$file\")\" | |\n| touch \"$file\" | |\n| sed -i \"/^export ${key}=/d\" \"$file\" | |\n| sed -i \"/^${key}=/d\" \"$file\" | |\n| echo \"export ${key}=\\\"${val}\\\"\" >> \"$file\" | |\n| } | |\n| # UWSM Hyprland environment (~/.config/uwsm/env-hyprland) | |\n| set_env_var \"${HOME}/.config/uwsm/env-hyprland\" \"AQ_NO_ATOMIC\" \"1\" | |\n| set_env_var \"${HOME}/.config/uwsm/env-hyprland\" \"WLR_NO_HARDWARE_CURSORS\" \"1\" | |\n| set_env_var \"${HOME}/.config/uwsm/env-hyprland\" \"AQ_DRM_DEVICES\" \"${AQ_DEVICES}\" | |\n| # UWSM General environment (~/.config/uwsm/env) | |\n| set_env_var \"${HOME}/.config/uwsm/env\" \"AQ_NO_ATOMIC\" \"1\" | |\n| set_env_var \"${HOME}/.config/uwsm/env\" \"WLR_NO_HARDWARE_CURSORS\" \"1\" | |\n| # Shell Profile (~/.bash_profile) | |\n| set_env_var \"${HOME}/.bash_profile\" \"AQ_NO_ATOMIC\" \"1\" | |\n| set_env_var \"${HOME}/.bash_profile\" \"WLR_NO_HARDWARE_CURSORS\" \"1\" | |\n| # System-wide environment (/etc/environment for display managers like greetd/sddm) | |\n| if command -v sudo &>/dev/null; then | |\n| sudo bash -c 'touch /etc/environment | |\n| sed -i \"/^AQ_NO_ATOMIC=/d\" /etc/environment | |\n| sed -i \"/^WLR_NO_HARDWARE_CURSORS=/d\" /etc/environment | |\n| echo \"AQ_NO_ATOMIC=1\" >> /etc/environment | |\n| echo \"WLR_NO_HARDWARE_CURSORS=1\" >> /etc/environment' | |\n| fi | |\n| success \"Environment variables written to UWSM, bash_profile, and /etc/environment.\" | |\n| # ------------------------------------------------------------------------------ | |\n| # 3. Configure Omarchy Hyprland Lua Files | |\n| # ------------------------------------------------------------------------------ | |\n| info \"Configuring Omarchy Hyprland Lua settings...\" | |\n| HYPR_DIR=\"${HOME}/.config/hypr\" | |\n| mkdir -p \"${HYPR_DIR}\" | |\n| # Write valid Lua syntax to monitors.lua (OLED 2880x1800@120Hz at 1.5x scale) | |\n| cat << 'EOF' > \"${HYPR_DIR}/monitors.lua\" | |\n| -- Omarchy Monitor Configuration | |\n| local omarchy_monitor_scale = 1.5 | |\n| local omarchy_gdk_scale = 1.5 | |\n| hl.env(\"GDK_SCALE\", tostring(omarchy_gdk_scale)) | |\n| hl.monitor({ | |\n| output = \"eDP-1\", | |\n| mode = \"2880x1800@120\", | |\n| position = \"0x0\", | |\n| scale = omarchy_monitor_scale | |\n| }) | |\n| EOF | |\n| success \"Configured ${HYPR_DIR}/monitors.lua\" | |\n| # Clean up any legacy or invalid calls in hyprland.lua | |\n| if [[ -f \"${HYPR_DIR}/hyprland.lua\" ]]; then | |\n| sed -i '/hl.cursor/,/})/d' \"${HYPR_DIR}/hyprland.lua\" | |\n| sed -i '/no_hardware_cursors/d' \"${HYPR_DIR}/hyprland.lua\" | |\n| sed -i '/AQ_DRM_DEVICES/d' \"${HYPR_DIR}/hyprland.lua\" | |\n| sed -i '/by-path/d' \"${HYPR_DIR}/hyprland.lua\" | |\n| success \"Cleaned up ${HYPR_DIR}/hyprland.lua\" | |\n| fi | |\n| # ------------------------------------------------------------------------------ | |\n| # 4. Early KMS Initramfs & Bootloader Options | |\n| # ------------------------------------------------------------------------------ | |\n| if command -v sudo &>/dev/null; then | |\n| # mkinitcpio early KMS | |\n| MKINITCPIO=\"/etc/mkinitcpio.conf\" | |\n| if [[ -f \"${MKINITCPIO}\" ]]; then | |\n| info \"Configuring early KMS modules in ${MKINITCPIO}...\" | |\n| if ! grep -q \"amdgpu\" \"${MKINITCPIO}\" || ! grep -q \"nvidia_drm\" \"${MKINITCPIO}\"; then | |\n| sudo cp \"${MKINITCPIO}\" \"${MKINITCPIO}.bak.$(date +%s)\" | |\n| sudo sed -i 's/^MODULES=(.*/MODULES=(amdgpu nvidia nvidia_modeset nvidia_uvm nvidia_drm)/' \"${MKINITCPIO}\" | |\n| info \"Regenerating initramfs images (mkinitcpio -P)...\" | |\n| sudo mkinitcpio -P || warn \"mkinitcpio encountered a non-fatal warning; continuing.\" | |\n| success \"Initramfs early KMS updated.\" | |\n| else | |\n| success \"Early KMS modules already present in ${MKINITCPIO}.\" | |\n| fi | |\n| fi | |\n| # Limine bootloader kernel parameters | |\n| LIMINE_CONF=\"/etc/default/limine\" | |\n| if [[ -f \"${LIMINE_CONF}\" ]]; then | |\n| if ! grep -q \"nvidia_drm.modeset=1\" \"${LIMINE_CONF}\"; then | |\n| info \"Adding nvidia_drm modeset parameters to ${LIMINE_CONF}...\" | |\n| sudo sed -i 's/APPEND=\"/APPEND=\"nvidia_drm.modeset=1 nvidia_drm.fbdev=1 /' \"${LIMINE_CONF}\" || true | |\n| success \"Limine configuration updated.\" | |\n| fi | |\n| fi | |\n| fi | |\n| # ------------------------------------------------------------------------------ | |\n| # 5. Summary & Completion | |\n| # ------------------------------------------------------------------------------ | |\n| echo -e \"${BOLD}${GREEN}======================================================${NC}\" | |\n| echo -e \"${BOLD}${GREEN} Setup Completed Successfully! ${NC}\" | |\n| echo -e \"${BOLD}${GREEN}======================================================${NC}\" | |\n| echo -e \"Applied settings:\" | |\n| echo -e \" • ${BOLD}AQ_NO_ATOMIC=1${NC} (Bypasses AMD Strix Point DRM atomic commit bug)\" | |\n| echo -e \" • ${BOLD}WLR_NO_HARDWARE_CURSORS=1${NC} (Prevents cursor freezes on legacy DRM)\" | |\n| echo -e \" • ${BOLD}AQ_DRM_DEVICES=${AQ_DEVICES}${NC}\" | |\n| echo -e \" • ${BOLD}monitors.lua${NC} configured for 2880x1800@120Hz with 1.5x HiDPI scale\" | |\n| echo -e \"\" | |\n| echo -e \"To apply all kernel and module changes, restart your laptop:\" | |\n| echo -e \" ${YELLOW}sudo reboot${NC}\" |", "url": "https://wpnews.pro/news/omarchy-hyprland-fix-for-asus-rog-zephyrus-g14-amd-igpu-nvidia-dgpu", "canonical_source": "https://gist.github.com/codyoss/a506c49ed5212c5b3e40614a7ac4c435", "published_at": "2026-09-01 05:19:18+00:00", "updated_at": "2026-09-04 01:22:04.146937+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["ASUS ROG Zephyrus G14", "Hyprland", "Omarchy", "AMD", "NVIDIA", "Aquamarine"], "alternates": {"html": "https://wpnews.pro/news/omarchy-hyprland-fix-for-asus-rog-zephyrus-g14-amd-igpu-nvidia-dgpu", "markdown": "https://wpnews.pro/news/omarchy-hyprland-fix-for-asus-rog-zephyrus-g14-amd-igpu-nvidia-dgpu.md", "text": "https://wpnews.pro/news/omarchy-hyprland-fix-for-asus-rog-zephyrus-g14-amd-igpu-nvidia-dgpu.txt", "jsonld": "https://wpnews.pro/news/omarchy-hyprland-fix-for-asus-rog-zephyrus-g14-amd-igpu-nvidia-dgpu.jsonld"}}