Code Monkey home page Code Monkey logo

kernel's Introduction

Linux Surface

Linux running on the Microsoft Surface devices. Follow the instructions below to install the latest kernel.

Announcements and Updates | Upstream Status

Why / About this Project

These days, Linux supports a lot of devices out-of-the-box. As a matter of fact, this includes a good portion of the Microsoft Surface devices—for most parts at least. So why would you need a special kernel for Surface devices? In short, for the parts that are not supported upstream yet.

Unfortunately, Surface devices tend to be a bit special. This is mostly because some hardware choices Microsoft made are rarely (if at all) used by other, more "standard", devices. For example:

  • Surface devices (4th generation and later) use their own embedded controller (the Surface Aggregator Module, or SAM). In contrast to other devices, however, some newer Surface devices route their keyboard and touchpad input via this controller. Unfortunately, every new Surface device requires some (usually small) patch to enable support for it, since devices managed by SAM are generally not auto-discoverable.
  • Surface devices (4th generation and later, excluding the Go series) use a rather special system for touch and pen input. In short, this requires user-space processing of touch and pen data to enable multitouch support and has not been upstreamed yet.
  • Surface devices rely on Intel's ISP for camera image processing. This means that the webcam also requires some user-space processing. While patches are being upstreamed, not all devices are supported (even with this project), and more work remains to be done.

We aim to send all the changes we make here upstream, but this may take time. This kernel allows us to ship new features faster, as we do not have to adhere to the upstream release schedule (and, for better or worse, code standards). We also rely on it to test and prototype patches before sending them upstream, which is crucial because we maintainers cannot test on all Surface devices (which also means we may break things along the way).

So should you install this custom kernel and the associated packages? It depends: We generally recommend you try your standard distribution kernel first. If that works well for you, great! But if you're missing any features or experiencing issues, take a look at our feature matrix and give our kernel and packages a try. If your device is not listed as supported yet, feel free to open an issue.

Supported Devices

  • Surface Book
  • Surface Book 2
  • Surface Book 3
  • Surface 3
  • Surface Go
  • Surface Go 2
  • Surface Go 3
  • Surface Laptop
  • Surface Laptop 2
  • Surface Laptop 3
  • Surface Laptop 4
  • Surface Laptop 5
  • Surface Laptop Go
  • Surface Laptop Go 2
  • Surface Laptop Studio
  • Surface Pro 1
  • Surface Pro 3
  • Surface Pro 4
  • Surface Pro (5th Gen) / Surface Pro 2017
  • Surface Pro 6
  • Surface Pro 7
  • Surface Pro 7+
  • Surface Pro 8
  • Surface Pro 9
  • Surface Studio

Features / What's Working

See the feature matrix for more information about each device.

Disclaimer

  • For the most part, things are tested on a Surface Book 2. While most things are reportedly fully working on other devices, your mileage may vary. Please look at the issues list for possible exceptions.

Installation and Setup

We provide package repositories for the patched kernel and other utilities. Please refer to the detailed installation and setup guide. There, you may also find device-specific caveats. In case you have disk encryption set up or plan to use it, take care to follow the respective instructions in the installation guide and have a look at the respective wiki page. After installation, you may want to have a look at the wiki and the contrib/ directory for useful tweaks.

If you want to compile the kernel yourself (e.g. if your distribution is not supported), please have a look at the wiki.

Additional Information

Notes

  • If you are getting stuck at boot when loading the ramdisk, you need to install the Processor Microcode Firmware for Intel CPUs (usually found under Additional Drivers in Software and Updates).
  • Using TLP can cause slowdowns, laggy performance, and occasional hangs if not configured properly! You have been warned.
  • If you want to use hibernate instead of suspend, you need to create a swap partition or file, please follow your distribution's instructions (or here).

Support

If you have questions or need support, please join our Matrix Space! This space contains

License

This repository contains patches, which are either derivative work targeting a specific already licensed source, i.e. parts of the Linux kernel, or introduce new parts to the Linux kernel. These patches fall thus, if not explicitly stated otherwise, under the license of the source they are targeting, or if they introduce new code, the license they explicitly specify inside of the patch. Please refer to the specific patch and source in question for further information. License texts can be obtained at https://github.com/torvalds/linux/tree/master/LICENSES.

kernel's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kernel's Issues

SB3: system total power limit at 25 watts, including display backlight

This is observed by using s-tui to continuously monitor the power consumption, core frequency and utilization while compiling the kernel.

Running a "cold start", the system power peaks at 40 watts, and then drops to 25 watts (could be a thermal trip point, or a "long time power limit"?), where the CPU package draws 16 watts, resulting in all-core frequency at 1.6GHz. Core temperature stabilizes at 71C.

Curiously, I lowered the screen brightness to 5%, and the CPU package starts to draw more power (20+ watts) and all-core frequency goes up to 2.0GHz. Core temperature stabilizes at 78C.

So this does not solely look like a thermal throttle -- but where does that 25W limit come from?

unable to sign dkms modules due to libssl1 dependency

I got the following error when compiling dkms drivers on the latest surface kernel:

/lib/modules/6.1.6-surface/build/scripts/sign-file: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file

I use debian testing, and indeed they no longer ship this library. I solved it by installing libssl1.1_1.1.1n-0+deb11u3_amd64.deb as ships with bullseye.

I am not sure where sign-file comes from, but I would assume it would be best to make it compatible with libssl3.

wrong kernel release version for pre-build linux-surface

