Skip to content

omamobile-shell 0.2.145: screen recording picks full screen or an area, mixes app sound with the mic, heat limits opt-in, and shows a stop chip in the bar - #1014

Open
Somnius wants to merge 5 commits into
derekross:mainfrom
Somnius:screenrec-pr
Open

Somnius wants to merge 5 commits into
derekross:mainfrom
Somnius:screenrec-pr

Conversation

@Somnius

@Somnius Somnius commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Phone: Pixel 8 Pro (husky), kernel 7.3.0-rc6-mct1121-omamobile-push1-g1a128f5f61d8. Package: omamobile-shell 0.2.145.

The Screen record tile's page now lets you pick what to record and which sound to take, and the recorder looks after heat on its own.

  • Record: full screen, or pick an area (after Start you drag a box; Omarchy's region picker, slurp underneath).
  • Sound: none, apps + mic (default sink monitor and mic mixed through a temporary null sink, like Omarchy's wf-recorder path), apps only, mic only.
  • Call recording is listed greyed out with "Needs the modem". The row stays disabled in this PR. omamobile-screenrecord call-status already gives the text it shows once there's a call recording backend: a legal-reasons message where the law doesn't allow it (country from the network MCC, else the system region, policy in /usr/share/omamobile/callrec/countries.tsv), and a consent notice where the country is unknown. The list ships empty on purpose, every line should come with a source. TELEPHONY-APPS-PLAN no longer says "not planned".
  • A supervisor runs for as long as the recording does (under systemd-inhibit). It stops and keeps the file at 60 C (two samples in a row), when the screen goes off, after 30 min, or below 200 MB free, and it unloads the null sink and loopbacks however wf-recorder ends. It won't start above 59 C. The limits (59/60 C, 30 min, storage, width, fps, threads) can be changed in an optional ~/.config/omamobile/screenrecord.conf.
  • A start lock, so a double tap or a stop during the area pick can't start a second recorder. A stop during the pick closes the picker.
  • The bar shows a red chip with the time while recording; tap it to stop.
  • Still CPU encoding (wf-recorder + x264 ultrafast, 2 threads, up to 720 px wide): on the Pixel 8 Pro gpu-screen-recorder reports an unknown vendor, h264_software only and portal capture only, there's no V4L2 encoder node and VA-API doesn't init.

On my Pixel 8 Pro (this code on top of my other open shell branches): the page while the phone was at 60 C (Start disabled, the reason under the rows), and the bar before and during a recording:

record page
bar idle
bar recording

What I tested: test/all passes in the CI container, with a new test/screenrecord.sh (stand-ins for wf-recorder, pactl, hyprctl, the picker and the thermal zones): every sound mode's arguments, module cleanup after stop and after a killed recorder, stale module sweep, area geometry, a cancelled pick, a stop during the pick, a dead supervisor, pactl failing, the 59/60 C gate and stop with the file kept, screen off, the start lock, call-status. On the phone: no sound, apps + mic, apps only and mic only each saved a playable file (720x1602 h264, aac 48 kHz where there's sound), with no modules left behind. The apps + mic, apps only and mic runs ended after about 6 s while the phone read 60-62 C. That matches the 60 C stop, but I added the stop reason to the log after those runs, so it isn't confirmed.

Not tested: the touch area pick on the real screen (only scripted geometry in the container), an area recording on the phone (the phone stayed over 59 C), recordings longer than a few seconds (so the 30 min and low storage stops only in the container), the echo you get in apps + mic on the speaker, and whether the shell's own idle timer respects the systemd-inhibit lock (the screen-off stop covers that case). The fallback for when systemd-inhibit can't start is only covered by reading the code. No offscreen renders this time, the page is a layer-shell window and the render harness here draws plain items only.

tools/phone-smoke report

phone-smoke: unknown

Kernel 7.3.0-rc6-mct1121-omamobile-push1-g1a128f5f61d8, tools at unknown, 2026-11-23T16:53Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-mct1121-omamobile-push1-g1a128f5f61d8, slot b, up 62530s
storage guard (required) ok 62 partitions; only userdata and slot b's boot images writable
root (required) ok ext4 on userdata, 207G free
kernel health (required) ok no oops or BUG; 0 WARN, 0 error lines in dmesg (0 known, 0 new)
systemd units ok none failed
first boot units not ok failed on the first boot: systemd-firstboot.service
USB gadget (required) ok bound to 11210000.usb
display ok card2-DSI-1 connected, 1344x2992
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked true)
touch ok SALIXP Touchscreen
buttons ok gpio-keys
Wi-Fi ok wlp1s0 on brcmfmac, link up
Bluetooth ok hci0, powered true
battery ok 78% Discharging, 38 °C
sound cards ok googlehuskyaocs
sensors skip no sensor proxy
cameras skip no libcamera tools
thermal ok hottest zone 57 °C

Packages: hyprland 0.57.0-3.3, libcamera 0.7.2-4.23, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.3-1, omamobile-audio 0.5.18-1, omamobile-device-husky 0.1.23.hz1-1, omamobile-firstboot 0.1.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-nfctools 0.1.0-1, omamobile-omarchy 0.1.50.scan2-1, omamobile-osk-words 0.1.0-2, omamobile-owl-widgets 0.1.2-1, omamobile-settings 0.1.10.combo1121zj-1, omamobile-shell 0.2.141.hz12-1, omamobile-stevia 0.59.0-18, omamobile-voice 0.1.4-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1

The first boot line isn't touched by this change (it only changes omamobile-shell).

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Lef. This is a big step for the recorder, and the test is unusually thorough: I ran test/screenrecord.sh here and all 19 cases pass, the module cleanup after a killed recorder included. Three things need changing before it can merge, and there's one question that's mine to answer.

  1. CI is red on the grep -q lint, at test/screenrecord.sh:196. "$rec" heat | grep -cx -- "- 59" >/dev/null || fail ... fixes it. Because that check stops tests/all, the package tests never ran in CI, so please check the run once it's green again.

  2. The "no wf-recorder" case starts the real recorder on any machine that has one. The stand-ins sit in front of the host's PATH, so when the case hides the stand-in, command -v wf-recorder finds /usr/bin/wf-recorder. The shell depends on wf-recorder, so that's every phone, and tools/phone-install-package runs the tests on the phone: I tried it with a fake "host" recorder later on PATH, and it was started with -o DSI-1 -c libx264 ... and left running while the test removed its folder. Could the script take the recorder from a variable (say OMAMOBILE_RECORD_WF, default wf-recorder, used both in the check and in the setsid nice line), with the test pointing it at its stand-in, and at a path that doesn't exist for this case?

  3. The 60 C stop and the "won't start above 59 C" rule. Your own runs ended after about 6 s at 60-62 C, and the area recording couldn't start at all. My 7 Pro's GPU zone idles at 54 C and sits at 56-58 C under load, and an 8 Pro on the charger reads 61-62 C, so with these defaults most recordings would stop within seconds, and many would never start. You made the same call on #1001 after the thermal discussion on #946: the hotspot's heat stop is off unless set. I'd like the same here, the heat stop and the start refusal off by default with your screenrecord.conf keys to turn them on, or a threshold with a reason that holds on these phones.

  4. Call recording: changing the plan from "not planned" to "planned", and showing a greyed-out row on every phone before there's a backend, is a decision for me, and I haven't made it yet. I'll come back to it here. For this PR I'd keep the plan row as it is and leave the row off the page; call-status can stay, since it does nothing without a backend.

Once those are in, I'll run it on my 7 Pro from this branch on its own: a full-screen recording of about a minute with each sound mode, an area recording, the chip, and a stop with the screen going off. I'll set the version at merge.

@Somnius Somnius changed the title omamobile-shell 0.2.145: screen recording picks full screen or an area, mixes app sound with the mic, stops at 60 C, and shows a stop chip in the bar omamobile-shell 0.2.145: screen recording picks full screen or an area, mixes app sound with the mic, heat limits opt-in, and shows a stop chip in the bar Nov 24, 2026
@Somnius

Somnius commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @derekross, all four are done in the new commit on top:

  1. The line you flagged at test/screenrecord.sh:196 (now 198) uses grep -cx -- "- off" >/dev/null now (the expected text changed with item 3). tests/grep-q-pipes passes, and the package's test/all passes in the Arch CI container as uid 1000, screenrecord cases included. I'll check the GitHub run once it's done after the push.
  2. The script takes the recorder from OMAMOBILE_RECORD_WF (default wf-recorder), in the command -v check and in the setsid nice line. The test exports it as the stand-in's full path, and the "no wf-recorder" case points it at a path that doesn't exist and checks that nothing was started. The hide helper is gone.
  3. HEAT_START and HEAT_STOP are unset by default, so no start refusal and no heat stop unless screenrecord.conf (or the env) sets them. heat prints <C> off without a limit, and the page only greys out Start when a limit is set. New test case: starts at 75 C and keeps running with no limits; the old 59/60 C cases now run with the two keys set.
  4. The Call recording row is off the page, the TELEPHONY-APPS-PLAN.md row is back to main's text, and call-status stays.

