Patch enabling speakers, mic, camera, suspend and hibernate, and touchpad configuration for surface pro 11 intel.#1990
Conversation
|
Tested on Surface Pro for Business 11th Edition with Intel (SKU Working: Speakers, microphone detected and functional. I did not test HDMI audio outputs. Note on topology: The patch sets Might be worth noting in the PR description that the monolithic topology file isn't needed. First boot probe failure: On the very first boot, the SOF probe failed with Mixer switches default to off: After the driver loads, the RT1320 codec's output and capture switches are off. Speakers and mic show up in desktop audio settings but produce no sound until enabled: # Speaker output
amixer -c 0 cset name='rt1320-1 OT23 L Switch' on
amixer -c 0 cset name='rt1320-1 OT23 R Switch' on
# Microphone capture
amixer -c 0 cset name='rt1320-1 FU Capture Switch' on,on,on,onThese persist with |
|
@diwakar-s-maurya Thanks for the feedback, I have integrated this into the new contrib scripts in my newest commits which should auto configure the audio devices. |
|
@AndreGilerson Thanks! Would you mind opening a separate PR for the kernel changes at https://github.com/linux-surface/kernel/? (It's just a bit easier to review and I've pretty much automated generating patches from the kernel repo by now). |
|
Are there any news on this pr? Does it get merged in near future? I would love to use my integrated speakers. |
|
Is there anything we could do (without deep knowledge of the linux kernel, ...) in helping to get this pull request merged or to at least adapt the patches for a newer kernel version than 6.17? |
|
Sorry life and work happened during the last few weeks, so I was not able to focus on this anymore. But the changes are open on my branch, so maybe someone else could forward this. I am however happy to say that I am using my kernel patches on my surface 11 with nixos the whole time and it is so stable that is has become my daily driver. I am actually flirting with applying the patches to the 7.0 kernel, because I have read somewhere that the entire sleep system, for which i have patches too, works way more cleanly with that kernel version. But I will probably only get to it in 2 weeks. |
Fixed soundwire matching the wrong ids, because the amplifiers on the surface use class ids instead of uinique ids. Furthermore the added a second DAI entry to the RT1320 coder info, that enables the mic. Added endpoints to the surface machine table entry.
To use the cameras, one does need a more up to date version of libcamera than e.g. the ubuntu apt sources provide. Libcamera can be found in: https://github.com/libcamera-org/libcamera. This has been developed with commit b18132713165210d45d66d54e7ae6086a021a47e. When installed, using cam -l should show both cameras, and qcam should be able to view a video stream of both. Please note, that the image quality will be terrible, as the driver contains no optimization yet.
…es the surface immediately goes back to sleep
…1876. Map mic component name from "rt1320-1" to "rt1320-dmic" in the card components string. The old name didn't match the upstream UCM regex which only accepts -dmic/-sdca suffixes. This follows the existing convention used by rt712-dmic and rt713-dmic. Requires rt1320-dmic.conf in alsa-ucm-conf (not yet upstream). A bit hacky to change an existing patch, but should be fine atm.
Enable safe validation of contrib package installation without modifying the system. Adds --dry-run to cameras, audio, and hibernate-setup scripts. Creates new install.sh scripts (with --dry-run, --install, --remove) for suspend and touchpad packages that previously required manual file copies.
Userspace audio configs for Surface Pro 11 (Intel Lunar Lake): RT1320 DMIC UCM config, PipeWire speaker EQ, mic noise suppression, and install script with mixer switch initialization. Install script created with assitance from claude code.
…tarting logind terminates all login sessions, which kills GNOME and leaves you on a broken TTY. The logind drop-in config (LidSwitchIgnoreInhibited=no) will take effect on the next reboot instead, which is safe.
Add udev rule and libinput quirk for the Type Cover touchpad: - Group keyboard (045E:0C8E) and touchpad (045E:0C8D) into the same libinput device group to enable disable-while-typing (DWT) - Tune edge palm detection threshold as fallback to firmware palm rejection - Include install/uninstall script with dry-run support Install script created with the assistance of claude code.
Automated setup for the full IPU7 camera pipeline: builds ipu7-drivers, installs Intel firmware/libs, patches and builds the camera HAL with Surface Pro 11 sensor configs (IMX681 front, OV13858 rear), and builds the GStreamer icamerasrc plugin. Includes v4l2loopback virtual camera bridge so standard apps (Firefox, Zoom, Chrome) can use the cameras, with udev/WirePlumber rules to hide the 32 raw ISYS nodes. Extracts AIQB tuning files from Microsoft firmware for optimal image quality, with upstream fallback when firmware is unavailable. Install script created with the assistance of claude code.
|
Opened a separate PR for the kernel changes in linux-surface/kernel#164. Removed the kernel patches from this PR, just keeping the contrib packages. Furthermore I tested them on a clean ubuntu 26.04 install and applied some fixes. |
Beyond the known display-pipeline hang, two more Lunar Lake issues drove second-cycle suspend hangs: - GPE 0xAB: spurious TRP3 (00:07.3) hot-plug interrupt on a port that doesn't exist on this SKU. Firmware's _LAB handler calls undefined SLAB, flooding dmesg with AE_NOT_FOUND and causing printk contention during dpm_suspend. Mitigated by acpi_mask_gpe=0xAB plus new surface-disable-gpe-ab.service (boot-time chipset disable) and 52-gpe-ab-disable sleep hook (re-applied every resume; the disable state isn't fully persistent across s2idle). - pcie_aspm.policy=powersupersave drove the TB4 root ports into L1.2 across s2idle, wedging the xhci/NHI controllers. Switched to policy=default; pcie_aspm=force is retained so ASPM stays enabled. Also: acpi_osi -> "Windows 2022", install.sh switches to install(1) and warns if powersupersave is still on the cmdline, README updated with measured drain (~200 mW avg, ~10 day standby) replacing the prior ~351 mW estimate. README.md and install.sh script adjusted using claude code.
|
@AndreGilerson Thanks for your work again! After switching from the 6.17 kernel with your patches to the 6.18 one, sound still worked, and also the cameras showed in However the mic stopped working; I managed to get it working again as in #1876 (comment) Additionally I've tried your contrib scripts for the audio and the cameras: The audio script worked well; it now sounds better with the EQ. I did have to enable the systemd filter-chain service such that it would start automatically after rebooting. Maybe this would be worth noting in the readme. And if the denoise filter is active, the mic-icon in gnome is always shown; should it be like that? The camera script didn't work that well; it couldn't find the By replacing the name here I could get the script to continue, but somehow I then wasn't able to get v4l2loopback installed running on a non-rpm kernel; maybe I would have to compile it from source. And another issue: the script wasn't able to extract the AIQB files from the .msi, it didn't find them; maybe the .msi changed somehow? On the Microsoft website it is dated to yesterday. One issue that I've found with the lid sensor (which also works now for me, although a bit inconsistent): When suspending via power-button and then closing the lid, the surface unsuspends. Do you know if this is normal? However, thank you a lot for your effort and its already really cool to be able to use the (now well-sounding) speakers and suspend, ... working a lot better! |
|
@Timeo04 Thanks for the input! Since i only have this one device that I am using for development and testing (and even daily use, but i am using two separate SSDs for that now...) it is always difficult to discern whether an old change, or some other artifact is interacting with issue i am currently working on. As a first step because @qzed also mentioned that they are going to auto generate the patches later anyway, can you instead of using the patches from this repo, please just use my kernel with all the changes applied: https://github.com/AndreGilerson/linux-surface-kernel/tree/v6.18-surface-devel ? Can you also please check the following list of problems so that i have not missed anything? I will be opening up separate issues for all the subsystems in my forks later, because I am starting to lose track of everything. Cameras (kernel side)
Audio contrib:
Camera Contrib:
Lid / suspend:
|
|
@AndreGilerson Thank you for your response, that sounds good. I wasn't sure if it was the idea to directly compile the kernel from your kernel repository, but thank you for your hint, then I will do so the next time I compile the kernel. Your list seems right and so far complete. For the 2. point in Camera Contrib, I think the issue is it won't install from rpm fusion when having a kernel-devel installed from a kernel not installed from rpm. |
Fixed soundwire matching the wrong ids, because the amplifiers on the surface use class ids instead of uinique ids. Furthermore the added a second DAI entry to the RT1320 coder info, that enables the mic. Added endpoints to the surface machine table entry.
Tested on ubuntu 25.10 with 6.17. Further testing required for other kernels.
The quality of the Mic is at the moment a bit low, some optimization is required.