$ ls /boot/*.img
/boot/initramfs-linux-surface.img
/boot/intel-ucode.img
/boot/initramfs-linux-surface-fallback.img

$ yay -Qi linux-surface
Name            : linux-surface
Version         : 5.3.6-1
Description     : The Linux-surface kernel and modules
Architecture    : x86_64
URL             : None
Licenses        : GPL2
Groups          : None
Provides        : None
Depends On      : coreutils  linux-firmware  kmod  mkinitcpio>=0.7
Optional Deps   : crda: to set the correct wireless channels of your country
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 77.76 MiB
Packager        : Unknown Packager
Build Date      : 2019年10月18日 06時28分05秒
Install Date    : 2019年10月19日 14時44分38秒
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature

$ uname -r
5.3.2-1-surface

also, there an error when install linux-surface(no other verison installed)

depmod: ERROR: could not open directory /lib/modules/5.3.2-1-surface: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

MS Surface Pro 7 - Error Communicating to TMP Chip

IMG_20191228_053021

Hi, I need your help. I'm tried everything to run Linux (Ubuntu 19.10, other OS' doesn't work either) on my surface pro 7. The live-usb-Stick works (tried it on my desktop PC).
In UEFI the Secure-Boot is off + TMP Chip is on. (Tried it with TMP off, than it doesn't boot, too. Does anyone knows a workaround?
Please explain it more detailed, because I'm new with Grub/booting Linux.

PS: My Windows 10 (same SSD other partition) is encrypted with Bitlocker.

Thanks.

UFS module missing

I'm trying to run linux-surface on Surface Go 4. I've installed Fedora as per linux-surface/linux-surface#1162 (comment), but it is still not booting because it can't find the "hard drive". Surface Go 4 uses UFS (Universal Flash Storage) which ideally needs to be enabled in the kernel to be available on boot. I compared:

Fedora "Live" vs.
Fedora 40 fresh install vs.
Fedora with surface kernel.

Fedora Live

liveuser@localhost-live:~$ cat /boot/config-6.8.5-301.fc40.x86_64 | grep UFS
CONFIG_SCSI_UFSHCD=m
CONFIG_SCSI_UFS_BSG=y
CONFIG_SCSI_UFS_CRYPTO=y
CONFIG_SCSI_UFS_HWMON=y
CONFIG_SCSI_UFSHCD_PCI=m
# CONFIG_SCSI_UFS_DWC_TC_PCI is not set
CONFIG_SCSI_UFSHCD_PLATFORM=m
CONFIG_SCSI_UFS_CDNS_PLATFORM=m
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_UFS_DEBUG is not set
liveuser@localhost-live:~$ lsmod | grep ufs
ufs                   102400  0
liveuser@localhost-live:~$ 

Fedora fresh install

surface@fedora:~$ cat /boot/config-6.8.5-301.fc40.x86_64 | grep UFS
CONFIG_SCSI_UFSHCD=m
CONFIG_SCSI_UFS_BSG=y
CONFIG_SCSI_UFS_CRYPTO=y
CONFIG_SCSI_UFS_HWMON=y
CONFIG_SCSI_UFSHCD_PCI=m
# CONFIG_SCSI_UFS_DWC_TC_PCI is not set
CONFIG_SCSI_UFSHCD_PLATFORM=m
CONFIG_SCSI_UFS_CDNS_PLATFORM=m
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_UFS_DEBUG is not set
surface@fedora:~$ lsmod | grep ufs
surface@fedora:~$

Fedora with surface kernel

surface@fedora:~$ cat /boot/config-6.8.8-1.surface.fc40.x86_64 | grep UFS
CONFIG_SCSI_UFSHCD=m
CONFIG_SCSI_UFS_BSG=y
CONFIG_SCSI_UFS_CRYPTO=y
CONFIG_SCSI_UFS_HWMON=y
CONFIG_SCSI_UFSHCD_PCI=m
# CONFIG_SCSI_UFS_DWC_TC_PCI is not set
CONFIG_SCSI_UFSHCD_PLATFORM=m
CONFIG_SCSI_UFS_CDNS_PLATFORM=m
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_UFS_DEBUG is not set
surface@fedora:~$ lsmod | grep ufs
surface@fedora:~$ 

I then tried loading UFS with modprobe ufs for the surface kernel, but it couldn't find the module. I then had look in modules directory, and it seems like the ufs module is missing from the module directory for the surface kernel.

surface@fedora:~$ ls /lib/modules/6.8.8-1.surface.fc40.x86_64/kernel/fs/ufs/
surface@fedora:~$ ls /lib/modules/6.8.5-301.fc40.x86_64/kernel/fs/ufs/
ufs.ko.xz

Would it be possible to include the ufs module for the surface kernel? Even better, have it enabled in the kernel and not having to load the module when installing the surface kernel?

Please let me know if there is any additional information I can provide.

I raised something similar before here: linux-surface/linux-surface#1371

What options to choose when compiling the kernel for SB2

I am trying to compile the kernel using these patches for SB2 13" 8GB for use with debian buster.
I have done the following to apply the patches from this repository

cd /opt/linux-stable/
checkout v5.3.10
for i in /opt/linux-surface/patches/5.3/*.patch; do patch -p1 < $i; done
cp /opt/linux-surface/configs/5.1/config .config
make oldconfig
cd ..
dpkg -i linux-headers-5.3.10-surface-linux-surface_5.3.10-surface-linux-surface-1_amd64.deb linux-image-5.3.10-surface-linux-surface_5.3.10-surface-linux-surface-1_amd64.deb linux-libc-dev_5.3.10-surface-linux-surface-1_amd64.deb

Since 5.1 a bunch of options have been added. Unfortunately I am quite inexperienced with this so I do not really know what to pick. Right now I apparently picked the wrong options, because my installation does not start at all. I am using a live-install-stick and chroot to fix my system at the moment.
Is there any update to the process? Should I do something different? What options should I pick? Is there an updated config file?

WiFi broke on kernel 5.8.3

Device: Surface Book 2
Distro: Manjaro
Previous Kernel: 5.8.1
Kernel After Update: 5.8.3
Date of Update: 24. Aug 2020
Kernel downloaded through yay from the repo: https://pkg.surfacelinux.com/arch/

I should mention that i couldn't connect to neither the 2.4GHz nor 5Ghz network from my router. I was however able to connect to a mobile hotspot (OnePlus 6T). After downgrading to 5.8.1 the issue was instantly resolved. I will attempt to build from commit 233bcf2 and see if works there.

Backporting 5.3/5.4 changes into 4.19

dumping all the commit log made by linux-surface and reporting backporting status here.

commit in 4.19:
☑: means both 5.3 and 4.19 have corresponding commit (according to commit title)
✅(only in 4.19)
⚪(in 4.19 and 5.4)

commit irrelevant to 4.19:
✅(merge commit)
✅(legacy-i915)
✅(outdated-patch)

commit not in 4.19 but corresponding change already done:
✅(already available in 4.19)

commit not in 4.19 (no meaning in emojis, just for visibility):

  • [ ] ❓(not sure if needed for 4.19)
  • ❌(old-patches-cleanup)
  • 🚳(bugfix/touch-rotation) #3
  • 🔺(feature/no-ipts-config-file) #11
  • 🙅(feature/ipts-cleanup) #15
  • 🚫(feature/companion-no-feedback) #16
  • 🉐(wifi-suspend-fix)
  • 🈲(feature/ipts-no-modeswitch) #23

The checkbox shows backport status on https://github.com/kitakar5525/linux-surface-kernel/tree/backport/v4.19-surface-devel

4.19

dce8429 - kitakar5525, 2020-01-11 : Surface3-OEMB: surface3-wmi: add quirk for Surface 3 with broken DMI table
7384203 - Chih-Wei Huang, 2018-09-18 : Surface3-OEMB: ASoC: add quirk for Surface 3 with broken DMI table
62ac18a - Maximilian Luz, 2019-12-30 : surface_acpi: Remove indirect dependencies
ccb08bd - kitakar5525, 2019-12-06 : surface3-spi: workaround: disable DMA mode to avoid crash by default
3e10103 - Maximilian Luz, 2019-12-27 : surface_acpi: Integrate dGPU hot-plug system
c4b9193 - Maximilian Luz, 2019-12-27 : Revert "platform/x86: Add support for Surface Book 2 dGPU"
5717e13 - Maximilian Luz, 2019-12-05 : surface_acpi: Default-disable wakeup on SSH
160e224 - Maximilian Luz, 2019-12-04 : surface_acpi: Add battery/AC support via SID
2595b99 - Maximilian Luz, 2019-11-12 : surface_acpi: Add support for SAM HID devices
135f881 - Maximilian Luz, 2019-11-10 : surface_acpi: Split SID into MFD device
cef457f - Blaž Hrastnik, 2019-11-06 : HID: Improve Windows Precision Touchpad detection.
739ca58 - Blaž Hrastnik, 2019-11-07 : Revert "HID: quirks for Microsoft Surface devices"
dbb20f8 - Maximilian Luz, 2019-11-06 : surface_acpi: Fix debug device config option name
3491789 - Tuowen Zhao, 2019-10-16 : docs: driver-model: add devm_ioremap_uc
f56c4bb - Tuowen Zhao, 2019-10-16 : mfd: intel-lpss: use devm_ioremap_uc for MMIO
d4b353d - Tuowen Zhao, 2019-10-16 : lib: devres: add a helper function for ioremap_uc
841fce3 - Tuowen Zhao, 2019-10-16 : sparc64: implement ioremap_uc
f8d6fd3 - Maximilian Luz, 2019-10-20 : surface_acpi: Update surface-acpi module
3aac3d3 - Hans de Goede, 2019-10-05 : Input: soc_button_array - partial revert of support for newer surface devices
470808b - Dorian Stoll, 2019-10-03 : Add firmware declarations for ipts_surface
cfc5d92 - Maximilian Luz, 2019-10-17 : INTEL_IPTS: Add dependency on DRM_I915
9c30ab7 - Maximilian Luz, 2019-10-02 : surface_acpi: Update DMI check for Surface Pro 5
468e384 - Maximilian Luz, 2019-09-28 : platform/x86: Add support for Surface Book 2 dGPU
9a9ae39 - Maximilian Luz, 2019-09-28 : USB: serial: Register Surface Go LTE device
b026a27 - Maximilian Luz, 2019-09-28 : wireless: Add mwlwifi driver
935f6d2 - Maximilian Luz, 2019-09-28 : platform/x86: Surface 3 battery platform operation region support
7f59405 - Maximilian Luz, 2019-09-28 : wireless/mwifiex: Add quirks for Surface devices
218ad8f - Maximilian Luz, 2019-09-28 : USB: Modify lpm check for sdcard-reader
1564ae6 - Maximilian Luz, 2019-09-28 : HID: quirks for Microsoft Surface devices
8240743 - Maximilian Luz, 2019-09-28 : Add support for Intel IPTS touch devices
☑(contains typo) 36f3225 - Maximilian Luz, 2019-09-28 : staging: Add WIP camera drivers for Surfae devices
d13cc15 - Maximilian Luz, 2019-07-27 : Input: soc_button_array - Add support for newer surface devices
aa86cce - Maximilian Luz, 2019-07-27 : platform/x86: surfacepro3_button: Fix device check
4bb6b4b - Maximilian Luz, 2019-09-28 : power/suspend: Add delay for device quirks
✅(only in 4.19) 853c185 - kitakar5525, 2019-09-28 : nvme: Backport changes for suspend
1b062be - Maximilian Luz, 2019-09-25 : platform: Add gen5 MS Surface platform support
⚪(in 4.19 and 5.4) 6a3fb10 - Maximilian Luz, 2019-09-24 : serdev: Add ACPI devices by ResourceSource field
8d74ef9 - qzed, 2019-08-26 : ACPI: Fix buffer/integer type mismatch
38f039c - Dorian Stoll, 2019-09-22 : Add secureboot pre-signing to the kernel
d573e8a - Greg Kroah-Hartman, 2019-09-21 : Linux 4.19.75

5.3

✅(merge commit) 9933f3c - Maximilian Luz, 2020-01-13 : Merge pull request #29 from kitakar5525/Surface3-OEMB
9c1f1f4 - kitakar5525, 2020-01-11 : Surface3-OEMB: surface3-wmi: add quirk for Surface 3 with broken DMI table
85982de - Chih-Wei Huang, 2018-09-18 : Surface3-OEMB: ASoC: add quirk for Surface 3 with broken DMI table
749a4a6 - Maximilian Luz, 2019-12-30 : surface_acpi: Remove indirect dependencies
✅(merge commit) 7f5a95a - Maximilian Luz, 2019-12-27 : Merge pull request #24 from kitakar5525/surface3-touch-fix
7212ca8 - Maximilian Luz, 2019-12-27 : surface_acpi: Integrate dGPU hot-plug system
341a076 - Maximilian Luz, 2019-12-27 : Revert "platform/x86: Add support for Surface Book 2 dGPU"
6c196de - kitakar5525, 2019-12-06 : surface3-spi: workaround: disable DMA mode to avoid crash by default
✅(merge commit) a93d778 - Maximilian Luz, 2019-12-22 : Merge pull request #23 from StollD/feature/ipts-no-modeswitch
🈲(feature/ipts-no-modeswitch) 894fbba - Dorian Stoll, 2019-12-20 : ipts: Dont automatically switch sensor modes
🉐(wifi-suspend-fix) 8dbbfa6 - sebanc, 2019-11-04 : wireless/mwifiex: Fix S0ix / suspend
🉐(wifi-suspend-fix) d95adde - Maximilian Luz, 2019-12-18 : Revert "wireless/mwifiex: Add quirks for Surface devices"
2d775a4 - Maximilian Luz, 2019-12-05 : surface_acpi: Default-disable wakeup on SSH
af731af - Maximilian Luz, 2019-12-04 : surface_acpi: Add battery/AC support via SID
42110e9 - Maximilian Luz, 2019-11-12 : surface_acpi: Add support for SAM HID devices
b2dbb40 - Maximilian Luz, 2019-11-10 : surface_acpi: Split SID into MFD device
✅(merge commit) 745dbed - Maximilian Luz, 2019-11-10 : Merge pull request #16 from StollD/feature/companion-no-feedback
🚫(feature/companion-no-feedback) 55e49e1 - Dorian Stoll, 2019-11-10 : ipts: Add a generic interface for quirks
🚫(feature/companion-no-feedback) 40f343b - Dorian Stoll, 2019-11-08 : ipts: Let the companion decide about no_feedback
✅(merge commit) 600a4b7 - Maximilian Luz, 2019-11-08 : Merge pull request #15 from StollD/feature/ipts-cleanup
🙅(feature/ipts-cleanup) 6fad9aa - Dorian Stoll, 2019-11-07 : ipts: Document output of IPTS debug thread
🙅(feature/ipts-cleanup) 15585f5 - Dorian Stoll, 2019-10-28 : ipts: Remove ipts prefix from driver source files
🙅(feature/ipts-cleanup) ec34a39 - Dorian Stoll, 2019-10-28 : ipts: Move debugging settings into modparams
🙅(feature/ipts-cleanup) b7c60a6 - Dorian Stoll, 2019-10-28 : ipts: Cleanup ipts-i915 to pass checkpatch
🙅(feature/ipts-cleanup) 1623943 - Dorian Stoll, 2019-10-28 : ipts: Cleanup ipts-mei to pass checkpatch
🙅(feature/ipts-cleanup) 9f369e2 - Dorian Stoll, 2019-10-28 : ipts: Update Makefile / Kconfig to pass checkpatch
🙅(feature/ipts-cleanup) 863de54 - Dorian Stoll, 2019-10-28 : ipts: Cleanup ipts-kernel to pass checkpatch
🙅(feature/ipts-cleanup) 1050bfc - Dorian Stoll, 2019-10-28 : ipts: Cleanup ipts-hid to pass checkpatch
✅(merge commit) f466f7d - Maximilian Luz, 2019-11-07 : Merge pull request #14 from archseer/v5.3-surface-devel
d45bc35 - Blaž Hrastnik, 2019-11-06 : HID: Improve Windows Precision Touchpad detection.
352b9fc - Blaž Hrastnik, 2019-11-07 : Revert "HID: quirks for Microsoft Surface devices"
65dcd3b - Maximilian Luz, 2019-11-06 : surface_acpi: Fix debug device config option name
🙅(feature/ipts-cleanup) 1fb6e17 - Dorian Stoll, 2019-10-28 : ipts: Cleanup public headers to pass checkpatch
🙅(feature/ipts-cleanup) c0556e1 - Dorian Stoll, 2019-10-28 : ipts: Cleanup ipts-surface to pass checkpatch
🙅(feature/ipts-cleanup) 0774af9 - Dorian Stoll, 2019-10-28 : ipts: Cleanup ipts-msg-handler to pass checkpatch
🙅(feature/ipts-cleanup) f63f758 - Dorian Stoll, 2019-10-28 : ipts: Cleanup ipts-companion to pass checkpatch
🙅(feature/ipts-cleanup) 24f97ef - Dorian Stoll, 2019-10-27 : ipts: Cleanup ipts-gfx to pass checkpatch
🙅(feature/ipts-cleanup) 4aaed39 - Dorian Stoll, 2019-10-27 : ipts: Cleanup ipts-state.h to pass checkpatch
🙅(feature/ipts-cleanup) 05f51be - Dorian Stoll, 2019-10-27 : ipts: Cleanup ipts-resource to pass checkpatch
🙅(feature/ipts-cleanup) 9c9dfad - Dorian Stoll, 2019-10-27 : ipts: Cleanup ipts-params to pass checkpatch
🙅(feature/ipts-cleanup) 52e26dd - Dorian Stoll, 2019-10-27 : ipts: Cleanup ipts-dbgfs.c to pass checkpatch
🙅(feature/ipts-cleanup) 30a9d30 - Dorian Stoll, 2019-10-27 : ipts: Cleanup ipts-sensor-regs.h to pass checkpatch
🙅(feature/ipts-cleanup) bda1092 - Dorian Stoll, 2019-10-27 : ipts: Clean up ipts.h to pass checkpatch
🙅(feature/ipts-cleanup) a16bb16 - Dorian Stoll, 2019-10-27 : ipts: Clean up ipts-mei-msg.h to pass checkpatch
✅(merge commit) 93d2b93 - Maximilian Luz, 2019-11-04 : Merge pull request #11 from StollD/feature/no-ipts-config-file
🔺(feature/no-ipts-config-file) 636e23d - Dorian Stoll, 2019-10-27 : ipts: Address comments by qzed and grayhatter
✅(merge commit) fe380f8 - Maximilian Luz, 2019-10-28 : Merge pull request #13 from qzed/v5.3-lpss-fix
aceca89 - Tuowen Zhao, 2019-10-16 : docs: driver-model: add devm_ioremap_uc
6f1806d - Tuowen Zhao, 2019-10-16 : mfd: intel-lpss: use devm_ioremap_uc for MMIO
127f1a7 - Tuowen Zhao, 2019-10-16 : lib: devres: add a helper function for ioremap_uc
9e250ff - Tuowen Zhao, 2019-10-16 : sparc64: implement ioremap_uc
🔺(feature/no-ipts-config-file) e1cfd84 - Dorian Stoll, 2019-10-20 : ipts: Move ipts_fw_config.bin into the companion
🔺(feature/no-ipts-config-file) a1531a7 - Dorian Stoll, 2019-10-20 : ipts: Implement new companion interface
b728e89 - Maximilian Luz, 2019-10-20 : surface_acpi: Update surface-acpi module
d6e78a3 - Maximilian Luz, 2019-10-17 : INTEL_IPTS: Add dependency on DRM_I915
37287a3 - Hans de Goede, 2019-10-05 : Input: soc_button_array - partial revert of support for newer surface devices
✅(merge commit) e353b20 - Maximilian Luz, 2019-10-03 : Merge pull request #7 from StollD/feature/initramfs-firmware
79f7d67 - Dorian Stoll, 2019-10-03 : Add firmware declarations for ipts_surface
2a9a217 - Maximilian Luz, 2019-10-02 : surface_acpi: Update DMI check for Surface Pro 5
✅(already available in 4.19) d1adb85 - Maximilian Luz, 2019-09-26 : scripts/sign_kernel: Change shell to bash
❓(not sure if needed for 4.19) e05aa9d - Maximilian Luz, 2019-09-26 : platform/x86: Update surface-acpi
❓(not sure if needed for 4.19) 8667db5 - Maximilian Luz, 2019-09-26 : serdev: Update ACPI lookup fix
✅(merge commit) d0ff754 - Maximilian Luz, 2019-09-23 : Merge pull request #5 from StollD/feature/sign-for-secureboot
f799a0c - Dorian Stoll, 2019-09-22 : Add secureboot pre-signing to the kernel
✅(merge commit) 1d902b5 - Maximilian Luz, 2019-09-20 : Merge pull request #3 from StollD/bugfix/touch-rotation
✅(merge commit) 5b57c79 - Maximilian Luz, 2019-09-19 : Merge pull request #2 from qzed/v5.3-surface-devel-i915update
✅(legacy-i915) f8c1e1f - Chris Wilson, 2019-09-04 : drm/i915: Restore relaxed padding (OCL_OOB_SUPPRES_ENABLE) for skl+
✅(legacy-i915) 7824ac5 - Ville Syrjälä, 2019-08-28 : drm/i915: Limit MST to <= 8bpc once again
🚳(bugfix/touch-rotation) 86f95d2 - Dorian Stoll, 2019-09-18 : Remove IPTS sensor mode APIs
🚳(bugfix/touch-rotation) 464d29d - kitakar5525, 2019-08-28 : ipts: hid-multitouch: revert all the changes
✅(merge commit) ce721a4 - Maximilian Luz, 2019-09-18 : Merge pull request #1 from StollD/feature/i915-legacy-5.2.15
✅(legacy-i915) 54590f6 - Lionel Landwerlin, 2019-06-28 : drm/i915/icl: whitelist PS_(DEPTH|INVOCATION)COUNT
✅(legacy-i915) 439a55e - John Harrison, 2019-06-17 : drm/i915: Add whitelist workarounds for ICL
✅(legacy-i915) 567c377 - Lionel Landwerlin, 2019-06-28 : drm/i915: whitelist PS
(DEPTH|INVOCATION)_COUNT
✅(legacy-i915) b9c9de4 - John Harrison, 2019-06-17 : drm/i915: Support whitelist workarounds on all engines
✅(legacy-i915) 9af88b4 - John Harrison, 2019-06-17 : drm/i915: Support flags in whitlist WAs
✅(legacy-i915) 8fd23fb - Ville Syrjälä, 2019-07-17 : drm/i915: Make sure cdclk is high enough for DP audio on VLV/CHV
✅(legacy-i915) d0a080d - Kenneth Graunke, 2019-06-25 : drm/i915: Disable SAMPLER_STATE prefetching on all Gen11 steppings.
❓(not sure if needed for 4.19) 44c79ab - Maximilian Luz, 2019-09-18 : surface_acpi: Test keeping EC alive for suspend
❌(old-patches-cleanup) 434376f - Maximilian Luz, 2019-09-18 : Revert downstream_hpd_needs_d0 changes in i915_legacy
❌(old-patches-cleanup) 09372ba - Maximilian Luz, 2019-09-18 : Revert "wireless: Add mwlwifi driver"
❌(old-patches-cleanup) 71867ba - Maximilian Luz, 2019-09-18 : Revert "power/suspend: Add delay for device quirks"
❌(old-patches-cleanup) a13b184 - Maximilian Luz, 2019-09-18 : Revert "staging: Add WIP camera drivers for Surface devices"
❌(old-patches-cleanup) 810a019 - Maximilian Luz, 2019-09-18 : Revert "USB: Modify lpm check for sdcard-reader"
871f089 - Maximilian Luz, 2019-09-18 : Add support for Intel IPTS touch devices
✅(legacy-i915) 0003674 - Dorian Stoll, 2019-09-16 : integrate legacy i915
✅(legacy-i915) 54ae106 - Dorian Stoll, 2019-09-16 : add legacy i915
711bc72 - Maximilian Luz, 2019-09-18 : USB: Modify lpm check for sdcard-reader
367d6a9 - qzed, 2019-09-18 : wireless/mwifiex: Add quirks for Surface devices
8ec4242 - qzed, 2019-09-18 : staging: Add WIP camera drivers for Surface devices
7dca9b4 - qzed, 2019-09-18 : power/suspend: Add delay for device quirks
118195a - qzed, 2019-09-17 : USB: serial: Register Surface Go LTE device
96f5273 - qzed, 2019-09-17 : wireless: Add mwlwifi driver
b4c1b84 - qzed, 2019-09-17 : platform/x86: Surface 3 battery platform operation region support
8902494 - qzed, 2019-09-17 : HID: quirks for Microsoft Surface devices
2b6071e - Maximilian Luz, 2019-07-02 : platform/x86: Add support for Surface Book 2 dGPU
3fea367 - Maximilian Luz, 2019-07-27 : Input: soc_button_array - Add support for newer surface devices
5f679de - Maximilian Luz, 2019-07-27 : platform/x86: surfacepro3_button: Fix device check
99535b3 - qzed, 2019-08-26 : platform: Add gen5 MS Surface platform support
✅(outdated-patch) a39043f - qzed, 2019-08-26 : serdev: Find ACPI clients by ResourceSource tag
07db8ff - qzed, 2019-08-26 : ACPI: Fix buffer/integer type mismatch
4d856f7 - Linus Torvalds, 2019-09-15 : Linux 5.3

5.4

cd9559f - kitakar5525, 2020-01-11 : Surface3-OEMB: surface3-wmi: add quirk for Surface 3 with broken DMI table
cd400a8 - Chih-Wei Huang, 2018-09-18 : Surface3-OEMB: ASoC: add quirk for Surface 3 with broken DMI table
e6ca5ca - Maximilian Luz, 2019-12-30 : surface_acpi: Remove indirect dependencies
66c8401 - kitakar5525, 2019-12-06 : surface3-spi: workaround: disable DMA mode to avoid crash by default
94e747e - Maximilian Luz, 2019-12-27 : surface_acpi: Integrate dGPU hot-plug system
6062883 - Maximilian Luz, 2019-12-27 : Revert "platform/x86: Add support for Surface Book 2 dGPU"
🉐(wifi-suspend-fix) c8da40c - sebanc, 2019-11-04 : wireless/mwifiex: Fix S0ix / suspend
🉐(wifi-suspend-fix) 264427b - Maximilian Luz, 2019-12-18 : Revert "wireless/mwifiex: Add quirks for Surface devices"
❓(not sure if needed for 4.19) f05900c - Maximilian Luz, 2019-12-11 : surface_acpi: Simplify SSH irq setup
569f1f0 - qzed, 2019-09-18 : wireless/mwifiex: Add quirks for Surface devices
d8ce470 - qzed, 2019-09-17 : USB: serial: Register Surface Go LTE device
90b9633 - qzed, 2019-09-17 : platform/x86: Surface 3 battery platform operation region support
8ff12df - Maximilian Luz, 2019-07-02 : platform/x86: Add support for Surface Book 2 dGPU
6a65883 - Maximilian Luz, 2019-12-06 : platform/x86: Add gen5 MS Surface platform support
⚪(in 4.19 and 5.4) 4bea4a7 - Maximilian Luz, 2019-09-24 : serdev: Add ACPI devices by ResourceSource field
422a490 - qzed, 2019-08-26 : ACPI: Fix buffer/integer type mismatch
09f1c1c - Blaž Hrastnik, 2019-11-06 : HID: Improve Windows Precision Touchpad detection.
8d10106 - Tuowen Zhao, 2019-10-16 : docs: driver-model: add devm_ioremap_uc
f3e1eb2 - Tuowen Zhao, 2019-10-16 : mfd: intel-lpss: use devm_ioremap_uc for MMIO
04f6483 - Tuowen Zhao, 2019-10-16 : lib: devres: add a helper function for ioremap_uc
fa03b4c - Tuowen Zhao, 2019-10-16 : sparc64: implement ioremap_uc
073fd9a - Dorian Stoll, 2019-09-22 : Add secureboot pre-signing to the kernel
219d543 - Linus Torvalds, 2019-11-24 : Linux 5.4

backporting

@qzed
I left the following commits because I think surface_sam modules are developed for both 4.19 and 5.4 and I assume the modules for 4.19 is already up-to-date. Is this OK?
❓(not sure if needed for 4.19) e05aa9d - Maximilian Luz, 2019-09-26 : platform/x86: Update surface-acpi
❓(not sure if needed for 4.19) 8667db5 - Maximilian Luz, 2019-09-26 : serdev: Update ACPI lookup fix
❓(not sure if needed for 4.19) 44c79ab - Maximilian Luz, 2019-09-18 : surface_acpi: Test keeping EC alive for suspend
❓(not sure if needed for 4.19) f05900c - Maximilian Luz, 2019-12-11 : surface_acpi: Simplify SSH irq setup

The whole kernel built without errors and running well.
I'll split backports into multiple branches and make multiple PRs tomorrow.

Drivers for MAX34407 and MAX34417

The Surface devices seem to use MAX34407 (up to Pro 6) and MAX34417 (later) to measure power consumption for various components / part of the system (see e.g. https://github.com/linux-surface/acpidumps/blob/master/surface_book_2/dsdt.dsl#L18219-L18226).

Datasheets:

The missing drivers don't impact system performance, so this is a low priority issue.

Surface Book 1 dGPU

First of all, i am completely pleased for your tremendous work on this kernel for surface devices, am a Cuban artist from fine arts who have a Surface Book 1, and I haven't more money to buy another laptop, I work on linux and i don't want for use my dGPU to have the two systems on my laptop... my work it's completely digital.

Please can you support the dGPU on Surface Book 1, is it too much difficult? Please i don't know how to do.... and i work with video editing, game engines... i don't want to use windows....

form linux itself i can't see the dGPU with lspci, i don't know if only with your kernel the dGPU could work or if i need a nvidia driver, which driver??? maybe a privative one? please help....

Moreover i have a doubt... you have two repositories, Linux-surface(jakeday fork) which it's that i am currently using, from the archlinux repo, but you have linux-surface-kernel repo here, which one i have to use??

i hope that you don't stop your wonderful work on this project,

Greetings

Pro 4: 5.8.8-1 does not support touch anymore

the touch support of the 5.8.8-1 Kernel for Surface Pro4 is no longer working. Older kernels worked/are still working.

A related issue has been introduced in the mainstream fedora kernels 5.8.6-5.8.9 and is fixed in 5.8.10.

Pro 7/Laptop 3: Touchscreen support

Any chance that this could work on the new Surface Pro 7 as well?
Jakeday kernel battery/acpi does not work.

I tried to run "make" in /modules and got this:

`
make -C /lib/modules/"5.3.6-1-surface"/build M= modules
make[1]: *** /lib/modules/5.3.6-1-surface/build: No such file or directory. Stop.
make: *** [Makefile:29: all] Error 2

`

Mwifiex: tx timeout randomly occurs in AP mode

mwifiex_pcie 0000:01:00.0 ap0: NETDEV WATCHDOG: CPU: 3: transmit queue 1 timed out 5120 ms
mwifiex_pcie 0000:01:00.0: 4303588352 : Tx timeout(#7), bss_type-num = 1-1
mwifiex_pcie 0000:01:00.0: tx_timeout_cnt exceeds threshold.        Triggering card reset!

This transaction failure in ap mode cause timeout to let driver force reset the card, finally cause kernel to stuck. Kitakar5525 had made a commit to let it not mess up kernel, the kernel may still stuck before driver discovered the timeout though:

kernel: watchdog: BUG: soft lockup - CPU#0 stuck for 5007s! [kworker/u12:1:13296]
kernel: Modules linked in: [last unloaded: br_netfilter]
kernel: CPU: 0 PID: 13296 Comm: kworker/u12:1 Tainted: G             L     6.8.8-surface-1 #1
kernel: Hardware name: Microsoft Corporation Surface 3/Surface 3, BIOS 1.51116.238 03/09/2015
kernel: Workqueue: MWIFIEX_WORK_QUEUE mwifiex_main_work_queue [mwifiex]
kernel: RIP: 0010:mwifiex_wmm_process_tx+0x100/0x8f0 [mwifiex]
kernel: Code: 9a 00 c1 85 c9 78 5c 4c 89 e7 e8 eb c2 fd d9 41 0f b6 06 48 89 c2 48 83 c0 60 48 c1 e2 04 48 c1 e0 04 4e 8b 84 3a 00 06 00 00 <4c> 01 f8 4c 39 c0 74 1d 41 80 78 45 00 75 0e 49 8d 50 10 49 3b 50
kernel: RSP: 0018:ffffa1aa4903fd70 EFLAGS: 00000206
kernel: RAX: 0000000000000600 RBX: 0000000000000002 RCX: 0000000000000007
kernel: RDX: 0000000000000000 RSI: 00000000fffffe00 RDI: ffff8c64c39e46c0
kernel: RBP: ffffa1aa4903fde0 R08: ffff8c63f1d56420 R09: 0000000000000101
kernel: R10: ffffffff9ba060c8 R11: 0000000000000424 R12: ffff8c64c39e46c0
kernel: R13: ffff8c64e2f54000 R14: ffffffffc1009aaa R15: ffff8c64c39e4000
kernel: FS:  0000000000000000(0000) GS:ffff8c64fba00000(0000) knlGS:0000000000000000
kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 000000c0017e1010 CR3: 000000011c434000 CR4: 00000000001006f0
kernel: Call Trace:
kernel:  <IRQ>
kernel:  ? show_regs+0x68/0x70
kernel:  ? watchdog_timer_fn+0x202/0x280
kernel:  ? __pfx_watchdog_timer_fn+0x10/0x10
kernel:  ? __hrtimer_run_queues+0x107/0x270
kernel:  ? hrtimer_interrupt+0x109/0x240
kernel:  ? __sysvec_apic_timer_interrupt+0x50/0x120
kernel:  ? sysvec_apic_timer_interrupt+0x7b/0x90
kernel:  </IRQ>
kernel:  <TASK>
kernel:  ? asm_sysvec_apic_timer_interrupt+0x1b/0x20
kernel:  ? mwifiex_wmm_process_tx+0x100/0    x8f0 [mwifiex]
kernel:  mwifiex_main_process+0x5d9/0x960 [mwifiex]
kernel:  mwifiex_main_work_queue+0x25/0x30 [mwifiex]
kernel:  process_scheduled_works+0x9d/0x390
kernel:  ? __pfx_worker_thread+0x10/0x10
kernel:  worker_thread+0x15b/0x2d0
kernel:  ? __pfx_worker_thread+0x10/0x10
kernel:  kthread+0xf9/0x130
kernel:  ? __pfx_kthread+0x10/0x10
kernel:  ret_from_fork+0x3c/0x60
kernel:  ? __pfx_kthread+0x10/0x10
kernel:  ret_from_fork_asm+0x1b/0x30
kernel:  </TASK>

After some digging up, there are some possible solutions:

  1. Try to apply PCI reset method to surface 3 (also see patchwork link in solution 2)
    #72
  2. Downgrading firmware
    https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
    https://gitlab.com/kernel-firmware/linux-firmware/
    https://github.com/Corben78/mwifiex-firmware/tree/master/mrvl
  3. Use mwlwifi driver
    https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
    https://github.com/kaloz/mwlwifi/tree/master

Recommend label: A:"Mwifiex" D:"Surface 3"

If there are need to attach hostapd.conf, please let me know and I may attached later.

See also:
1. https://linux-wireless.vger.kernel.narkive.com/6cYwkesp/mwifiex-and-sd8787-tx-queue-timeout-in-ap-mode
2. #70 (comment)

Proper device names in IPTS driver

My little concern is that we cannot distinguish touch devices by name anymore:

# before
$ libinput list-devices | grep ipts
Device:           ipts 1B96:005E UNKNOWN
Device:           ipts 1B96:005E
Device:           ipts 1B96:005E Touchscreen
Device:           ipts 1B96:005E Mouse

# after
$ libinput list-devices | grep ipts
Device:           ipts 1B96:005E
Device:           ipts 1B96:005E

No impact on functionality, though.
I hope we can change the name by IPTS driver side rather than patching to hid-multitouch.c at some point, like ipts 1B96:005E Pen and ipts 1B96:005E Touchscreen (for human).

(The ipts 1B96:005E UNKNOWN device was a single-touch device.)
(I don't know what was the purpose of the ipts 1B96:005E Mouse. It seems to be not used by any input for me.)

Originally posted by @kitakar5525 in #3 (comment)

Wireguard module is not included

Wireguard is quite popular these days. This is on Fedora 38. Can it be included in the binary distribution?

modprobe wireguard
modprobe: FATAL: Module wireguard not found in directory /lib/modules/6.3.3-1.surface.fc38.x86_64

Thanks

USB host controller not probed with v5.12-spx-dt and v5.13-spx-dt

I'm trying to run Linux on Surface Pro X SQ2.

With ACPI, the kernel probes correctly the USB Host Controller dwc3-qcom and I can connect a USB keyboard and and USB Network dongle.

While booting with v5.12-spx-dt the device tree , the kernel doesn't probe usb host controllers but manages to mount the roofs from initrd.
v5.13-spx-dt with the dt doesn't boot for some reasons, the console starts printing then the screen gets black.

Kernel boots on Surface Laptop 3

  1. cloned this repro https://github.com/qzed/linux-surface-kernel/
  2. copied https://github.com/qzed/linux-surface-kernel-configs/debian-5.3-x86_64.config to .config in 1.
  3. built w/ gcc (Ubuntu 9.2.1-0ubuntu2)
  4. installed kernel and kernel modules, rebooted into new kernel
  5. machine stalls at loading ramdisk

running Ubuntu 19.10

microcode version 0x38 (/proc/cpuinfo), kernel dmesg: microcode: sig=0x706e5, pf=0x80, revision=0x38; Microcode Update Driver: v2.2

@qzed is this the way to go? any additional steps required?

Backport changes on 5.6 to 5.4

Backport newer changes to 5.4, especially the new IPTS driver. This is motivated by a discussion on Gitter. Basically, on the Pro 7 there seem to be some upstream issues with the iGPU, causing freezes on v5.5+. It would thus help some people to have patches including the latest wifi fixes and IPTS driver on v5.4, even if we don't build binary releases.

We should probably remove the old 5.4 branch and start fresh based on the 5.6 patches.

PRO 4: missing touch support with 5.5.8

Device: Surface Pro 4
Kernel: 5.5.8-1.surface.fc30.x86_64 build 6.3. 14:38
(which is actually newer than the Fedora one with 5.5.7 )

Description:

Firsttime installation of a surface kernel of your repo, so no refereces, if older kernels of this series are working. JakeDays kernelpatches did work and produced a working 5.1er kernel.

Any ideas?

Working:
wifi
typcover

Mysterious:

it looks like it consumes less power ( none at all 100% battery for 5+ minutes ) .. or the battery check does not work at all. power-top says 4.7 W drain, which is a medium consumption. After a reboot it showed 95% dropping... so sort of works.

Missing Features:

Touchscreensupport
Camera

Installed:

kernel-surface-5.5.8-1.fc30.x86_64
surface-firmware-20191004-1.fc30.noarch
surface-secureboot-20200202-1.fc30.noarch
libwacom-surface-1.2-3.fc30.x86_64

Modules:

ipts 0x
mei 5x mei_hdcp,mei_me,ipts
i915 12x
i2c_algo_bit 1x i915
drm_kms_helper 1x i915
drm 6x drm_kms_helper, i915
video 1x i915

Surface Laptop 3 (AMD) ACPI errors on boot

I get a bunch of errors related to ACPI on boot. Not fatal, but i wonder if that causes other issues.

Could not resolve symbol [_SB.PCI0.LPC0.EC0], AE_NOT_FOUND (20190703/dswload2-159)
Could not resolve symbol [_SB.PEP._STA.TPOS], AE_NOT_FOUND (20190703/psargs-330)

dmesg | igrep acpi ouput:

[    0.000000] BIOS-e820: [mem 0x0000000009b00000-0x0000000009cd7fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x0000000009f00000-0x0000000009f0afff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000ce38f000-0x00000000ce3bcfff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000ce3bd000-0x00000000ce3fdfff] ACPI data
[    0.000000] efi:  ACPI=0xce3fd000  ACPI 2.0=0xce3fd014  SMBIOS=0xce2e0000  SMBIOS 3.0=0xce2de000  TPMFinalLog=0xce39b000  MEMATTR=0xcccd9a98  ESRT=0xccce5018 
[    0.013194] ACPI: Early table checksum verification disabled
[    0.013198] ACPI: RSDP 0x00000000CE3FD014 000024 (v02 MSFT  )
[    0.013200] ACPI: XSDT 0x00000000CE3CD188 0000EC (v01 MSFT   MSFT     00000000 AMD  00000001)
[    0.013205] ACPI: FACP 0x00000000CE3F4000 000114 (v06 MSFT   MSFT     00000000 AMD  00000001)
[    0.013210] ACPI: DSDT 0x00000000CE3D5000 0046BF (v02 MSFT   MIN      00000000 INTL 20160422)
[    0.013212] ACPI: SSDT 0x00000000CE3F6000 005419 (v02 AMD    AmdTable 00000002 MSFT 02000002)
[    0.013215] ACPI: DBG2 0x00000000CE3F5000 00005C (v00 MSFT   MSFT     00000001 AMD  00000001)
[    0.013217] ACPI: HPET 0x00000000CE3F3000 000038 (v01 MSFT   MSFT     00000001 AMD  00000001)
[    0.013219] ACPI: WSMT 0x00000000CE3F2000 000028 (v01 MSFT   MSFT     00000001 AMD  00000001)
[    0.013221] ACPI: APIC 0x00000000CE3F1000 00009E (v03 MSFT   MSFT     00000000 AMD  00000000)
[    0.013223] ACPI: MCFG 0x00000000CE3F0000 00003C (v01 MSFT   MSFT     00000000 AMD  00000000)
[    0.013225] ACPI: MSDM 0x00000000CE3EF000 000055 (v01 MSFT            00000001 MSFT 00000001)
[    0.013227] ACPI: SSDT 0x00000000CE3EE000 0003FA (v02 AMD    Tpm2Tabl 00001000 INTL 20160422)
[    0.013230] ACPI: TPM2 0x00000000CE3ED000 000034 (v04 MSFT   MSFT     00000001 AMD  00000001)
[    0.013232] ACPI: VFCT 0x00000000CE3DF000 00D484 (v01 MSFT   MSFT     00000001 AMD  31504F47)
[    0.013234] ACPI: IVRS 0x00000000CE3DE000 0000D0 (v02 AMD    AMD IVRS 00000001 AMD  00000000)
[    0.013236] ACPI: SSDT 0x00000000CE3DC000 001D0C (v01 AMD    AMD CPU  00000001 AMD  00000001)
[    0.013238] ACPI: CRAT 0x00000000CE3DB000 000810 (v01 AMD    AMD CRAT 00000001 AMD  00000001)
[    0.013240] ACPI: CDIT 0x00000000CE3DA000 000029 (v01 AMD    AMD CDIT 00000001 AMD  00000001)
[    0.013242] ACPI: SSDT 0x00000000CE3D4000 0004F0 (v01 AMD    AmdTable 00000001 INTL 20160422)
[    0.013244] ACPI: SSDT 0x00000000CE3D2000 001DC8 (v01 AMD    AmdTable 00000001 INTL 20160422)
[    0.013247] ACPI: BGRT 0x00000000CE3D1000 000038 (v01 MSFT   MSFT     00000001 AMD  00000001)
[    0.013249] ACPI: SSDT 0x00000000CE3D0000 0000E5 (v01 AMD    AmdTable 00000001 INTL 20160422)
[    0.013251] ACPI: SSDT 0x00000000CE3CF000 00022B (v01 AMD    AmdTable 00000001 INTL 20160422)
[    0.013253] ACPI: SSDT 0x00000000CE3CE000 0003DD (v01 AMD    AmdTable 00000001 INTL 20160422)
[    0.013255] ACPI: SSDT 0x00000000CE3FC000 00008D (v01 AMD    AmdTable 00000001 INTL 20160422)
[    0.013257] ACPI: SSDT 0x00000000CE3CC000 0001B3 (v01 AMD    AmdTable 00000001 INTL 20160422)
[    0.013259] ACPI: SSDT 0x00000000CE3CB000 00064D (v01 AMD    AmdTable 00000001 INTL 20160422)
[    0.013261] ACPI: FPDT 0x00000000CE3CA000 000034 (v01 MSFT   MSFT     00000001 AMD  00000001)
[    0.013269] ACPI: Local APIC address 0xfee00000
[    0.056470] ACPI: PM-Timer IO Port: 0x408
[    0.056473] ACPI: Local APIC address 0xfee00000
[    0.056480] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
[    0.056509] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.056510] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
[    0.056512] Using ACPI (MADT) for SMP configuration information
[    0.056513] ACPI: HPET id: 0x10228210 base: 0xfed00000
[    0.120251] ACPI: Core revision 20190703
[    0.320077] PM: Registering ACPI NVS region [mem 0x09b00000-0x09cd7fff] (1933312 bytes)
[    0.320077] PM: Registering ACPI NVS region [mem 0x09f00000-0x09f0afff] (45056 bytes)
[    0.320077] PM: Registering ACPI NVS region [mem 0xce38f000-0xce3bcfff] (188416 bytes)
[    0.323573] ACPI: bus type PCI registered
[    0.323573] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.331167] ACPI: Added _OSI(Module Device)
[    0.331167] ACPI: Added _OSI(Processor Device)
[    0.331168] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.331168] ACPI: Added _OSI(Processor Aggregator Device)
[    0.331169] ACPI: Added _OSI(Linux-Dell-Video)
[    0.331169] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.331170] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    0.335620] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.LPC0.EC0], AE_NOT_FOUND (20190703/dswload2-159)
[    0.335628] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20190703/psobject-220)
[    0.335631] ACPI: Skipping parse of AML opcode: Scope (0x0010)
[    0.336529] ACPI: 12 ACPI AML tables successfully acquired and loaded
[    0.339321] ACPI: Interpreter enabled
[    0.339346] ACPI: (supports S0)
[    0.339347] ACPI: Using IOAPIC for interrupt routing
[    0.342554] [Firmware Info]: PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] not reserved in ACPI motherboard resources
[    0.342560] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.343435] ACPI: Power Resource [WRST] (off)
[    0.343840] ACPI: Power Resource [P0U0] (on)
[    0.343871] ACPI: Power Resource [P3U0] (off)
[    0.344019] ACPI: Power Resource [BRST] (on)
[    0.344204] ACPI: Power Resource [P0U1] (on)
[    0.344231] ACPI: Power Resource [P3U1] (off)
[    0.348696] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PEP._STA.TPOS], AE_NOT_FOUND (20190703/psargs-330)
[    0.348707] ACPI Error: Aborting method \_SB.PEP._STA due to previous error (AE_NOT_FOUND) (20190703/psparse-529)
[    0.349036] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.349042] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[    0.349234] acpi PNP0A08:00: _OSC: platform does not support [SHPCHotplug LTR]
[    0.349415] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug PME AER PCIeCapability]
[    0.361314] acpi MSFT0101:00: platform device creation failed: -16
[    0.361322] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PEP._STA.TPOS], AE_NOT_FOUND (20190703/psargs-330)
[    0.361329] ACPI Error: Aborting method \_SB.PEP._STA due to previous error (AE_NOT_FOUND) (20190703/psparse-529)
[    0.363267] ACPI: bus type USB registered
[    0.363845] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PEP._STA.TPOS], AE_NOT_FOUND (20190703/psargs-330)
[    0.363853] ACPI Error: Aborting method \_SB.PEP._STA due to previous error (AE_NOT_FOUND) (20190703/psparse-529)
[    0.364260] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PEP._STA.TPOS], AE_NOT_FOUND (20190703/psargs-330)
[    0.364260] ACPI Error: Aborting method \_SB.PEP._STA due to previous error (AE_NOT_FOUND) (20190703/psparse-529)
[    0.395427] PCI: Using ACPI for IRQ routing
[    0.405267] pnp: PnP ACPI init
[    0.405414] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active)
[    0.405474] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.405494] system 00:02: Plug and Play ACPI device, IDs PNP0c01 (active)
[    0.405904] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PEP._STA.TPOS], AE_NOT_FOUND (20190703/psargs-330)
[    0.405916] ACPI Error: Aborting method \_SB.PEP._STA due to previous error (AE_NOT_FOUND) (20190703/psparse-529)
[    0.405925] pnp: PnP ACPI: found 3 devices
[    0.413705] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    0.535102] ACPI: Lid Switch [LID0]
[    0.536743] ACPI: Thermal Zone [TZ05] (27 C)
[    0.536999] ACPI: Thermal Zone [TZ09] (27 C)
[    0.538828] hpet_acpi_add: no address or irqs in _CRS
[    1.745765] acpi_cpufreq: overriding BIOS provided _PSD data
[    1.882235] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PEP._STA.TPOS], AE_NOT_FOUND (20190703/psargs-330)
[    1.882490] ACPI Error: Aborting method \_SB.PEP._STA due to previous error (AE_NOT_FOUND) (20190703/psparse-529)
[    1.884696] ACPI: Video Device [VGA] (multi-head: yes  rom: no  post: no)
[    1.885057] acpi device:07: registered as cooling_device8
[    2.947867] acpi-tad ACPI000E:00: Missing _PRW

HID: probe fails with "report is too long"

Tracking the upstream bug: https://bugzilla.kernel.org/show_bug.cgi?id=206259
(Bug 206259 - HID ELAN9038 probe fails with "report is too long")

The commit 31d06cc (HID: Fix slab-out-of-bounds read in hid_field_extract) breaks IPTS driver (the one that uses GuC submission on 4.19) and reportedly the touchscreen driver on Surface Go according to the buglink.

For the IPTS driver on 4.19, we have already added the following commits:

  • 44c036b (HID: Do not abort on over-sized reports)
  • 8acf3f6 (ipts: prevent buffer-overflows by truncating HID reports)

Now, the upstream fixes have been landed on 5.6-rc4 as

So, let's see if those fixes will land on any stable/LTS releases, too.

Environment

  • Affected devices: IPTS driver (the one that uses GuC submission on 4.19), Touchscreen driver on Surface Go
  • Kernel version: Any upstream stable/LTS kernels
  • Distribution: not distribution specific

SP3 - i2c_designware devices spam interrupts, reducing performance and battery life

(Currently Xubuntu 21.04, with latest linux-surface kernel)

My Surface Pro 3 performs really badly out of the box with any Linux distro, with lots of micro-stutter, applications taking a long time to start up, lots of heat and short battery life... Looking at powertop, I found that interrupts for the device INT33C2:00 were eating a huge amount of power, often 4 or 5 watts.

Blacklisting i2c_hid helped performance and got rid of the INT33C2 interrupts, but performance was still not great. Trying the linux-surface kernel instead of the Ubuntu generic or lowlatency ones, things were even worse - when i2c_hid wasn't blacklisted, INT33C2 interrupts ate up 16 watts, keeping the SP3's fans constantly on blast.

Looking at dmesg I noted that INT33C2 was actually powered by the (built in) i2c_designware driver, and disabled that as detailed here:

https://unix.stackexchange.com/questions/423797/how-do-i-disable-i2c-designware-support-when-its-not-built-as-a-module

On reboot, the touchscreen did not work (as expect and as with blacklisting i2c_hid), but performance was much better, and estimated battery life increased by almost an hour.

Wifi Driver

Forgive my lack of knowledge, this is new to me...

I'm looking at the readme on https://github.com/qzed/linux-surface-kernel/tree/v5.3-surface-devel/drivers/net/wireless/marvell/mwifiex and it says to copy sd8787.bin to /lib/firmware/mrvl/ directory. Currently in that directory is a bunch of bin files including sd8787_uapsta.bin, and other like sdsd8997_combo_v4.bin, and sd8688.bin. What's the difference between all the files in this directory? Are they all different drivers or different versions of the same driver? Can I remove any of these files and keep just one? Is my Surface Book 2 using sd8688 or is it using a different one? How do I check? If it is using sd8688.bin where can I find sd8787.bin? I've googled and can't find it sorry.

Wifi, Bluetooth, Standby and audio not working properly

Hi, i have a surface laptop 1st generation, and i have installed on an external box kali linux. I installed the latest kernel version, which is 5.3.10 if I'm not wrong and i encountered some problems actually: after suspension the wifi does not work anymore, and the wifi card is not visible anymore neither from the top bar nor from the terminal (if i run ifconfig); i do have to reboot in order to be able to use it again.
The Bluetooth does not work out of the box and never worked since my installation.
Moreover the audio behaves badly, cause when I insert the 3.5mm jack connector of the earphones, the built-in speakers start to reproduce a strange noise.
Another issue is the standby, because sometimes the display just turns off, and if i try to press any button or the track-pad buttons nothing happens; I figured out that I need to press the power button in order to light up the screen but sometimes it doesn't wake up and i need to force the shutdown, which is actually not a good idea, but it's the only thing left to do. However, even if I am able to wake it up, the wifi card doesn't work, so i need to reboot it anyway.
There is also another issue, which is the fact that when you use the Caps Lock key, there is no light, so you don't know if it is enabled or not.

WiFi Power-Management/Firmware issue (mwifiex)

I'm running latest release (5.3) and after x minutes getting:

[ 6828.584671] mwifiex_pcie 0000:02:00.0: PREP_CMD: FW in reset state
[ 6828.584687] mwifiex_pcie 0000:02:00.0: failed to get signal information
[ 6828.584755] mwifiex_pcie 0000:02:00.0: PREP_CMD: FW in reset state
[ 6828.584763] mwifiex_pcie 0000:02:00.0: failed to get signal information
[ 6834.587608] mwifiex_pcie 0000:02:00.0: PREP_CMD: FW in reset state
[ 6834.587623] mwifiex_pcie 0000:02:00.0: failed to get signal information
[ 6834.587698] mwifiex_pcie 0000:02:00.0: PREP_CMD: FW in reset state
[ 6834.587706] mwifiex_pcie 0000:02:00.0: failed to get signal information

only reboot solve the wifi crash for me....
I'm running sp 2017 ubuntu 19.10

Undefined reference to intel_ipts_connect in ipts_gfx

ld: drivers/misc/ipts/ipts-gfx.o: in function `ipts_open_gpu':
ipts-gfx.c:(.text+0x9e): undefined reference to `intel_ipts_connect'
ld: drivers/misc/ipts/ipts-gfx.o: in function `ipts_close_gpu':
ipts-gfx.c:(.text+0x11d): undefined reference to `intel_ipts_disconnect'
make[1]: *** [/home/grayhatter/code/aports/main/linux-vanilla/src/linux-5.3/Makefile:1069: vmlinux] Error 1
make: *** [/home/grayhatter/code/aports/main/linux-vanilla/src/linux-5.3/Makefile:179: sub-make] Error 2

any thoughts/suggestions?

[Pro 7/Laptop 3]: Kernel panic at boot due to incorrect BAR specification for intel-lpss-pci

Description (taken from LKML):

Some BIOS erroneously specifies write-combining BAR for intel-lpss-pci
in MTRR. This will cause the system to hang during boot. If possible,
this bug could be corrected with a firmware update.

Upstream LKML: https://lkml.org/lkml/2019/10/16/1230
Upstream bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203485

Workaround: Blacklist intel_lpss_pci, if necessary via kernel parameter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.