I also changed the title so it doesn't say "stops at 60 C" anymore. I haven't run it on my 8 Pro yet, it's off charging. I'll post that run when it's back up. Version left for you.

@derekross

Copy link
Copy Markdown
Owner

Decision on call recording: not planned. Recording a call records the other person too, and in many places that needs their consent, so the project won't offer it. Please drop the greyed-out row and leave TELEPHONY-APPS-PLAN as "not planned". The screen recorder itself is welcome once the review's other points are fixed.

Somnius added a commit to Somnius/omarchy-mobile that referenced this pull request Nov 24, 2026
Derek decided on derekross#1014 that the project won't offer call recording, since
it records the other person too and in many places that needs their
consent. The page's row and the plan change were already out; this takes
out what was left for it: the call-status verb, callrec/countries.tsv,
its install line and its test cases.

Signed-off-by: Lef <me@lefteros.com>
@Somnius

Somnius commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @derekross. The row and the plan were already done in f0fa771 (my reply above, 02:00 UTC today): no Call recording row on the page, and TELEPHONY-APPS-PLAN.md keeps main's "not planned" text.

Since it's now not planned at all, I also took out what was left for it in baefadd: the call-status verb, callrec/countries.tsv, its install line and its test cases. You'd said call-status could stay, so tell me if you'd rather keep it, it's one revert.

Tested in the Arch CI container as uid 1000: tools/pr-check, the pipe lints and the shell's test/all (screenrecord cases included) all pass (34 ok lines, rc 0). Not on the phone yet. It's back online now, so the run you listed (a minute of full screen with each sound mode, an area, the chip, a stop with the screen going off) is coming. I'll rebase after #994 (#994) lands, as you said.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, Lef. All four points are in, and I checked each: the lint line, the recorder taken from OMAMOBILE_RECORD_WF (I ran the test here with a fake "host" wf-recorder on PATH and it was never started), the heat limits off unless screenrecord.conf sets them, and the call-recording row gone with the plan back to main's text. Taking call-status and the country file out as well is the cleaner end now that call recording isn't planned, so no need to revert that.

What's left is order and a run. #994 goes in first; after that, please rebase so the recording chip anchors on the unread count rather than on the same spot (today both use callChipPill.visible ? callChipPill.right : clockText.right, so they'd draw on top of each other). Then I'll run it on my 7 Pro from your branch on its own: a minute of full screen with each sound mode, an area, the chip, a stop by the power key, and the default with no heat limits on a warm phone. I'll write the squash message by hand, since the first commit's text still describes the call row and the 60 C stop, and I'll set the version at merge.

…a, mixes app sound with the mic, stops at 60 C, and shows a stop chip in the bar

The Screen record page gets Record (full screen / pick an area) and Sound
(none / apps and mic / apps only / mic only), plus a greyed-out Call
recording row: "Needs the modem" for now; later greyed out where the law
does not allow it (countries.tsv, empty until each line has a source) and
shown with a consent notice where the country is unknown.

omamobile-screenrecord runs a supervisor under systemd-inhibit for as long
as the recording runs. It stops and keeps the file at 60 C, when the screen
goes off, after 30 minutes or on low storage, logs why it stopped, and
unloads the apps+mic null sink and loopbacks however wf-recorder ends. It
refuses to start above 59 C. A start lock keeps a double tap or a stop
during the area pick from starting a second recorder. The bar shows a red
chip with the time; a tap stops.

TELEPHONY-APPS-PLAN: call recording is planned once the modem works.
…n, no call row

- The recorder comes from OMAMOBILE_RECORD_WF (default wf-recorder), in
  the check and in the setsid nice line; the test points it at its
  stand-in and, for the missing-recorder case, at a path that doesn't
  exist, so a test run never starts the real wf-recorder.
- HEAT_START and HEAT_STOP are unset by default: no start refusal and no
  heat stop unless screenrecord.conf (or the env) sets them. These phones
  idle at 54-62 C, so 59/60 C stopped most recordings within seconds.
  `heat` prints "<C> off" without a limit; the page only greys Start
  when a limit is set.
- The Call recording row is off the page and the plan row is back as on
  main; call-status stays.
- test/screenrecord.sh:196 uses grep -c, for the grep-q-pipes lint.

Signed-off-by: Lef <me@lefteros.com>
Derek decided on derekross#1014 that the project won't offer call recording, since
it records the other person too and in many places that needs their
consent. The page's row and the plan change were already out; this takes
out what was left for it: the call-status verb, callrec/countries.tsv,
its install line and its test cases.

