Skip to content

Desktop: mount removable storage through udisks - #49

Open
brkosebay wants to merge 85 commits into
OrchardLinux:mainfrom
brkosebay:j71t/removable-media
Open

brkosebay wants to merge 85 commits into
OrchardLinux:mainfrom
brkosebay:j71t/removable-media

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

Part 13 of 14 of the iPad 5 (J71t) series in this repository; merge after #48.

Problem

USB sticks behind the camera adapter were not mounted in the desktop.

Change

Run udiskie in the labwc session for unprivileged automount through udisks2 (unplugging stays an explicit safe removal), and add udiskie and udisks2 to the packages.

Testing

  • Hardware: iPad 5 Wi-Fi (J71t). Hands-on testing on 2026-11-11 with an integrated build of this series, made before the final failure-path fixes, covered removable storage.
  • 2026-11-12: no further hardware test of this change beyond the above.
  • Host: the Linux test suite passes at this branch's head (with Orchard at the top of its series).

Dependencies

Depends on #48, OrchardLinux/orchard#126 (merged).

This branch is stacked on the PRs it depends on and carries their commits; the change of this PR is its last commit, "Desktop: mount removable storage through udisks".

🤖 Generated with Claude Code

Bring this branch onto current main. The merge keeps the other side's
tree; the next commit carries the reworked version of this branch's
change.
Bring this branch onto current main and the series it depends on. The
merge keeps the other side's tree; the next commit carries the reworked
version of this branch's change.
Bring this branch onto current main and the series it depends on. The
merge keeps the other side's tree; the next commit carries the reworked
version of this branch's change.
Bring this branch onto current main and the series it depends on. The
merge keeps the other side's tree; the next commit carries the reworked
version of this branch's change.
Bring this branch onto current main and the series it depends on. The
merge keeps the other side's tree; the next commit carries the reworked
version of this branch's change.
Bring this branch onto current main and the series it depends on. The
merge keeps the other side's tree; the next commit carries the reworked
version of this branch's change.
Bring this branch onto current main and the series it depends on. The
merge keeps the other side's tree; the next commit carries the reworked
version of this branch's change.
Automatic rotation could not be overridden: there was no manual rotation
or lock in the menu.

Add omarchy-rotate with rotate and lock commands, menu entries for them,
and the release root wiring.

Assisted-by: LLM
The tablet had no lock on cover close, no dim before idle lock, and
suspend was offered even when the kernel could not complete it.

Lock on cover close, dim before the idle lock, disable hibernation, and
gate suspend on ipadlinux-suspend-ready, the kernel's readiness report.
Documented in docs/power-and-lock.md.

Assisted-by: LLM
The panel kept a fixed brightness; there was no automatic brightness
from the ambient-light sensor.

Add an optional, off-by-default automatic brightness daemon (generic IIO
lux or iio-sensor-proxy, no board calibration), a toggle in the Display
panel and its CLI.

Assisted-by: LLM
Orchard's guarded Mac current profile needs a device-side opt-in.

Opt J71t into the Mac current profile through
/etc/orchard/mac-usb-current, with a test.

Assisted-by: LLM
A chosen display scale was lost at the next login, and after a scale or
rotation change windows could end up off screen.

Add omarchy-display-scale and a Display panel picker, restore the saved
scale at login, and gather windows on screen with Super+Shift+G.

Assisted-by: LLM
On a 1.5 GB device the default zram size and an unbounded journal waste
memory.

Size zram to RAM, favour compressed swap (swappiness, page cluster,
watermarks), bound the runtime and system journal, and quiet the
console.

Assisted-by: LLM
A warm restart went on even when the GPU could not be quiesced.

Add the quiesce-gpu helper, which reports a failure to the restart
caller.

Assisted-by: LLM
With the G5P kernel driver the desktop can render on the GPU, but it
needs a Mesa build matched to the kernel's UAPI and must not select
hardware rendering on a kernel without it.

Package a private matched G5P Mesa (mesa-g5p-orchard) with a GPU probe,
select the hardware desktop session only after the probe succeeds, and
configure Firefox for hardware WebRender and, with the VA-API bridge,
hardware video decoding. The package builds Mesa 1f24e522a3e, whose two
lost-device fixes keep a refused submission's signal fences and report a
lost device's semaphore counters, so an application sees a lost device
instead of waiting forever on a fence. That commit is the head of the
OrchardLinux/mesa pull request from brkosebay:orchard-0.4-g5p, which
merges first.

Assisted-by: LLM
The tablet's audio overrides worked against upstream's controls: new
outputs started at almost no volume, and a global Bluetooth codec
restriction overrode upstream's per-user radio codec policy. The
keyboard button also took room in the right section of the bar.

Start new outputs at 50% (saved volumes still win), empty the old global
codec restriction so that upstream's per-user policy applies, move the
keyboard button to the left section of the bar, and mark the shell
helper scripts executable.

Assisted-by: LLM
When the USB gadget link dropped after having worked, it stayed down
until a reboot, taking USB serial and SSH with it.

Add omarchy-usb-recover and its service, which rebinds a previously
healthy gadget with bounded retries, with tests; iputils and iproute2
are added for its link probes.

Assisted-by: LLM
Restart always went through a cold boot of the tethered chain, which on
this device needs the host. A warm restart through kexec keeps the
device usable on its own.

Add orchard-kexec/orchard-restart with the matched DT loader, health and
provenance units, root refresh and a pacman hook; a path unit refreshes
the warm image when the selected boot entry changes. The reset guard is
paired with the kernel. A plain reboot selects the cold path, a refused
or unqualified dispatch escapes to a cold reset (establishing cold mode
first, or arming the native watchdog), and a failed kexec never falls
back to an unproven warm reboot. Documented in docs/warm-restart.md.

Assisted-by: LLM
A double tap on a window title only maximised when it hit blank title
space, which is hard to hit on a touch screen.

Add a labwc patch that treats the title text and the blank space as one
double-tap target, and build it with the other labwc patches.

Assisted-by: LLM
After discoverability changes a powered controller could stop page
scanning, so a trusted keyboard could not reconnect.

A timer sets every powered controller connectable 15 seconds after boot
and then every 30 seconds; discoverable and pairable stay as they are.
Adds the BlueZ main.conf this needs.

Assisted-by: LLM
USB sticks behind the camera adapter were not mounted in the desktop.

Run udiskie in the labwc session for unprivileged automount through
udisks2 (unplugging stays an explicit safe removal), and add udiskie and
udisks2 to the packages.

Assisted-by: LLM
Bring this branch onto current main, which now has the Smart Cover lock
and wake in omarchy-powerd.
The sensor test's note on a hands-on check named no person but read as
a maintainer's report; call it a hands-on test. The tablet sensor
notes call the power daemon the sole owner of screen-off and sleep, as
the power state model does.

Assisted-by: LLM
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
The restore path must not overwrite settings another owner of the
gadget set; "maintainer" there meant that technical owner.

Assisted-by: LLM
Bring this branch onto current main and the series it depends on.
Orchard main now gives every installed system the Mac current
identity (0x1014) on its own, and nothing reads
/etc/orchard/mac-usb-current any more, so the notes on opting in with
that flag describe a switch that no longer exists.

Assisted-by: LLM
ipadlinux-suspend-ready first asked Orchard's device-feature helper
whether the board's feature table marked suspend as working. Orchard
does not ship that table: feature states describe a board, they do not
switch behaviour. Without the helper every sleep request was refused.

Decide from the kernel's own admission query on every board instead.
/sys/power/suspend_ready answers "ready" or names the first driver or
precheck that would refuse; a kernel without the query cannot show
that a suspend would be admitted, so sleep stays refused there, as do
an unreadable or malformed answer. The helper no longer reads the
board identity. Powerd, the session menu and systemd's direct suspend
guard keep calling the same helper.

Assisted-by: LLM
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
This branch was stacked on the Mac current opt-in (OrchardLinux#39), which was
closed: Orchard main now uses the Mac current identity on every
installed system, and nothing reads /etc/orchard/mac-usb-current. Remove
the flag file and its test, so this branch and the ones after it do
not carry that change.

Assisted-by: LLM
quiesce-gpu ran only when Orchard's device-feature helper said the
board's warm_restart feature was working. Orchard does not ship that
helper, so the GPU was never quiesced. Decide from the mechanism
instead: when the G5P driver exposes its handover command, arm the
failure receipt and send td-kexec as before; without it there is
nothing to quiesce and the helper exits without arming anything.

Assisted-by: LLM
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
orchard-restart and orchard-kexec asked Orchard's device-feature
helper whether the board's warm_restart feature was working. Orchard
does not ship that helper: feature states describe a board, they do
not switch behaviour. Without it Restart was always a cold reboot.

Decide from what a warm restart uses instead: the running kernel's
kexec support (/sys/kernel/kexec_loaded), kexec-tools, and the
kernel's tethered reset guard, which only a kernel whose watchdog
describes the tethered boot provides (J71t today). orchard-kexec
supported answers that, orchard-restart calls it, and every warm
action without it keeps the cold path as before.

Assisted-by: LLM
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
Bring this branch onto current main and the series it depends on.
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.

1 participant