Bug 512866 - Intel GPU using xe driver not detected/displayed
Summary: Intel GPU using xe driver not detected/displayed
Status: RESOLVED FIXED
Alias: None
Product: ksystemstats
Classification: Frameworks and Libraries
Component: General (other bugs)
Version First Reported In: 6.5.3
Platform: CachyOS Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 511794 514137 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-12-02 13:00 UTC by Hunter Hardy
Modified: 2026-05-22 13:53 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 6.8.0
Sentry Crash Report:


Attachments
Screenshot of System monitor (103.58 KB, image/png)
2025-12-02 13:00 UTC, Hunter Hardy
Details
Screenshot of nvtop (104.54 KB, image/png)
2025-12-02 13:02 UTC, Hunter Hardy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hunter Hardy 2025-12-02 13:00:48 UTC
Created attachment 187304 [details]
Screenshot of System monitor

SUMMARY
Intel discrete GPU (Arc B580) using the xe kernel driver is not detected or displayed in Plasma System Monitor's GPU information, while it works correctly in other tools.

STEPS TO REPRODUCE
1. Have an Intel GPU using the xe driver (e.g., Arc B580, Battlemage)
2. Open Plasma System Monitor or KDE Info Center
3. Look for GPU information

OBSERVED BEHAVIOR
The Intel GPU using the xe driver does not appear in the GPU listing.

EXPECTED BEHAVIOR
The GPU should be detected and displayed, similar to how it appears in nvtop and other monitoring tools.

SYSTEM INFORMATION
- Plasma 6.x / KInfoCenter 6.5.3
- Kernel: 6.17.9-2-cachyos
- GPU: Intel Arc B580 (Battlemage G21) [8086:e20b]
- Driver: xe (not i915)
- Mesa: 25.2.7

ADDITIONAL INFORMATION
The GPU is fully functional and detected by:
- lspci: Shows "VGA compatible controller: Intel Corporation Battlemage G21 [Arc B580]"
- /sys/class/drm/card0: Present with correct vendor/device IDs
- nvtop: Detects and monitors the GPU correctly
- glxinfo: Reports "Mesa Intel(R) Arc(tm) B580 Graphics"

The xe driver is the only supported driver for Battlemage GPUs - i915 cannot be used as an alternative.

It appears the GPU detection code may only look for i915/amdgpu/nvidia drivers and not the newer xe driver.

REPRODUCTION HINTS FOR DEVELOPERS

The xe driver can be identified via:
- /sys/class/drm/card*/device/uevent contains "DRIVER=xe"
- /sys/class/drm/card*/device/driver symlink points to ".../drivers/xe"

xe driver sysfs structure is similar to i915 but under a different driver path:
- /sys/bus/pci/drivers/xe/  (vs /sys/bus/pci/drivers/i915/)

The xe driver DOES expose hwmon sensors (power, temp, fan):
- /sys/class/hwmon/hwmon*/name = "xe"
- temp2_label: "pkg", temp3_label: "vram"
- energy1_label: "card", energy2_label: "pkg"
- fan1_input, fan2_input, fan3_input

Detection approach that works:
1. Enumerate /sys/class/drm/card*
2. Check /sys/class/drm/card*/device/uevent for DRIVER=
3. Accept "xe" in addition to "i915", "amdgpu", "nvidia", etc.

Affected hardware (xe driver only, no i915 fallback):
- Intel Arc B-series (Battlemage): B580, B570
- Intel Lunar Lake integrated graphics
- Future Intel discrete GPUs

The i915 driver cannot be used for these GPUs - xe is the only option.
Comment 1 Hunter Hardy 2025-12-02 13:02:12 UTC
Created attachment 187305 [details]
Screenshot of nvtop
Comment 2 David Redondo 2025-12-03 12:43:32 UTC
We dont have any code for handling xe driver indeed. I don't have a xe driver gpu so that makes development hard. ideally someone with such a gpu would contribute the code.
Comment 3 Bug Janitor Service 2025-12-05 09:25:50 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/ksystemstats/-/merge_requests/119
Comment 4 Arjen Hiemstra 2026-01-05 09:20:30 UTC
*** Bug 514137 has been marked as a duplicate of this bug. ***
Comment 5 Arjen Hiemstra 2026-01-05 15:41:32 UTC
*** Bug 511794 has been marked as a duplicate of this bug. ***
Comment 6 2874248970 2026-04-04 06:17:29 UTC
I tested this on Fedora 43 on April 4, 2026 with an Intel Arc B580 (Battlemage G21, 8086:e20b) using the xe driver.

Environment:
- kernel: 6.18.16-200.fc43.x86_64
- Plasma: 6.6.2
- ksystemstats: 6.6.2-1.fc43.x86_64
- plasma-systemmonitor: 6.6.2-1.fc43.x86_64
- mesa-dri-drivers: 25.3.6-2.fc43

With the stock Fedora package, Plasma System Monitor did not show GPU usage and ksystemstats still tried to read the old i915 PMU path:

Device directory "/sys/bus/event_source/devices/i9150000_03_00.0" does not exist

The actual PMU path on this machine is:

/sys/bus/event_source/devices/xe_0000_03_00.0

I then applied MR 119 locally and tested the patched build. After restarting plasma-ksystemstats, ksystemstats_xe_helper started correctly for 0000:03:00.0 and GPU sensors became available over D-Bus, including:
- gpu/gpu1/usage
- gpu/gpu1/coreFrequency
- gpu/gpu1/temperature
- gpu/gpu1/video
- gpu/gpu1/usedVram
- gpu/gpu1/totalVram

So MR 119 works for Arc B580 on Fedora 43 with the xe driver.
Comment 7 2874248970 2026-04-04 06:41:43 UTC
AI-assisted disclosure: my previous validation comment on this bug was drafted and submitted with local AI/browser automation assistance, but it was based on real hardware verification from my Fedora 43 system.
Comment 8 Nate Graham 2026-05-18 19:07:53 UTC
Git commit 8768ac73d757ddd45a3874342263588bb66ea746 by Nate Graham, on behalf of Hunter Hardy.
Committed on 18/05/2026 at 14:41.
Pushed by ngraham into branch 'master'.

Add Intel Xe GPU driver support

Add support for Intel GPUs using the Xe kernel driver (Arc series,
Battlemage, Lunar Lake, etc.) alongside existing i915 support.

- Add XeHelper binary for reading Xe PMU perf events and VRAM
- Add LinuxXeGpu device class with hwmon sensor discovery
- Detect xe vs i915 driver via udev_device_get_driver()
- Report GPU usage (Render, Video engines) and frequency via PMU
- Report temperature via hwmon
- Query VRAM total/used via DRM_IOCTL_XE_DEVICE_QUERY
- Make Xe support conditional on drm/xe_drm.h availability
- Set CAP_PERFMON capability on xe_helper binary

M  +20   -0    plugins/gpu/CMakeLists.txt
M  +19   -0    plugins/gpu/LinuxBackend.cpp
A  +195  -0    plugins/gpu/LinuxXeGpu.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +46   -0    plugins/gpu/LinuxXeGpu.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +355  -0    plugins/gpu/XeHelper.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +9    -0    plugins/gpu/XeHelperLocation.h.cmake

https://invent.kde.org/plasma/ksystemstats/-/commit/8768ac73d757ddd45a3874342263588bb66ea746