Signed-off-by: Lef <me@lefteros.com>
After derekross#994 both the unread count and the recording chip anchored on
callChipPill.visible ? callChipPill.right : clockText.right, so with
an unread notification during a recording they drew on top of each
other. The chip now follows the unread count when it shows, else the
call chip or the clock as before. test/all checks the anchor.

Signed-off-by: Lef <me@lefteros.com>
@Somnius

Somnius commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on main now that #994 is in (conflicts in Bar.qml, test/status-model.js and the version; main's number kept). The recording chip now anchors on the unread count: unreadPill.visible ? unreadPill.right : callChipPill.visible ? callChipPill.right : clockText.right, so with an unread notification during a recording they sit side by side instead of on one spot. test/all checks that anchor (75efa05).

Tested in the CI container as uid 1000: tools/pr-check, the pipe lints and the shell's test/all. Not seen on a phone, that's your 7 Pro run.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Lef. The chip now sits after the unread count, and the test/all check on that anchor is a nice touch.

CI went red on its first run, and it isn't the runner: I reproduced it. In a container whose PID 1 doesn't reap children (GitHub's job container is one), wf-recorder is re-parented to PID 1 after the start exits, and after the stop it stays a zombie. alive() uses kill -0, which succeeds on a zombie, so the supervisor waits forever and the test's "supervisor ended after stop" times out. On the laptop, and on a phone, systemd reaps it, which is why your runs and my first ones passed. With alive() also checking the process state it passes in the same container:

alive() {
  local s
  [[ $1 =~ ^[0-9]+$ ]] && kill -0 "$1" 2>/dev/null || return 1
  # a zombie answers kill -0; read its state (field 3, after the last ")")
  s=$(cat "/proc/$1/stat" 2>/dev/null) || return 1
  s=${s##*) }
  [[ ${s%% *} != Z ]]
}

To reproduce: docker run -d --network none -v "$PWD:/src:ro" <image> sleep 600, then docker exec -w /src/packages/omamobile-shell <id> bash test/screenrecord.sh; with --init it passes. If you'd rather I push that commit, say so. After CI is green I'll run it on my 7 Pro from your branch, write the squash message by hand, and set the version at merge.

In a container whose PID 1 doesn't reap children (GitHub's job container
is one), wf-recorder is re-parented to PID 1 and stays a zombie after the
stop. kill -0 succeeds on a zombie, so the supervisor waited forever and
test/screenrecord.sh's "supervisor ended after stop" timed out. alive()
now also reads the process state from /proc/<pid>/stat.

Suggested-by: Derek Ross <derekross@gmail.com>
Signed-off-by: Lef <me@lefteros.com>
derekross added a commit that referenced this pull request Nov 25, 2026
Adds 9 lessons (L-1181 to L-1189) and 1 correction (C-65) from the 12
candidate lessons of review round 68, so the next round's reviewer
checks what this one caught or nearly missed: 4 to safety (a chroot
bind mount judged by everything its processes can open, an upstream
unit's "safe because" comment checked on a phone, shared paths in a
device draft, a stock boot between trials ageing the backup), 1 to
shell (a daemon newly offering a mode, against upstream's defaults),
1 to kernel (firmware-written addresses through a sliding BAR window),
and 3 to reviews (two-dot diffs on a stale branch, a blocker planned
for a follow-up, a gate keyed on another open PR's field). Two
candidates extend existing entries instead: L-982 now covers shipped
code that watches a process with kill -0 (#1014), and L-1051 the mirror
case of a "not in any release tag yet" line (#1028). C-65 corrects
round 67's memory estimate for #998, which counted whole-process RSS.

safety.md, shell-2.md, kernel.md, reviews.md and claims.md passed
30 kB, so their oldest entries move to the top of the next part as
LESSONS.md says, cascading where a part then passed 30 kB too; the
index carries the new counts.


Claude-Session: https://claude.ai/code/session_01BeEcdTihbUaQF9HBVigJ49

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Somnius

Somnius commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks Derek, good catch on the zombie. I pushed it myself: alive() is now your version, word for word, with you as Suggested-by.

I checked it with your repro, the CI image without --init and the test run as uid 1000: on the old head test/screenrecord.sh fails at "supervisor ended after stop", and on the new head it passes. CI is green on it now: https://github.com/derekross/omamobile/actions/runs/45652084528

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Lef, and thanks for checking it in the non-reaping container yourself. The fix is in, CI is green, and I re-ran the recorder's tests on your branch merged with today's main, where the bar has changed quite a bit since: they pass, and the chip still sits after the unread count with its own tap area, clear of the clock's new card.

Next is my run on the 7 Pro from your branch, as I said. I'll set the version and write the squash message when I merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants