Skip to content

sysmon: process pause and priority - #4137

Merged
bbedward merged 2 commits into
duxlabs-dev:masterfrom
Conava:process-pause-priority
Nov 5, 2026
Merged

bbedward merged 2 commits into
duxlabs-dev:masterfrom
Conava:process-pause-priority

Conversation

@Conava

@Conava Conava commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Description

This adds two features to the system monitor: pausing processes and changing their priority. Both are in the right-click menu and in the expanded process view.

Pause freezes a process and everything it started until it is resumed, for example a game while you're away. Paused processes are dimmed and show a pause icon in the list. Session processes, DMS itself and kernel threads can't be paused. Quit, End process tree, Restart and the kill button in the bar's window menu resume a paused process so the commands can go through.

Priority has five levels from Highest to Lowest and applies to all threads of a process, and on a merged row to every process in that row. The current level shows in the expanded view, and the optional Nice column is now a Priority column that shows the level and sorts by it. The exact nice value stays in the Details tab. Lowering the priority of your own process needs no password, everything else goes through the system monitor's unlock or a password prompt.

I also fixed the session process list: dbus-broker-launch never matched because process names get cut off at 15 characters, so it now gets the same warning on quit as the other session processes and no Restart.

One limit: pausing a single program inside a terminal hands the terminal back to the shell, the same as Ctrl+Z.

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

Partially implements #1256
I left out affinity and the profiles from the issue. Affinity can be a follow-up, the work there is a CPU picker that makes sense on hybrid CPUs with different CCDs for example which I cannot reliably test on my own system. Profiles would need to watch every process start for example with a kernel-level interface, and ananicy-cpp and gamemode already cover that. Should stay separate from DMS in my opinion.

Screenshots / video

screenshot_2026-11-05_09-21-51 1793866933065389598

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 dux-docs to document any new behaviors: docs(dms): document the system monitor dux-docs#168 (still open from the system monitor rework)

Add Pause/Resume and Priority to the process menu and the expanded
row, in both the window and the popout.

Pause sends SIGSTOP to a process and everything it started, parents
first so a shell keeps its foreground job, and Resume sends SIGCONT.
Session processes, polkitd and DMS can't be paused, and the root
helper never stops itself. Paused rows are dimmed and show an icon.

A stopped process ignores SIGTERM until it continues, so Quit, End
process tree and Restart now continue it after signalling. Otherwise
they did nothing and Resume ended the process later.

Priority offers five presets for the nice value. It applies to every
thread, and on a merged row to every process in that row. Nice is
per thread on Linux, so a plain renice only changes the main thread.
Lowering your own process needs no password; anything else goes
through the unlocked helper or pkexec.

The level shows as a chip in the expanded row, and the optional Nice
column becomes Priority, showing the level and sorting Highest first.
Values set elsewhere read as the nearest level; the exact number stays
in the Details tab.

Fix the session list too: comm is cut to 15 characters, so
dbus-broker-launch never matched. It now gets the critical warning
and no restart, as the list intended.
The window menu sent a plain kill, which a stopped process ignores
until it continues. Go through the same tree script as Quit on a
paused process. Continuing a running process changes nothing.
@github-actions github-actions Bot added core Go daemon and CLI under core/ feature ui Quickshell UI under quickshell/ labels Nov 5, 2026
@bbedward

bbedward commented Nov 5, 2026

Copy link
Copy Markdown
Member

/claude review

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: Go helper signal/nice handling (signal validation, STOP/CONT ordering, self-exclusion, merged-row walk) and its tests; QML tree/priority/restart shell scripts, pause/priority actions and auth paths, context menu submenus, detail strip controls, process row and priority sort, bar window kill; deprecated shims, I18n, untouched translation catalogs. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 564e301 into duxlabs-dev:master Nov 5, 2026
5 checks passed
bbedward pushed a commit that referenced this pull request Nov 6, 2026
port 2.1

(cherry picked from commit 564e301)
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 ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants