A proposition for a fully intergrated kext for all Surface Pro hardwares

Overview

BigSurface

The name comes from macOS Big Sur. Big Sur + Surface -> Big Surface (LOL)

PS:If you have a better name, please let me know.

A proposition for a fully intergrated kext for all Surface Pro related hardwares

TODO

  • Surface Type Cover Done

    The code is based on VoodooI2CHID.kext, but added keyboard support.

  • Battery status--Surface Serial Hub Most Important

    See https://github.com/linux-surface/surface-aggregator-module. To obtain the battery readout, one needs to register the operation handler for _SAN device(called via _SAN.RQST) and send the request to SSH device. SSH is a UART controller, the low level uart operation(tx, rx) is needed to be completed. Thus an expert in UART development is needed. Other than that, the rest of the code is not hard to port, mainly how to encode and decode the request packages.

    The Surface Laptop and Surface Book things can be deleted.

  • Performance mode

    Depends on Surface Serial Hub driver

  • Buttons

    Surface onboard GPIO buttons. ACPI device name: MSBT HID:MSHW0040 Not finished yet.

    To drive it is quite simple, just register the corresponding GPIO interrupts and handle them.

  • Ambient Light Sensor

    ACPI device name: ACSD, attached under I2C4 The Linux source code is attached in the folder, just one source file, should be 'easy' to port.(Maybe we don't need gesture and proximity) Driver should attach to VoodooI2CDeviceNub and use it to perform I2C IO. See VoodooI2CSynaptics for code reference.

  • Cameras

    ACPI devices: CAMR,CAMF,CAM3(infrared camera) Corresponding device id: OV8865,OV5693,OV7251 Not so important, they use I2C to transfert data. Linux code available.

  • Touch Screen

    Device id: 0x34E4 Linux uses mei to communicate with the touch screen(ipts), don't know the equivalant thing on macOS nor how to communicate with it.

Issues
  • Request to add Keyboard Support for Surface laptop

    Request to add Keyboard Support for Surface laptop

    Hi, Can you please add the keyboard and trackpad support for surface laptop 3. Device configuration is nearly same as surface pro 7(compare ioreg), macOS runs very well on it. May be other surface laptop's have the same issue - everything works except keyboard and trackpad. Both keyboard & trackpad are connected with i2c >HID_device.

    Trackpad: HID\Target_KIP&Category_HID&Col01 HID\VID_045E&PID_09AF&Col01&UP:0001_U:0002 HID\VID_045E&UP:0001_U:0002 HID_DEVICE_SYSTEM_MOUSE HID_DEVICE_UP:0001_U:0002 HID_DEVICE

    Keyboard: HID\Target_KIP&Category_HID&Col01 HID\VID_045E&PID_09AE&Col01&UP:0001_U:0006 HID\VID_045E&UP:0001_U:0006 HID_DEVICE_SYSTEM_KEYBOARD HID_DEVICE_UP:0001_U:0006 HID_DEVICE

    I also found that someone has prepared 2 keyboard commits to add, but finally not added -https://github.com/VoodooI2C/VoodooI2CHID/pull/3 . At least if you can add this 2 commits and give a try if they works (You will find me here, if you need to test it). Thank you ioreg surface laptop3.zip

    opened by plsh2me 88
  • Battery Support not working on SP6

    Battery Support not working on SP6

    Hi,

    I have just installed the latest Kext along with the supplied SSDT.

    It seems that it's not working as it's stuck in "charging" mode.

    Please let me know if you need anything from me to help you support the SP6.

    Thanks, Best Regards

    opened by therealjbenam 76
  • Hardware buttons

    Hardware buttons

    Hey there. First of all, I would like to congratulate you on your project and the endeavour you are about to take.

    I know that Hackintoshing a Surface can sometimes be very tricky.

    That being said:

    I came across your project while Googling for fixes for the cameras on the Surface Pro under a Hackintosh setup.

    I just wanted to lend out my help and let you know that I fixed the Hardware button issue (Power button and the two volume buttons) by editing my dumped DSDT.aml and then patching it with the corresponding code.

    First I injected this in my DSDT.aml using MaciASL's latest version (https://github.com/acidanthera/MaciASL/releases):

    #Maintained by: RehabMan for: ACPIKeyboard.kext #patch.txt

    #This patch serves to provide a catalyst to load ACPIKeyboard.kext #and it also provides a sink to send notifications to in #order to send messages to the kext to simulate keystrokes.

    into device label RMKB remove_entry; into definitionblock code_regex . insert begin Device (RMKB)\n {\n Name(_HID, "RMKB0000")\n }\n end;

    Then, after saving it, I re-opened it and saved this to it:

    into method label _Q52 replace_content begin // Volume-up pressed\n Notify(\RMKB, 0x1148)\n end;

    into method label _Q53 replace_content begin // Volume-up released\n Notify(\RMKB, 0x1248)\n end;

    into method label _Q54 replace_content begin // Volume-down pressed\n Notify(\RMKB, 0x1149)\n end;

    into method label _Q55 replace_content begin // Volume-down released\n Notify(\RMKB, 0x1249)\n end;

    into method label _Q60 replace_content begin //Power button pressed\n Notify(\RMKB, 0x117f)\n end;

    into method label _Q61 replace_content begin // Power button released\n Notify(\RMKB, 0x127f)\n end;

    I then proceeded to get the ACPIKeyboard.kext from https://bitbucket.org/RehabMan/os-x-acpi-keyboard/downloads/RehabMan-ACPIKeyboard-2015-1230.zip

    Then I placed it under Kexts on my OC folder (using OpenCore 0.7.0) and then edited the config.plist to include it.

    My source for this was: https://www.programmersought.com/article/9099709695/

    Hope this helps with your project and saves you some trouble.

    opened by billabongbruno 33
  • Workout on Surface Touch Screen (not an issue)

    Workout on Surface Touch Screen (not an issue)

    @Xiashangning Hi dear, First I am thankful to you for your dedication and giving time out of your academic busyness. Anyway I am curious to know - when you are planning to work on touchscreen driver?

    Thank you

    opened by plsh2me 20
  • Support 10.14 Mojave on Surface Pro 6

    Support 10.14 Mojave on Surface Pro 6

    Hi, I've tried to install the kexts in OC, however somehow the kexts seems not properly loaded. May I ask if these kexts only works on Big Sur? Really would like to have the battery indicator works. Many thanks.

    opened by stedio 16
  • Proposal to fix power management during sleep

    Proposal to fix power management during sleep

    Hi Xiashangning,

    I believe I have come across another issue that may need to be solved with this project. I believe that the SP7 is incapable of entering into an S3 state during sleep in macOS. The CPU never ceases during sleep, which draws tons of power - not ideal for the battery size in these machines. I have tried diagnosing this on my own for three weeks, and in that time several experienced people on the Hackintosh discord tried and failed to find the root cause.

    Have you gotten sleep to work, as in the CPU turns off? If not, do you think it is something this project needs to patch as well?

    opened by sauregurke 16
  • [Discussion] Surface Ambient Light Sensor

    [Discussion] Surface Ambient Light Sensor

    Right now the ALS branch implements the functionality of the Ambient Light Sensor(ACSD) on Surface series. However it is not usable yet. Its readout is only valid when hot reboot from Windows(200-400 depends on light conditions). Cold boot will result in a readout of only 0-3 lux. This issue is opened for the discussion of exploring the right initialization sequence of it. It is an APDS9960 device and the datasheet it here. https://cdn.sparkfun.com/datasheets/Sensors/Proximity/apds9960.pdf You can consult to my driver's source code and try to modify it, mainly the initialization part happens in initDevice() Anyone who wants to experience the light sensor functionality can switch to ALS branch, copy Lilu and VirtualSMC's debug version under Dependencies folder and compile it.

    opened by Xiashangning 15
  • macOS Monterey Support?

    macOS Monterey Support?

    With the BigSurface, the touchpad seems only partially working on Monterey(Can't use gestures on Touchpad) But on BigSur it works perfect on my Surface (However, some people say it doesn't work)

    opened by jackjack1-su 13
  • Trackpad not working properly on 10.15.7

    Trackpad not working properly on 10.15.7

    Running with OpenCore on 10.15.7 with BigSurface on a Surface Pro 6.

    • Trackpad is usable as a mouse and can scroll, however clicking on things doesn't work as expected (clicking a folder in Finder doesn't open it, but displays information about the folder)
    • In System Preferences, under Trackpad, it shows "No trackpad"
    opened by emiyl 12
  • Surface Book 3 - Touchscreen

    Surface Book 3 - Touchscreen

    Hi, Love your work.

    Previous kext works perfectly on my Surface Book 3 bringing keyboard and touchpad plus everything else to my laptop, however when I tried to use the new kext it breaks the keyboard and touchpad, and Touchscreen still does not work.

    Thank you

    opened by MetalChris87 11
  • Potential incompatibility with certain Surface Pro 7 units

    Potential incompatibility with certain Surface Pro 7 units

    Hi Ziashangning, I would like to thank you for all of the hard work you have done on this project, in particular with the addition of battery support. However, after running many tests with my config, I can't seem to get anything to work with version 4 of the kext.

    As a matter of fact, on version 3, my type cover, trackpad and ALS were working (see attached files for IOReg and dmesg readings), although macOS did not seem to respond to the output of the ALS driver. I assumed I had something wrong with my config, and as finals were coming up, I let it be for then.

    However, with version 4... everything seems to be broken. The ambient light driver doesn't seem to be loaded at all -- "sudo kextstat | grep -i Big" returns nothing, and there is no dmesg logs for BigSurface itself, see attached file -- plus the voodooinput kext is not loaded and therefore the trackpad is not working either. I understand that the voodooinput and voodooI2CController kexts are identical in version 4 and version 3, however VoodooGPIO has been upgraded to version 1.20 from 1.1, plus VoodooSerial has been added.

    In version 4, VoodooI2CController, VoodooSerial and VoodooGPIO are confirmed to be loaded, but VoodooInput does not load or attach, neither does BigSurface itself.

    In version 3, BigSurface and its three plugins are loaded and working. On my machine, the ambient light sensor driver works and puts out values as shown by attached dmesg file, however macOS doesn't respond. As this is less important than battery readouts, we can ignore it for now if you'd like.

    TL;DR the following issues are present in Version 4 of BigSurface, on my machine:

    • BigSurface itself is not loading - therefore ALS driver is not working;
    • VoodooInput is not loading, therefore trackpad is no longer working.

    I have attached IORegs from my system for both versions, as well as the output of "sudo dmesg | grep Light" for both versions, named accordingly. Additionally I have included my config with irrelevant parts stripped in case I am missing a kext or something like that - I do have SSDT-SURFACE.aml enabled in my config and it is present in my ACPI folder.

    Any help would be greatly appreciated - more likely than not I am forgetting something, in which case I apologize. I have a SP7, i5-1035G4, and a model 1725 type cover. Please let me know if you need anything else.

    version3grepsurfaceambientlight.txt ^^this has most of the output stripped away as it is unnecessary. this is just to show that BigSurface version 3 is working, as the ALS driver puts out values (in dmesg). Version 3 working trackpad.ioreg.zip

    version 4 broken trackpad.ioreg.zip version4grepLight.txt

    config.plist.zip

    opened by sauregurke 11
  • Keyboard for the surface laptop 1?

    Keyboard for the surface laptop 1?

    Hey, I was just wondering if you have any plans on supporting the surface laptop 1 9d27? The last time I tested this, absolutely nothing changed (keyboard didn't work and battery readout wasn't functional).

    As you said in my other issue, battery readout has been resolved so I'll test this - does keyboard input work as well?

    opened by SmartBoy84 3
