Skip to content

Use Xe-capable btop on Intel xe GPU systems#6139

Open
stappmus wants to merge 1 commit into
basecamp:devfrom
stappmus:btop-intel-xe
Open

Use Xe-capable btop on Intel xe GPU systems#6139
stappmus wants to merge 1 commit into
basecamp:devfrom
stappmus:btop-intel-xe

Conversation

@stappmus

Copy link
Copy Markdown

Summary

Detect Intel GPUs using the Linux xe driver and install the temporary btop-xe package from OPR so btop can show GPU usage/frequency on Lunar Lake, Panther Lake, Battlemage, and future Xe-driver systems.

Also turns on btop GPU info inside the CPU panel by default, while keeping the separate GPU box disabled.

Depends on: omacom-io/omarchy-pkgs#114

Why

Omarchy already installs btop, but current Arch extra/btop does not detect Intel GPUs using the xe kernel driver. On Panther Lake, btop shows CPU/memory/process stats but no Intel GPU usage/frequency even though the kernel exposes Xe telemetry.

This is not Panther Lake-only. The detector checks for Intel PCI GPU devices using DRIVER=xe and an exposed xe_* PMU source.

Upstream context:

What changes

  • Add omarchy-hw-intel-xe
  • Add install/config/hardware/intel/btop-xe.sh
  • Run that install hook from install/config/all.sh
  • Include btop-xe in install/omarchy-other.packages for ISO/package availability
  • Update default btop config:
    • show_gpu_info = "On"
    • keep shown_boxes = "cpu mem net proc"
    • keep shown_gpus = "nvidia amd intel"
  • Add a migration for existing Intel Xe installs

Compatibility

This does not disable or hide other GPU vendors.

shown_gpus remains:

shown_gpus = "nvidia amd intel"

The package still builds btop with normal GPU support. NVIDIA and AMD users are not routed through this hook because it only runs when an Intel GPU is using the xe driver.

Screenshot

Intended layout: no separate GPU box, with Intel Xe GPU usage shown inside the CPU panel.

btop showing Intel Xe GPU usage inside the CPU panel

Tested

On Intel Panther Lake / Arc B390:

00:02.0 VGA compatible controller: Intel Corporation Panther Lake [Arc B390]
Kernel driver in use: xe
/sys/bus/event_source/devices/xe_0000_00_02.0 exists

The new detector exits successfully on that hardware:

bin/omarchy-hw-intel-xe
# exit 0

After the package/config change:

btop version: 1.4.7+76530c8
/usr/bin/btop cap_dac_read_search,cap_perfmon=ep

btop -d reports:

Xe: Using fdinfo for GPU utilization (PCI: 0000:00:02.0)

GPU usage and frequency appear inside the CPU panel.

Additional checks:

bash -n bin/omarchy-hw-intel-xe install/config/hardware/intel/btop-xe.sh migrations/1782416832.sh
git diff --check

Notes

Temporary until upstream btop and Arch extra/btop ship Intel xe support.

AI disclosure: this PR was prepared with AI assistance and manually tested on real Panther Lake hardware.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Intel xe-driver detection and routes affected systems to a temporary btop-xe package so btop can display Intel Xe GPU utilization/frequency (especially on newer Intel platforms using the xe kernel driver). It also adjusts the default btop config to show GPU info inside the CPU panel while keeping the dedicated GPU box hidden.

Changes:

  • Add omarchy-hw-intel-xe hardware detector for Intel GPUs running the xe driver (and requiring an xe_* PMU source).
  • Add an Intel hardware install hook to install btop-xe, and wire it into the install flow; add a migration for existing installs.
  • Update the default btop config to enable show_gpu_info = "On"; add btop-xe to the “other packages” list for availability.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
migrations/1782416832.sh Adds a migration to install btop-xe on Intel xe systems and adjust existing btop config.
install/omarchy-other.packages Adds btop-xe to the additional package set for availability.
install/config/hardware/intel/btop-xe.sh Adds an Intel-specific install hook to install btop-xe when applicable.
install/config/all.sh Wires the new Intel btop-xe hook into the install sequence.
config/btop/btop.conf Enables GPU info in the CPU panel by default (show_gpu_info = "On").
bin/omarchy-hw-intel-xe Introduces a detector for Intel GPUs using the xe driver + available xe_* PMU.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +5
if omarchy-hw-intel-xe && pacman -Si btop-xe &>/dev/null; then
yes | sudo pacman -S --needed btop-xe
fi
@stappmus

Copy link
Copy Markdown
Author

Updated the companion package PR to reduce the Xe polling overhead: btop-xe now prefers kernel gtidle sysfs counters when available and keeps fdinfo as the fallback.

Local Panther Lake/Xe test at update_ms = 2000: about 3.46% -> 1.13% of one CPU core in the same 30s btop sample, with the embedded GPU row still shown.

Package PR update: omacom-io/omarchy-pkgs#114 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants