From 84311874fa8b83a97043bebb8b69861836905e69 Mon Sep 17 00:00:00 2001 From: Saya Andy Date: Wed, 19 Aug 2026 18:42:54 +0700 Subject: feat: rewrite wireupcameras service as optional to avoid system hanging docs: add image of fedora running, update info of where to copy qcvss8380_pa.mbn --- README.md | 6 ++++-- docs/FedoraOnSurface.jpg | Bin 0 -> 529833 bytes .../etc/systemd/system/wireupcameras.service | 3 --- .../usr/local/bin/wireupcameras.sh | 14 ++++++++++++++ 4 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 docs/FedoraOnSurface.jpg diff --git a/README.md b/README.md index 2448809..5502ed3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Fedora KIWI image descriptions, modified to build & launch for Surface Pro 12" Gen 1 +![Fedora Workstation Rawhide running on Surface Pro 12"](docs/FedoraOnSurface.jpg) + It is the fork of the original [KIWI image descriptions](https://forge.fedoraproject.org/releng/kiwi-descriptions), modified for launching Fedora Linux Rawhide Live ISO on Surface Pro 12" Gen 1 (and further installing it on the device). I bought this device as I viewed it as a great Linux GNOME tablet, but after several days, many hours of work of trying to do so, I must say that installing a distribution here (and then having it work fine) is a huge pain in the ass. @@ -24,7 +26,7 @@ To build this on Fedora Linux: []$ sudo dnf --assumeyes install kiwi kiwi-systemdeps distribution-gpg-keys # Run the image build []$ sudo ./kiwi-build --kiwi-file=Fedora.kiwi --image-type= --image-profile= --output-dir ./outdir -# An example for Workstation Live CD ISO +# An example for Workstation Live CD ISO, takes around 16 minutes []$ sudo ./kiwi-build --kiwi-file=Fedora.kiwi --image-type=iso --image-profile=Workstation-Live --output-dir ./outdir ``` @@ -35,7 +37,7 @@ To build this on Fedora Linux: * No secure boot possible for this ISO for now, as the platform used is `efi` and not `uefi`. * No GRUB auto hidden menu. Trying to have the menu hidden results in system restarting after trying to boot it. * `wireupcameras.service` (which enables tablet's cameras to be used) fails on installed system (not in Live CD though), as no `/dev/media*` gets initialized. -* No hardware video decoding for now, as the iris video codec (`qcvss8380_pa.mbn`) is Windows-only (as far as I researched), but you can copy one to `/lib/firmware/qcom/x1p42100/Microsoft/Surface12/`, if you have Windows ARM64 upartition. +* No hardware video encoding/decoding for now, as the iris video codec (`qcvss8380_pa.mbn`) is Windows-only (as far as I researched), but you can copy one from `/path/to/mounted/windows/drive/Windows/System32/DriverStore/FileRepository/qcdx8380.inf_arm64_*/qcvss8380_pa.mbn` to `/lib/firmware/qcom/x1p42100/Microsoft/Surface12/`, if you keep Windows ARM64 partition. * Suspend on Snapdragon X is still very unstable. No deep sleep is available, so `mem_sleep_default=s2idle` was set. Even that leads to compromises as suspending via GNOME results in hard freeze, so the default power button behavior was changed to `interactive` and should not be changed back to `suspend`. ## Image variants diff --git a/docs/FedoraOnSurface.jpg b/docs/FedoraOnSurface.jpg new file mode 100644 index 0000000..6b37f3c Binary files /dev/null and b/docs/FedoraOnSurface.jpg differ diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/wireupcameras.service b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/wireupcameras.service index 538d79a..31eff6c 100644 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/wireupcameras.service +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/wireupcameras.service @@ -1,8 +1,5 @@ [Unit] Description=Wire up Surface Pro rear camera (media-ctl pipeline) -After=dev-media0.device -Wants=dev-media0.device -DefaultDependencies=no [Service] Type=oneshot diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/local/bin/wireupcameras.sh b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/local/bin/wireupcameras.sh index 2e8f2d3..833a422 100644 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/local/bin/wireupcameras.sh +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/local/bin/wireupcameras.sh @@ -1,6 +1,20 @@ #!/bin/bash set -e +# Wait for /dev/media0 to appear (MSM VFE driver may need firmware to probe) +# Timeout after 10 seconds to avoid infinite hangs on systems without camera hardware +MAX_WAIT=10 +WAIT_COUNT=0 +while [ ! -e /dev/media0 ] && [ $WAIT_COUNT -lt $MAX_WAIT ]; do + sleep 1 + WAIT_COUNT=$((WAIT_COUNT + 1)) +done + +if [ ! -e /dev/media0 ]; then + echo "wireupcameras: /dev/media0 not found after ${MAX_WAIT}s, skipping" >&2 + exit 0 +fi + SENSOR="ov13858 1-0010" # Tell each pad in the path what format to expect -- cgit v1.3.1+13