Releases(v6-touchscreen)
  • v6-touchscreen(Jun 21, 2022)

    As the title suggests, now touch screen & stylus are fully supported on Surface series.

    Only tested on SP7, should works on newer devices. need PCI device id for SP6 and former devices to work properly. Post an issue and I will make it compatible to your devices :)

    However, it should be paired with a user space daemon to process touch & stylus input. Check my IPTSDaemon repo for detailed information on installing it.

    The SSDT patch is NECESSARY, otherwise the kext will cause a kernel panic.

    Source code(tar.gz)
    Source code(zip)
    BigSurface.zip(226.83 KB)
    SSDT-SURFACE.aml(208 bytes)
  • v5-sl3support(May 20, 2022)

    Optimised existing code Fixed serval bugs Solved the issue that the power button fails to respond after wakeup. Now all buttons work properly all the time. Improved SurfaceSerialHub speed and robustness Add keyboard & touchpad support for Surface Laptop3 devices

    Note: Even though SL3 users can use their builtin keyboard and touchpad now, they CANNOT wake up the system by keyboard or touchpad (No solution).

    Source code(tar.gz)
    Source code(zip)
    BigSurface.zip(197.06 KB)
  • v4-battery(Jan 3, 2022)

    Surface Pro's battery supported SurfaceSerialHub implemented SurfaceLaptop's keyboard & touchpad can be supported. (all preliminary drivers are done by me, only the realisation of a SurfaceSerialHub client is sufficient)

    Tested on SP7

    Problem: I failed to register interrupt for UART device (UA00), irq on Windows and Linux is 20, right now a timer is used so it might consume more energy.

    Any suggestion to ameliorate the code is welcomed

    Source code(tar.gz)
    Source code(zip)
    BigSurface.kext.zip(182.04 KB)
    SSDT-SURFACE.zip(507 bytes)
  • v3-ALS(Nov 20, 2021)

    • Add support for Microsoft Surface Pro Ambient Light Sensor Thanks @llccd
      • You can set baseline of ALI in info.plist, the calculation is base_ali+ALI value from the sensor, this is designed to prevent the screen from becoming too dim. We don not fully understand the machanism of macOS's converting ALI to screen brightness level, so further tuning is needed and WELCOMED.
    • Fixed Typecover issue in macOS Monterey
    • Improved Surface Button response and deleted unnecessary code.
    Source code(tar.gz)
    Source code(zip)
    BigSurface.kext.zip(146.98 KB)
  • v2-Buttons(Oct 27, 2021)

  • v1-Typecover(Jun 29, 2021)

