Code Monkey home page Code Monkey logo

surface-aggregator-module'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.

surface-aggregator-module's People

Contributors

andy-shev avatar archseer avatar arndb avatar atriix avatar bentiss avatar bryant1410 avatar djrscally avatar edgarware avatar gregkh avatar intel-lab-lkp avatar iwanders avatar kees avatar mchehab avatar qzed avatar rafaeljw avatar steveniemitz avatar t-8ch avatar yatli avatar

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

Watchers

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

surface-aggregator-module's Issues

Surface 3 support?

I see the Surface 3 isn't listed in the supported devices table, and I'm having some issues, namely acpi -V doesn't list any thermal info.

# nix-shell -p acpi --run "acpi -V"
Battery 0: Full, 100%
Battery 0: design capacity 7683 mAh, last full capacity 6404 mAh = 83%
Adapter 0: off-line
Cooling 0: Processor 0 of 10
Cooling 1: STR0 no state information available
Cooling 2: LCD 0 of 99
Cooling 3: LCD 0 of 99
Cooling 4: LCD 0 of 99
Cooling 5: LCD 0 of 99
Cooling 6: Processor 0 of 10
Cooling 7: soc_dts0 no state information available
Cooling 8: LCD 0 of 99
Cooling 9: Processor 0 of 10
Cooling 10: INT3400 Thermal no state information available
Cooling 11: TCHG 0 of 4
Cooling 12: STR2 no state information available
Cooling 13: LCD 0 of 99
Cooling 14: LCD 0 of 99
Cooling 15: PNIT no state information available
Cooling 16: LCD 0 of 99
Cooling 17: Processor 0 of 10
Cooling 18: soc_dts1 no state information available
Cooling 19: intel_powerclamp no state information available

Devices in sysfs seem to exist though, but I don't know if any of this is sensible:

# cat /sys/class/thermal/thermal_zone*/{type,temp}
PNIT
soc_dts0
soc_dts1
INT3400 Thermal
STR0
STR2
54000
50000
57000
20000
-273150
-273150

What gives?

[SB2] Implement SW_TABLET_MODE support

On the SB2 we get events when the clipboard is attached to/detached from the base. We also can check the device mode (tablet/laptop/slate) via a request to the EC. Combine those two to provide input-events for SW_TABLET_MODE.

Bumblebee Support

This looks ACPI related. I'm running Ubuntu 18.10. After upgrading to 4.19 from Jake, I found out the 390 drivers are unsupported in 4.19 so I upgraded the nvidia driver to 410.

410 no longer uses prime-select and prefers bumblebee/optirun to enable the graphics card.

remi@sb2:~$ optirun firefox
[  549.113374] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver

[  549.113409] [ERROR]Aborting because fallback start is disabled.

Looking at dmesg:

[  265.746948] bbswitch: version 0.8
[  265.746960] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
[  265.746978] bbswitch: Found discrete VGA device 0000:02:00.0: \_SB_.PCI0.RP05.PXSX
[  265.747354] bbswitch: No suitable _DSM call found.

The device ID properly maps to the nvidia card but that _DSM call looks like ACPI related. Any ideas?

[SL] Caps lock key doesn't illuminate on press

From jakeday/linux-surface#5:
The capslock key does not illuminate on keypress.

From the HID spec:
Synchronization between LED states and CAPS LOCK, NUM LOCK, SCROLL LOCK, COMPOSE, and KANA >events is maintained by the host and NOT the keyboard. If using the keyboard descriptor in Appendix B, >LED states are set by sending a 5-bit absolute report to the keyboard via a Set_Report(Output) request.

@qzed I left the laptop at work over the weekend so I unfortunately can't get you the logs quite yet. I can do so early in the week.

[SB2 15] Module loading, but no batteries appear

Hi! I'm running SurfaceBook2 15" and recently built 4.18.20 kernel (on Archlinux) using your patchset from qzed/linux-surface repo and your config (you've shared it somewhere). Unfortunately, no battery appears. Module loads automatically, previous version spammed with:

[    6.883302] surfacegen5_acpi_notify_san MSHW0091:00: surfacegen5_acpi_notify_san_probe

for like 40 times :)
(no other lines with surfacegen in dmesg)
New version keeps silence at all.

Module is loaded according to lsmod

Unkown HID devices (Surface Laptop 3 AMD)

Found those unkown devices, touchscreen or accelerometer?

Any data I could provide to help supporting them?

$ cat /proc/bus/input/devices | grep "Name\|Sysfs"
...
S: Sysfs=/devices/platform/MSHW0110:00/surface_sam_sid_vhf/0006:045E:0922.0001/input/input23
N: Name="Microsoft Surface HID UNKNOWN"
S: Sysfs=/devices/platform/MSHW0110:00/surface_sam_sid_vhf/0006:045E:0922.0001/input/input24
N: Name="Microsoft Surface HID UNKNOWN"
S: Sysfs=/devices/platform/MSHW0110:00/surface_sam_sid_vhf/0006:045E:0922.0001/input/input26
N: Name="Microsoft Surface HID UNKNOWN"
S: Sysfs=/devices/platform/MSHW0110:00/surface_sam_sid_vhf/0006:045E:0922.0001/input/input27

SL3 No touchpad and keyboard

Since the last update my keyboard and touchpad is not working anymore

Environment

  • Hardware model: Surface Laptop 3 (Intel)
  • Kernel version: 5.7.8-surface x86_64 x86_64 x86_64 GNU/Linux
  • Distribution: Ubuntu 20.04

[ 531.202929] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 531.306455] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 531.409167] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 544.910620] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 545.014129] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 545.018374] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 545.122055] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 545.224990] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 545.328613] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 545.431379] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 545.534103] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)
[ 545.637091] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x15, tc: 0x15, cid: 0x00, iid: 0x01, chn: 0x02)

Any ideas?

Patches for 4.20

Update patches for v4.20.x

Out of date:

  • 0001-ACPI-Fix-buffer-integer-type-mismatch.patch
  • 0002-ACPI-Fix-gsbus-write-transaction-buffer-length.patch

Requirements for building under gentoo.

Hey, I know this is experimental but it is really bothering me that I am not able to get this working!

I am running on a surface book 2:
I have successfully used this module under Ubuntu, fedora, and arch, but I cannot seem to get it to work under Gentoo for some reason. I am able to compile the kernel with your patches, and the CONFIG_SERIAL.. Settings applied, and load it [the module] with insmod, however no battery stats. I know I haven't attached any logs or anything but I don't really know where to start with troubleshooting this, if any logs can help, please let me know and I will send them;

The information I have been able to gather so far from DMESG is that the driver is loaded:
[ 51.871132] surfacegen5_acpi_notify: loading out-of-tree module taints kernel. [ 51.871460] surfacegen5_acpi_notify_san MSHW0091:00: surfacegen5_acpi_notify_san_probe [ 51.871461] surfacegen5_acpi_notify_shps MSHW0153:00: surfacegen5_acpi_notify_shps_probe [ 51.871491] surfacegen5_acpi_notify_shps MSHW0153:00: sg5_base_state_irq_setup [ 51.871509] surfacegen5_acpi_notify_shps MSHW0153:00: failed to get base_presence-int GPIO

Any help is greatly appreciated.

EDIT: Probably should have mentioned kernel version is 4.18.16

Surface Control unable to set or get performance - 'device does not exist'

I have been unable to get the control utility to set or get performance as the device does not exist. I have both re-installed and un-installed-then-installed-again to no avail. The same thing happened under the fedora 5.12.6 kernel as well, this is a new install as of a week ago.

These are the contents of /sys/bus/surface_aggregator/devices/"01\:03\:01\:00\:01/": driver modalias power software_node subsystem uevent

I have attempted to touch/nano a 'perf_mode' file but cannot, even as root. This is what happens when I try and set performance:

sudo surface performance set 4
Error: Failed to get current performance mode

Caused by:
    0: Could not access device "/sys/bus/surface_aggregator/devices/01:03:01:00:01/perf_mode"
    1: No such file or directory (os error 2)

I'm sure I am missing something simple

Kernel: Linux fedora 5.12.8-1.surface.fc34.x86_64 #1 SMP Sat May 29 15:37:39 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Support for Thermal Subsystem

The thermal subsystem (TMP) currently lacks a driver for 7th and later generation models. This should be a SSAM client device driver and needs devices to be added to the registry (e.g. IDs ssam:01:03:<TID>:<IID>:<FUN>).

Since we can actually detect which sensor instances are available, there should probably be a thermal hub device managing (i.e. instantiating) individual sensor devices. It seems that there's also the possibility for having different target IDs ('TID') so it might be a good idea to have one hub per target ID. Hubs and sensor devices can be separated by function ID (FUN), e.g. hub has FUN=0 and sensor FUN=1.

There is some functionality to set sensor trip points, implementing this should also considered but might be something for a later time. First priority should be getting the values to sysfs in a format that e.g. thermald can read. Gen7 devices do have a DPTF config which seems to depend on those sensors, so we'll have to figure out what it expects and how to make that compatible, ideally so that thermald can automatically use that config, which should then result in behavior similar to Windows.

On the gen5 devices, these sensors have some ID string embedded in ACPI, which gives an indication what it is used for. Ideally we'd find a mapping for those on the gen7 devices as well. This might be encoded in the Windows driver, so might need some reverse engineering.

A list of currently known commands and events is provided here:

List of Thermal Subsystem Requests (TC = 0x03)
--------------------------------------------------------------------------------
CID IID TID Payload Response Name/Function Source
------------------------------------------------------------------------
0x01 #SEN 0x01 no yes ACPI/_TMP dsdt
0x02 0x00 0x01 no yes Get performance mode log
0x03 0x00 0x01 yes no Set performance mode log
0x04 0x00 0x01 no yes Get available sensors dsdt
0x09 #SEN 0x01 yes yes Set sensor trip point dsdt
Note: CID 0x09 is an Intel DPTF command.
List of Thermal Subsystem Events (TC = 0x03)
--------------------------------------------------------------------------------
CID IID TID Payload Name/Function Source
------------------------------------------------------------------------
0x0b #SEN 0x01 ? Notify sensor trip-point log+dsdt

See https://www.kernel.org/doc/html/latest/driver-api/surface_aggregator/client.html#adding-ssam-devices for documentation on client devices and drivers.

Occasional ENXIO on gpiod_to_irq

Occasionally (say, 1 in every 10 boots) my SL3A will get ENXIO returned on the gpiod_to_irq in the ssh module.

Using my usb keyboard to unload/reload the module has it init properly later, so I'm assuming that it's just a weird race condition.

Support for Performance-States (Performance/Power-Savings/Thermals)

There is a command for the EC that can set the power-strategy, which is triggered by changing the power-slider on windows. I'm not sure if this applies to all devices.

On the Surface Book 2, this seems to heavily influence the automatic fan-control, at least for the dGPU. I can't check if this influences the CPU fan on the 15" model, as I only have the 13.5" model which comes without a CPU fan. Help here would be appreciated (more on this below).

I've so far tested this with the unigine heaven benchmark and at least from what I can tell it behaves differently on the two different settings that I've tested it so far (lowest- and highest). On the lowest performance setting (0x01) the fans will keep quiet, causing the dGPU to throttle, on the highest setting (0x04) fans will appropriately ramp up, keeping the dGPU cool.

Helping Out/Testing:
For this to work, you need to use this module, i.e. go into the module directory, build it (make clean all), unload the surface-acpi module (rmmod surface_acpi) and insert the surfacegen5_acpi module (insmod surfacegen5_acpi.ko).

On the SB2: You can now set the performance-mode by writing its value to the perf_mode attribute of the MSHW0107 device, e.g. via

echo 3 | sudo tee /sys/devices/platform/MSHW0107:00/perf_mode

Reading from this device will return the current value.

On other devices: You can run the provided script to set the performance state to highest-performance:

sudo ./scripts/sysfs_rqst.py /sys/bus/serial/devices/serial0-0/rqst

If you want to experiment, you can also change the state in the script by changing the following line, replacing 0x04 by the performance state of your choice (0x01 to 0x04):

21:    data = bytes(performance_state_request(state=0x04))

Requests from Logs: (Implementation Stuff)

low perf:  aa 55 80 0c 00 a5 d6 c9  80 03 01 00 00 ba 01 03  01 00 00 00  1b e5
high perf: aa 55 80 0c 00 93 43 9f  80 03 01 00 00 a8 01 03  04 00 00 00  c6 0e

get:       aa 55 80 .. .. .. .. ..  80 03 01 00 00 .. .. 02  .. ..
-resp (1): aa 55 80 .. .. .. .. ..  80 03 00 01 00 .. .. 02  01 00 00 00  01 00 01 00  .. ..
-resp (4): aa 55 80 .. .. .. .. ..  80 03 00 01 00 .. .. 02  04 00 00 00  01 00 04 00  .. ..

Mapping to Windows Performance Slider:

Value Name (Windows) Notes
0x04 Best Performance
0x03 Better Performance
0x02 Battery Saver Only accessible on Windows when AC disconnected.
0x01 Recommended Default

DTX support on Surface Book 3

Implement support for DTX on Surface Book 3. IRPMon logs for detach/attach can be found in linux-surface/linux-surface#201 (comment).

From an initial look at the logs, the SAM interface on the SB3 seems to be the same. This means that likely only the ACPI device used on the SB2 has been removed. This would also mean that the only changes necessary are: 1) Adding a MODULE_ALIAS to the DTX module, and 2) adding a corresponding entry to the SID MFD cell.

Battery stats only work intermittently on Surface Pro 2017

Hi,

I'm using jakeday's kernel via dmhacker's wrapper for Arch. I only get battery stats on some boots, and I can't seem to find any common traits between boot sequences that work and those that don't. If I reboot enough, I can always get it to work or stop working.

Here's some output from dmesg from a working boot:

[    2.017865] surfacegen5_acpi_san MSHW0091:00: Linked as a consumer to serial0-0
[    2.017870] acpi ACPI000E:00: Linked as a consumer to MSHW0091:00
[    2.017881] ac ACPI0003:00: Linked as a consumer to MSHW0091:00
[    2.017884] acpi PNP0C0A:00: Linked as a consumer to MSHW0091:00
...
[    4.061421] surfacegen5_acpi_ssh serial0-0: recv: invalid start of message
[    4.162884] surfacegen5_acpi_ssh serial0-0: recv: invalid start of message
[    4.263668] surfacegen5_acpi_ssh serial0-0: recv: invalid start of message
[    4.265382] usb 1-5: new high-speed USB device number 3 using xhci_hcd
[    4.364880] surfacegen5_acpi_ssh serial0-0: recv: invalid start of message
...
[   48.337779] surfacegen5_acpi_ssh serial0-0: rqst: communication failed 3 times, giving up
[   48.337791] surfacegen5_acpi_san MSHW0091:00: san_rqst: IO error occured, trying again
[   58.316891] surfacegen5_acpi_ssh serial0-0: rqst: communication failed 3 times, giving up
[   58.316904] surfacegen5_acpi_san MSHW0091:00: san_rqst: IO error occured, trying again
[   63.307488] surfacegen5_acpi_ssh serial0-0: rqst: communication failed 3 times, giving up
[   63.307500] surfacegen5_acpi_san MSHW0091:00: san_rqst: IO error occured, trying again
[   69.321411] surfacegen5_acpi_ssh serial0-0: rqst: communication failed 3 times, giving up
[   69.321423] surfacegen5_acpi_san MSHW0091:00: san_rqst: IO error occured, trying again
[   78.344983] surfacegen5_acpi_ssh serial0-0: rqst: communication failed 3 times, giving up
[   78.344993] surfacegen5_acpi_san MSHW0091:00: san_rqst: IO error occured, trying again
[  107.655866] surfacegen5_acpi_ssh serial0-0: rqst: communication failed 3 times, giving up

