Linux on the Lenovo Yoga Slim 7x
This repository tracks my personal endeavor in getting linux running on the Lenovo Yoga Slim 7x, a laptop with an arm64 Snapdragon X Elite processor.
!! Created on Sept 6th 2024. This may be super out of date by now: things are moving very quickly. !!
Compatibility matrix
Hardware | Does it work? | Notes |
---|---|---|
CPU frequency scaling, power control | ✅ | |
Framebuffer (without GPU accel) | ✅ | |
NVME | ✅ | |
GPU acceleration | ✅ | |
Keyboard | ✅ | |
Trackpad | ✅ | |
Touchpad | ✅ | |
Battery monitoring | ✅ | |
Wifi | ✅ | |
USB 2.0 | ✅ | |
USB 3.0 | ✅ | |
Webcam | ❌ | |
Internal speakers | ❌ | |
Bluetooth | ✅ | |
DP alt-mode (i.e. HDMI dongle) | ❌ | |
PCI tunneling over USB4 | ❌ | |
Suspend to RAM | ❌ | |
Suspend to disk | ❌ |
Kernel
Use kernel from [here](https://github.com/jhovold/linux) and use the following commit
Apply the following patches:
Use firmware from [here](https://github.com/anonymix007/x1e-firmware).
initramfs
For the initramfs only load the following modules (in that order):
Other modules will cause the screen to blank after two minutes.
Linux installation
I boot straight into an Ubuntu 22.04 installation from the initramfs. I installed Ubuntu via debootstrap
. Systemd and udev will then load all the other kernel modules to get things like GPU, Wifi etc. working.
IMPORTANT: If you boot from USB then don't let udev load any other modules as one of them (likely qcom_q6v5_pas
, but haven't confirmed this) will cause the USB bus to reset, rendering your root and boot device inoperable. For my USB image I just copied over ath12k modules and their dependencies and none of the other modules that were built with the kernel above. When booting from nvme you can load all the modules just fine.
GPU
Just use bleeding edge mesa.
Battery indicator
Make sure you have pd-mapper daemon running from [here](https://github.com/linux-msm/pd-mapper/tree/e7c42e1522249593302a5b8920b9e7b42dc3f25e). Create a systemd service file for it and ensure that it launches during boot.
Bluetooth
To get bluetooth working, I switched over to this repo:
with branch wip/x1e80100-6.11-rc6
. This enables bluetooth. Unfotunately, the branch has one downside: if you boot into an emergency console in the initramfs, the screen will blank after two minutes. Fully booting into the OS is fine when booting from nvme. I suspect booting from USB may not work as no additional modules are loaded with my USB hack explained above. Not sure what exactly is causing this. In the future, I'll simply apply the bluetooth commits to jhovold's repo and see if that works.
DP alt mode
Apparently this works with latest DP patches from [here](https://git.codelinaro.org/abel.vesa/linux/-/commits/x1e-next-20240906/?ref_type=heads) but haven't tried this yet.
Resources
https://git.codelinaro.org/linaro/qcomlt/demos/debian-12-installer-image
Most important link (basically followed the nix source code): https://github.com/kuruczgy/x1e-nixos-config/
https://gist.github.com/joske/52be3f1e5d0239706cd5a4252606644b