JeVois-Pro People Counter : Implement people counter on JeVois-Pro Deep Learning Smart Camera

JeVois-Pro People Counter Refer to the OpenCV People Counter article to implement a people counter on the JeVois-Pro Deep Learning Smart Camera. First

On-Device AI Co., Ltd. 1 Nov 10, 2021
Isotropic Remeshing of Triangulated Surface

Isotropic Remesher Isotropic Remeshing of Triangulated Surface Overview This repository implement the five steps of Isotropic Remeshing described in t

Jeremy HU 45 Jun 7, 2022
Contour mapping and 3D surface modeling app

QuikGrid v5.4 for 64-bit editions of MS Windows Contour mapping and 3D surface modeling app A 64-Bit Windows installer for QuikGrid can be found in th

Stephen Ferrell 2 Apr 15, 2022
Wayfire plugin for handling touchpad gestures globally in a layer-shell surface

wf-globalgestures Global touchpad gestures plugin for Wayfire: implements a special protocol (also in this repo) that lets clients request that a part

null 4 Jan 18, 2022
CAFLOOD 2D surface flow (flood) simulator with two-way coupling to other simulators

CAFLOOD FLUIDIT This is an improved version of the latest published open source version of University of Exeter's CAFLOOD cellular automata based 2D f

Fluidit LTD 1 Dec 23, 2021
White paper describing the Autodesk Standard Surface shader.

