diff options
7 files changed, 29 insertions, 6 deletions
@@ -30,12 +30,13 @@ To build this on Fedora Linux: ## What is left out (for now) -* Live CD has to run in RAM, so `rd.live.ram=1` is set for cmdline. Otherwise, at least on my ancient flash drive, it fails to load multiple necessary services, including `polkit`. +* Live CD has to run in RAM, so `rd.live.ram=1` is set for cmdline. Otherwise, at least on my ancient flash drive, it fails to load multiple necessary services, including `polkit`. So, ~5 minutes of loading on USB 2 drive, while screen is not backlit, is to be expected. * No rescue vmlinuz. * 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 leads to restart after trying to boot it. +* 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 partition. +* 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. +* 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/components/liveinstall.xml b/components/liveinstall.xml index 55ae4eb..c04ca7f 100644 --- a/components/liveinstall.xml +++ b/components/liveinstall.xml @@ -10,7 +10,7 @@ publisher="Fedora Project" volid="Fedora_Linux" application_id="Fedora_Linux" primary="true" flags="dmsquash" filesystem="erofs" erofscompression="lzma,level=6" mediacheck="true" firmware="efi" efiparttable="gpt" efifatimagesize="30" - kernelcmdline="quiet rhgb clk_ignore_unused pd_ignore_unused systemd.tpm2_wait=0 rd.live.ram=1" + kernelcmdline="quiet rhgb mem_sleep_default=s2idle clk_ignore_unused pd_ignore_unused systemd.tpm2_wait=0 rd.live.ram=1" fscreateoptions="-Efragments -C 1048576" > <bootloader name="grub2" grub_template="grub-arm.cfg.iso-template" console="console" timeout="10"/> @@ -620,7 +620,23 @@ install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system /etc/systemd/system/wireupcameras.service systemctl enable wireupcameras.service -restorecon -Rv /usr /lib /etc/systemd/system /etc/udev/rules.d +# Suspend on Snapdragon is still very unstable. This is the reason why +# 'mem_sleep_default=s2idle' is set explicitly in the cmdline as 'deep' mode +# does not function at all. +# Even then, suspending via gnome settings daemon results in hard freeze. +# This is why: +# logind behavior is kept intact with suspend behavior. +# gnome default power button behavior was replaced with 'interactive'. +install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/logind.conf.d/60-surface-power-key.conf \ + /etc/systemd/login.conf.d/60-surface-power-key.conf +install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button \ + /etc/dconf/db/local.d/00-power-button +install -Dm644 /tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/profile/user \ + /etc/dconf/profile/user + +dconf update + +restorecon -Rv /usr /lib /etc/systemd /etc/dconf /etc/udev/rules.d #====================================== # Set the WSL name for ELN diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button new file mode 100644 index 0000000..1b69eab --- /dev/null +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/db/local.d/00-power-button @@ -0,0 +1,2 @@ +[org/gnome/settings-daemon/plugins/power] +power-button-action='interactive' diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/profile/user b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/profile/user new file mode 100644 index 0000000..aca0641 --- /dev/null +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/dconf/profile/user @@ -0,0 +1,2 @@ +user-db:user +system-db:local diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/kernel/cmdline b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/kernel/cmdline index 9479627..5b92d02 100644 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/kernel/cmdline +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/kernel/cmdline @@ -1 +1 @@ -rootflags=subvol=root clk_ignore_unused pd_ignore_unused systemd.tpm2_wait=0 rhgb quiet +rootflags=subvol=root mem_sleep_default=s2idle clk_ignore_unused pd_ignore_unused systemd.tpm2_wait=0 rhgb quiet diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/logind.conf.d/60-surface-power-key.conf b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/logind.conf.d/60-surface-power-key.conf new file mode 100644 index 0000000..c6fc547 --- /dev/null +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/logind.conf.d/60-surface-power-key.conf @@ -0,0 +1,2 @@ +HandlePowerKey=suspend +HandlePowerKeyLongPress=poweroff |