From Fedora Project Wiki

(update now that rawhide is bootable without filesystem modifications)
Line 4: Line 4:


==== Bootable images ====
==== Bootable images ====
Fedora developers are aiming for it being supportable/usable in time for Fedora 38, at some point before that, some consumable images will be released for testing.
Fedora Rawhide images are bootable as of the 15th of December, 2023. There are, unfortunately some boot arguments that need to be added to boot successfully
 
* The kernel must be booted with `arm64.nopauth clk_ignore_unused pd_ignore_unused rd.driver.blacklist=msm`
A Linaro's Debian image is available at [https://forums.lenovo.com/t5/Other-Linux-Discussions/Does-anybody-know-if-there-is-work-being-done-to-integrate-X13s-ARM-processor-with-linux/m-p/5175315?page=1#5771660 this link]. It provides a decent user experience, despite missing audio and suspension capabilities.
* A recent firmware must be on the machine, and the linux/DT mode must be selected in the FW menus.
Power usage not yet optimized, so expect high battery drain
** Recommend minimum version:
 
*** Version: N3HET84W (1.56 )
==== Kernel development ====
* A 6.5 or newer device tree must be placed on the ESP of the internal NVMe disk and named sc8280xp-lenovo-thinkpad-x13s.dtb
Some of work on the kernel can be seen in https://github.com/jhovold/linux repository, branches wip/sc8280xp
** ex: /boot/efi/sc8280xp-lenovo-thinkpad-x13s.dtb
** as a workaround you can add a devicetree line in grub to load the dtb until it can be put in place on the ESP
* to boot from USB you need to add `modprobe.blacklist=qcom_q6v5_pas` to the boot arguments, this keeps the USB from being reset and the storage device being renamed mid boot.


==== GPU ====
Once the system is installed you need to install pd-mapper and enable the pd-mapper service to get battery charge reporting working
GPU hardware acceleration not yet available
* `sudo dnf install -y pd-mapper; sudo systemctl enable --now pd-mapper.service`
** Charging may not work at all though any number of USB-C hubs
Anaconda persists module.blacklist boot arguments to the installed system in order for pd-mapper to run properly we need to remove `/etc/modprobe.d/anaconda-denylist.conf` and regenerate the initrd with `sudo dracut-f` to enable qcom_q6v5_pas to be loaded automatically.
* Audio works but is quiet
* TPM support is missing
* Try the https://fedoraproject.org/wiki/Thinkpad_X13s#Similar_pages link to get a few more things working.
==== Bluetooth ====
By default there is no Bluetooth mac address set. You can manually set an address with btmgmt. e.g., `sudo btmgmt public-addr F4:A8:0D:30:A3:47`


==== Sound ====
To make it just work, copy this file to `/etc/systemd/system/bluetooth.service.d/override.conf` (It is courteous to use your own public-addr, put a random string of numbers to make it unique.)
Kernel side implementation at [https://lore.kernel.org/lkml/20221121130403.161817-3-srinivas.kandagatla@linaro.org/T/ this link]
Userland code still to be implemented


<pre>
[Service]
ExecStartPre=/bin/bash -c 'sleep 5 && yes | btmgmt public-addr 00:24:81:17:62:36'
# Blank ExecStart line to clear the service file, overrides are additive.
ExecStart=
ExecStart=/usr/lib/bluetooth/bluetoothd
</pre>
==== Touch Screen ====
There is some probe defer issue to get touch screen bound to i2c_hid_of driver. To workaround temporarily run `sudo echo 4-0010 > /sys/bus/i2c/drivers/i2c_hid_of/bind` to make it persit install the file at https://github.com/ironrobin/x13s-alarm/blob/trunk/x13s-touchscreen-udev/72-x13s-touchscreen.rules in `/etc/udev/rules.d/`
==== 5G Modem ====
While waiting on a new release of ModemManager we can take the following steps
<pre>
sudo ln -s 105b /usr/share/ModemManager/fcc-unlock.available.d/105b\:e0c3
sudo mkdir -p /etc/ModemManager/fcc-unlock.d
sudo ln -sft /etc/ModemManager/fcc-unlock.d /usr/share/ModemManager/fcc-unlock.available.d/*
</pre>
==== Virtualization ====
==== Virtualization ====
Virtualization is not yet available. The UEFI is not yet exposing [https://developer.arm.com/documentation/102412/0102/Privilege-and-Exception-levels the EL2 (exception level)] which is required to run VMs
Virtualization is not yet available. The UEFI is not yet exposing [https://developer.arm.com/documentation/102412/0102/Privilege-and-Exception-levels the EL2 (exception level)] which is required to run VMs
Line 24: Line 47:
==== Webcam ====
==== Webcam ====
Not working
Not working
==== Wi-Fi ====
Working


==== Similar pages ====
==== Similar pages ====
https://github.com/ironrobin/archiso-x13s/wiki/Feature-Support
https://github.com/ironrobin/archiso-x13s/wiki/Feature-Support
==== Rawhide hacking ====
As of the 6.5RC series, official rawhide will boot given the following changes:
* <strike>Grub2 must have this patch applied https://src.fedoraproject.org/rpms/grub2/pull-request/27</strike> Should be in rawhide now, assure grub2 >= 2.06-100
* The kernel must be booted with 'arm64.nopauth clk_ignore_unused pd_ignore_unused`
* A recent firmware must be on the machine, and the linux/DT mode must be selected in the FW menus.
** Recommend minimum version:
*** Version: N3HET84W (1.56 )
*** Release Date: 06/26/2023
* A 6.5 device tree must be placed on the ESP of the internal NVMe disk and named sc8280xp-lenovo-thinkpad-x13s.dtb
** ex: /boot/efi/sc8280xp-lenovo-thinkpad-x13s.dtb
* USB boot is possible if qcom/sc8280xp/LENOVO/21BX/qcadsp8280.mbn is removed from the USB boot image
** And add_drivers+=" qrtr " is added during initrd build
** Otherwise leave it alone if booting from NVMe
*** Instead of removing the firmware file, 'modprobe.blacklist=qcom_q6v5_pas' will keep the USB from being reset/renamed.
* GPU firmware is provided in fedora as of kernel 6.5.3
* <strike>Appropriate GPU firmware is placed in /lib/firmware/qcom/a660_sqe.fw, and /lib/firmware/qcom/a690_gmu.bin </strike>
** <strike>Acquire from: https://github.com/ironrobin/x13s-alarm/tree/trunk/x13s-firmware</strike>
* Due to the mainline nature of this kernel the following things may not work correctly:
** Battery monitor in gnome
*** <strike>Install the latest, pd-mapper https://github.com/andersson/pd-mapper, and qrtr-ns https://github.com/andersson/qrtr to fix this. </strike>
*** dnf install -y pd-mapper; systemctl enable pd-mapper.service; systemctl start pd-mapper.service
** Proper USB-C charging negotiation, may result in slow charging, or battery drain while plugged in.
*** Charging may not work at all though any number of USB-C hubs
*** Make sure pd-mapper is installed to fix some of the more glaring problems.
** Keyboard rollover
** Bluetooth
** CPU cache size reporting
** Keyboard LEDs (depends on HW revision?, fn-f1 may enable the mute + capslock at which point both leds will be toggled by caps lock)
** Audio
** External Displays
** efi variables
** USB device may drop offline following: arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0xffffd081, fsynr=0x350013, cbfrsynra=0x563, cb=1
** Screen may blank for a few seconds during boot
*** This may be worked around with rd.blacklist=msm modprobe.blacklist=msm,
*** and initcall_blacklist=regulator_init_complete
** TPM support is missing
** USB may not run at superspeed+ rates.
* All the above subject to change as patches are merged, this list is approximately correct as of the middle of August 2023
** Try the https://fedoraproject.org/wiki/Thinkpad_X13s#Similar_pages link to get a few more things working.

Revision as of 22:43, 17 December 2023

Page to keep track of Linux support development for Thinkpad X13s (SoC codename sc8280xp), the first Thinkpad with ARM CPU.

Most of following informations come from #aarch64-laptops on OFTC, #fedora-arm on Libera.chat and arm[AT]lists.fedoraproject.org. Upstream infos change on daily basis, so this page may be outdated, therefore read it with pinch of salt / cum grano salis.

Bootable images

Fedora Rawhide images are bootable as of the 15th of December, 2023. There are, unfortunately some boot arguments that need to be added to boot successfully

  • The kernel must be booted with arm64.nopauth clk_ignore_unused pd_ignore_unused rd.driver.blacklist=msm
  • A recent firmware must be on the machine, and the linux/DT mode must be selected in the FW menus.
    • Recommend minimum version:
      • Version: N3HET84W (1.56 )
  • A 6.5 or newer device tree must be placed on the ESP of the internal NVMe disk and named sc8280xp-lenovo-thinkpad-x13s.dtb
    • ex: /boot/efi/sc8280xp-lenovo-thinkpad-x13s.dtb
    • as a workaround you can add a devicetree line in grub to load the dtb until it can be put in place on the ESP
  • to boot from USB you need to add modprobe.blacklist=qcom_q6v5_pas to the boot arguments, this keeps the USB from being reset and the storage device being renamed mid boot.

Once the system is installed you need to install pd-mapper and enable the pd-mapper service to get battery charge reporting working

  • sudo dnf install -y pd-mapper; sudo systemctl enable --now pd-mapper.service
    • Charging may not work at all though any number of USB-C hubs

Anaconda persists module.blacklist boot arguments to the installed system in order for pd-mapper to run properly we need to remove /etc/modprobe.d/anaconda-denylist.conf and regenerate the initrd with sudo dracut-f to enable qcom_q6v5_pas to be loaded automatically.

Bluetooth

By default there is no Bluetooth mac address set. You can manually set an address with btmgmt. e.g., sudo btmgmt public-addr F4:A8:0D:30:A3:47

To make it just work, copy this file to /etc/systemd/system/bluetooth.service.d/override.conf (It is courteous to use your own public-addr, put a random string of numbers to make it unique.)

[Service]
ExecStartPre=/bin/bash -c 'sleep 5 && yes | btmgmt public-addr 00:24:81:17:62:36'
# Blank ExecStart line to clear the service file, overrides are additive.
ExecStart=
ExecStart=/usr/lib/bluetooth/bluetoothd

Touch Screen

There is some probe defer issue to get touch screen bound to i2c_hid_of driver. To workaround temporarily run sudo echo 4-0010 > /sys/bus/i2c/drivers/i2c_hid_of/bind to make it persit install the file at https://github.com/ironrobin/x13s-alarm/blob/trunk/x13s-touchscreen-udev/72-x13s-touchscreen.rules in /etc/udev/rules.d/

5G Modem

While waiting on a new release of ModemManager we can take the following steps

sudo ln -s 105b /usr/share/ModemManager/fcc-unlock.available.d/105b\:e0c3
sudo mkdir -p /etc/ModemManager/fcc-unlock.d
sudo ln -sft /etc/ModemManager/fcc-unlock.d /usr/share/ModemManager/fcc-unlock.available.d/*

Virtualization

Virtualization is not yet available. The UEFI is not yet exposing the EL2 (exception level) which is required to run VMs

Webcam

Not working

Similar pages

https://github.com/ironrobin/archiso-x13s/wiki/Feature-Support