Those recv and rqst messages occur almost every boot, even the ones that work. They appear over the login tty and the rqst ones seem to continue appearing while I'm logged in in the background according to dmesg.

Here's a failed one:

[    5.476235] surfacegen5_acpi_ssh serial0-0: rqst: communication failed 3 times, giving up
[    5.818733] mwifiex_pcie 0000:01:00.0: info: FW download over, size 843828 bytes
[    5.908373] Console: switching to colour frame buffer device 342x114
[    5.937181] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[    5.937398] surfacegen5_acpi_ssh: probe of serial0-0 failed with error -5

This failed one didn't have the recv and request messages, but I believe some have.

This doesn't seem like enough to determine the problem, but I'm not really sure what else to provide. Feel free to request more info.

Thanks.

Edit: Is your gist relevant to me? Why would the MSHW number be different (84 vs 91)? That's some way to interface with the hardware, right? I'm a little in over my head here, if you can't tell.

Edit 2: This has persisted through several kernel versions (4.18?, 4.19, now 5.0.7) and a full reinstall at some point over the past couple months.

Support for new event registration subsystem.

Newer devices (SP7, SL3, SB3, ..?) seem to use a different mechanism to enable events.

Copied from linux-surface/linux-surface#201 (comment):

So we'll need to add support for the REG system and enable/disable the events via that. The kbd- commands not doing anything indicate that the old way to enable/disable events isn't being used here.

I've also had a look at the Windows driver, and it seems like the old and new event enable/disable commands have, as far as I can tell (unfortunately I'm not a 100% sure here as the CID/TC values seem to be supplied by the caller and not the registry function), mostly the same code path. So that would indicate that the old and new ways don't play together, but the new is a replacement for the old.

Another thing that I've noticed is the battery. I accidentally added them via IID (instance-ID) 0 and 1, but on the SB2 those were 1 and 2 (this should pretty much have the effect that there are two battery instances created, but they will display the exact same data, i.e. the data of battery 1, which should be the one integrated into the clipboard). I've fixed that now, however, after that I had another look at the battery messages in the logs, and it looks like this is not going to work: It seems like they separated the batteries not by IID but by priority (which I think we should rename at this point, because that use kind of indicates that it's not a priority but maybe rather something like a transfer channel). That is kind of confirmed by one of the REG events: 01 00 02 02 01 (the 02 01 at the end is likely TC=2, i.e. battery/power subsystem and IID=1). So likely, the current branch state will break the battery driver and the old state will show only battery 1, but two times... I'll try to fix that tomorrow.

Just to make sure that they haven't done some controller magic to virtually "merge" the two batteries into one for display purposes: The (extended) battery status on Windows does show two batteries?

So with regards to this, I want to try and find the answers for a couple of questions:

  • Is the REG system set-up per channel? In the detach/attach IRPMon log, the reg system is only accessed via channel 2, event messages for input devices are sent via channel 2, but event messages for the battery are sent via channel 1 and 2. So to properly enable events, do we have to set up the battery events for channel 1 by accessing the REG system via channel 1?

  • What are the event messages returned when enabling events for the REG system? Could be currently enabled events or could be events that can be enabled. Part of the payload could indicate if an event has been enabled or not. Or maybe even how many times if it does internal counting. The last two bytes seem to be TC and IID. The byte before those could be the channel. Some example payloads of the event messages:
    ```
    01 00 02 03 01

    01 00 02 02 01
    
    01 00 02 15 01
    01 00 02 15 03
    01 00 02 15 05
    01 00 02 15 06
    
    01 00 02 21 00
    ```
    
  • Related to previous: Can events be enabled multiple times (i.e. does it do resource-counting internally or is it just on/off)?

  • Related to previous: Is there a command to get the currently enabled events (or trigger the event messages sent directly after enabling events for REG)?

  • When was this introduced? Looks like the SL3 and Pro7 use this too. We might also check SL1/SL2 and Pro6, but I don't think they use that yet.

  • What about the thermal subsystem (TC=3)? Looks like there is only an event with IID=1 enabled. On the SB2, temperature sensors were separated by IID. Does this still apply or are they separated by channel now? Also those probably require a new driver since they don't seem to accessed by ACPI any more...

[SP2017] Battery POWER_NOW reports wrong value

The value reported by the acpi driver for the power draw is incorrect (or at least rather high, tens of watts regularly).

Looking at the surface_sam_ssd code and the acpi code I can't find where these values even get evaluated. Am I correct in assuming that these values go straight from the hardware (ssd message) into the kernel ACPI structures? Because in that case I assume that the hardware is not giving useful information and it may be useful to try and correct the value. Is there any knowledge available on how windows handles this data? (I guess not).

Events disabled after resume from hibernation

After waking up from hibernate mode, the keyboard does not work and I cannot log back into the system.

Environment

  • Hardware model: Surface Laptop 2
  • Kernel version: Linux surface 5.8.1-arch1-3-surface linux-surface/linux-surface#1 SMP PREEMPT Tue, 18 Aug 2020 04:24:22 +0000 x86_64 GNU/Linux
  • Distribution: Manjaro Linux
`dmesg` output
[    0.000000] microcode: microcode updated early to revision 0xd6, date = 2020-04-27
[    0.000000] Linux version 5.8.1-arch1-3-surface (linux-surface@archlinux) (gcc (GCC) 10.1.0, GNU ld (GNU Binutils) 2.34.0) linux-surface/linux-surface#1 SMP PREEMPT Tue, 18 Aug 2020 04:24:22 +0000
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-linux-surface root=UUID=36f84b4f-b2de-40e8-8bd7-4c7b9484c5d0 rw quiet resume=UUID=25eaab8e-6b26-4e45-8b29-a20df17ff842 udev.log_priority=3
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Hygon HygonGenuine
[    0.000000]   Centaur CentaurHauls
[    0.000000]   zhaoxin   Shanghai  
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[    0.000000] x86/fpu: xstate_offset[3]:  832, xstate_sizes[3]:   64
[    0.000000] x86/fpu: xstate_offset[4]:  896, xstate_sizes[4]:   64
[    0.000000] x86/fpu: Enabled xstate features 0x1f, context size is 960 bytes, using 'compacted' format.
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000040000000-0x00000000403fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000040400000-0x000000008aa0bfff] usable
[    0.000000] BIOS-e820: [mem 0x000000008aa0c000-0x000000008aa0cfff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x000000008aa0d000-0x000000008aa0dfff] reserved
[    0.000000] BIOS-e820: [mem 0x000000008aa0e000-0x000000008bdcdfff] usable
[    0.000000] BIOS-e820: [mem 0x000000008bdce000-0x000000008be40fff] type 20
[    0.000000] BIOS-e820: [mem 0x000000008be41000-0x000000008be8afff] reserved
[    0.000000] BIOS-e820: [mem 0x000000008be8b000-0x000000008beb0fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x000000008beb1000-0x000000008befefff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000008beff000-0x000000008befffff] usable
[    0.000000] BIOS-e820: [mem 0x000000008bf00000-0x000000008f7fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fe010000-0x00000000fe010fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000026f7fffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] efi: EFI v2.70 by MSFT
[    0.000000] efi: TPMFinalLog=0x8bea7000 ACPI=0x8befe000 ACPI 2.0=0x8befe014 SMBIOS=0x8be4c000 SMBIOS 3.0=0x8be4a000 MEMATTR=0x88cee018 ESRT=0x88d07198 
[    0.000000] SMBIOS 3.2.0 present.
[    0.000000] DMI: Microsoft Corporation Surface Laptop 2/Surface Laptop 2, BIOS 138.3261.768 05.29.2020
[    0.000000] tsc: Detected 1800.000 MHz processor
[    0.001115] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.001118] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.001127] last_pfn = 0x26f800 max_arch_pfn = 0x400000000
[    0.001132] MTRR default type: write-back
[    0.001134] MTRR fixed ranges enabled:
[    0.001136]   00000-9FFFF write-back
[    0.001137]   A0000-BFFFF uncachable
[    0.001139]   C0000-FFFFF write-protect
[    0.001140] MTRR variable ranges enabled:
[    0.001142]   0 base 00C0000000 mask 7FC0000000 uncachable
[    0.001144]   1 base 00A0000000 mask 7FE0000000 uncachable
[    0.001145]   2 base 0090000000 mask 7FF0000000 uncachable
[    0.001146]   3 base 008E000000 mask 7FFE000000 uncachable
[    0.001147]   4 base 008D000000 mask 7FFF000000 uncachable
[    0.001148]   5 disabled
[    0.001149]   6 disabled
[    0.001150]   7 disabled
[    0.001151]   8 disabled
[    0.001152]   9 disabled
[    0.001902] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
[    0.002293] last_pfn = 0x8bf00 max_arch_pfn = 0x400000000
[    0.022446] esrt: Reserving ESRT space from 0x0000000088d07198 to 0x0000000088d07298.
[    0.022456] e820: update [mem 0x88d07000-0x88d07fff] usable ==> reserved
[    0.022511] check: Scanning 1 areas for low memory corruption
[    0.022518] Using GB pages for direct mapping
[    0.023131] Secure boot could not be determined
[    0.023133] RAMDISK: [mem 0x3690b000-0x3747cfff]
[    0.023151] ACPI: Early table checksum verification disabled
[    0.023171] ACPI: RSDP 0x000000008BEFE014 000024 (v02 MSFT  )
[    0.023177] ACPI: XSDT 0x000000008BEFD0E8 0000B4 (v01 MSFT   MSFT     00000000 MSFT 0000005F)
[    0.023185] ACPI: FACP 0x000000008BEE4000 00010C (v05 MSFT   MSFT     00000000 MSFT 0000005F)
[    0.023193] ACPI: DSDT 0x000000008BEC8000 017E67 (v02 MSFT   MSFT     00000000 INTL 20160422)
[    0.023198] ACPI: FACS 0x000000008BE90000 000040
[    0.023202] ACPI: SSDT 0x000000008BEEC000 0101B2 (v02 MSFT   DptfTabl 00001000 INTL 20160422)
[    0.023207] ACPI: MSDM 0x000000008BEEB000 000055 (v01 MSFT            00000001 MSFT 00000001)
[    0.023211] ACPI: SSDT 0x000000008BEEA000 000574 (v02 MSFT   Tpm2Tabl 00001000 INTL 20160422)
[    0.023216] ACPI: TPM2 0x000000008BEE9000 000034 (v03 MSFT   MSFT     00000002 MSFT 0000005F)
[    0.023220] ACPI: SSDT 0x000000008BEE5000 003151 (v02 SaSsdt SaSsdt   00003000 INTL 20160422)
[    0.023225] ACPI: HPET 0x000000008BEE3000 000038 (v01 MSFT   MSFT     00000001 MSFT 0000005F)
[    0.023229] ACPI: APIC 0x000000008BEE2000 00012C (v03 MSFT   MSFT     00000001 MSFT 0000005F)
[    0.023234] ACPI: MCFG 0x000000008BEE1000 00003C (v01 MSFT   MSFT     00000001 MSFT 0000005F)
[    0.023238] ACPI: LPIT 0x000000008BEE0000 000094 (v01 MSFT   MSFT     00000000 MSFT 0000005F)
[    0.023242] ACPI: SSDT 0x000000008BEC5000 00281D (v02 MSFT   RTD3APNV 00001000 INTL 20160422)
[    0.023247] ACPI: SSDT 0x000000008BEC4000 0007C7 (v02 MSFT   xh_la000 00000000 INTL 20160422)
[    0.023251] ACPI: SSDT 0x000000008BEC2000 0017AE (v02 CpuRef CpuSsdt  00003000 INTL 20160422)
[    0.023256] ACPI: DMAR 0x000000008BEC1000 000088 (v01 MSFT   MSFT     00000001 INTL 00000001)
[    0.023260] ACPI: NHLT 0x000000008BEC0000 00002D (v00 MSFT   MSFT     00000002 MSFT 0000005F)
[    0.023264] ACPI: BGRT 0x000000008BEBF000 000038 (v01 MSFT   MSFT     00000002 MSFT 0000005F)
[    0.023269] ACPI: WSMT 0x000000008BEBE000 000028 (v01 MSFT   MSFT     00000002 MSFT 0000005F)
[    0.023273] ACPI: FPDT 0x000000008BEBD000 000034 (v01 MSFT   MSFT     00000002 MSFT 0000005F)
[    0.023286] ACPI: Local APIC address 0xfee00000
[    0.023444] No NUMA configuration found
[    0.023445] Faking a node at [mem 0x0000000000000000-0x000000026f7fffff]
[    0.023450] NODE_DATA(0) allocated [mem 0x26f7fc000-0x26f7fffff]
[    0.023489] Zone ranges:
[    0.023490]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.023493]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.023494]   Normal   [mem 0x0000000100000000-0x000000026f7fffff]
[    0.023496]   Device   empty
[    0.023497] Movable zone start for each node
[    0.023498] Early memory node ranges
[    0.023499]   node   0: [mem 0x0000000000001000-0x000000000009ffff]
[    0.023501]   node   0: [mem 0x0000000000100000-0x000000003fffffff]
[    0.023502]   node   0: [mem 0x0000000040400000-0x000000008aa0bfff]
[    0.023503]   node   0: [mem 0x000000008aa0e000-0x000000008bdcdfff]
[    0.023504]   node   0: [mem 0x000000008beff000-0x000000008befffff]
[    0.023505]   node   0: [mem 0x0000000100000000-0x000000026f7fffff]
[    0.023786] Zeroed struct page in unavailable ranges: 20116 pages
[    0.023788] Initmem setup node 0 [mem 0x0000000000001000-0x000000026f7fffff]
[    0.023790] On node 0 totalpages: 2077036
[    0.023792]   DMA zone: 64 pages used for memmap
[    0.023793]   DMA zone: 26 pages reserved
[    0.023794]   DMA zone: 3999 pages, LIFO batch:0
[    0.023830]   DMA32 zone: 8872 pages used for memmap
[    0.023832]   DMA32 zone: 567757 pages, LIFO batch:63
[    0.029503]   Normal zone: 23520 pages used for memmap
[    0.029504]   Normal zone: 1505280 pages, LIFO batch:63
[    0.044787] Reserving Intel graphics memory at [mem 0x8d800000-0x8f7fffff]
[    0.045554] ACPI: PM-Timer IO Port: 0x1808
[    0.045557] ACPI: Local APIC address 0xfee00000
[    0.045568] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.045569] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[    0.045570] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[    0.045571] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[    0.045572] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1])
[    0.045572] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1])
[    0.045573] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1])
[    0.045574] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1])
[    0.045575] ACPI: LAPIC_NMI (acpi_id[0x09] high edge lint[0x1])
[    0.045576] ACPI: LAPIC_NMI (acpi_id[0x0a] high edge lint[0x1])
[    0.045577] ACPI: LAPIC_NMI (acpi_id[0x0b] high edge lint[0x1])
[    0.045578] ACPI: LAPIC_NMI (acpi_id[0x0c] high edge lint[0x1])
[    0.045579] ACPI: LAPIC_NMI (acpi_id[0x0d] high edge lint[0x1])
[    0.045580] ACPI: LAPIC_NMI (acpi_id[0x0e] high edge lint[0x1])
[    0.045580] ACPI: LAPIC_NMI (acpi_id[0x0f] high edge lint[0x1])
[    0.045582] ACPI: LAPIC_NMI (acpi_id[0x10] high edge lint[0x1])
[    0.045611] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119
[    0.045614] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.045616] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.045618] ACPI: IRQ0 used by override.
[    0.045620] ACPI: IRQ9 used by override.
[    0.045623] Using ACPI (MADT) for SMP configuration information
[    0.045625] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.045638] e820: update [mem 0x88c54000-0x88c79fff] usable ==> reserved
[    0.045650] TSC deadline timer available
[    0.045652] smpboot: Allowing 8 CPUs, 0 hotplug CPUs
[    0.045677] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.045680] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000fffff]
[    0.045682] PM: hibernation: Registered nosave memory: [mem 0x40000000-0x403fffff]
[    0.045684] PM: hibernation: Registered nosave memory: [mem 0x88c54000-0x88c79fff]
[    0.045686] PM: hibernation: Registered nosave memory: [mem 0x88d07000-0x88d07fff]
[    0.045689] PM: hibernation: Registered nosave memory: [mem 0x8aa0c000-0x8aa0cfff]
[    0.045690] PM: hibernation: Registered nosave memory: [mem 0x8aa0d000-0x8aa0dfff]
[    0.045692] PM: hibernation: Registered nosave memory: [mem 0x8bdce000-0x8be40fff]
[    0.045693] PM: hibernation: Registered nosave memory: [mem 0x8be41000-0x8be8afff]
[    0.045694] PM: hibernation: Registered nosave memory: [mem 0x8be8b000-0x8beb0fff]
[    0.045695] PM: hibernation: Registered nosave memory: [mem 0x8beb1000-0x8befefff]
[    0.045697] PM: hibernation: Registered nosave memory: [mem 0x8bf00000-0x8f7fffff]
[    0.045698] PM: hibernation: Registered nosave memory: [mem 0x8f800000-0xdfffffff]
[    0.045699] PM: hibernation: Registered nosave memory: [mem 0xe0000000-0xefffffff]
[    0.045700] PM: hibernation: Registered nosave memory: [mem 0xf0000000-0xfe00ffff]
[    0.045701] PM: hibernation: Registered nosave memory: [mem 0xfe010000-0xfe010fff]
[    0.045702] PM: hibernation: Registered nosave memory: [mem 0xfe011000-0xffffffff]
[    0.045704] [mem 0x8f800000-0xdfffffff] available for PCI devices
[    0.045706] Booting paravirtualized kernel on bare hardware
[    0.045710] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370452778343963 ns
[    0.055052] setup_percpu: NR_CPUS:320 nr_cpumask_bits:320 nr_cpu_ids:8 nr_node_ids:1
[    0.055349] percpu: Embedded 56 pages/cpu s192512 r8192 d28672 u262144
[    0.055359] pcpu-alloc: s192512 r8192 d28672 u262144 alloc=1*2097152
[    0.055360] pcpu-alloc: [0] 0 1 2 3 4 5 6 7 
[    0.055389] Built 1 zonelists, mobility grouping on.  Total pages: 2044554
[    0.055391] Policy zone: Normal
[    0.055392] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-surface root=UUID=36f84b4f-b2de-40e8-8bd7-4c7b9484c5d0 rw quiet resume=UUID=25eaab8e-6b26-4e45-8b29-a20df17ff842 udev.log_priority=3
[    0.056245] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.056613] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.056737] mem auto-init: stack:byref_all, heap alloc:on, heap free:off
[    0.091699] Memory: 7990864K/8308144K available (14339K kernel code, 1479K rwdata, 4600K rodata, 1640K init, 3032K bss, 317280K reserved, 0K cma-reserved)
[    0.091710] random: get_random_u64 called from __kmem_cache_create+0x3e/0x600 with crng_init=0
[    0.091952] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.091976] Kernel/User page tables isolation: enabled
[    0.092019] ftrace: allocating 40094 entries in 157 pages
[    0.115699] ftrace: allocated 157 pages with 5 groups
[    0.115868] rcu: Preemptible hierarchical RCU implementation.
[    0.115869] rcu: 	RCU dyntick-idle grace-period acceleration is enabled.
[    0.115870] rcu: 	RCU restricting CPUs from NR_CPUS=320 to nr_cpu_ids=8.
[    0.115871] rcu: 	RCU priority boosting: priority 1 delay 500 ms.
[    0.115873] 	Trampoline variant of Tasks RCU enabled.
[    0.115873] 	Rude variant of Tasks RCU enabled.
[    0.115874] rcu: RCU calculated value of scheduler-enlistment delay is 30 jiffies.
[    0.115876] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8
[    0.120718] NR_IRQS: 20736, nr_irqs: 2048, preallocated irqs: 16
[    0.121493] Console: colour dummy device 80x25
[    0.121499] printk: console [tty0] enabled
[    0.121532] ACPI: Core revision 20200528
[    0.122005] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635855245 ns
[    0.122096] APIC: Switch to symmetric I/O mode setup
[    0.122099] DMAR: Host address width 39
[    0.122101] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.122112] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e
[    0.122113] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.122119] DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da
[    0.122121] DMAR: RMRR base: 0x0000008d000000 end: 0x0000008f7fffff
[    0.122124] DMAR-IR: IOAPIC id 2 under DRHD base  0xfed91000 IOMMU 1
[    0.122125] DMAR-IR: HPET id 0 under DRHD base 0xfed91000
[    0.122126] DMAR-IR: Queued invalidation will be enabled to support x2apic and Intr-remapping.
[    0.123823] DMAR-IR: Enabled IRQ remapping in x2apic mode
[    0.123825] x2apic enabled
[    0.123843] Switched APIC routing to cluster x2apic.
[    0.128024] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.142058] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x19f2297dd97, max_idle_ns: 440795236593 ns
[    0.142065] Calibrating delay loop (skipped), value calculated using timer frequency.. 3601.00 BogoMIPS (lpj=6000000)
[    0.142068] pid_max: default: 32768 minimum: 301
[    0.147000] LSM: Security Framework initializing
[    0.147007] Yama: becoming mindful.
[    0.147055] Mount-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.147074] Mountpoint-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.147563] mce: CPU0: Thermal monitoring enabled (TM1)
[    0.147602] process: using mwait in idle threads
[    0.147606] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8
[    0.147608] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4
[    0.147611] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    0.147614] Spectre V2 : Mitigation: Full generic retpoline
[    0.147615] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[    0.147615] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    0.147618] Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier
[    0.147619] Spectre V2 : User space: Mitigation: STIBP via seccomp and prctl
[    0.147621] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl and seccomp
[    0.147630] SRBDS: Mitigation: Microcode
[    0.147631] MDS: Mitigation: Clear CPU buffers
[    0.148083] Freeing SMP alternatives memory: 32K
[    0.149885] smpboot: CPU0: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (family: 0x6, model: 0x8e, stepping: 0xa)
[    0.150047] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver.
[    0.150057] ... version:                4
[    0.150058] ... bit width:              48
[    0.150058] ... generic registers:      4
[    0.150060] ... value mask:             0000ffffffffffff
[    0.150060] ... max period:             00007fffffffffff
[    0.150061] ... fixed-purpose events:   3
[    0.150062] ... event mask:             000000070000000f
[    0.150130] rcu: Hierarchical SRCU implementation.
[    0.151583] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter.
[    0.151706] smp: Bringing up secondary CPUs ...
[    0.151874] x86: Booting SMP configuration:
[    0.151875] .... node  #0, CPUs:      linux-surface/linux-surface#1 linux-surface/linux-surface#2 linux-surface/linux-surface#3 linux-surface/linux-surface#4
[    0.163138] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
[    0.163138]  linux-surface/linux-surface#5 linux-surface/linux-surface#6 linux-surface/linux-surface#7
[    0.166309] smp: Brought up 1 node, 8 CPUs
[    0.166309] smpboot: Max logical packages: 1
[    0.166309] smpboot: Total of 8 processors activated (28811.00 BogoMIPS)
[    0.169224] devtmpfs: initialized
[    0.169224] x86/mm: Memory block size: 128MB
[    0.169793] PM: Registering ACPI NVS region [mem 0x8aa0c000-0x8aa0cfff] (4096 bytes)
[    0.169793] PM: Registering ACPI NVS region [mem 0x8be8b000-0x8beb0fff] (155648 bytes)
[    0.169793] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370867519511994 ns
[    0.169793] futex hash table entries: 2048 (order: 5, 131072 bytes, linear)
[    0.169793] pinctrl core: initialized pinctrl subsystem
[    0.169793] PM: RTC time: 07:24:21, date: 2020-08-20
[    0.169793] thermal_sys: Registered thermal governor 'fair_share'
[    0.169793] thermal_sys: Registered thermal governor 'bang_bang'
[    0.169793] thermal_sys: Registered thermal governor 'step_wise'
[    0.169793] thermal_sys: Registered thermal governor 'user_space'
[    0.169793] thermal_sys: Registered thermal governor 'power_allocator'
[    0.169793] NET: Registered protocol family 16
[    0.169793] DMA: preallocated 1024 KiB GFP_KERNEL pool for atomic allocations
[    0.169793] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.169876] DMA: preallocated 1024 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.169886] audit: initializing netlink subsys (disabled)
[    0.169899] audit: type=2000 audit(1597908261.046:1): state=initialized audit_enabled=0 res=1
[    0.169899] cpuidle: using governor ladder
[    0.169899] cpuidle: using governor menu
[    0.172115] ACPI: bus type PCI registered
[    0.172117] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.172235] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
[    0.172253] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820
[    0.172271] PCI: Using configuration type 1 for base access
[    0.172743] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.174062] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.174062] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.175598] ACPI: Added _OSI(Module Device)
[    0.175599] ACPI: Added _OSI(Processor Device)
[    0.175600] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.175602] ACPI: Added _OSI(Processor Aggregator Device)
[    0.175603] ACPI: Added _OSI(Linux-Dell-Video)
[    0.175605] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.175606] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    0.243436] ACPI: 7 ACPI AML tables successfully acquired and loaded
[    0.249033] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.256857] ACPI: Dynamic OEM Table Load:
[    0.256878] ACPI: SSDT 0xFFFF8FEEA5949000 00058B (v02 PmRef  Cpu0Ist  00003000 INTL 20160422)
[    0.259878] ACPI: \_PR_.PR00: _OSC native thermal LVT Acked
[    0.261795] ACPI: Dynamic OEM Table Load:
[    0.261804] ACPI: SSDT 0xFFFF8FEEA5671C00 0003FF (v02 PmRef  Cpu0Cst  00003001 INTL 20160422)
[    0.264700] ACPI: Dynamic OEM Table Load:
[    0.264707] ACPI: SSDT 0xFFFF8FEEA592AB40 0000BA (v02 PmRef  Cpu0Hwp  00003000 INTL 20160422)
[    0.267448] ACPI: Dynamic OEM Table Load:
[    0.267457] ACPI: SSDT 0xFFFF8FEEA594A000 000628 (v02 PmRef  HwpLvt   00003000 INTL 20160422)
[    0.270997] ACPI: Dynamic OEM Table Load:
[    0.271010] ACPI: SSDT 0xFFFF8FEEA5998000 000D14 (v02 PmRef  ApIst    00003000 INTL 20160422)
[    0.275358] ACPI: Dynamic OEM Table Load:
[    0.275365] ACPI: SSDT 0xFFFF8FEEA5674800 000317 (v02 PmRef  ApHwp    00003000 INTL 20160422)
[    0.278355] ACPI: Dynamic OEM Table Load:
[    0.278362] ACPI: SSDT 0xFFFF8FEEA5673400 00030A (v02 PmRef  ApCst    00003000 INTL 20160422)
[    0.287212] ACPI: Interpreter enabled
[    0.287291] ACPI: (supports S0 S4 S5)
[    0.287293] ACPI: Using IOAPIC for interrupt routing
[    0.287359] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.288511] ACPI: Enabled 10 GPEs in block 00 to 7F
[    0.299488] ACPI: Power Resource [PX01] (on)
[    0.299636] ACPI: Power Resource [PX02] (on)
[    0.299771] ACPI: Power Resource [PX03] (on)
[    0.299908] ACPI: Power Resource [PX04] (on)
[    0.300042] ACPI: Power Resource [PX05] (on)
[    0.300182] ACPI: Power Resource [PX06] (on)
[    0.300316] ACPI: Power Resource [PX07] (on)
[    0.300447] ACPI: Power Resource [PX08] (on)
[    0.300578] ACPI: Power Resource [PX09] (on)
[    0.300711] ACPI: Power Resource [PX10] (on)
[    0.302765] ACPI: Power Resource [USBC] (on)
[    0.308238] ACPI: Power Resource [PXP] (off)
[    0.311124] ACPI: Power Resource [PXP] (off)
[    0.311574] ACPI: Power Resource [PRWF] (on)
[    0.330239] ACPI: Power Resource [CAMP] (on)
[    0.343786] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-fe])
[    0.343796] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
[    0.348076] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
[    0.351786] PCI host bridge to bus 0000:00
[    0.351790] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    0.351792] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    0.351794] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.351795] pci_bus 0000:00: root bus resource [mem 0x000c0000-0x000c3fff window]
[    0.351797] pci_bus 0000:00: root bus resource [mem 0x000c4000-0x000c7fff window]
[    0.351798] pci_bus 0000:00: root bus resource [mem 0x000c8000-0x000cbfff window]
[    0.351800] pci_bus 0000:00: root bus resource [mem 0x000cc000-0x000cffff window]
[    0.351801] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff window]
[    0.351803] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff window]
[    0.351805] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff window]
[    0.351806] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff window]
[    0.351808] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff window]
[    0.351809] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff window]
[    0.351811] pci_bus 0000:00: root bus resource [mem 0x000e8000-0x000ebfff window]
[    0.351812] pci_bus 0000:00: root bus resource [mem 0x000ec000-0x000effff window]
[    0.351814] pci_bus 0000:00: root bus resource [mem 0x000f0000-0x000fffff window]
[    0.351815] pci_bus 0000:00: root bus resource [mem 0x8f800000-0xdfffffff window]
[    0.351817] pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfe7fffff window]
[    0.351819] pci_bus 0000:00: root bus resource [bus 00-fe]
[    0.351835] pci 0000:00:00.0: [8086:5914] type 00 class 0x060000
[    0.353318] pci 0000:00:02.0: [8086:5917] type 00 class 0x030000
[    0.353338] pci 0000:00:02.0: reg 0x10: [mem 0xa0000000-0xa0ffffff 64bit]
[    0.353347] pci 0000:00:02.0: reg 0x18: [mem 0x90000000-0x9fffffff 64bit pref]
[    0.353354] pci 0000:00:02.0: reg 0x20: [io  0x3000-0x303f]
[    0.353381] pci 0000:00:02.0: BAR 2: assigned to efifb
[    0.354896] pci 0000:00:04.0: [8086:1903] type 00 class 0x118000
[    0.354917] pci 0000:00:04.0: reg 0x10: [mem 0xa1730000-0xa1737fff 64bit]
[    0.356525] pci 0000:00:05.0: [8086:1919] type 00 class 0x048000
[    0.356544] pci 0000:00:05.0: reg 0x10: [mem 0xa1000000-0xa13fffff 64bit]
[    0.358069] pci 0000:00:14.0: [8086:9d2f] type 00 class 0x0c0330
[    0.358098] pci 0000:00:14.0: reg 0x10: [mem 0xa1700000-0xa170ffff 64bit]
[    0.358188] pci 0000:00:14.0: PME# supported from D3hot D3cold
[    0.359948] pci 0000:00:14.2: [8086:9d31] type 00 class 0x118000
[    0.359978] pci 0000:00:14.2: reg 0x10: [mem 0xa1740000-0xa1740fff 64bit]
[    0.361524] pci 0000:00:14.3: [8086:9d32] type 00 class 0x048000
[    0.361637] pci 0000:00:14.3: reg 0x10: [mem 0xa1710000-0xa171ffff 64bit]
[    0.363534] pci 0000:00:15.0: [8086:9d60] type 00 class 0x118000
[    0.363800] pci 0000:00:15.0: reg 0x10: [mem 0xa1741000-0xa1741fff 64bit]
[    0.366290] pci 0000:00:15.1: [8086:9d61] type 00 class 0x118000
[    0.366556] pci 0000:00:15.1: reg 0x10: [mem 0xa1742000-0xa1742fff 64bit]
[    0.369024] pci 0000:00:15.2: [8086:9d62] type 00 class 0x118000
[    0.369290] pci 0000:00:15.2: reg 0x10: [mem 0xa1743000-0xa1743fff 64bit]
[    0.371749] pci 0000:00:15.3: [8086:9d63] type 00 class 0x118000
[    0.372015] pci 0000:00:15.3: reg 0x10: [mem 0xa1744000-0xa1744fff 64bit]
[    0.374409] pci 0000:00:16.0: [8086:9d3a] type 00 class 0x078000
[    0.374460] pci 0000:00:16.0: reg 0x10: [mem 0xa1745000-0xa1745fff 64bit]
[    0.374605] pci 0000:00:16.0: PME# supported from D3hot
[    0.376269] pci 0000:00:16.4: [8086:9d3e] type 00 class 0x078000
[    0.376320] pci 0000:00:16.4: reg 0x10: [mem 0xa1746000-0xa1746fff 64bit]
[    0.376465] pci 0000:00:16.4: PME# supported from D3hot
[    0.377920] pci 0000:00:1c.0: [8086:9d16] type 01 class 0x060400
[    0.378045] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    0.379822] pci 0000:00:1d.0: [8086:9d18] type 01 class 0x060400
[    0.379948] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    0.381778] pci 0000:00:1e.0: [8086:9d27] type 00 class 0x118000
[    0.382045] pci 0000:00:1e.0: reg 0x10: [mem 0xa1747000-0xa1747fff 64bit]
[    0.384447] pci 0000:00:1f.0: [8086:9d4e] type 00 class 0x060100
[    0.386119] pci 0000:00:1f.2: [8086:9d21] type 00 class 0x058000
[    0.386140] pci 0000:00:1f.2: reg 0x10: [mem 0xa173c000-0xa173ffff]
[    0.387727] pci 0000:00:1f.3: [8086:9d71] type 00 class 0x040380
[    0.387762] pci 0000:00:1f.3: reg 0x10: [mem 0xa1738000-0xa173bfff 64bit]
[    0.387795] pci 0000:00:1f.3: reg 0x20: [mem 0xa1720000-0xa172ffff 64bit]
[    0.387865] pci 0000:00:1f.3: PME# supported from D3hot D3cold
[    0.389931] pci 0000:01:00.0: [1179:0113] type 00 class 0x010802
[    0.389969] pci 0000:01:00.0: reg 0x10: [mem 0xa1600000-0xa1603fff 64bit]
[    0.390116] pci 0000:01:00.0: PME# supported from D0 D3hot
[    0.390295] pci 0000:00:1c.0: PCI bridge to [bus 01]
[    0.390301] pci 0000:00:1c.0:   bridge window [mem 0xa1600000-0xa16fffff]
[    0.390467] pci 0000:02:00.0: [11ab:2b38] type 00 class 0x020000
[    0.390515] pci 0000:02:00.0: reg 0x10: [mem 0xa1500000-0xa15fffff 64bit pref]
[    0.390535] pci 0000:02:00.0: reg 0x18: [mem 0xa1400000-0xa14fffff 64bit pref]
[    0.390687] pci 0000:02:00.0: supports D1 D2
[    0.390688] pci 0000:02:00.0: PME# supported from D0 D1 D3hot D3cold
[    0.391018] pci 0000:00:1d.0: PCI bridge to [bus 02]
[    0.391028] pci 0000:00:1d.0:   bridge window [mem 0xa1400000-0xa15fffff 64bit pref]
[    0.399054] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.399162] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 *10 11 12 14 15)
[    0.399266] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.399371] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.399475] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.399579] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.399685] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.399789] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 10 *11 12 14 15)
[    0.417147] iommu: Default domain type: Translated 
[    0.417147] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    0.417147] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    0.417147] pci 0000:00:02.0: vgaarb: bridge control possible
[    0.417147] vgaarb: loaded
[    0.417147] SCSI subsystem initialized
[    0.417151] libata version 3.00 loaded.
[    0.417151] ACPI: bus type USB registered
[    0.417151] usbcore: registered new interface driver usbfs
[    0.417151] usbcore: registered new interface driver hub
[    0.417151] usbcore: registered new device driver usb
[    0.417151] pps_core: LinuxPPS API ver. 1 registered
[    0.417151] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.417151] PTP clock support registered
[    0.417151] EDAC MC: Ver: 3.0.0
[    0.417151] Registered efivars operations
[    0.417151] NetLabel: Initializing
[    0.417151] NetLabel:  domain hash size = 128
[    0.417151] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.417151] NetLabel:  unlabeled traffic allowed by default
[    0.417151] PCI: Using ACPI for IRQ routing
[    0.444231] PCI: pci_cache_line_size set to 64 bytes
[    0.444610] e820: reserve RAM buffer [mem 0x88c54000-0x8bffffff]
[    0.444613] e820: reserve RAM buffer [mem 0x88d07000-0x8bffffff]
[    0.444615] e820: reserve RAM buffer [mem 0x8aa0c000-0x8bffffff]
[    0.444616] e820: reserve RAM buffer [mem 0x8bdce000-0x8bffffff]
[    0.444618] e820: reserve RAM buffer [mem 0x8bf00000-0x8bffffff]
[    0.444619] e820: reserve RAM buffer [mem 0x26f800000-0x26fffffff]
[    0.446143] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    0.446143] hpet0: 8 comparators, 64-bit 24.000000 MHz counter
[    0.448730] clocksource: Switched to clocksource tsc-early
[    0.467530] VFS: Disk quotas dquot_6.6.0
[    0.467553] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.467664] pnp: PnP ACPI init
[    0.467856] system 00:00: [mem 0x40000000-0x403fffff] has been reserved
[    0.467863] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.468155] system 00:01: [mem 0xfd000000-0xfdabffff] has been reserved
[    0.468159] system 00:01: [mem 0xfdad0000-0xfdadffff] has been reserved
[    0.468161] system 00:01: [mem 0xfdb00000-0xfdffffff] has been reserved
[    0.468163] system 00:01: [mem 0xfe000000-0xfe01ffff] could not be reserved
[    0.468165] system 00:01: [mem 0xfe036000-0xfe03bfff] has been reserved
[    0.468167] system 00:01: [mem 0xfe03d000-0xfe3fffff] has been reserved
[    0.468169] system 00:01: [mem 0xfe410000-0xfe7fffff] has been reserved
[    0.468175] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.468745] system 00:02: [io  0x2000-0x20fe] has been reserved
[    0.468751] system 00:02: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.469006] system 00:03: [io  0x0680-0x069f] has been reserved
[    0.469008] system 00:03: [io  0xffff] has been reserved
[    0.469010] system 00:03: [io  0xffff] has been reserved
[    0.469012] system 00:03: [io  0xffff] has been reserved
[    0.469014] system 00:03: [io  0x1800-0x18fe] has been reserved
[    0.469016] system 00:03: [io  0x164e-0x164f] has been reserved
[    0.469021] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.469199] pnp 00:04: Plug and Play ACPI device, IDs PNP0b00 (active)
[    0.469271] system 00:05: [io  0x1854-0x1857] has been reserved
[    0.469276] system 00:05: Plug and Play ACPI device, IDs INT3f0d PNP0c02 (active)
[    0.471585] system 00:06: [mem 0xfe033000-0xfe033fff] has been reserved
[    0.471587] system 00:06: [mem 0xfe032008-0xfe032fff] has been reserved
[    0.471592] system 00:06: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.476031] system 00:07: [mem 0xfed10000-0xfed17fff] has been reserved
[    0.476034] system 00:07: [mem 0xfed18000-0xfed18fff] has been reserved
[    0.476036] system 00:07: [mem 0xfed19000-0xfed19fff] has been reserved
[    0.476039] system 00:07: [mem 0xe0000000-0xefffffff] has been reserved
[    0.476042] system 00:07: [mem 0xfed20000-0xfed3ffff] has been reserved
[    0.476045] system 00:07: [mem 0xfed90000-0xfed93fff] could not be reserved
[    0.476047] system 00:07: [mem 0xfed45000-0xfed8ffff] has been reserved
[    0.476049] system 00:07: [mem 0xff000000-0xffffffff] has been reserved
[    0.476051] system 00:07: [mem 0xfee00000-0xfeefffff] has been reserved
[    0.476053] system 00:07: [mem 0x8f800000-0x8f81ffff] has been reserved
[    0.476059] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.479359] pnp: PnP ACPI: found 8 devices
[    0.485837] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    0.485935] NET: Registered protocol family 2
[    0.486145] tcp_listen_portaddr_hash hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.486212] TCP established hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.486422] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    0.486539] TCP: Hash tables configured (established 65536 bind 65536)
[    0.486670] UDP hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.486706] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes, linear)
[    0.486833] NET: Registered protocol family 1
[    0.486841] NET: Registered protocol family 44
[    0.486857] pci 0000:00:1c.0: PCI bridge to [bus 01]
[    0.486864] pci 0000:00:1c.0:   bridge window [mem 0xa1600000-0xa16fffff]
[    0.486872] pci 0000:00:1d.0: PCI bridge to [bus 02]
[    0.486880] pci 0000:00:1d.0:   bridge window [mem 0xa1400000-0xa15fffff 64bit pref]
[    0.486887] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    0.486889] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    0.486891] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[    0.486893] pci_bus 0000:00: resource 7 [mem 0x000c0000-0x000c3fff window]
[    0.486894] pci_bus 0000:00: resource 8 [mem 0x000c4000-0x000c7fff window]
[    0.486896] pci_bus 0000:00: resource 9 [mem 0x000c8000-0x000cbfff window]
[    0.486898] pci_bus 0000:00: resource 10 [mem 0x000cc000-0x000cffff window]
[    0.486900] pci_bus 0000:00: resource 11 [mem 0x000d0000-0x000d3fff window]
[    0.486901] pci_bus 0000:00: resource 12 [mem 0x000d4000-0x000d7fff window]
[    0.486903] pci_bus 0000:00: resource 13 [mem 0x000d8000-0x000dbfff window]
[    0.486904] pci_bus 0000:00: resource 14 [mem 0x000dc000-0x000dffff window]
[    0.486906] pci_bus 0000:00: resource 15 [mem 0x000e0000-0x000e3fff window]
[    0.486908] pci_bus 0000:00: resource 16 [mem 0x000e4000-0x000e7fff window]
[    0.486911] pci_bus 0000:00: resource 17 [mem 0x000e8000-0x000ebfff window]
[    0.486913] pci_bus 0000:00: resource 18 [mem 0x000ec000-0x000effff window]
[    0.486914] pci_bus 0000:00: resource 19 [mem 0x000f0000-0x000fffff window]
[    0.486916] pci_bus 0000:00: resource 20 [mem 0x8f800000-0xdfffffff window]
[    0.486918] pci_bus 0000:00: resource 21 [mem 0xfd000000-0xfe7fffff window]
[    0.486924] pci_bus 0000:01: resource 1 [mem 0xa1600000-0xa16fffff]
[    0.486926] pci_bus 0000:02: resource 2 [mem 0xa1400000-0xa15fffff 64bit pref]
[    0.487179] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    0.487822] PCI: CLS 0 bytes, default 64
[    0.487879] Trying to unpack rootfs image as initramfs...
[    0.709488] Freeing initrd memory: 11720K
[    0.732135] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.732144] software IO TLB: mapped [mem 0x847b1000-0x887b1000] (64MB)
[    0.732436] check: Scanning for low memory corruption every 60 seconds
[    0.733008] Initialise system trusted keyrings
[    0.733038] Key type blacklist registered
[    0.733115] workingset: timestamp_bits=41 max_order=21 bucket_order=0
[    0.734914] zbud: loaded
[    0.749974] Key type asymmetric registered
[    0.749976] Asymmetric key parser 'x509' registered
[    0.749989] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    0.750052] io scheduler mq-deadline registered
[    0.750053] io scheduler kyber registered
[    0.750098] io scheduler bfq registered
[    0.750831] pcieport 0000:00:1c.0: PME: Signaling with IRQ 122
[    0.751229] pcieport 0000:00:1d.0: PME: Signaling with IRQ 123
[    0.751365] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[    0.751516] efifb: probing for efifb
[    0.751546] efifb: showing boot graphics
[    0.753355] efifb: framebuffer at 0x90000000, using 13312k, total 13312k
[    0.753356] efifb: mode is 2256x1504x32, linelength=9024, pages=1
[    0.753357] efifb: scrolling: redraw
[    0.753359] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[    0.753422] fbcon: Deferring console take-over
[    0.753424] fb0: EFI VGA frame buffer device
[    0.753435] intel_idle: MWAIT substates: 0x11142120
[    0.753436] intel_idle: v0.5.1 model 0x8E
[    0.754137] intel_idle: Local APIC timer is reliable in all C-states
[    0.754296] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
[    0.754322] ACPI: Lid Switch [LID0]
[    0.758451] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.759797] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <[email protected]>
[    0.759798] AMD-Vi: AMD IOMMUv2 functionality not available on this system
[    0.761907] nvme nvme0: pci function 0000:01:00.0
[    0.762202] usbcore: registered new interface driver usbserial_generic
[    0.762208] usbserial: USB Serial support registered for generic
[    0.762232] rtc_cmos 00:04: RTC can wake from S4
[    0.762857] rtc_cmos 00:04: registered as rtc0
[    0.763014] rtc_cmos 00:04: setting system clock to 2020-08-20T07:24:22 UTC (1597908262)
[    0.763037] rtc_cmos 00:04: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[    0.763137] intel_pstate: Intel P-state driver initializing
[    0.764704] intel_pstate: HWP enabled
[    0.764787] ledtrig-cpu: registered to indicate activity on CPUs
[    0.764892] intel_pmc_core INT33A1:00:  initialized
[    0.764982] drop_monitor: Initializing network drop monitor service
[    0.765172] NET: Registered protocol family 10
[    0.772840] Segment Routing with IPv6
[    0.772843] RPL Segment Routing with IPv6
[    0.772889] NET: Registered protocol family 17
[    0.774299] nvme nvme0: allocated 38 MiB host memory buffer.
[    0.774931] microcode: sig=0x806ea, pf=0x80, revision=0xd6
[    0.775111] microcode: Microcode Update Driver: v2.2.
[    0.775117] IPI shorthand broadcast: enabled
[    0.775128] sched_clock: Marking stable (774151977, 954822)->(782646569, -7539770)
[    0.775232] registered taskstats version 1
[    0.775241] Loading compiled-in X.509 certificates
[    0.778923] Loaded X.509 cert 'Build time autogenerated kernel key: 412e349b4832abe825a9013a7e16e0a0109b844b'
[    0.779282] zswap: loaded using pool lz4/z3fold
[    0.779649] Key type ._fscrypt registered
[    0.779650] Key type .fscrypt registered
[    0.779651] Key type fscrypt-provisioning registered
[    0.780949] PM:   Magic number: 0:630:420
[    0.781157] RAS: Correctable Errors collector initialized.
[    0.825293] nvme nvme0: 8/0/0 default/read/poll queues
[    0.841531]  nvme0n1: p1 p2 p3
[    0.845078] Freeing unused decrypted memory: 2040K
[    0.845707] Freeing unused kernel image (initmem) memory: 1640K
[    0.855790] Write protecting the kernel read-only data: 22528k
[    0.857076] Freeing unused kernel image (text/rodata gap) memory: 2044K
[    0.857774] Freeing unused kernel image (rodata/data gap) memory: 1544K
[    0.932141] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[    0.932143] x86/mm: Checking user space page tables
[    0.981284] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[    0.981289] Run /init as init process
[    0.981290]   with arguments:
[    0.981291]     /init
[    0.981291]   with environment:
[    0.981292]     HOME=/
[    0.981292]     TERM=linux
[    0.981293]     BOOT_IMAGE=/boot/vmlinuz-linux-surface
[    1.089462] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    1.089475] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[    1.090570] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0000000081109810
[    1.090823] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[    1.091060] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.08
[    1.091062] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.091063] usb usb1: Product: xHCI Host Controller
[    1.091065] usb usb1: Manufacturer: Linux 5.8.1-arch1-3-surface xhci-hcd
[    1.091066] usb usb1: SerialNumber: 0000:00:14.0
[    1.091209] hub 1-0:1.0: USB hub found
[    1.091227] hub 1-0:1.0: 12 ports detected
[    1.093944] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    1.093948] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    1.093960] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed
[    1.094018] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.08
[    1.094020] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.094023] usb usb2: Product: xHCI Host Controller
[    1.094025] usb usb2: Manufacturer: Linux 5.8.1-arch1-3-surface xhci-hcd
[    1.094026] usb usb2: SerialNumber: 0000:00:14.0
[    1.094196] hub 2-0:1.0: USB hub found
[    1.094207] hub 2-0:1.0: 6 ports detected
[    1.114859] PM: Image not found (code -22)
[    1.165520] EXT4-fs (nvme0n1p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.289207] random: fast init done
[    1.352412] systemd[1]: systemd 245.7-2-manjaro running in system mode. (+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[    1.369255] systemd[1]: Detected architecture x86-64.
[    1.401821] systemd[1]: Set hostname to <surface>.
[    1.574565] systemd[1]: Created slice system-getty.slice.
[    1.574876] systemd[1]: Created slice system-modprobe.slice.
[    1.575160] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[    1.575481] systemd[1]: Created slice User and Session Slice.
[    1.575542] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    1.575586] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    1.575759] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    1.575785] systemd[1]: Reached target Local Encrypted Volumes.
[    1.575797] systemd[1]: Reached target Login Prompts.
[    1.575816] systemd[1]: Reached target Paths.
[    1.575828] systemd[1]: Reached target Remote File Systems.
[    1.575839] systemd[1]: Reached target Slices.
[    1.575916] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[    1.576012] systemd[1]: Listening on LVM2 metadata daemon socket.
[    1.576076] systemd[1]: Listening on LVM2 poll daemon socket.
[    1.577798] systemd[1]: Listening on Process Core Dump Socket.
[    1.577858] systemd[1]: Listening on initctl Compatibility Named Pipe.
[    1.577998] systemd[1]: Listening on Journal Audit Socket.
[    1.578086] systemd[1]: Listening on Journal Socket (/dev/log).
[    1.578178] systemd[1]: Listening on Journal Socket.
[    1.578265] systemd[1]: Listening on udev Control Socket.
[    1.578324] systemd[1]: Listening on udev Kernel Socket.
[    1.579228] systemd[1]: Mounting Huge Pages File System...
[    1.580189] systemd[1]: Mounting POSIX Message Queue File System...
[    1.581132] systemd[1]: Mounting Kernel Debug File System...
[    1.582113] systemd[1]: Mounting Kernel Trace File System...
[    1.583399] systemd[1]: Starting Create list of static device nodes for the current kernel...
[    1.584260] systemd[1]: Starting Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
[    1.585026] systemd[1]: Starting Load Kernel Module drm...
[    1.586702] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[    1.586732] systemd[1]: Condition check resulted in File System Check on Root Device being skipped.
[    1.588269] systemd[1]: Starting Journal Service...
[    1.590461] systemd[1]: Starting Load Kernel Modules...
[    1.591401] systemd[1]: Starting Remount Root and Kernel File Systems...
[    1.592311] systemd[1]: Starting udev Coldplug all Devices...
[    1.593650] systemd[1]: Mounted Huge Pages File System.
[    1.593778] systemd[1]: Mounted POSIX Message Queue File System.
[    1.593873] systemd[1]: Mounted Kernel Debug File System.
[    1.593975] systemd[1]: Mounted Kernel Trace File System.
[    1.594630] systemd[1]: Finished Create list of static device nodes for the current kernel.
[    1.597565] Linux agpgart interface v0.103
[    1.601515] random: lvm: uninitialized urandom read (4 bytes read)
[    1.601531] EXT4-fs (nvme0n1p2): re-mounted. Opts: (null)
[    1.603396] systemd[1]: Finished Remount Root and Kernel File Systems.
[    1.603560] systemd[1]: Condition check resulted in First Boot Wizard being skipped.
[    1.604937] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[    1.605869] systemd[1]: Starting Load/Save Random Seed...
[    1.605902] systemd[1]: Condition check resulted in Create System Users being skipped.
[    1.606948] systemd[1]: Starting Create Static Device Nodes in /dev...
[    1.607679] systemd[1]: Finished Load Kernel Modules.
[    1.608070] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[    1.608978] systemd[1]: Mounting Kernel Configuration File System...
[    1.610215] systemd[1]: Starting Apply Kernel Variables...
[    1.612276] systemd[1]: Mounted Kernel Configuration File System.
[    1.619303] systemd[1]: Finished Apply Kernel Variables.
[    1.628146] systemd[1]: Finished Create Static Device Nodes in /dev.
[    1.629374] systemd[1]: Starting udev Kernel Device Manager...
[    1.634682] systemd[1]: [email protected]: Succeeded.
[    1.635021] systemd[1]: Finished Load Kernel Module drm.
[    1.665106] systemd[1]: Finished udev Coldplug all Devices.
[    1.745418] tsc: Refined TSC clocksource calibration: 1800.010 MHz
[    1.745445] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x19f233062f3, max_idle_ns: 440795263401 ns
[    1.745478] clocksource: Switched to clocksource tsc
[    1.918777] systemd[1]: Started Journal Service.
[    1.918918] audit: type=1130 audit(1597908263.652:2): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journald comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    1.926332] systemd-journald[232]: Received client request to flush runtime journal.
[    2.014018] audit: type=1130 audit(1597908263.745:3): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journal-flush comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    2.034034] audit: type=1130 audit(1597908263.765:4): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-udevd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    2.035138] audit: type=1130 audit(1597908263.765:5): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=lvm2-lvmetad comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    2.080112] ACPI: AC Adapter [ADP1] (off-line)
[    2.161781] hid: raw HID events driver (C) Jiri Kosina
[    2.178123] tpm_tis NTC0103:00: 2.0 TPM (device-id 0xFE, rev-id 4)
[    2.201569] random: mktemp: uninitialized urandom read (6 bytes read)
[    2.201581] random: mktemp: uninitialized urandom read (6 bytes read)
[    2.239955] mc: Linux media interface: v0.10
[    2.243405] intel-lpss 0000:00:15.0: enabling device (0000 -> 0002)
[    2.243626] proc_thermal 0000:00:04.0: enabling device (0000 -> 0002)
[    2.243702] idma64 idma64.0: Found Intel integrated DMA 64-bit
[    2.247496] intel_rapl_common: Found RAPL domain package
[    2.247497] intel_rapl_common: Found RAPL domain dram
[    2.247770] proc_thermal 0000:00:04.0: Creating sysfs group for PROC_THERMAL_PCI
[    2.259188] i2c_hid i2c-MSHW0092:00: supply vdd not found, using dummy regulator
[    2.259205] i2c_hid i2c-MSHW0092:00: supply vddl not found, using dummy regulator
[    2.287531] intel-lpss 0000:00:15.1: enabling device (0000 -> 0002)
[    2.287804] idma64 idma64.1: Found Intel integrated DMA 64-bit
[    2.297331] intel-lpss 0000:00:15.2: enabling device (0000 -> 0002)
[    2.297682] idma64 idma64.2: Found Intel integrated DMA 64-bit
[    2.307252] intel-lpss 0000:00:15.3: enabling device (0000 -> 0002)
[    2.307472] idma64 idma64.3: Found Intel integrated DMA 64-bit
[    2.317687] intel-lpss 0000:00:1e.0: enabling device (0000 -> 0002)
[    2.317940] idma64 idma64.4: Found Intel integrated DMA 64-bit
[    2.355815] videodev: Linux video capture interface: v2.00
[    2.368805] Adding 9227464k swap on /dev/nvme0n1p3.  Priority:-2 extents:1 across:9227464k SSFS
[    2.369873] mei_me 0000:00:16.4: enabling device (0004 -> 0006)
[    2.369907] mei_me 0000:00:16.0: enabling device (0004 -> 0006)
[    2.373207] input: PC Speaker as /devices/platform/pcspkr/input/input1
[    2.386789] audit: type=1130 audit(1597908264.119:6): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=lvm2-monitor comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    2.411752] audit: type=1130 audit(1597908264.142:7): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-fsck@dev-disk-by\x2duuid-7C37\x2dD528 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    2.499031] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.499293] RAPL PMU: API unit is 2^-32 Joules, 5 fixed counters, 655360 ms ovfl timer
[    2.499295] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules
[    2.499296] RAPL PMU: hw unit of domain package 2^-14 Joules
[    2.499297] RAPL PMU: hw unit of domain dram 2^-14 Joules
[    2.499298] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
[    2.499299] RAPL PMU: hw unit of domain psys 2^-14 Joules
[    2.499328] ipu3_imgu: module is from the staging directory, the quality is unknown, you have been warned.
[    2.504089] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.576837] ipu3-cio2 0000:00:14.3: enabling device (0000 -> 0002)
[    2.577065] ipu3-cio2 0000:00:14.3: device 0x9d32 (rev: 0x1)
[    2.580473] cryptd: max_cpu_qlen set to 1000
[    2.581926] ipu3-imgu 0000:00:05.0: enabling device (0000 -> 0002)
[    2.582180] ipu3-imgu 0000:00:05.0: device 0x1919 (rev: 0x1)
[    2.582202] ipu3-imgu 0000:00:05.0: physical base address 0x00000000a1000000, 4194304 bytes
[    2.599348] AVX2 version of gcm_enc/dec engaged.
[    2.599350] AES CTR mode by8 optimization enabled
[    2.621217] audit: type=1130 audit(1597908264.352:8): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    2.635514] audit: type=1127 audit(1597908264.369:9): pid=365 uid=0 auid=4294967295 ses=4294967295 msg=' comm="systemd-update-utmp" exe="/usr/lib/systemd/systemd-update-utmp" hostname=? addr=? terminal=? res=success'
[    2.641811] audit: type=1130 audit(1597908264.372:10): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-update-utmp comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    2.672681] ipu3-imgu 0000:00:05.0: loaded firmware version irci_irci_ecr-master_20161208_0213_20170112_1500, 17 binaries, 1212984 bytes
[    2.696424] urandom_read: 2 callbacks suppressed
[    2.696425] random: mktemp: uninitialized urandom read (6 bytes read)
[    2.698155] random: tlp-readconfs: uninitialized urandom read (4 bytes read)
[    2.736461] mwifiex_pcie 0000:02:00.0: enabling device (0000 -> 0002)
[    2.736713] mwifiex_pcie: PCI memory map Virt0: 000000007144ae1c PCI memory map Virt2: 00000000e1ddbbef
[    2.748749] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[    2.748767] snd_hda_intel 0000:00:1f.3: enabling device (0000 -> 0002)
[    2.749473] input: gpio-keys as /devices/platform/MSHW0040:00/gpio-keys.1.auto/input/input2
[    2.757878] dw-apb-uart.4: ttyS0 at MMIO 0xa1747000 (irq = 20, base_baud = 1843200) is a 16550A
[    2.764900] intel_rapl_common: Found RAPL domain package
[    2.764903] intel_rapl_common: Found RAPL domain core
[    2.764904] intel_rapl_common: Found RAPL domain uncore
[    2.764906] intel_rapl_common: Found RAPL domain dram
[    2.764952] serial serial0: tty port ttyS0 registered
[    2.770319] surface_sam_ssh serial0-0: SAM controller version: 145.501.139
[    2.780132] input: MSHW0092:00 045E:0933 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-MSHW0092:00/0018:045E:0933.0001/input/input3
[    2.780250] input: MSHW0092:00 045E:0933 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-MSHW0092:00/0018:045E:0933.0001/input/input4
[    2.780341] hid-generic 0018:045E:0933.0001: input,hidraw0: I2C HID v1.00 Mouse [MSHW0092:00 045E:0933] on i2c-MSHW0092:00
[    2.800146] input: Microsoft Virtual HID Framework Device Keyboard as /devices/platform/MSHW0096:00/0006:045E:F001.0002/input/input6
[    2.805945] input: Microsoft Virtual HID Framework Device Consumer Control as /devices/platform/MSHW0096:00/0006:045E:F001.0002/input/input7
[    2.822598] ipts: unknown parameter 'singletouch' ignored
[    2.822656] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Probing IPTS
[    2.822657] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS using DMA_BIT_MASK(64)
[    2.826638] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: Device 1B96:0979 found
[    2.829208] hid-generic 0006:045E:F001.0002: input,hidraw0: <UNKNOWN> HID v0.00 Keyboard [Microsoft Virtual HID Framework Device] on 
[    2.832932] ipts 0000:00:16.4-3e8d0870-271a-4208-8eb5-9acb9402ae04: IPTS enabled
[    2.837535] input: MSHW0092:00 045E:0933 Mouse as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-MSHW0092:00/0018:045E:0933.0001/input/input8
[    2.837664] input: MSHW0092:00 045E:0933 Touchpad as /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-MSHW0092:00/0018:045E:0933.0001/input/input9
[    2.837767] hid-multitouch 0018:045E:0933.0001: input,hidraw1: I2C HID v1.00 Mouse [MSHW0092:00 045E:0933] on i2c-MSHW0092:00
[    3.181568] checking generic (90000000 d00000) vs hw (a0000000 1000000)
[    3.181571] checking generic (90000000 d00000) vs hw (90000000 10000000)
[    3.181573] fb0: switching to inteldrmfb from EFI VGA
[    3.182547] i915 0000:00:02.0: vgaarb: deactivate vga console
[    3.195990] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    3.199088] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    3.202165] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    3.205033] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[    3.247710] i915 0000:00:02.0: [drm] Reducing the compressed framebuffer size. This may lead to less power savings than a non-reduced-size. Try to increase stolen memory size if available in BIOS.
[    3.263912] random: crng init done
[    3.268419] mousedev: PS/2 mouse device common for all mice
[    3.281487] [drm] Initialized i915 1.6.0 20200515 for 0000:00:02.0 on minor 0
[    3.288302] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[    3.289086] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input11
[    3.290080] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    3.314480] fbcon: i915drmfb (fb0) is primary device
[    3.314483] fbcon: Deferring console take-over
[    3.314488] i915 0000:00:02.0: fb0: i915drmfb frame buffer device
[    3.319337] battery: ACPI: Battery Slot [BAT1] (battery present)
[    3.467028] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC298: line_outs=1 (0x1a/0x0/0x0/0x0/0x0) type:speaker
[    3.467032] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    3.467034] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    3.467035] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    3.467037] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    3.467040] snd_hda_codec_realtek hdaudioC0D0:      Mic=0x18
[    3.467043] snd_hda_codec_realtek hdaudioC0D0:      Internal Mic=0x12
[    3.584202] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input12
[    3.584414] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input13
[    3.584629] input: HDA Intel PCH HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input14
[    3.584862] input: HDA Intel PCH HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input15
[    3.585074] input: HDA Intel PCH HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input16
[    3.585358] input: HDA Intel PCH HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input17
[    3.585814] input: HDA Intel PCH HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:1f.3/sound/card0/input18
[    3.607752] DPTF Platform Power INT3407:00: Unsupported event [0x82]
[    3.997814] mwifiex_pcie 0000:02:00.0: info: FW download over, size 723540 bytes
[    4.722089] usb 1-5: new high-speed USB device number 2 using xhci_hcd
[    4.863035] usb 1-5: New USB device found, idVendor=1286, idProduct=204c, bcdDevice=32.01
[    4.863040] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.863044] usb 1-5: Product: Bluetooth and Wireless LAN Composite Device
[    4.863047] usb 1-5: Manufacturer: Marvell
[    4.863049] usb 1-5: SerialNumber: 0000000000000000
[    4.955531] mwifiex_pcie 0000:02:00.0: WLAN FW is active
[    5.061081] mwifiex_pcie 0000:02:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (15.68.19.p21) 
[    5.061084] mwifiex_pcie 0000:02:00.0: driver_version = mwifiex 1.0 (15.68.19.p21) 
[    5.064123] mwifiex_pcie 0000:02:00.0 wlp2s0: renamed from mlan0
[    5.232182] kauditd_printk_skb: 16 callbacks suppressed
[    5.232185] audit: type=1130 audit(1597908266.965:27): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    5.301183] audit: type=1130 audit(1597908267.032:28): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    5.310803] mwifiex_pcie 0000:02:00.0: Request to enable ps_mode received but it's disallowed by module parameter. Rejecting the request.
[    5.315864] mwifiex_pcie 0000:02:00.0: Request to disable ps_mode received. Disabling it.
[    5.348902] audit: type=1130 audit(1597908267.082:29): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=wpa_supplicant comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    5.570903] Bluetooth: Core ver 2.22
[    5.570931] NET: Registered protocol family 31
[    5.570932] Bluetooth: HCI device and connection manager initialized
[    5.570937] Bluetooth: HCI socket layer initialized
[    5.570940] Bluetooth: L2CAP socket layer initialized
[    5.570943] Bluetooth: SCO socket layer initialized
[    5.590038] usbcore: registered new interface driver btusb
[    5.590206] Bluetooth: hci0: unexpected event for opcode 0x0000
[    5.592612] Bluetooth: hci0: unexpected event for opcode 0x0000
[    5.622658] audit: type=1130 audit(1597908267.355:30): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=bluetooth comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    5.633788] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.633790] Bluetooth: BNEP filters: protocol multicast
[    5.633794] Bluetooth: BNEP socket layer initialized
[    5.697578] audit: type=1130 audit(1597908267.429:31): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-logind comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    5.702485] audit: type=1130 audit(1597908267.435:32): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sddm comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    5.781348] NET: Registered protocol family 38
[    6.629006] audit: type=1100 audit(1597908268.362:33): pid=750 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_permit acct="sddm" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[    6.629100] audit: type=1101 audit(1597908268.362:34): pid=750 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_permit acct="sddm" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[    6.630689] audit: type=1103 audit(1597908268.362:35): pid=750 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_permit acct="sddm" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[    6.687883] audit: type=1130 audit(1597908268.419:36): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user-runtime-dir@968 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    8.048827] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    8.057363] Bridge firewalling registered
[    8.279380] Initializing XFRM netlink socket
[    8.629562] process 'docker/tmp/qemu-check266176065/check' started with executable stack
[    8.860566] mwifiex_pcie 0000:02:00.0: Request to enable ps_mode received but it's disallowed by module parameter. Rejecting the request.
[   10.608783] kauditd_printk_skb: 52 callbacks suppressed
[   10.608788] audit: type=1131 audit(1597908272.339:89): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   10.922053] audit: type=1100 audit(1597908272.652:90): pid=1149 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_tally2,pam_shells,pam_unix,pam_permit acct="raphael" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[   10.925334] audit: type=1101 audit(1597908272.655:91): pid=1149 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_tally2,pam_access,pam_unix,pam_permit,pam_time acct="raphael" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[   10.926946] audit: type=1103 audit(1597908272.659:92): pid=1149 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_tally2,pam_shells,pam_unix,pam_permit acct="raphael" exe="/usr/lib/sddm/sddm-helper" hostname=? addr=? terminal=? res=success'
[   10.927243] audit: type=1006 audit(1597908272.659:93): pid=1149 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=2 res=1
[   10.978875] mwifiex_pcie 0000:02:00.0: Request to disable ps_mode received. Disabling it.
[   11.002825] audit: type=1130 audit(1597908272.735:94): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user-runtime-dir@1000 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   11.016369] mwifiex_pcie 0000:02:00.0: Request to disable ps_mode received. Disabling it.
[   11.020358] audit: type=1101 audit(1597908272.752:95): pid=1151 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_tally2,pam_access,pam_unix,pam_permit,pam_time acct="raphael" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   11.020826] audit: type=1103 audit(1597908272.752:96): pid=1151 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=? acct="raphael" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
[   11.020975] audit: type=1006 audit(1597908272.752:97): pid=1151 uid=0 old-auid=4294967295 auid=1000 tty=(none) old-ses=4294967295 ses=3 res=1
[   11.024139] audit: type=1105 audit(1597908272.755:98): pid=1151 uid=0 auid=1000 ses=3 msg='op=PAM:session_open grantors=pam_loginuid,pam_loginuid,pam_keyinit,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env acct="raphael" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   13.732103] Bluetooth: RFCOMM TTY layer initialized
[   13.732111] Bluetooth: RFCOMM socket layer initialized
[   13.732119] Bluetooth: RFCOMM ver 1.11
[   15.766087] mwifiex_pcie 0000:02:00.0: Request to disable ps_mode received. Disabling it.
[   17.569700] mwifiex_pcie 0000:02:00.0: info: trying to associate to 'flow_5G' bssid 04:d9:f5:a1:b8:0c
[   17.672887] mwifiex_pcie 0000:02:00.0: info: associated to bssid 04:d9:f5:a1:b8:0c successfully
[   18.636905] IPv6: ADDRCONF(NETDEV_CHANGE): wlp2s0: link becomes ready
[   19.011929] kauditd_printk_skb: 11 callbacks suppressed
[   19.011932] audit: type=1131 audit(1597908280.742:110): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   20.673372] audit: type=1130 audit(1597908282.405:111): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   21.181101] audit: type=1131 audit(1597908282.912:112): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user@968 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   21.195974] audit: type=1131 audit(1597908282.929:113): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user-runtime-dir@968 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   22.681235] fuse: init (API version 7.31)
[   32.017077] audit: type=1131 audit(1597908293.749:114): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   35.674991] audit: type=1131 audit(1597908298.318:115): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   35.968907] audit: type=1334 audit(1597908298.615:116): prog-id=10 op=UNLOAD
[   35.968919] audit: type=1334 audit(1597908298.615:117): prog-id=9 op=UNLOAD

Surface Pro 2017 Module loaded but can't find anything related battery.

Hi qzed,

I just compiled your module with the 4.18.11 kernel (and of course all patches applied) and I can load the module just fine just as far as I can see there is nothing this module "does".

Checking dmesg for surface this is what I get:
[ 4.075932] surface_acpi: Microsoft Surface ACPI Driver version 0.1
[ 4.075980] surface_acpi: Attaching device MSHW0084
[ 4.076077] surface_acpi: Attaching device MSHW0091
[ 4.077009] surface_acpi: probe of INT3403:03 failed with error -22
[ 4.077013] surface_acpi: probe of INT3403:04 failed with error -22
[ 4.077021] surface_acpi: probe of INT3403:08 failed with error -22
[ 4.101880] surfacegen5_acpi_notify: loading out-of-tree module taints kernel.
[ 4.206001] surfacegen5_acpi_notify_ssh serial0-0: surfacegen5_acpi_notify_ssh_probe
[ 4.206340] surfacegen5_acpi_notify_ssh serial0-0: surfacegen5_ssh_setup_from_resource

Can you please let me know what I do wrong or if Surface Pro 2017 is not supported and that's why I don't see anything?

Thanks in advance!
Julius

Remove devices on detaching the Book clipboard

Detaching the clipboard currently causes some issues regarding proper de-initialization/re-initialization of devices attached to the base on the Surface Book 3. When a base detachment has been detected, these devices should be removed via the drivers and re-added on attachment.

Affected devices are

  • secondary/base battery
  • HID devices, specifically keyboard and touchpad

surface_sam: hps: using result of pci_enable_device() ?

When building with CONFIG_ENABLE_MUST_CHECK=y (y is the default value
but some distributions don't set), the compiler gives the following
warnings:

drivers/platform/x86/surface_sam/surface_sam_hps.c: In function ‘__shps_dgpu_rp_set_power_unlocked’:
drivers/platform/x86/surface_sam/surface_sam_hps.c:378:4: warning: ignoring return value of ‘pci_enable_device’, declared with attribute warn_unused_result [-Wunused-result]
  378 |    pci_enable_device(rp);
      |    ^~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/surface_sam/surface_sam_hps.c: In function ‘shps_dgpu_powered_on’:
drivers/platform/x86/surface_sam/surface_sam_hps.c:782:3: warning: ignoring return value of ‘pci_enable_device’, declared with attribute warn_unused_result [-Wunused-result]
  782 |   pci_enable_device(rp);
      |   ^~~~~~~~~~~~~~~~~~~~~

Looking at the other usages of pci_enable_device() in the Linux kernel,
many callers use the result. So, let's use the result here, too, like this?

diff --git a/drivers/platform/x86/surface_sam/surface_sam_hps.c b/drivers/platform/x86/surface_sam/surface_sam_hps.c
index 4fba5ee75a66..b5bd933f57e1 100644
--- a/drivers/platform/x86/surface_sam/surface_sam_hps.c
+++ b/drivers/platform/x86/surface_sam/surface_sam_hps.c
@@ -374,8 +374,11 @@ static int __shps_dgpu_rp_set_power_unlocked(struct platform_device *pdev, enum
 
                pci_restore_state(rp);
 
-               if (!pci_is_enabled(rp))
-                       pci_enable_device(rp);
+               if (!pci_is_enabled(rp)) {
+                       status = pci_enable_device(rp);
+                       if (status)
+                               return status;
+               }
 
                pci_set_master(rp);
                clear_bit(SHPS_STATE_BIT_RPPWRON_SYNC, &drvdata->state);
@@ -778,8 +781,11 @@ static int shps_dgpu_powered_on(struct platform_device *pdev)
        if (drvdata->dgpu_root_port_state)
                pci_load_and_free_saved_state(rp, &drvdata->dgpu_root_port_state);
        pci_restore_state(rp);
-       if (!pci_is_enabled(rp))
-               pci_enable_device(rp);
+       if (!pci_is_enabled(rp)) {
+               status = pci_enable_device(rp);
+               if (status)
+                       return status;
+       }
        pci_set_master(rp);
        dbg_dump_drvsta(pdev, "shps_dgpu_powered_on.2");
        dbg_dump_power_states(pdev, "shps_dgpu_powered_on.2");

That said, I'm not sure if returning without doing anything is OK or not
(error handlings? printing messages?). So, I'm glad if you can take a look
at this.

Issue with dgpu control on latest kernel

I recently installed Fedora 31 on my Surface Book 2 15".
After booting into the linux-surface kernel, most of the surface commands (as expected) work. However the dgpu control just gives me the following error:

[root@capefox 5.5.8-1.surface.fc31.x86_64]# surface dgpu get
Error: Cannot access device.
       No such file or directory (os error 2).
[root@capefox 5.5.8-1.surface.fc31.x86_64]# surface performance get
Performance-mode is 'Best Performance' (4)
[root@capefox 5.5.8-1.surface.fc31.x86_64]# surface status
       Device-Mode: Laptop
  Performance-Mode: Best Performance (4)

Looking at the repo, this seems to used to have been a seperate module, but that GitHub page now states it is completely integrated with the linux-surface project? Do I need to modprobe a certain module?

Bumblebeed daemon status

System info

Microsoft Surface Book 2
Operating System: Manjaro Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.8.8-arch1-1-surface
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8650U CPU @ 1.90GHz
Memory: 15.6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620

Context

I've followed your setup instructions. After the reboot step, I run sudo systemctl status bumblebeed. I get a message that I'm unsure of what it entails with respect to the system status and the usefulness of bumblebee.

...
Module 'bbswitch not found'
No switching method available. The dedicated card will always be on.
...

I saw in #28 that bbswitch is not working, but I'm also familiar with the surface control package, which allows me to turn on and off the dgpu manually.

Question

Could you please clarify the basic working process of surface dgpu + bumblebee + surface control + bbswitch with respect to the current recommended linux-surface system setup and state? Thanks!

Patches/port for 4.16

Hello,

I have 4.9 kernel that works really well on android x86 (here) (I'm not affiliated with TeamBilss)
I'm just wondering if it possible to port acpi_notify to 4.9. I was able to run the acpi_notify on androidx86 4.18.4 but without touch, screen rotation or vol-pwr buttons.

Sorry for interrupting

-Thamer

folders inside surface_aggregator are empty

after installing surface control and running surface status i get : Error: No devices found
also i tried running surface performance get and got this error :

Error: Failed to open performance mode device

Caused by:
    0: Could not access device "/sys/bus/surface_aggregator/devices/01:03:01:00:01"
    1: No such file or directory

after checking "/sys/bus/surface_aggregator" i found :
2 binary files ( uevent , drivers_probe )
2 empty folders ( devices , drivers )
1 empty text file ( drivers_autoprobe )

my device is surface pro 4 running manjaro gnome with the latest surface kernel ( 5.18 )
if there is anything missing or you have any quastion about how well my device is running linux, feel free to ask
thank you for your hard work in advance

[SP2017] Battery Indicator

Hello!

I'm new to Linux and I'm having troubles getting this module to work on a Surface Pro 2017 with a fresh install of Ubuntu 18.04 LTS. I've installed this precompiled kernel, which successfully gave me touch/pen/volume button support. Next, I tried to verify that the following configuration values are set:

CONFIG_SERIAL_DEV_BUS=y

CONFIG_SERIAL_DEV_CTRL_TTYPORT=y

I found that this was the case for the following files:

/boot/config-4.15.0-29-generic

/boot/config-4.15.0-43-generic

Are these the correct configuration files to be checking?

I then went on to make the module, and installed it using make dkms-install. I've also enabled the Battery Percentage option in Tweaks, but nothing has shown up in my Top Bar, even after reboot. It seems like the module is successfully running, since lsmod | grep 'surface' shows me surfacegen5_acpi is running. I've tried with and without blacklisting surface_acpi and surface_platform. I'm starting to run out of ideas, so any help would be greatly appreciated!

nvidia_uvm must be blacklisted to prevent dGPU from being on at boot

There's a kernel module nvidia_uvm that system76-power doesn't seem to blacklist and is missing from the wiki. On my SB2, if it's not blacklisted, the dGPU will always be on after rebooting and it's impossible to switch to the integrated GPU.

Side note: it seems like it's always impossible to switch back to the integrated GPU after switching to nvidia, compute, or hybrid. For a while I was able to switch back to the iGPU by calling modprobe -r on nvidia_uvm. However, when I could do this, I had the nvidia package installed. I uninstalled it since I already had nvidia-dkms installed and seem to have lost this ability. Reinstalling nvidia didn't help.

Surface Laptop 2: Keyboard not working

So I tried jakeday's repo for fixing the keyboard and nothing came out of that. I then found this repo in one of his issues tickets and tried installing it. Everything seemed to install and setup fine, but upon reboot, my keyboard still does not work. I'm running Linux Mint 19.1 on my Surface Laptop 2 and Secure Boot is off.

With instructions, I'm willing to test if needed!

Help Wanted: Improvements for the Surface Laptop Keyboard Driver

I'm currently cleaning up the Surface Aggregator Module drivers to eventually get them integrated into the upstream kernel. The HID/keyboard/touchpad driver needs a bit of re-work and I'd appreciate if any Surface Laptop 1, 2, or 3 or Surface Book 3 owners could run a couple of tests for me to figure out more details on the commands/protocol. This should also help finally getting the caps-lock led to work on the Surface Laptops 1 and 2.

Edit: I've received enough results for the part below, but there's still some things I'd like to figure out for the Surface Laptops 1 and 2 to get the caps-lock led working. See #51 (comment) on how you can help. You can ignore the rest of this comment.

Due to the interface being different, the commands I want you to run are separated in two categories: First, Surface Laptop 1 and 2, and second, Surface Laptop 3 and Surface Book 3. They are described below.

Before you can start, you'll need to

  1. Update to the latest linux-surface kernel (or if you're using this module via DKMS, update to the latest version in the master branch). Don't forget to reboot afterwards.
  2. Clone this repository (run git clone https://github.com/linux-surface/surface-aggregator-module.git) and change into its directory (cd surface-aggregator-module). If you've already cloned it, make sure it's up to date (run git pull inside the directory).
  3. Load the debug-interface by running modprobe surface_aggregator_cdev.
  4. Run the commands below, choosing the ones for your device. You'll need to run them as root (e.g. via sudo). If not stated otherwise, the commands should have an output. Please provide that (in association with the command you ran) or mention if it fails.

If you have a Surface Laptop 1 or 2, please run:

  • ./scripts/ssam/hid.py legacy-get-descriptor 0

    This should return the HID descriptor of the keyboard.

  • ./scripts/ssam/hid.py legacy-get-descriptor 1

    This should return the HID report descriptor of the keyboard.

  • ./scripts/ssam/hid.py legacy-get-descriptor 2

    This should return the HID device attributes of the keyboard.

  • ./scripts/ssam/hid.py legacy-get-feature-report 0

    This should return the main feature report of the keyboard.

  • ./scripts/ssam/hid.py legacy-set-capslock-led 1 and ./scripts/ssam/hid.py legacy-set-capslock-led 0

    This does not have any output. The first command should turn on the caps-lock led, the second command should turn it off. Confirmation on this would be great.

If you have a Surface Laptop 3 or Surface Book 3, please run:

  • ./scripts/ssam/hid.py hid-get-descriptor 1 0

    This should return the HID descriptor of the keyboard.

  • ./scripts/ssam/hid.py hid-get-descriptor 1 1

    This should return the HID report descriptor of the keyboard.

  • ./scripts/ssam/hid.py hid-get-descriptor 1 2

    This should return the HID device attributes of the keyboard.

Thanks!

Cc: @NickyTope, @archseer, @shieldwed, @fxgsell, @lecram1989, @sudosubin, @raphtlw, @cvandal, @steveniemitz

SB3: Unexpected result while enabling event source

Since upgrading my kernel to 5.8.5 I could no longer run make in the sb3-v3 branch and looked at latest commits, I realised that cleanup had been merged to master so have done a dkms-install on master branch.

I now get the following errors on boot and my battery status is no longer being reported, keyboard and trackpad work fine, clipboard detaches very slow.

~  dmesg | grep surface_sam
[    2.409294] surface_sam_ssh serial0-0: SAM controller version: 10.11.139
[    2.588543] surface_sam_ssh serial0-0: unexpected result while enabling event source: 0x01 (tc: 0x02, iid: 0x00, reg: 0x21)
[    2.588747] surface_sam_sid_battery: probe of 02:02:01:00 failed with error -71
[   32.470015] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x02, tc: 0x02, tid: 0x01, cid: 0x53, iid: 0x01)
[  175.327393] surface_sam_ssh serial0-0: event: unhandled event (rqid: 0x02, tc: 0x02, tid: 0x01, cid: 0x53, iid: 0x01)

~  acpi
Battery 0: Discharging, 0%, rate information unavailable
Battery 1: Full, 100%

[SB2] Implement clipboard detach events and handling thereof

On the SB2, clipboard detach events are being sent via the Surface Serial Hub (SSH) device. Allow handling of these events to

  • speed-up clipboard detaching (as this currently times out),
  • safely remove any USB device connected to the base, and
  • (maybe) prevent detaching at all (?).

Module doesn't work on openSUSE Tumbleweed due to downstream kernel compile option not satisifying requirements

Summary:

Module doesn't work on openSUSE Tumbleweed, because its kernel compile option

  • CONFIG_SERIAL_DEV_BUS is set to m
  • CONFIG_SERIAL_DEV_CTRL_TTYPORT doesnt exist

A feature request was submitted to distribution bug tracker, and the changes had been pushed to stable and master branches (as of 2021-02-15 09:01:25 UTC).
A new kernel build are made available to Tumbleweed repository after going through their OpenQA test, which usually takes about a week. However, those changes likely won't be available to Leap unless the next LTS kernel is released or a backport request is submitted.


surface linux kernel has no opensuse version, so instead of compiling the whole linux kernel i decided to install all the components individually. ipts and surface-gpe did work though but not sure why aggregator won't.
My device is surface pro 6. secure boot is enabled using microsoft & third party key. opensuse by default uses shim.

> uname -r
5.10.12-1-default

installed it via $ make dkms-install then manually loaded via

$ modprobe surface_perfmode; \
modprobe surface_aggregator; \
modprobe surface_acpi_notify; \
modprobe surface_aggregator_registry; \
modprobe surface_hid; \
modprobe surface_battery; \
modprobe surface_dtx; \
modprobe surface_aggregator_cdev

however battery status still won't display, even after rebooting.
dmesg shows "module verification failed", not sure if that caused the issue.

$ dmesg | grep surface
[    2.384087] integrity: Loaded X.509 cert 'Default Company Ltd: linux-surface: 24ef5c444499ba0aa6f2a8bea4258f065fea4ec6'
[   16.142523] surface_aggregator: loading out-of-tree module taints kernel.
[   16.142524] surface_aggregator: loading out-of-tree module taints kernel.
[   16.142617] surface_aggregator: module verification failed: signature and/or required key missing - tainting kernel
$ dmesg | grep acpi
[    0.028996] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.028997] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[    0.028998] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[    0.028999] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[    0.029000] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1])
[    0.029001] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1])
[    0.029002] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1])
[    0.029003] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1])
[    0.029004] ACPI: LAPIC_NMI (acpi_id[0x09] high edge lint[0x1])
[    0.029004] ACPI: LAPIC_NMI (acpi_id[0x0a] high edge lint[0x1])
[    0.029005] ACPI: LAPIC_NMI (acpi_id[0x0b] high edge lint[0x1])
[    0.029006] ACPI: LAPIC_NMI (acpi_id[0x0c] high edge lint[0x1])
[    0.029007] ACPI: LAPIC_NMI (acpi_id[0x0d] high edge lint[0x1])
[    0.029008] ACPI: LAPIC_NMI (acpi_id[0x0e] high edge lint[0x1])
[    0.029009] ACPI: LAPIC_NMI (acpi_id[0x0f] high edge lint[0x1])
[    0.029010] ACPI: LAPIC_NMI (acpi_id[0x10] high edge lint[0x1])
[    0.163732] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.296344] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
[    0.299662] acpi PNP0A08:00: _OSC: OS now controls [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
[    0.413437] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
$ ls /sys/bus/acpi/devices/
ACPI0003:00  INT3472:00   LNXPOWER:0d  PNP0C0F:01  device:1c  device:3f  device:62
ACPI000C:00  INT3472:01   LNXSYBUS:00  PNP0C0F:02  device:1d  device:40  device:63
ACPI000E:00  INT3472:02   LNXSYBUS:01  PNP0C0F:03  device:1e  device:41  device:64
INT0800:00   INT347A:00   LNXSYSTM:00  PNP0C0F:04  device:1f  device:42  device:65
INT0E0C:00   INT347E:00   LNXVIDEO:00  PNP0C0F:05  device:20  device:43  device:66
INT33A1:00   INT3F0D:00   MSHW0005:00  PNP0C0F:06  device:21  device:44  device:67
INT33BE:00   LNXCPU:00    MSHW0006:00  PNP0C0F:07  device:22  device:45  device:68
INT3400:00   LNXCPU:01    MSHW0008:00  device:00   device:23  device:46  device:69
INT3403:00   LNXCPU:02    MSHW0036:00  device:01   device:24  device:47  device:6a
INT3403:01   LNXCPU:03    MSHW0040:00  device:02   device:25  device:48  device:6b
INT3403:02   LNXCPU:04    MSHW0045:00  device:03   device:26  device:49  device:6c
INT3403:03   LNXCPU:05    MSHW0048:00  device:04   device:27  device:4a  device:6d
INT3403:04   LNXCPU:06    MSHW0084:00  device:05   device:28  device:4b  device:6e
INT3403:05   LNXCPU:07    MSHW0091:00  device:06   device:29  device:4c  device:6f
INT3403:06   LNXCPU:08    MSHW0102:00  device:07   device:2a  device:4d  device:70
INT3403:07   LNXCPU:09    MSHW0111:00  device:08   device:2b  device:4e  device:71
INT3403:08   LNXCPU:0a    MSHW0125:00  device:09   device:2c  device:4f  device:72
INT3403:09   LNXCPU:0b    MSHW0131:00  device:0a   device:2d  device:50  device:73
INT3403:0a   LNXCPU:0c    NTZ0412:00   device:0b   device:2e  device:51  device:74
INT3403:0b   LNXCPU:0d    PNP0000:00   device:0c   device:2f  device:52  device:75
INT3403:0c   LNXCPU:0e    PNP0100:00   device:0d   device:30  device:53  device:76
INT3403:0d   LNXCPU:0f    PNP0103:00   device:0e   device:31  device:54  device:77
INT3403:0e   LNXPOWER:00  PNP0A08:00   device:0f   device:32  device:55  device:78
INT3403:0f   LNXPOWER:01  PNP0B00:00   device:10   device:33  device:56  device:79
INT3403:10   LNXPOWER:02  PNP0C02:00   device:11   device:34  device:57  device:7a
INT3407:00   LNXPOWER:03  PNP0C02:01   device:12   device:35  device:58  device:7b
INT343D:00   LNXPOWER:04  PNP0C02:02   device:13   device:36  device:59  device:7c
INT3440:00   LNXPOWER:05  PNP0C02:03   device:14   device:37  device:5a  device:7d
INT3441:00   LNXPOWER:06  PNP0C02:04   device:15   device:38  device:5b  device:7e
INT3446:00   LNXPOWER:07  PNP0C02:05   device:16   device:39  device:5c
INT3447:00   LNXPOWER:08  PNP0C02:06   device:17   device:3a  device:5d
INT3449:00   LNXPOWER:09  PNP0C04:00   device:18   device:3b  device:5e
INT344A:00   LNXPOWER:0a  PNP0C0A:00   device:19   device:3c  device:5f
INT344B:00   LNXPOWER:0b  PNP0C0D:00   device:1a   device:3d  device:60
INT3470:00   LNXPOWER:0c  PNP0C0F:00   device:1b   device:3e  device:61

also, surface-control won't work.

$ surface status
Error: Cannot access device.
       No surface control device not found.

Ubuntu not installing properly on Surface Laptop 3

I just purchased SL3 and have tried to install Ubuntu but so far have been unsuccessful. Could someone please provide a step by step tutorial for beginners. I couldn't install Ubuntu 18.04, I manage to install 16.04 but the track pad and keyboard are not working, I've read numerous threads but I don't quite understand.

Strange trackpad behaviour on Surface Laptop 3 13"

First off, thanks very much for all your work on supporting these devices, much appreciated! 🙏

Summary

I am having some very strange trackpad behaviour, guessing it is related to performance modes

  1. Trackpad is extrememly jumpy under certain circumstances
    1. Fine when AC power is connected
    2. Fine when a logitech bluetooth mouse usb dongle is connected
      • Even when the mouse is off
    3. Fine when cpu is under load (all cores seems to be required)
  2. Whenever headphones are plugged in and playing audio, fan ramps up and stays up until audio stops playing (potentially unrelated)

Stopgap solution

Leave a wireless mouse dongle plugged in at all times lol

Details

`inxi -Fxxxza --no-host`

System:    Kernel: 5.4.2-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.4-x86_64 root=UUID=512d48b0-1886-4ada-8014-26a94a20dad9 rw quiet apparmor=1 
           security=apparmor udev.log_priority=3 reboot=pci 
           Desktop: Gnome 3.34.1 wm: gnome-shell dm: GDM 3.34.1 Distro: Manjaro Linux 
Machine:   Type: Laptop System: Microsoft product: Surface Laptop 3 
           v: 124I:00036T:000M:0300000D:0B:05F:1C:05P:48S:01E:0Y:0K:0U:02 serial: <filter> Chassis: type: 9 serial: <filter> 
           Mobo: Microsoft model: Surface Laptop 3 serial: <filter> UEFI: Microsoft v: 6.19.140 date: 08/21/2019 
Battery:   ID-1: BAT0 charge: 27.3 Wh condition: 47.9/45.8 Wh (105%) volts: 7.7/7.6 model: SMP M1087273 type: Li-ion 
           serial: <filter> status: Discharging cycles: 14 
CPU:       Topology: Quad Core model: Intel Core i7-1065G7 bits: 64 type: MT MCP arch: Ice Lake family: 6 model-id: 7E (126) 
           stepping: 5 microcode: 46 L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 23968 
           Speed: 616 MHz min/max: 400/3900 MHz Core speeds (MHz): 1: 616 2: 698 3: 583 4: 612 5: 677 6: 690 7: 615 8: 653 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel vendor: Microsoft driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:8a52 
           Display: wayland server: X.org 1.20.6 driver: i915 compositor: gnome-shell resolution: <xdpyinfo missing> 
           OpenGL: renderer: Mesa DRI Intel HD Graphics (Ice Lake 8x8 GT2) v: 4.5 Mesa 19.2.7 compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:34c8 
           Sound Server: ALSA v: k5.4.2-1-MANJARO 
Network:   Device-1: Intel driver: iwlwifi v: kernel port: 3000 bus ID: 00:14.3 chip ID: 8086:34f0 
           IF: wlp0s20f3 state: up mac: <filter> 
           IF-ID-1: docker0 state: down mac: <filter> 
Drives:    Local Storage: total: 238.47 GiB used: 37.46 GiB (15.7%) 
           ID-1: /dev/nvme0n1 vendor: Toshiba model: KBG40ZNS256G MEMORY size: 238.47 GiB block size: physical: 512 B 
           logical: 512 B speed: 31.6 Gb/s lanes: 4 serial: <filter> rev: AEMS0102 scheme: GPT 
Partition: ID-1: / raw size: 199.22 GiB size: 195.09 GiB (97.93%) used: 37.43 GiB (19.2%) fs: ext4 dev: /dev/nvme0n1p4 
Sensors:   System Temperatures: cpu: 34.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Info:      Processes: 247 Uptime: 3d 2h 30m Memory: 15.25 GiB used: 1.83 GiB (12.0%) Init: systemd v: 242 Compilers: 
           gcc: 9.2.0 Shell: fish v: 3.0.2 running in: gnome-terminal inxi: 3.0.37

dmesg unhandled power event
[36413.889754] surface_sam_ssh serial0-0: recv: received buffer (size: 12)
[36413.889757] recv: 00000000: 00 00 00 00 00 00 00 00 00 00 6b 63
[36414.033241] surface_sam_ssh serial0-0: recv: received buffer (size: 39)
[36414.033249] recv: 00000000: aa 55 80 1d 00 7d f0 f7 80 02 00 01 01 02 00 53
[36414.033252] recv: 00000010: 01 1c f1 01 00 4e 3d 01 00 65 00 43 1e 00 00 00
[36414.033254] recv: 00000020: 00 c8 32 00 00 8f ab
[36414.033277] surface_sam: power event (cid = 0x53)
[36414.033279] surface_sam: unhandled power event (cid = 0x53)
[36414.033290] surface_sam_ssh serial0-0: sending message
[36414.033292] send: 00000000: aa 55 40 00 00 7d 66 45 ff ff
[36415.263554] surface_sam_ssh serial0-0: recv: received buffer (size: 30)
[36415.263563] recv: 00000000: aa 55 00 14 00 7e 3a 84 80 15 00 02 00 15 00 00
[36415.263567] recv: 00000010: 01 00 52 00 00 00 00 00 00 00 00 00 6d 5b
[36415.338030] surface_sam_ssh serial0-0: recv: received buffer (size: 30)
[36415.338037] recv: 00000000: aa 55 00 14 00 7f 1b 94 80 15 00 02 00 15 00 00
[36415.338039] recv: 00000010: 01 00 00 00 00 00 00 00 00 00 00 00 6b 63

Tried

  1. All different combinations of Xorg / Wayland and libinput / synaptics
    • No effect, still laggy. Synaptics is the least bad, but still the same symptoms
  2. Setting the power mode to 4, as outlined in #18
    • (python script does not print anything when executed)
  3. Different kernels (5.4.1, 5.5rc)
    • Same behaviour on all others
    • 5.5 was not usable for other reasons, may try again in future and will update

Integration with the Linux kernel source tree

I'm working on enabling ACPI for NixOS on my SB2. To do so I want to integrate the code in module/ with the kernel source tree, perhaps as a patch. I don't have experience with kernel module development though, so I'm not sure what's required to do that. The main problem is that I don't know where I should put the code from module/ or what else I would have to change to get that code to build with the kernel. Is it easy to bundle the code in module/ into a patch?

Also works on Surface Pro 6 (2018)

First of all thank you for your great work.

This is not an issue, but rather an FYI: I just wanted to let you that this also works for Surface Pro 6 (2018).

Simply doing a sudo dpkg -i on the latest image, header, and libc-dev .deb files from your fork and adding the CONFIG_SERIAL_... values mentioned in the README to /etc/sysctl.conf (hopefully this is the right place to enter them 😅 ) worked.

Power event 0x53

On my Surface Pro 7, dmesg is flooded with the following lines:

surface_sam_sid_power: power event (cid = 0x53)
surface_sam_sid_power: unhandled power event (cid = 0x53)

Unable to drop a managed device link reference on v5.1.9

Unloading the module on v5.1.9 causes the following issue:

[  193.423821] ------------[ cut here ]------------
[  193.423823] Unable to drop a managed device link reference
[  193.423881] WARNING: CPU: 7 PID: 2615 at drivers/base/core.c:456 device_link_put_kref+0x30/0x40
[  193.423883] Modules linked in: surfacegen5_acpi(OE-) fuse rfcomm bnep btusb btrtl btbcm btintel bluetooth ecdh_generic crc16 snd_usb_audio snd_usbmidi_lib snd_rawmidi snd_seq_device sd_mod hid_sensor_rotation hid_sensor_gyro_3d hid_sensor_accel_3d hid_sensor_als hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio hid_sensor_hub intel_ishtp_hid cdc_ether usbnet r8152 mii 8021q garp mrp stp llc input_leds usbhid joydev mousedev intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel battery nls_iso8859_1 nls_cp437 kvm vfat fat snd_hda_codec_hdmi snd_soc_skl uas irqbypass usb_storage snd_soc_skl_ipc mwlwifi snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_soc_acpi_intel_match snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic mac80211 snd_soc_core ledtrig_audio crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel hid_multitouch snd_hda_codec hid_generic snd_hda_core 8250_dw
[  193.423978]  mwifiex_pcie intel_ipts mwifiex snd_hwdep iTCO_wdt iTCO_vendor_support gpio_keys aesni_intel ipu3_cio2 v4l2_fwnode videobuf2_dma_sg aes_x86_64 videobuf2_memops crypto_simd videobuf2_v4l2 cryptd videobuf2_common tpm_crb glue_helper snd_pcm cfg80211 intel_cstate intel_uncore intel_rapl_perf videodev snd_timer snd mei_me idma64 tpm_tis intel_ish_ipc intel_lpss_pci intel_xhci_usb_role_switch media soundcore rfkill mei i2c_i801 roles tpm_tis_core processor_thermal_device pcspkr intel_lpss intel_pch_thermal intel_soc_dts_iosf intel_ishtp surfacepro3_button tpm evdev rng_core mac_hid hid acpi_tad soc_button_array int3400_thermal acpi_thermal_rel int3403_thermal dptf_power int340x_thermal_zone sb2_shps(OE) pcc_cpufreq ac vboxnetflt(OE) vboxnetadp(OE) vboxpci(OE) vboxdrv(OE) vboxvideo(C) ttm vboxsf(OE) vboxguest sg scsi_mod crypto_user acpi_call(OE) ip_tables x_tables btrfs libcrc32c crc32c_generic xor raid6_pq xhci_pci crc32c_intel xhci_hcd i915 i2c_algo_bit cec drm_kms_helper
[  193.424080]  syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_agp intel_gtt agpgart [last unloaded: surfacegen5_acpi]
[  193.424095] CPU: 7 PID: 2615 Comm: rmmod Tainted: G        WC OE     5.1.9-surface-dev #159
[  193.424098] Hardware name: Microsoft Corporation Surface Book 2/Surface Book 2, BIOS 389.2370.769 10/02/2018
[  193.424104] RIP: 0010:device_link_put_kref+0x30/0x40
[  193.424107] Code: 47 34 01 74 19 48 8d 47 3c f0 ff 4f 3c 0f 88 4a c4 29 00 74 01 c3 48 89 c7 e9 0c f1 ff ff 48 c7 c7 88 b2 2f 83 e8 ea 1e ad ff <0f> 0b c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 53
[  193.424108] RSP: 0018:ffff9f598167be30 EFLAGS: 00010286
[  193.424110] RAX: 0000000000000000 RBX: ffff98ed18c61060 RCX: 0000000000000000
[  193.424111] RDX: 0000000000000007 RSI: 0000000000000082 RDI: 00000000ffffffff
[  193.424113] RBP: ffff98ed18c61060 R08: 000000000000077e R09: 0000000000000004
[  193.424114] R10: 0000000000000000 R11: 0000000000000001 R12: ffff98ecac512800
[  193.424115] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[  193.424117] FS:  00007efe1374e740(0000) GS:ffff98ed273c0000(0000) knlGS:0000000000000000
[  193.424120] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  193.424121] CR2: 000055df0c43c5d8 CR3: 0000000259236006 CR4: 00000000003606e0
[  193.424122] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  193.424123] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  193.424124] Call Trace:
[  193.424133]  device_link_del+0x22/0x40
[  193.424153]  surfacegen5_ec_consumer_remove+0x27/0x50 [surfacegen5_acpi]
[  193.424158]  surfacegen5_acpi_san_remove+0x9a/0xc0 [surfacegen5_acpi]
[  193.424164]  platform_drv_remove+0x25/0x40
[  193.424168]  device_release_driver_internal+0xe4/0x1d0
[  193.424171]  driver_detach+0x40/0x78
[  193.424174]  bus_remove_driver+0x74/0xc6
[  193.424179]  cleanup_module+0x30/0x45 [surfacegen5_acpi]
[  193.424188]  __se_sys_delete_module+0x1a2/0x300
[  193.424198]  do_syscall_64+0x5b/0x180
[  193.424204]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  193.424208] RIP: 0033:0x7efe1387587b
[  193.424211] Code: 73 01 c3 48 8b 0d 15 f6 0b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e5 f5 0b 00 f7 d8 64 89 01 48
[  193.424213] RSP: 002b:00007ffc6e36c558 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
[  193.424215] RAX: ffffffffffffffda RBX: 0000564f3aa2a760 RCX: 00007efe1387587b
[  193.424217] RDX: 000000000000000a RSI: 0000000000000800 RDI: 0000564f3aa2a7c8
[  193.424218] RBP: 0000000000000000 R08: 1999999999999999 R09: 0000000000000000
[  193.424219] R10: 00007efe138e9ac0 R11: 0000000000000206 R12: 00007ffc6e36c780
[  193.424221] R13: 00007ffc6e36d86f R14: 0000564f3aa2a260 R15: 0000564f3aa2a760
[  193.424225] ---[ end trace 465f4eda4684a854 ]---

the command surface dgpu set on doesn't actually turn on the gpu.

So I have the linux-surface 5.5.4-1 installed, along with nvidia-dkms. I use surface-control to turn on the dGPU but when I try to switch to the dgpu using optimus-manager, it doesn't work. I thought that maybe the dGPU isn't on and so when I do lspci | grep 'VGA', it only prints 00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07) 00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-LP Integrated Sensor Hub (rev 21)

Battery Charging Control (Thermals, ..?)

From https://gitter.im/linux-surface/support:

@y2kbugleung_twitter: Does linux or this kernel come with any kind of thermal control during charging? I am monitoring the charge with a meter. I can see the reading jummping from 2A and then 0A and then 2A repeatedly. When I switch to Windows, the reading keeps at 1.x A to 2A.

@y2kbugleung_twitter: 1st trial on Win: https://www.youtube.com/watch?v=t7pAqZ4tqFA
2nd trial on Ubuntu: https://www.youtube.com/watch?v=pRX04YIKmT8
3rd trial on Win: https://www.youtube.com/watch?v=PEY38BPwvec

make module error

Hi ,
Thank you so much for the work on the "power status" issue for the surface devices.
My device is surface 2017.
I get your precompiled kernel and did make . Unfortunately get error..
I am "passive" linux user , maybe I just did stupid mistake , could you please look in to this error ?
Thank you!

yo@yo-Surface-Pro:~/git/linux-surfacegen5-acpi/module$ sudo make
make -C /lib/modules/"4.18.20-surface+"/build M= modules
make[1]: Entering directory '/usr/src/linux-headers-4.18.20-surface+'
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/syscall_32.tbl', needed by 'arch/x86/include/generated/asm/syscalls_32.h'. Stop.
make[1]: *** [arch/x86/Makefile:255: archheaders] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.18.20-surface+'
make: *** [Makefile:23: all] Error 2

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.