Autodesk Standard Surface A white paper specifying an uber surface shader that aims to provide a material representation capable of accurately modelin

Autodesk 304 Jun 4, 2022
Make Epsilon Great again - Project Mu UEFI Firmware for Surface Duo (First Generation) Devices

Project Mu UEFI Implementation for Surface Duo Build Quick notes for building: Use Ubuntu 20.04 x64 Generate ACPI tables with IASL Follow this quick d

WOA Project 48 Jun 30, 2022
Physically-based GPU and CPU ray-tracer emerging on a surface

etx-tracer Physically-based GPU and CPU ray-tracer emerging on a surface. Features Vertex Connection and Merging algorithm (CPU and GPU); Full-spectra

Serhii Rieznik 215 Jun 22, 2022
A CAF rebased kernel for Mi 9 & RedMi K20 Pro MIUI 12.5

Linux kernel ============ This file was moved to Documentation/admin-guide/README.rst Please notice that there are several guides for kernel develop

Stephen Sin 60 Jun 16, 2022
Device configuration for the Redmi Note 10 Pro / Max

Device configuration for the Redmi Note 10 Pro / Pro Max Copyright (C) 2021 ArrowOS The Redmi Note 10 Pro / Pro Max (sweet) is a mid-range smartphone

ArrowOS-Devices 21 May 28, 2022
Delta Kernel for Redmi Note 10 Pro (Max) (sweet/sweetin)

Linux kernel ============ This file was moved to Documentation/admin-guide/README.rst Please notice that there are several guides for kernel develop

Static Design Studio 12 Mar 19, 2022
split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support.

split89 keyboard - a 3d printed 89 key split TKL keyboard base powered by ATmega32U4 Pro Micro controllers with QMK Configurator support. This keyboar

null 42 May 10, 2022
IDA Pro key checker tool

IDA Key Checker IDA Pro (6.x-7.x) key checker tool Usage A list of available options can be retrieved using: ida_key_checker --help Arguments: Option

null 53 Jun 20, 2022
Macro keypad and rotary input based on the ATmega32U4 Pro Micro board

JC-Pro-Macro Macro keypad and rotary input based on the ATmega32U4 Pro Micro Videos: Development: https://www.youtube.com/watch?v=g-XJLiv03rI Assembly

Jeremy S Cook 12 Jun 8, 2022
User space configuration tool for RME HDSPe MADI / AES / RayDAT / AIO and AIO Pro cards driven by the snd-hdspe driver.

hdspeconf User space configuration tool for RME HDSPe MADI / AES / RayDAT / AIO and AIO Pro cards, driven by the snd-hdspe driver. Building hdspeconf

Philippe Bekaert 9 Jun 15, 2022
A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Using Pro-micro control.

N.A.G.E.K.I. A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Using Pro-micro control. 中文版

NanaNana 27 Jun 17, 2022
A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Using Pro-micro control.

N.A.G.E.K.I. PLEASE CHECK Main Project A cheap,simple,Ongeki controller Use Keyboard Simulation and Mouse Simulation to controller the ongeki game. Us

NanaNana 11 Dec 30, 2021
Common Device Source For Xiaomi Redmi Note 5 Pro (whyred)

The Redmi Note 5 Pro (codenamed "whyred") are high-end mid-range smartphones from Xiaomi announced and released in February 2018. Device specification

Yash Biyani 0 Dec 22, 2021
Pixel 6 and Pixel 6 Pro kernel sources.

How do I submit patches to Android Common Kernels BEST: Make all of your changes to upstream Linux. If appropriate, backport to the stable releases. T

GrapheneOS 12 Jun 15, 2022