[GH-ISSUE #3342] [Engine] run the Intel GPU sampler without root on a single-user host #1354

Closed
opened 2026-11-04 01:50:37 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @beyondcr on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3342

Area

[Engine]

What do you want to do?

Let the Intel GPU sampler run without root on a machine that has one user.

sycl/tools/gpustat.py takes VRAM and load from /proc/<pid>/fdinfo, and the install notes require
a root service writing /run/gpustat.json. That is right for a shared host: another user's
/proc/<pid>/fdinfo needs CAP_SYS_PTRACE, so the sampler has to be privileged to account for
processes it does not own.

On a single-user workstation every process that touches the card already belongs to that user, so
the sampler needs no privilege at all. Requiring root there means a second service running as root
on a desktop where nothing is shared, which is a permission and a dependency that buys nothing. It
also means the Monitor tab shows no load or VRAM at all until someone installs it.

What I would like, for the single-user case only: the sampler writes to the session runtime
directory when /run is not writable, the reader looks in both places and still uses the entry that
names its own card, and the install notes describe both. A shared host keeps the root service
exactly as it is today.

Notes:

  • Related but separate: #3117 fixes the readings themselves on a host with two Intel cards. This is
    only about which path the document is written to and read from, and it does not depend on that
    pull request landing first.
  • I already have both pieces working locally and am happy to open a pull request if this is the
    direction you want. If it is not wanted, say so and it stays local. The change is small: the
    sampler picks a writable path, the reader tries the system path and then the session path, and it
    keeps using the entry that names its own card.
  • Written with AI assistance, then measured and reviewed by hand on a machine with an Arc Pro B70
    and an Arc A770. Every claim here was checked against the source or against command output.

What do you do today instead?

On this machine I run the sampler as a systemd user unit writing $XDG_RUNTIME_DIR/gpustat.json,
with a locally patched reader that also checks that path. It works and has run for hours without
trouble, but it is a local patch rather than something the notes describe, so anyone else has to
work it out again.

Originally created by @beyondcr on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3342 ### Area [Engine] ### What do you want to do? Let the Intel GPU sampler run without root on a machine that has one user. `sycl/tools/gpustat.py` takes VRAM and load from `/proc/<pid>/fdinfo`, and the install notes require a root service writing `/run/gpustat.json`. That is right for a shared host: another user's `/proc/<pid>/fdinfo` needs `CAP_SYS_PTRACE`, so the sampler has to be privileged to account for processes it does not own. On a single-user workstation every process that touches the card already belongs to that user, so the sampler needs no privilege at all. Requiring root there means a second service running as root on a desktop where nothing is shared, which is a permission and a dependency that buys nothing. It also means the Monitor tab shows no load or VRAM at all until someone installs it. What I would like, for the single-user case only: the sampler writes to the session runtime directory when `/run` is not writable, the reader looks in both places and still uses the entry that names its own card, and the install notes describe both. A shared host keeps the root service exactly as it is today. Notes: - Related but separate: #3117 fixes the readings themselves on a host with two Intel cards. This is only about which path the document is written to and read from, and it does not depend on that pull request landing first. - I already have both pieces working locally and am happy to open a pull request if this is the direction you want. If it is not wanted, say so and it stays local. The change is small: the sampler picks a writable path, the reader tries the system path and then the session path, and it keeps using the entry that names its own card. - Written with AI assistance, then measured and reviewed by hand on a machine with an Arc Pro B70 and an Arc A770. Every claim here was checked against the source or against command output. ### What do you do today instead? On this machine I run the sampler as a systemd user unit writing `$XDG_RUNTIME_DIR/gpustat.json`, with a locally patched reader that also checks that path. It works and has run for hours without trouble, but it is a local patch rather than something the notes describe, so anyone else has to work it out again.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659462666 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1354
No description provided.