Repository navigation
feat(sysmon): rework the system monitor window - #3768
Conversation
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.
…work # Conflicts: # core/go.sum
- 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.
…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.
|
Made some fixes together with addressing the review findings in the dux-gop repo:
|
|
I just wanna say this is awesome and I love you |
|
/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"' |
There was a problem hiding this comment.
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:
| 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' |
There was a problem hiding this comment.
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):
| 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) => { |
There was a problem hiding this comment.
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]); |
There was a problem hiding this comment.
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 ###.
| Quickshell.execDetached([Proc.dmsBin, "cl", "copy", text]); | |
| Quickshell.execDetached([Proc.dmsBin, "cl", "copy", "--", text]); |
| if !reportMu.TryLock() { | ||
| return nil, errors.New("another report is running") | ||
| } |
There was a problem hiding this comment.
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:
| 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 |
There was a problem hiding this comment.
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:
| readonly property bool shouldRun: unlocked && wanted && !!drive?.device | |
| readonly property bool shouldRun: unlocked && wanted && !!drive?.device && !drive.asleep |
| 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]) : ""; | ||
| } |
There was a problem hiding this comment.
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:
| 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 reviewSeveral real bugs. The process tree kill can end DMS itself, and "Copy summary" never copies.
|
|
/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; |
There was a problem hiding this comment.
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);| return currentSort; | ||
| case "gpu": | ||
| case "vram": | ||
| return enabledModules.includes("process-gpu") && isModuleAvailable("process-gpu") ? currentSort : ""; |
There was a problem hiding this comment.
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".
| 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 |
There was a problem hiding this comment.
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.
| model: DgopService.perCoreCpuUsage.length | |
| model: root.perThread ? DgopService.perCoreCpuUsage.length : 0 |
Claude reviewThe second round's fixes are in. Three smaller issues remain, in SMART parsing, GPU sorting and the CPU pane.
|
|
/claude review |
| function unlock() { | ||
| if (!helper.running) | ||
| helper.running = true; | ||
| } |
There was a problem hiding this comment.
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.
| 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]) |
There was a problem hiding this comment.
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 --.
| onClicked: Quickshell.execDetached(["dms", "cl", "copy", root.fullCommand]) | |
| onClicked: Quickshell.execDetached(["dms", "cl", "copy", "--", root.fullCommand]) |
Claude reviewThe third round's fixes are in. Two bugs remain: re-unlocking after a lock and copying some command lines.
|
|
/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/.*: //')" |
There was a problem hiding this comment.
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: { |
There was a problem hiding this comment.
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 reviewThe fourth round's fixes are in. Two idle-cost issues remain, both on a shell that runs 24/7.
|
|
/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')" |
There was a problem hiding this comment.
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:
| 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 |
There was a problem hiding this comment.
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.listround trip the page shows the fallback (aggregate I/O line, Mount Points expanded). - When unlocked, the first card runs
smartctl -xagain 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.
| else if (exitCode !== 0) | ||
| failed(process, ""); |
There was a problem hiding this comment.
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.
| else if (exitCode !== 0) | |
| failed(process, ""); | |
| else if (exitCode !== 0 && exitCode !== 126) | |
| failed(process, ""); |
Claude reviewThe fifth round's fixes are in. Three smaller bugs remain: the Vulkan driver fact, the Disks page state and a restart toast.
|
|
/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)] |
There was a problem hiding this comment.
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.
| 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 reviewThe sixth round's fixes are in. One small i18n gap remains, no bugs found.
|
(cherry picked from commit a0b2486)
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:
Notes:
core/go.modpoints to my dgop fork, and I'll switch it back to upstream dgop in a follow-up commit once it's in.dms sysmon-helperruns 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.Validation
go test ./..., the FreeBSD build,run-qml.py logicand the node tests pass. I skipped theqml-testshook since it needs niri.Type of change
Related issues
Screenshots / video
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings