Machine translation from Turkish (Cloudflare Workers AI), not reviewed by the author. Read the Turkish original

← Posts

Omarchy 4.0.1 Optimization with Antigravity CLI and Fixing System Errors

Score —

Display, NVIDIA and SSD settings in the Omarchy 4.0.1 system with Antigravity CLI, along with configuration errors that need to be fixed.

· Updated: · 4 min read
Contents

Summary: I scanned my Omarchy 4.0.1 system with the Antigravity CLI and I'm sharing what was found: settings applied directly, such as 10-bit color and VRR for the external OLED display, low input latency via direct scanout, the SSD TRIM timer, and NVIDIA sleep services; things that need manual fixing, such as conflicting environment variables and missing diagnostic tools.

Hello everyone. In the spirit of The aged linux Gamer, I continue to seek the highest performance on Linux systems for gaming and daily use. Today I will show you step by step how I optimized my Omarchy 4.0.1 system from top to bottom with the Antigravity CLI tool, and how I fixed system errors and various incompatibilities.

As you know, especially in modern Wayland window managers like Hyprland, graphics card drivers, monitor refresh rates and latency are very critical. As a result of the comprehensive scan I did on my system, we fixed many configurations, from 10-bit color depth and VRR (G-Sync) activation for my external OLED display to direct scanout settings that provide low input latency. I also enabled details that can be forgotten in the background but are vital for system health, such as the SSD TRIM timer and NVIDIA sleep mode services.

You can find all of the commands I used and the detailed analysis report the system gave me below. Maybe there are similar details overlooked on your system too.

~ $ agy

      ▄▀▀▄        Antigravity CLI 1.1.22
     ▀▀▀▀▀▀        ozicoke@gmail.com (Google AI Pro)
    ▀▀▀▀▀▀▀▀      Gemini 3.7 Flash (High)
   ▄▀▀    ▀▀▄      ~
  ▄▀▀      ▀▀▄

> /model
  ⎿  Model set to Gemini 3.7 Flash (High)

────────────────────────────────────────────────────────────
> sistemi tara. omarchy 4.0 ve üzeri kullanıyorum. sürücü eksiği ya da yanlış olan bi şey var mı bak. sistemimi optimize et

● Read(~/.agents/skills/omarchy/SKILL.md) (ctrl+o to expand)

▸ Thought for 2s, 378 tokens
  Exploring Available Commands

● Bash(omarchy version; omarchy debug --no-sudo --print)
● Bash(omarchy commands)
● Bash(fastfetch --pipe || uname -a) (ctrl+o to expand)

▸ Thought for 3s, 625 tokens
  Analyzing System Specs

● Bash(bash -c ') (ctrl+o to expand)

▸ Thought for 3s, 908 tokens
  Analyzing System Services

● Bash(bash -c ') (ctrl+o to expand)

▸ Thought for 4s, 864 tokens
  Investigating VA-API Installation

● Bash(bash -c ')
● Bash(journalctl -k -b --no-pager | grep -iE "(i915|xe |gsc|nvme|firmware)" | head -n 40) (ctrl+o to expand)

▸ Thought for 3s, 518 tokens
  Observing the Binding

● Bash(bash -c ') (ctrl+o to expand)

▸ Thought for 2s, 212 tokens
  Investigating Graphics Modeset

● Bash(bash -c ') (ctrl+o to expand)
▸ Thought for 2s, 295 tokens
  Investigating Hyprland's Variables

● Bash(bash -c ')
● Bash(cat /etc/environment) (ctrl+o to expand)

▸ Thought for 2s, 511 tokens
  Investigating System Variables

● Bash(cat /usr/share/omarchy/default/hypr/nvidia.lua)
● Bash(supergfxctl -g 2>&1 || true; systemctl status supergfxd 2>&1 || true)
● Bash(journalctl -u supergfxd -b --no-pager | tail -n 25)
● Bash(cat /sys/module/nvidia_drm/parameters/modeset; cat /sys/module/nvidia_drm/parameters/fbdev)
● Bash(bash -c ')
● Bash(bash -c ')
● Bash(bash -c ')
● Read(~/.config/hypr/monitors.lua) (ctrl+o to expand)

▸ Thought for 2s, 420 tokens
  Analyzing Display Configurations
● Bash(ls -la ~/.config/hypr/)
● Bash(bash -c ') (ctrl+o to expand)

▸ Thought for 3s, 668 tokens
  Investigating System Configuration

● Bash(bash -c ')
● Bash(strings /usr/bin/supergfxd | grep -i modeset) (ctrl+o to expand)

▸ Thought for 5s, 244 tokens
  Analyzing Kernel Parameters

● Bash(supergfxctl -s) (ctrl+o to expand)

▸ Thought for 4s, 1.3k tokens
  Analyzing Supergfxctl Modes

● Bash(bash -c ') (ctrl+o to expand)

▸ Thought for 2s, 312 tokens
  Analyzing Dirty Memory Settings

● Bash(bash -c ')
● Bash(sudo -n id)
● Bash(omarchy pkg --help)
● Bash(cat $(which omarchy-pkg-add)) (ctrl+o to expand)

▸ Thought for 5s, 1.6k tokens
  Investigating Configuration Weaknesses

● Bash(bash -c ')
● Bash(bash -c ') (ctrl+o to expand)

▸ Thought for 2s, 409 tokens
  Checking Disk Space & Hyprland

● Bash(bash -c ') (ctrl+o to expand)
▸ Thought for 3s, 779 tokens
  Analyzing Display Settings
● Bash(systemctl status display-manager)
● Bash(wpctl status)
● Bash(modinfo xe | head -n 10; modinfo i915 | head -n 10) (ctrl+o to expand)

▸ Thought for 2s, 214 tokens
  Confirming Display Driver

● Bash(glxinfo -B)
● Bash(__NV_PRIME_RENDER_OFFLOAD=0 __GLX_VENDOR_LIBRARY_NAME=mesa glxinfo -B) (ctrl+o to expand)

▸ Thought for 6s, 2.0k tokens
  Analyzing Hardware and User Input
● Bash(hyprctl getoption render:explicit_sync)
● Bash(bash -c ')
● Bash(cat /usr/share/omarchy/default/hypr/omarchy.lua)
● Bash(cat /usr/share/omarchy/default/hypr/envs.lua) (ctrl+o to expand)
▸ Thought for 2s, 798 tokens
  Observing System Variables

● Bash(cp ~/.config/hypr/monitors.lua ~/.config/hypr/monitors.lua.bak.$(date +%s))
● Bash(cat /usr/share/omarchy/default/hypr/looknfeel.lua) (ctrl+o to expand)

▸ Thought for 2s, 94 tokens
  Testing VRR Options

● Edit(~/.config/hypr/monitors.lua)
● Bash(hyprctl reload && hyprctl configerrors)
● Bash(hyprctl monitors | grep -E "(Monitor|currentFormat|vrr)") (ctrl+o to expand)

▸ Thought for 2s, 243 tokens
  Observing Display Capabilities

● Bash(cp ~/.config/hypr/looknfeel.lua ~/.config/hypr/looknfeel.lua.bak.$(date +%s))
● Read(~/.config/hypr/looknfeel.lua)
● Edit(~/.config/hypr/looknfeel.lua)
● Bash(hyprctl reload && hyprctl configerrors && hyprctl getoption render:direct_scanout) (ctrl+o to expand)

▸ Thought for 2s, 401 tokens
  Confirming Direct Scanout
● Bash(systemctl enable --now fstrim.timer 2>&1)
● ManageTask(status c68eac01-a006-4787-a914-9b0a92a2b0c2/task-104)
● Bash(systemctl is-active fstrim.timer)
● Bash(systemctl enable nvidia-suspend nvidia-hibernate nvidia-resume 2>&1)
● Bash(systemctl is-enabled nvidia-suspend nvidia-hibernate nvidia-resume)
● Bash(which pkexec)
● Bash(sudo -l -U ozan 2>&1)
● Bash(pgrep -a -i polkit)
● Bash(ps aux | grep -iE "(polkit|agent)") (ctrl+o to expand)

▸ Thought for 2s, 352 tokens
  Detecting Authentication Agent Absence

● Bash(asdcontrol --help 2>&1 || true; file /usr/bin/asdcontrol 2>&1 || true)
● Bash(journalctl -p 4 -b --no-pager | tail -n 40) (ctrl+o to expand)

▸ Thought for 4s, 1.4k tokens
  Reviewing Firewall Status
  Sisteminiz kapsamlı bir şekilde tarandı. Cihazınız GameGaraj Slayer 4 Ultra (Intel Core Ultra 7 155H + RTX 4060 Mobile), Omarchy 4.0.1-1 ve Hyprland 0.56.2 üzerinde çalışıyor.

  Yapılan tarama sonucunda tespit edilen eksikler, yanlış yapılandırmalar ve uygulanan optimizasyonlar aşağıda özetlenmiştir.

1. Directly Applied Optimizations

A. 10-bit Color and VRR (G-Sync) for the External ASUS OLED Display

  • File: monitors.lua:16-23

  • Change Made: For your 27-inch ASUS ROG Strix OLED (XG27AQDMGR) monitor, bitdepth = 10 and vrr = 2 (variable refresh in fullscreen games) were enabled.

  • Result: Your monitor switched from 8-bit mode (16.7 million colors, XRGB8888) to 10-bit True Color mode (1.07 billion colors, XBGR2101010). Color banding in dark tones and gradients was prevented. On your 240Hz OLED panel, tearing and stuttering during FPS fluctuations in games were prevented.

B. Low Input Latency (Direct Scanout)

  • File: looknfeel.lua:50-58

  • Change Made: render = { direct_scanout = 2 } was added to the Hyprland configuration.

  • Result: Fullscreen games and applications bypass the Wayland compositor buffer and are sent directly to the display; this brings input lag close to zero.

C. SSD TRIM Timer Enabled

  • Status: Despite using a 4 TB NVMe SSD, fstrim.timer was disabled (inactive).

  • Action Taken: Weekly automatic TRIM was enabled with systemctl enable --now fstrim.timer. The SSD's write speed and cell lifespan are now protected.

D. NVIDIA Sleep/Resume Services Enabled

  • Status: The nvidia-suspend, nvidia-hibernate, and nvidia-resume services were disabled.

  • Action Taken: The services were enabled with systemctl enable. When the laptop lid is closed or the system enters sleep mode, VRAM contents are now preserved, preventing a black screen or freeze on wake.

2. Errors to Fix and Recommended Steps

The following operations require privileges, so it is recommended to run them in your terminal:

1. Clean Up Conflicting Variables in environment (Important)

Your file contains the following variables:

GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
LIBVA_DRIVER_NAME=nvidia
WLR_NO_HARDWARE_CURSORS=1

Why Is It Wrong?:

  • GBM_BACKEND=nvidia-drm: The official Hyprland documentation explicitly warns against defining this globally; it causes hardware acceleration crashes in Firefox, Chrome, and Electron (Discord, VSCode, Spotify) applications.

  • WLR_NO_HARDWARE_CURSORS=1: This has been deprecated with Hyprland version 0.41 and later.

  • LIBVA_DRIVER_NAME=nvidia: When defined globally, it overrides the QuickSync acceleration of the Intel Arc GPU unit in battery mode. Omarchy already manages NVIDIA variables dynamically within Hyprland.

To safely disable these lines, you can run the following command in your terminal:

sudo sed -i 's/^\(GBM_BACKEND\|__GLX_VENDOR_LIBRARY_NAME\|LIBVA_DRIVER_NAME\|WLR_NO_HARDWARE_CURSORS\)/# \1/' /etc/environment

2. NVIDIA VRAM Preservation Module Parameter

Define the module parameter so the NVIDIA suspend services work at full efficiency:

echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" | sudo tee /etc/modprobe.d/nvidia-power-management.conf

3. Missing Hardware Test/Diagnostic Tools

The missing packages for testing VA-API video acceleration (vainfo) and Vulkan driver layers (vulkaninfo):

omarchy pkg add libva-utils vulkan-tools

3. Healthy / Good Condition Components

  • Dual GPU (Hybrid): Intel Arc (Meteor Lake iGPU) and NVIDIA RTX 4060 Mobile drivers (nvidia-open-dkms 610.57.04, vulkan-intel, mesa 26.2.1) are installed without issues. supergfxctl is running in Hybrid mode and nvidia-powerd (Dynamic Boost) is active.

  • Memory & ZRAM: 32 GB RAM + 31.1 GB ZRAM (zstd, prio 100) + 31.1 GB Swapfile (prio 0). Kernel write limits (vm.dirty_bytes = 256MB, vm.swappiness = 150) are ideally tuned for a fast NVMe SSD.

  • Audio & Microphone: PipeWire 1.6.8 + WirePlumber, the Intel SOF audio chip and NVIDIA HDMI audio outputs work without issues.

  • System Up-to-Dateness: Your packages are up to date.

I hope this guide is useful to those who want to optimize their own system. If you have anything to add about graphics adapters, monitor profiles and power management, let's meet in the comments.

My reading

  • Small tweaks made a visible difference: Enabling 10-bit color and VRR on the external OLED display eliminated banding; direct scanout reduced input latency in full-screen games.
  • Services left disabled cause silent harm: The TRIM timer and NVIDIA sleep services were disabled; both only came to light during the scan.
  • Variables left over from old guides cause problems: Global definitions such as GBM_BACKEND, WLR_NO_HARDWARE_CURSORS and LIBVA_DRIVER_NAME are either no longer needed or break hardware acceleration in browsers and Electron apps.