Repository navigation
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
Conversation
derekross
left a comment
There was a problem hiding this comment.
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.
-
CI is red on the
grep -qlint, attest/screenrecord.sh:196."$rec" heat | grep -cx -- "- 59" >/dev/null || fail ...fixes it. Because that check stopstests/all, the package tests never ran in CI, so please check the run once it's green again. -
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-recorderfinds/usr/bin/wf-recorder. The shell depends onwf-recorder, so that's every phone, andtools/phone-install-packageruns the tests on the phone: I tried it with a fake "host" recorder later onPATH, 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 (sayOMAMOBILE_RECORD_WF, defaultwf-recorder, used both in the check and in thesetsid niceline), with the test pointing it at its stand-in, and at a path that doesn't exist for this case? -
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.confkeys to turn them on, or a threshold with a reason that holds on these phones. -
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-statuscan 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.
|
Thanks @derekross, all four are done in the new commit on top:
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. |
|
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. |
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>
|
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 Since it's now not planned at all, I also took out what was left for it in baefadd: the Tested in the Arch CI container as uid 1000: |
derekross
left a comment
There was a problem hiding this comment.
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>
baefadd to
75efa05
Compare
|
Rebased on main now that #994 is in (conflicts in Tested in the CI container as uid 1000: |
derekross
left a comment
There was a problem hiding this comment.
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>
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>
|
Thanks Derek, good catch on the zombie. I pushed it myself: I checked it with your repro, the CI image without |
derekross
left a comment
There was a problem hiding this comment.
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.
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.
omamobile-screenrecord call-statusalready 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".~/.config/omamobile/screenrecord.conf.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:
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-smokereportphone-smoke: unknown
Kernel
7.3.0-rc6-mct1121-omamobile-push1-g1a128f5f61d8, tools atunknown, 2026-11-23T16:53Z.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).