Skip to content

feat(sysmon): rework the system monitor window - #3768

Merged
bbedward merged 21 commits into
duxlabs-dev:masterfrom
Conava:system-monitor-rework
Oct 31, 2026
Merged

bbedward merged 21 commits into
duxlabs-dev:masterfrom
Conava:system-monitor-rework

Conversation

@Conava

@Conava Conava commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR reworks the System Monitor window.

Disclaimer: AI has helped a lot implementing this. I thoroughly tested, reviewed and fixed it and own every line of it. Testing has only been done on one hardware configuration though.

Every page now uses the same building blocks as Settings: the grouped list rows, one chart card and the standard dialogs. The tabs moved to a navigation rail on the left.

Changes:

  • Processes: rows show the app's name and icon (from the window, the desktop file or the executable). New optional columns for GPU video, internet connections, download/upload, status, threads, nice and CPU time. The table scrolls sideways when the columns don't fit.
  • Opening a process shows Overview, Resources, Network and Details tabs: CPU and memory breakdowns, lifetime I/O, scheduling and I/O priority, the systemd unit, the sandbox, listening ports and its connections grouped by address.
  • Quit, force quit, end process tree and restart are in the expanded row and in the right-click menu under "Quit or restart". Ending the compositor, the user's systemd, the session bus or DMS itself shows a warning and offers a restart instead. For a compositor that means reloading its config, since none of them can restart in place.
  • Performance: a device list with small graphs and a page per device. It now also shows things like memory modules, base clock, committed memory, swap devices, GPU shared memory and per-interface link speed and addresses. Less used values are under Advanced.
  • Disks: one card per drive with a live read/write graph, health, SMART values, the partitions and the full SMART report once unlocked. A sleeping HDD is not woken up here.
  • System: an About card and sections for DMS, desktop, displays, network, OS, hardware, storage and sensors. "Copy summary" copies a short overview for quick debugging and "Copy report" copies everything as Markdown, both without the hostname, user name or network names.

Notes:

  • This needs gops: add data for the DMS system monitor rework dux-gop#50 merged first. Until then core/go.mod points to my dgop fork, and I'll switch it back to upstream dgop in a follow-up commit once it's in.
  • Restart relaunches a normal program with its old command, environment and working directory. A systemd service is only restarted through systemd when the process is the unit's main process, otherwise it's relaunched like any other program. Under uwsm every app lives in the compositor's unit, and restarting that unit would end the session.
  • Most values of other users' processes show "—" since only root can read them. The lock button in the Processes toolbar fixes that: after one password prompt a small dms sysmon-helper runs as root through pkexec and answers the system monitor's requests until it's locked again or the window closes. It can only read dgop data and a drive's SMART report, signal one process, end a process tree and restart a system service. It's a separate commit since running anything as root deserves its own look, and I'm happy to drop it if you'd rather not have it. Without it, ending other users' processes still works through pkexec.
  • Quit in the expanded row isn't red. It's a split button with force quit and end process tree in its menu, and the split button has no error color. Adding an error variant to the split button in dank-qml-common would fix that, or Quit could become a plain red button with the other two only in the right-click menu or as separate buttons next to it.
  • The filter chips changed from User/System to All/User/System/Online (processes with internet connections), and the hover kill button in the rows is gone. Ending a process works from the row, the right-click menu and the keyboard as before.
  • It adds 175 new strings for i18n, which is a lot. Most are labels for the new stats.

Validation

  • Tested by hand on Hyprland.
  • Go tests for the drive, SMART report and dgop handlers, and JS tests for the column, drive, sensor, connection, system info and process logic.
  • go test ./..., the FreeBSD build, run-qml.py logic and the node tests pass. I skipped the qml-tests hook since it needs niri.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

screenshot_2026-10-15_23-53-00 screenshot_2026-10-15_23-59-27 screenshot_2026-10-15_23-59-35 screenshot_2026-10-16_00-02-09 screenshot_2026-10-16_00-00-02 screenshot_2026-10-16_00-00-07 screenshot_2026-10-16_00-00-12 screenshot_2026-10-16_00-00-20 screenshot_2026-10-16_00-00-24 screenshot_2026-10-16_00-00-36 screenshot_2026-10-16_00-01-42 screenshot_2026-10-16_00-01-50 screenshot_2026-10-16_00-01-59

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dlx-docs to document any new behaviors: docs(dms): document the system monitor dux-docs#168

The window gets a navigation rail (Processes, Performance, Disks,
System) and every page is rebuilt on the Settings grouped-list rows,
one chart card component and the standard dialogs and FABs.

Processes: dense single-line rows with app icons and value bars that
scale to the hardware (percentages to 100, memory to RAM, VRAM to the
GPU, disk to the fastest drive's link, network to the link speed).
New optional columns: GPU video engine, internet connections, down/up,
status, threads, nice and CPU time. All / User / System / Online
filters. The table scrolls sideways when the columns do not fit.
Opening a row shows the full command, process facts, lifetime I/O,
swap, open files, the systemd unit and the internet connections
grouped by address. The open row keeps its place while the numbers
keep updating; the list re-sorts after it closes.

Actions: Quit, Force quit, End process tree and Restart, in the row
and the context menu. Restart uses dms restart for the shell, reloads
the compositor's config, re-executes the user manager, restarts a
systemd unit only when the process is its main PID (apps started by a
session manager share the compositor's unit), and otherwise relaunches
the command with its environment and working directory once it has
exited. Ending a compositor, the user manager, the session bus or the
shell warns first and offers a restart instead. Other users' processes
are ended through pkexec.

Performance: a device list grouped by kind with sparklines, and a pane
per device with a chart and grouped stats, including memory modules,
base clock, sockets, virtualization, committed memory, swap devices,
GPU shared memory and memory controller load, and per-interface link
speed, MTU, driver and addresses. Disks: one expandable card per drive
with a live read/write chart, health, SMART values and a partition
strip, never waking a sleeping HDD. System: software and hardware
summaries, copyable as text, and every hwmon sensor scaled to its
critical limit.

Backend: drives.list over UDisks2, an on-demand dgop.process request,
and dgop pinned to a fork with the new fields until its PR lands.
Linux only lets the owner or root read a process's I/O, connections
and open files, so most values of root's and other users' processes
show "—". The lock button in the Processes toolbar starts
`dms sysmon-helper` through pkexec. While unlocked, the system monitor
sends its dgop requests to that helper, so every process has its
values, and ending or restarting another user's process needs no
further password prompt.

The helper only answers the dgop.* reads plus three actions: signal
one PID (TERM or KILL, never PID 1), end a process tree, and restart a
system unit when the PID is the unit's main process. It reads one
JSON request per line on stdin and exits when stdin closes, which
happens when the user locks again, the window closes or the shell
exits. The socket handler and the helper share one dgop dispatch.
dms refuses to run as root unless the command is on a short allowlist,
so the helper exited right after the password prompt. sysmon-helper is
now the one exception, with its own check. A failed unlock shows a
toast with the helper's error instead of failing silently; dismissing
the password prompt stays quiet.
dgop folded its gpu-stats module into the gpu module, so the monitor
reads every GPU's stats from one gpu request for the GPUs the user has
enabled, keyed by bus id. An unknown temperature hides its row instead
of showing 0 °C.

Per-process network: rates count LAN and VPN peers too, remotes to
them are listed under "Local network" apart from internet connections,
and a rate that misses UDP traffic shows as a lower bound.

Sorting by a column dgop can't sort the same way (memory direction,
threads, name, ...) now fetches every process instead of the top 100
by CPU. dgop's background socket listener is closed on shutdown.
Second round of design feedback on the system monitor.

Processes:
- Rows show the app's name and icon, from the window's app id, the
  desktop entry whose Exec runs the process, or the executable name.
  Merged rows explain their "(N)" in a tooltip.
- An expanded process has Overview, Resources, Network and Details
  tabs with the new dgop process detail; the panel stays inside the
  visible part of a sideways-scrolling table.
- Quit, Force quit, End process tree and Restart moved into a
  "Quit or restart" level of the context menu. Clicks that open or
  close the menu no longer toggle the row.
- With many columns the table shows a scrollbar and scrolls with
  Shift+wheel; sorting no longer leaves a focus ring on the header.
- Sorting and refreshing are cheaper: app lookups are cached per
  process, each cell is one text item, tooltips are created on first
  hover, and a sort change refreshes once instead of twice.

System page: hostname, distro and uptime, an About card and sections
for DMS, desktop, displays, network, OS, hardware, storage and
sensors, read once from a read-only script and dms doctor. "Copy
summary" and "Copy report" copy a short and a full Markdown overview
without hostname, user, Wi-Fi or VPN names.

Disks: the full SMART report goes through the unlocked helper (one
password prompt for all drives), starts collapsed, and partitions show
their LUKS version.

Performance: advanced stats stay in place when a sample lacks a value,
the GPU monitoring toggle is a settings row, and the Performance,
Disks and System pages load on their first visit.

Bumps dgop to the commit with the extended process detail.
- Opening a process no longer stalls the window: its detail panel is
  built in the background, rows update in place instead of being
  rebuilt on every sample, only the visible tab builds its rows, and
  row tooltips are created on first hover. New rows also stopped
  starting a detail panel while they were being sized.
- Values that are still loading show a spinner in their place: device
  rows on Performance until the first samples arrive, System page
  rows until the facts are read, and process values after unlocking
  until the root samples (two, for the rates) are in. Rows no longer
  pop in later; a drive's response time shows "—" when it is idle.
- The context menu shows its groups as separate cards.
- "Advanced" uses the same collapsible header as the SMART report,
  the GPU monitoring toggle sits above the chart, and the About card
  is tinted.
- The command under a process name is one line; the Details tab shows
  it in full with a copy button, and the status moved there too.
@Conava
Conava marked this pull request as ready for review October 15, 2026 22:11
…work

# Conflicts:
#	core/go.sum
#	core/internal/server/router.go
#	core/internal/server/server.go
Drive polling passes FlagNoAutoStart, so it never starts udisksd; an
absent udisks now reads as no drives. The SMART report runs smartctl
with a 30 s timeout and a 4 MiB output cap, one report at a time, so a
hanging drive can't pin a root process.

The root helper rejects service names that start with "-" and passes
"--" to systemctl, and its process tree walk keeps a visited set, since
a reused PID in the /proc snapshot could form a cycle.
The System page read the Vulkan driver with vulkaninfo, which opens
every GPU and wakes a suspended dGPU. It now reads the Vulkan driver
manifests instead, and its facts run once per window open rather than
on every tab switch. Every page now starts when the window opens.

Per-process GPU data is no longer requested while no GPU is monitored,
and turning the last GPU off clears its cursor and history, so turning
it back on doesn't average the first sample over the gap. The full
process list is held only by the visible process table, so a name sort
no longer keeps other consumers fetching every process after the
window closes.

The byte, rate and duration formatting and the history buffer use the
shared Format helpers, the drive health and kind labels live in one
place, and leftovers of earlier designs are gone. Every new term has a
translator context; overlapping read/write labels and explanatory
tooltips are folded into existing terms.
@Conava

Conava commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Made some fixes together with addressing the review findings in the dux-gop repo:

  • All 2.0 changes merged in
  • the System page doesn't wake a sleeping dGPU anymore (it ran vulkaninfo) and it only loads its information once per open instance of the system monitor now instead of every time you switch to the page.
  • with no GPU turned on, the process list doesn't ask for per-process GPU data anymore
  • sorting by name no longer keeps the full process list being fetched after the window is closed
  • checking drives doesn't start udisks if it isn't running, and fixed a bug where the SMART report could hang forever
  • cut some duplicated code and unnecessary strings, added some missing translator context

@NAXLAB

NAXLAB commented Oct 29, 2026

Copy link
Copy Markdown

I just wanna say this is awesome and I love you

@github-actions github-actions Bot added core Go daemon and CLI under core/ feature packaging ui Quickshell UI under quickshell/ labels Oct 31, 2026
@bbedward

Copy link
Copy Markdown
Member

/claude review

})

// Children first; a skipped child keeps its whole subtree.
readonly property string treeScript: 'walk() { for c in $(pgrep -P "$1"); do n=$(tr "[:upper:]" "[:lower:]" < /proc/$c/comm 2>/dev/null) || continue; case " $2 " in *" $n "*) continue ;; esac; walk "$c" "$2"; kill "$c" 2>/dev/null; done; }; walk "$1" "$2"; kill "$1"'

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.

c is global in POSIX sh, so the recursive walk "$c" "$2" overwrites it before the following kill "$c". After the recursion returns, c holds the last pid the inner loop saw, which can be a child it skipped.

Two things go wrong. With foot → zsh → npm → node, zsh and npm never get SIGTERM. With foot → zsh → dms run, dms is skipped inside walk zsh, but c still holds its pid, so back in walk foot the kill "$c" sends SIGTERM to DMS. This is the default path for the user's own processes. The Go treeOrder in the helper is correct.

Giving the function a subshell body makes c local:

Suggested change
readonly property string treeScript: 'walk() { for c in $(pgrep -P "$1"); do n=$(tr "[:upper:]" "[:lower:]" < /proc/$c/comm 2>/dev/null) || continue; case " $2 " in *" $n "*) continue ;; esac; walk "$c" "$2"; kill "$c" 2>/dev/null; done; }; walk "$1" "$2"; kill "$1"'
readonly property string treeScript: 'walk() ( for c in $(pgrep -P "$1"); do n=$(tr "[:upper:]" "[:lower:]" < /proc/$c/comm 2>/dev/null) || continue; case " $2 " in *" $n "*) continue ;; esac; walk "$c" "$2"; kill "$c" 2>/dev/null; done ); walk "$1" "$2"; kill "$1"'


// $1 pid, $2 its systemd unit. Only a unit's main process restarts through systemd (apps share the compositor's
// unit). Terminal programs exit 3. Anything else is relaunched with its command line, environment and directory.
readonly property string restartScript: 'p=$1; u=$2; case "$u" in *.service) [ "$(systemctl --user show -p MainPID --value "$u" 2>/dev/null)" = "$p" ] && exec systemctl --user restart "$u" ;; esac; s=$(cat "/proc/$p/stat") || exit 1; set -- ${s##*) }; [ "$5" = 0 ] || exit 3; t=$(mktemp -d) || exit 1; trap "rm -r \\"$t\\"" EXIT; cp "/proc/$p/cmdline" "$t/cmd" && cp "/proc/$p/environ" "$t/env" && cwd=$(readlink "/proc/$p/cwd") || exit 1; kill "$p" || exit 1; i=0; while kill -0 "$p" 2>/dev/null; do i=$((i + 1)); [ "$i" -gt 100 ] && exit 1; sleep 0.1; done; cd "$cwd" 2>/dev/null || cd; run="setsid -f"; command -v systemd-run >/dev/null && run="$run systemd-run --user --scope --quiet --collect"; cat "$t/env" "$t/cmd" | xargs -0 $run env -i'

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.

The relaunched app inherits stdout and stderr from this sh, and those are the StdioCollector pipes Proc.runCommand creates. setsid -f and systemd-run --scope keep stdio. When sh exits, QProcess closes the read ends.

After that, the app's next write to stdout or stderr fails. An app that doesn't ignore SIGPIPE is killed, and Python apps raise BrokenPipeError. Many apps log a warning at startup, so a restart can "succeed" and then die. Also, streamFinished doesn't fire while the app holds the pipes, so the Proc entry stays pending until the app exits.

Detach its output (xargs already gives the child /dev/null as stdin):

Suggested change
readonly property string restartScript: 'p=$1; u=$2; case "$u" in *.service) [ "$(systemctl --user show -p MainPID --value "$u" 2>/dev/null)" = "$p" ] && exec systemctl --user restart "$u" ;; esac; s=$(cat "/proc/$p/stat") || exit 1; set -- ${s##*) }; [ "$5" = 0 ] || exit 3; t=$(mktemp -d) || exit 1; trap "rm -r \\"$t\\"" EXIT; cp "/proc/$p/cmdline" "$t/cmd" && cp "/proc/$p/environ" "$t/env" && cwd=$(readlink "/proc/$p/cwd") || exit 1; kill "$p" || exit 1; i=0; while kill -0 "$p" 2>/dev/null; do i=$((i + 1)); [ "$i" -gt 100 ] && exit 1; sleep 0.1; done; cd "$cwd" 2>/dev/null || cd; run="setsid -f"; command -v systemd-run >/dev/null && run="$run systemd-run --user --scope --quiet --collect"; cat "$t/env" "$t/cmd" | xargs -0 $run env -i'
readonly property string restartScript: 'p=$1; u=$2; case "$u" in *.service) [ "$(systemctl --user show -p MainPID --value "$u" 2>/dev/null)" = "$p" ] && exec systemctl --user restart "$u" ;; esac; s=$(cat "/proc/$p/stat") || exit 1; set -- ${s##*) }; [ "$5" = 0 ] || exit 3; t=$(mktemp -d) || exit 1; trap "rm -r \\"$t\\"" EXIT; cp "/proc/$p/cmdline" "$t/cmd" && cp "/proc/$p/environ" "$t/env" && cwd=$(readlink "/proc/$p/cwd") || exit 1; kill "$p" || exit 1; i=0; while kill -0 "$p" 2>/dev/null; do i=$((i + 1)); [ "$i" -gt 100 ] && exit 1; sleep 0.1; done; cd "$cwd" 2>/dev/null || cd; run="setsid -f"; command -v systemd-run >/dev/null && run="$run systemd-run --user --scope --quiet --collect"; cat "$t/env" "$t/cmd" | xargs -0 $run env -i >/dev/null 2>&1'

