From Fedora Project Wiki

Installing Fedora on Snapdragon Windows-on-ARM Laptops

  1. Prepare the laptop. You will want to keep Windows around for firmware updates. Update the windows drivers to get the latest BIOS and runtime loadable firmwares (e.g. run the Lenovo Vantage tool). Resize the disk under Windows to make space for Fedora.
  2. Prepare a USB drive with the aarch64 Fedora Workstation 44 Live ISO. Download the iso (enable Beta downloads until F44 is released) and use Fedora Media Writer or dd to write it to an empty USB drive, as described on the download page.
  3. Boot the laptop from the USB-stick, at the grub menu enter e to edit selected the boot entry and add the following kernel commandline options at the end of the line starting with linux to work around various known issues on these laptops.
    On laptops with a Snapdragon X Elite/Plus X1E/X1P CPU add:
    clk_ignore_unused pd_ignore_unused systemd.tpm2_wait=0 modprobe.blacklist=qcom_q6v5_pas
    On laptops with a Snapdragon 8cx Gen 3 CPU add:
    clk_ignore_unused pd_ignore_unused systemd.tpm2_wait=0 modprobe.blacklist=qcom_q6v5_pas efi=noruntime arm64.nopauth
    When booting from an USB-A port modprobe.blacklist=qcom_q6v5_pas can be omitted.
    See the kernel commandline workarounds explained section below for more info about these.
  4. After booting start the installer to install Fedora as usual.
  5. Reboot into the new install and go through the first-boot setup (connect wifi, create a user, etc). Note the first boot will have a delay of 90 seconds, this is fixed by re-adding systemd.tpm2_wait=0 to the kernel commandline below.
  6. After logging in the first time, open a terminal and run the following commands to work around various known issues on these laptops:
    sudo rm -f /etc/modprobe.d/anaconda-denylist.conf
    echo scmi-cpufreq | sudo tee /etc/modules-load.d/scmi-cpufreq.conf
    sudo grubby --update-kernel=ALL --args="systemd.tpm2_wait=0"
  7. The below steps deal with model specific DSP firmware and adding these to the initramfs. On most models these firmwares must be copied from the Windows partition. On Lenovo Thinkpad X13s / T14s gen6 / Yoga Slim 7x models this may be skipped, but it is still better to have a windows partition with recently updated drivers on there and copy the latest firmwares from there:
    echo 'install_items+=" /lib/firmware/updates/qcom/sc82*/*/*/*.mbn* "' | sudo tee /etc/dracut.conf.d/qcom-adsp-fw.conf
    echo 'install_items+=" /lib/firmware/updates/qcom/x1*/*/*/*.mbn* "' | sudo tee -a /etc/dracut.conf.d/qcom-adsp-fw.conf
    echo 'install_items+=" /lib/firmware/updates/qcom/x1*/*/*/*.elf* "' | sudo tee -a /etc/dracut.conf.d/qcom-adsp-fw.conf
    sudo dnf --enable-repo=updates-testing install qcom-firmware-extract
    sudo qcom-firmware-extract
    If you chose to skip copying the firmware files from the Windows partitions run these commands instead:
    echo 'install_items+=" /lib/firmware/qcom/sc82*/*/*/*.mbn* "' | sudo tee /etc/dracut.conf.d/qcom-adsp-fw.conf
    echo 'install_items+=" /lib/firmware/qcom/x1*/*/*/*.mbn* "' | sudo tee -a /etc/dracut.conf.d/qcom-adsp-fw.conf
    echo 'install_items+=" /lib/firmware/qcom/x1*/*/*/*.elf* "' | sudo tee -a /etc/dracut.conf.d/qcom-adsp-fw.conf
    sudo dracut -f
    See the post install workarounds explained section below for more info about these.

Kernel commandline workarounds explained

clk_ignore_unused

By default the kernel will disable any clocks and power-domains which have not been claimed by any drivers when the kernel is done initializing all builtin drivers, before starting the (initramfs) init process.

This is a problem when not all clock consuming drivers are builtin. In this case some clocks which should have stayed on may get turned off, causing the boot to fail before the kernel drivers consuming these clock can be loaded.

The kernel community has been discussing solving this by moving turning the clocks off to the sync_state framework, since 2023 but no solution has appeared yet.

A simpler more targetted fix would be to figure out which clocks exactly are causing problems when turned off this way and mark these with CLK_IGNORE_UNUSED.

pd_ignore_unused

This is the same as clk_ignore_unused but then for power domains. sync_state support for power domains has landed in linux-next and should land in the 7.1-rc# kernels. This should remove the need to pass pd_ignore_unused (to be confirmed).

systemd.tpm2_wait=0

The efivars provided by the EFI firmware on these systems indicate that there is a TPM2. This causes systemd-tpm2-generator to generate units to wait for a /dev/tpmrm0 device to show up. These units time out after 45 seconds causing a total boot delay of 90 seconds. This option disables systemd-tpm2-generator .

Passing this option will be necessary until the kernel gets support for the TPM setup used on these systems.

modprobe.blacklist=qcom_q6v5_pas

The EFI firmware boots the ADSP co-processor with a minimal firmware. Linux needs to reboot the ADSP co-processor with a full featured firmware for things like audio and battery-monitoring support.

Rebooting the ADSP resets the TCPM which causes the Type-C mux, which switches pins between USB / DP / thunderbolt / xxx functions, to temporarily go into high-Z mode. From the XHCI USB controller's point of view this looks like the USB-C cable is unplugged and re-plugged. This breaks booting from USB drives connected to the Type-C ports, because to the kernel it looks like the USB drive is unplugged halfway through the boot.

This option disables loading the Linux ADSP driver working around this probem to allow booting from an USB drive to install Linux to the internal drive.

A proper fix for this, making sure that the USB bus reset happens before any USB storage is mounted is under review.

efi=noruntime

Disable EFI runtime services support on laptops with a Snapdragon 8cx Gen 3 CPUs to workaround issues in the EFI firmware triggered by using EFI runtime services.

arm64.nopauth

Disable Pointer Authentication on laptops with a Snapdragon 8cx Gen 3 CPUs. A future BIOS update may allow running with Pointer Authentication.


Post install workarounds explained

sudo rm -f /etc/modprobe.d/anaconda-denylist.conf

Passing modprobe.blacklist=qcom_q6v5_pas on the kernel commandline causes anaconda to generate this file to permanently deny-list the qcom_q6v5_pas kernel module. But that was only necessary to install from a USB drive and now that the system is running from the internal drive we do want the qcom_q6v5_pas DSP driver to load, so remove this file.

echo scmi-cpufreq | sudo tee /etc/modules-load.d/scmi-cpufreq.conf

Fedora builds the scmi-cpufreq as module, but autoloading of that module does not work due to the modpost utility not supporting the SCMI bus.

This can be fixed by adding support to the modpost utility for the SCMI bus, doing something similar like what this patch did for the slim bus.

sudo grubby --update-kernel=ALL --args="systemd.tpm2_wait=0"

Anaconda does not propagate the "systemd.tpm2_wait=0" passed when booting the Workstation live media to the installed system, this re-adds it.

There is an anaconda fix pending, which makes anaconda properly propagate this option.

Add ADSP firmwares to the initramfs

The echo 'install_items+=" ... "' | sudo tee /etc/dracut.conf.d/qcom-adsp-fw.conf commands tell dracut to add the model specific ADSP firmwares to the initramfs.

This is necessary because generating a host-only initramfs on the installed system will bring the ADSP driver into the initramfs and without these firmwares in the initramfs the ADSP driver will not reboot the ADSP into the full firmware leading to no audio and no battery monitoring.

This has been fixed in upstream dracut by this PR. So with Fedora 45 this should no longer be necessary.

Install + run qcom-firmware-extract script

The following 2 commands install + run the qcom-firmware-extract script:

sudo dnf --enable-repo=updates-testing install qcom-firmware-extract
sudo qcom-firmware-extract

This is necessary because some firmwares on these laptops are laptop model specific and the linux-firmware repository does not contain firmware files for all supported models.

Even on models where all the firmware is in linux-firmware running qcom-firmware-extract is still a good idea because the local Windows installation often has newer firmware files then those in linux-firmware.