return;
case "relaunch":
DgopService.fetchProcessDetail(process.pid, detail => {
Proc.runCommand("processRestart" + pid, ["sh", "-c", restartScript, "sh", pid, detail?.unit ?? ""], (output, exitCode) => {

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.

Proc.runCommand only removes _procDebouncers entries for random ids. With "processRestart" + pid, every distinct pid that is restarted leaves a Timer and its entry behind for the life of the shell. The same applies at line 173. A restart is one-shot and doesn't need debouncing, so pass null as the id in both places.

]

function copy(text) {
Quickshell.execDetached([Proc.dmsBin, "cl", "copy", text]);

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.

SystemInfo.summary() puts "- " in front of every line, so the text always starts with -. cobra/pflag parses it as short flags, and dms cl copy fails with unknown shorthand flag: ' '. "Copy summary" never copies, yet the success toast still shows. "Copy report" only works because it starts with ###.

Suggested change
Quickshell.execDetached([Proc.dmsBin, "cl", "copy", text]);
Quickshell.execDetached([Proc.dmsBin, "cl", "copy", "--", text]);

Comment thread core/internal/server/drives/report.go Outdated
Comment on lines +44 to +46
if !reportMu.TryLock() {
return nil, errors.New("another report is running")
}

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.

The helper runs every request in its own goroutine, so two expanded drive cards send drives.smart at the same moment. This happens on unlock, or when a second card is expanded while the first smartctl -x is still running. One request gets "another report is running".

SmartReport.qml treats that as state_ = "error", and it only reruns from "idle". The card stays on that error until the window is reopened, and collapsing and re-expanding it doesn't help.

Waiting on the lock serializes the requests, and each one is already bounded by reportTimeout:

Suggested change
if !reportMu.TryLock() {
return nil, errors.New("another report is running")
}
reportMu.Lock()

}

// Read when the card is open, not for every drive at once: smartctl wakes a sleeping disk.
readonly property bool shouldRun: unlocked && wanted && !!drive?.device

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.

shouldRun ignores drive.asleep, and wanted is the card's expanded, which is true for card 0 by default (DisksView.qml:67). The report also runs while its own section is still collapsed. FullReport runs smartctl -x without -n standby.

So when the user is unlocked and opens Disks with a spun-down HDD as the first drive (for example sda on a machine with no NVMe), the disk spins up, even though the card shows it as asleep. The PR says a sleeping HDD is not woken here. Skip the read while the drive is asleep; it will run once drives.list reports the drive awake:

Suggested change
readonly property bool shouldRun: unlocked && wanted && !!drive?.device
readonly property bool shouldRun: unlocked && wanted && !!drive?.device && !drive.asleep

Comment on lines +50 to +53
readonly property string compositorVersion: {
const key = Object.keys(f).find(k => k === "wm." + CompositorService.compositor) ?? Object.keys(f).find(k => k.startsWith("wm."));
return key ? SystemInfo.version(f[key]) : "";
}

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.

SystemFacts only writes wm.hyprland, wm.niri, wm.sway, wm.scroll, wm.labwc and wm.miracle. On mango, aqueous or umbriel, the startsWith("wm.") fallback picks up the version of some other installed compositor.

For example, a mango user with Hyprland also installed gets "Mango 0.45.0" in About and in the copied summary and report used for bug reports. Drop the fallback:

Suggested change
readonly property string compositorVersion: {
const key = Object.keys(f).find(k => k === "wm." + CompositorService.compositor) ?? Object.keys(f).find(k => k.startsWith("wm."));
return key ? SystemInfo.version(f[key]) : "";
}
readonly property string compositorVersion: {
const raw = f["wm." + CompositorService.compositor];
return raw ? SystemInfo.version(raw) : "";
}

@claude

claude Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Claude review

Several real bugs. The process tree kill can end DMS itself, and "Copy summary" never copies.

  • End process tree: the sh fallback reuses a global c across recursion, so it skips intermediate processes and can SIGTERM skipped ones like dms, ProcessActions.qml:30
  • Restart: the relaunched app keeps the shell's stdout/stderr pipes and breaks or dies when it writes after they close, ProcessActions.qml:34
  • Each restarted pid leaves a Timer in Proc._procDebouncers (named id), ProcessActions.qml:155
  • "Copy summary" text starts with - , which pflag parses as a flag, so nothing is copied but the success toast shows, SystemView.qml:217
  • Two SMART reports at once: one fails with "another report is running" and stays failed, drives/report.go:44
  • The full SMART report runs on the first, default-expanded card even when the drive is asleep, and wakes the HDD, SmartReport.qml:70
  • On mango, aqueous or umbriel, the compositor version falls back to another installed compositor's version, SystemView.qml:50
    Checked: the root helper (pid and unit checks, device path validation, lifecycle), the socket protocol between core and QML, the drives package, timers and polling after the window closes, shell injection in the process actions, privacy of the copied report, deprecated shims, D* widgets, I18n. Model: claude-opus-5-5.

@bbedward

Copy link
Copy Markdown
Member

/claude review

push("attributes", table.filter(t => t && has(t.name)).map(t => kv(t.name, t.value + " / " + t.worst + " / " + t.thresh + (t.raw && t.raw.string ? " " + t.raw.string : ""))));

const nvTests = j.nvme_self_test_log && j.nvme_self_test_log.table;
const ataTests = j.ata_smart_self_test_log && j.ata_smart_self_test_log.standard && j.ata_smart_self_test_log.standard.table;

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.

Core runs smartctl -x, which means -l xselftest,selftest -l xerror,error. When a drive supports the extended (GP) logs, which nearly every modern SATA drive does, smartctl prints only those. They end up under ata_smart_self_test_log.extended and ata_smart_error_log.extended (the count is at extended.count). This code only reads .standard.table (here) and .summary.count (line 266), so the self-test section and the error count are missing on most SATA drives. NVMe isn't affected.

Fall back to the extended keys:

const tl = j.ata_smart_self_test_log;
const ataTests = tl && (tl.standard || tl.extended)?.table;
...
const el = j.ata_smart_error_log;
const ataErr = el && (el.summary || el.extended);

Comment thread quickshell/Services/DgopService.qml Outdated
return currentSort;
case "gpu":
case "vram":
return enabledModules.includes("process-gpu") && isModuleAvailable("process-gpu") ? currentSort : "";

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.

When no GPU is enabled, buildMetaParams() drops process-gpu (line 625), but this check still returns "gpu"/"vram", because the default gpu/vram columns put process-gpu in enabledModules. So needsFullProcessList stays false and the request goes out with limit: 100 and a sort dgop has no data for. With the default setup (no GPU enabled), clicking the GPU or VRAM header shows 100 arbitrary rows while the count says e.g. "350 processes".

Suggested change
return enabledModules.includes("process-gpu") && isModuleAvailable("process-gpu") ? currentSort : "";
return gpuPciIds.length > 0 && enabledModules.includes("process-gpu") && isModuleAvailable("process-gpu") ? currentSort : "";

spacing: Theme.spacingS

Repeater {
model: DgopService.perCoreCpuUsage.length

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.

visible: root.perThread on the parent hides the grid but doesn't stop the Repeater. In the default "Overall" mode it still builds one tile per thread, each with a MetricChart/DSparkline whose path bindings rerun on every sample. CpuPane is the default pane and stays loaded while other tabs are open, so a 32-thread CPU recomputes 32 hidden sparklines on every poll whenever the window is open. threadHistory still fills in PerformanceView, so the charts start full when the user switches modes.

Suggested change
model: DgopService.perCoreCpuUsage.length
model: root.perThread ? DgopService.perCoreCpuUsage.length : 0

@claude

claude Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Claude review

The second round's fixes are in. Three smaller issues remain, in SMART parsing, GPU sorting and the CPU pane.

  • The SMART self-test section and error count are missing on most SATA drives: smartctl -x writes the extended logs, but the parser only reads standard/summary, Drives.js:258
  • Sorting by GPU or VRAM with no GPU enabled keeps the 100-row limit, so the list shows arbitrary rows, DgopService.qml:682
  • In "Overall" mode the hidden per-thread grid still builds and redraws one sparkline per thread on every sample, CpuPane.qml:142
    Checked: that the second round's fixes landed (filter chip index, popout sort reconcile, Tailscale Ref, I18n.duration); the root helper's pid, unit and device checks and the tree-kill skip list; the dgop and drives socket fields between Go and QML; Ref balance, timers and polling after the window and popout close; callers of the changed Format.js and Ref.qml APIs; deprecated shims; D* widgets; I18n. Model: claude-opus-5-5.

@bbedward

Copy link
Copy Markdown
Member

/claude review

Comment on lines +473 to +476
function unlock() {
if (!helper.running)
helper.running = true;
}

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.

After a lock, every second unlock fails without any message. lock() leaves helper.stdinEnabled false. On the next running = true, Quickshell starts the process with stdin closed. Setting it back to true in onStarted comes too late, because a closed channel isn't reopened. The dgop.modules handshake is never sent, the helper gets EOF and exits 0, so ready never becomes true and no toast shows. The user enters the password and stays locked.

To reproduce: unlock, close the window (ProcessListModal.qml:101 calls lock()) or press the lock button, then unlock again.

Turn stdin back on before starting. The assignment in onStarted can then go.

Suggested change
function unlock() {
if (!helper.running)
helper.running = true;
}
function unlock() {
if (helper.running)
return;
helper.stdinEnabled = true;
helper.running = true;
}

iconName: "content_copy"
iconColor: Theme.surfaceText
tooltipText: I18n.tr("Copy Full Command")
onClicked: Quickshell.execDetached(["dms", "cl", "copy", root.fullCommand])

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.

Without --, copying fails for any command line that starts with -. Login shells are the common case: their command line is -bash or -zsh. pflag reads it as flags, dms cl copy fails with unknown shorthand flag, and nothing is copied. SystemView.qml:230 already passes --.

Suggested change
onClicked: Quickshell.execDetached(["dms", "cl", "copy", root.fullCommand])
onClicked: Quickshell.execDetached(["dms", "cl", "copy", "--", root.fullCommand])

@claude

claude Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Claude review

The third round's fixes are in. Two bugs remain: re-unlocking after a lock and copying some command lines.

  • Unlock after a lock starts the helper with stdin closed, so every second unlock fails silently after the password prompt, DgopService.qml:473
  • "Copy Full Command" has no --, so command lines starting with - (login shells like -zsh) are not copied, ProcessDetailStrip.qml:626
    Checked: that the third round's fixes landed (SMART extended logs, GPU sort with no GPU, per-thread Repeater); the root helper's pid, unit and device checks and its lifecycle; dgop and drives socket fields between Go and QML; Ref balance and callers of the changed Ref.qml and Format.js APIs; timers and polling after the window and popout close; shell quoting in the process actions; privacy of the copied report; deprecated shims; D* widgets; I18n. Model: claude-opus-5-5.

@bbedward

Copy link
Copy Markdown
Member

/claude review

v snap && p pkg.snap "$(snap list 2>/dev/null | tail -n +2 | wc -l)"
[ -d /run/current-system ] && v nix-store && p pkg.nix "$(nix-store -qR /run/current-system 2>/dev/null | wc -l)"
v pipewire && p pipewire "$(pipewire --version 2>/dev/null | sed -n 's/.*libpipewire \\([0-9.]*\\).*/\\1/p')"
v glxinfo && p gl "$(glxinfo -B 2>/dev/null | grep -m1 'OpenGL version string' | sed 's/.*: //')"

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.

glxinfo is an X11 client, so it connects to $DISPLAY. niri runs xwayland-satellite only when an X client connects, and sway (xwayland enable) starts Xwayland lazily. On those compositors, a user with no X11 apps who opens the System page starts a full X server, and it keeps running for the rest of the session. That's an extra resident process in a shell that runs 24/7.

Fix: use a Wayland/EGL query instead, e.g. eglinfo -B -p wayland (same mesa-utils/mesa-demos package). Or skip glxinfo unless an X server is already running.

property bool cpuPerThread: false

// Window app ids by PID: a window names its app more reliably than the process name does.
readonly property var windowAppIds: {

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.

This is a binding on a singleton, so it stays live for the whole session once the System Monitor has loaded ProcessListMetrics, even after the window closes. It depends on sortedToplevels and, through windowPid(), on NiriService.windows, MangoService.windows or every Hyprland toplevel's lastIpcObject. Each window open, focus or title change reruns it. It costs O(n²) per run, because windowPid() scans the window list once per toplevel. Only appEntry() reads it, and that only runs while the process list is shown.

Fix: gate it, e.g. if (!DgopService.enabledModules.includes("processes")) return ({}); at the top of the binding. Or build the map lazily inside appEntry() next to _appMemo.

@claude

claude Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Claude review

The fourth round's fixes are in. Two idle-cost issues remain, both on a shell that runs 24/7.

  • System page runs glxinfo, an X11 client, which starts Xwayland (niri on-demand, sway lazy) and leaves it running, SystemFacts.qml:40
  • windowAppIds is a live singleton binding that reruns on every window or title change after the monitor has been opened once, with O(n²) cost, ProcessListMetrics.qml:28
    Checked: that the fourth round's fixes landed (helper stdin re-enabled before restart, cl copy -- everywhere, NVMe size fallback, tray map cleanup); the root helper's method set, pid and unit checks and lifecycle; the drives and dgop socket fields between Go and QML; Ref module swaps and refcount balance; process action scripts and quoting; timers, Processes and polling after the window and popout close; deprecated shims; D* widgets; I18n. Model: claude-opus-5-5.

@bbedward

Copy link
Copy Markdown
Member

/claude review

icd=$(ls /usr/share/vulkan/icd.d/*.json /etc/vulkan/icd.d/*.json 2>/dev/null)
if [ -n "$icd" ]; then
p vk.api "$(cat $icd | grep -o '"api_version" *: *"[^"]*"' | sed 's/.*: *"//;s/"//' | sort -V | tail -n1)"
p vk.driver "$(cat $icd | grep -o '"library_path" *: *"[^"]*"' | sed 's/"$//;s/.*[/"]//;s/^lib\\(vulkan\\|GLX\\)_//;s/\\.so.*//;s/^radeon$/radv/;s/^intel$/anv/;s/^intel_hasvk$/hasvk/;s/^nouveau$/nvk/' | grep -v '^lvp' | sort -u | paste -sd, - | sed 's/,/, /g')"

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.

GNU sed finds the s delimiter before it parses the regex, and it doesn't skip bracket expressions. So in s/.*[/"]// the / inside [...] ends the pattern. sed then reads .*[ as the pattern and "] as the replacement, and the trailing / as a flag. The whole expression fails with "unknown option to s'", so vk.driver` is always empty on glibc distros and the Vulkan row only shows the API version. Use a different delimiter for that one command:

Suggested change
p vk.driver "$(cat $icd | grep -o '"library_path" *: *"[^"]*"' | sed 's/"$//;s/.*[/"]//;s/^lib\\(vulkan\\|GLX\\)_//;s/\\.so.*//;s/^radeon$/radv/;s/^intel$/anv/;s/^intel_hasvk$/hasvk/;s/^nouveau$/nvk/' | grep -v '^lvp' | sort -u | paste -sd, - | sed 's/,/, /g')"
p vk.driver "$(cat $icd | grep -o '"library_path" *: *"[^"]*"' | sed 's/"$//;s|.*[/"]||;s/^lib\\(vulkan\\|GLX\\)_//;s/\\.so.*//;s/^radeon$/radv/;s/^intel$/anv/;s/^intel_hasvk$/hasvk/;s/^nouveau$/nvk/' | grep -v '^lvp' | sort -u | paste -sd, - | sed 's/,/, /g')"

spacing: Theme.spacingXS
Ref {
service: DriveService
active: root.visible

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.

The DriveService Ref here, and the ones in PerformanceView and SystemView, are only held while their page is visible. Switching to Processes drops the count to 0, and DriveService.onPollingChanged sets drives = []. Performance↔Disks can also hit 0 for a moment, depending on which visible binding updates first.

So every visit to Disks does this:

  • All DriveCards are destroyed and rebuilt, and expanded state goes back to the default.
  • For one drives.list round trip the page shows the fallback (aggregate I/O line, Mount Points expanded).
  • When unlocked, the first card runs smartctl -x again through the root helper.

Fix: hold one DriveService Ref in ProcessListModal with active: processListModal.visible, like the DgopService one, and drop the three per-page Refs.

Comment on lines +176 to +177
else if (exitCode !== 0)
failed(process, "");

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.

pkexec exits 126 when the user dismisses the password prompt. Cancelling a restart of another user's process while locked therefore shows a "Failed to restart …" error toast. DgopService.qml:520 and BootEntryService.qml:130 already treat 126 as a cancel.

Suggested change
else if (exitCode !== 0)
failed(process, "");
else if (exitCode !== 0 && exitCode !== 126)
failed(process, "");

@claude

claude Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Claude review

The fifth round's fixes are in. Three smaller bugs remain: the Vulkan driver fact, the Disks page state and a restart toast.

  • The Vulkan driver sed command has an unescaped / inside [...], so GNU sed rejects the whole expression and the driver is never shown, SystemFacts.qml:45
  • DriveService Refs are held per page, so every tab switch clears drives: the Disks cards are rebuilt, expanded state is lost, the fallback flashes, and the SMART report reruns when unlocked, DisksView.qml:28
  • Dismissing the pkexec prompt on a locked system-service restart shows a "Failed to restart" toast (exit 126 isn't treated as a cancel), ProcessActions.qml:176
    Checked: that the fifth round's fixes landed (glxinfo replaced by the libgallium lookup, windowAppIds gated on the processes module); the root helper's method set, pid/unit/device checks, stdout locking and lifecycle; the dgop and drives socket fields between Go and QML; Ref balance and callers of the changed Ref.qml, Format.js and DgopService APIs; process action scripts and quoting; timers and polling after the window and popout close; the SystemFacts script; privacy of the copied report; deprecated shims; D* widgets; I18n. Model: claude-opus-5-5.

@bbedward

Copy link
Copy Markdown
Member

/claude review

Layout.alignment: Qt.AlignTop
title: I18n.tr("Process", "section title: details of one process")
iconName: "info"
rows: [root.row(I18n.tr("User"), root.live?.username), root.row(I18n.tr("Status"), root.live?.status ? ProcessListMetrics.statusLabel(root.live.status) : null), root.row("UID", root.detail?.uid), root.row(I18n.tr("Group"), root.detail?.group ? root.detail.group + " (" + root.detail.gid + ")" : root.detail?.gid), root.row(I18n.tr("Started", "when a process was started"), root.started ? root.started.toLocaleString(Qt.locale(), Locale.ShortFormat) : null), root.row(I18n.tr("Parents", "chain of processes that started this one"), root.parentChain), root.row(I18n.tr("Terminal"), root.detail?.tty), root.row(I18n.tr("Session", "login session id of a process"), root.detail?.session), root.row(I18n.tr("Setuid", "process runs with another user's rights"), root.privileges?.setuid ? I18n.tr("Yes") : null)]

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.

The "UID" row label is the only label in this list that isn't wrapped in I18n.tr(). "PID" is translated elsewhere (ProcessListMetrics.qml:139). CONTRIBUTING.md requires user-facing strings to go through I18n.tr() with context.

Suggested change
rows: [root.row(I18n.tr("User"), root.live?.username), root.row(I18n.tr("Status"), root.live?.status ? ProcessListMetrics.statusLabel(root.live.status) : null), root.row("UID", root.detail?.uid), root.row(I18n.tr("Group"), root.detail?.group ? root.detail.group + " (" + root.detail.gid + ")" : root.detail?.gid), root.row(I18n.tr("Started", "when a process was started"), root.started ? root.started.toLocaleString(Qt.locale(), Locale.ShortFormat) : null), root.row(I18n.tr("Parents", "chain of processes that started this one"), root.parentChain), root.row(I18n.tr("Terminal"), root.detail?.tty), root.row(I18n.tr("Session", "login session id of a process"), root.detail?.session), root.row(I18n.tr("Setuid", "process runs with another user's rights"), root.privileges?.setuid ? I18n.tr("Yes") : null)]
rows: [root.row(I18n.tr("User"), root.live?.username), root.row(I18n.tr("Status"), root.live?.status ? ProcessListMetrics.statusLabel(root.live.status) : null), root.row(I18n.tr("UID", "user id of a process"), root.detail?.uid), root.row(I18n.tr("Group"), root.detail?.group ? root.detail.group + " (" + root.detail.gid + ")" : root.detail?.gid), root.row(I18n.tr("Started", "when a process was started"), root.started ? root.started.toLocaleString(Qt.locale(), Locale.ShortFormat) : null), root.row(I18n.tr("Parents", "chain of processes that started this one"), root.parentChain), root.row(I18n.tr("Terminal"), root.detail?.tty), root.row(I18n.tr("Session", "login session id of a process"), root.detail?.session), root.row(I18n.tr("Setuid", "process runs with another user's rights"), root.privileges?.setuid ? I18n.tr("Yes") : null)]

@claude

claude Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Claude review

The sixth round's fixes are in. One small i18n gap remains, no bugs found.

  • The UID row label in the process details isn't wrapped in I18n.tr(), ProcessDetailStrip.qml:557
    Checked: that the sixth round's fixes landed (vk.driver sed delimiter, DriveService Ref held by the window, pkexec 126 on system restart); the r6 changes (DeviceRail shown/hidden rows and keyboard move, per-thread grid height, fullList and full-list refcounts, the windowAppId memo, formatTemp callers); the root helper's methods, pid/unit/device checks and lifecycle; dgop and drives socket fields between Go and QML; Ref balance and callers of the changed Ref.qml, Format.js and DgopService APIs; timers and polling after the window and popout close; process action script quoting; privacy of the copied report; deprecated shims; D* widgets; I18n. Model: claude-opus-5-5.

@bbedward
bbedward merged commit a0b2486 into duxlabs-dev:master Oct 31, 2026
6 checks passed
purian23 pushed a commit that referenced this pull request Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Go daemon and CLI under core/ feature packaging ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants