Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Releases: WOA-Project/SurfaceDuo-Drivers

Version 2301.67

21 Jan 22:51
Compare
Choose a tag to compare

This update introduces a number of bug fixes and improvements. Key changes include:

Screenshot (10)

  • Update Signatures to the new "Windows On Andromeda" (2023) certificate chain
  • Enable Secure Boot Enablement Support with matching UEFI pair.
  • Surface Duo can now boot Windows with Secure Boot enabled provided you use a SecureBoot uefi variant.

*You will need to currently disable the second Surface Touch Pen Processor device in device manager otherwise you will only be able to use the right side of the device to interact and not the left side

Full Changelog: 2301.32...2301.67

Version 2301.32

11 Jan 23:42
Compare
Choose a tag to compare

This update introduces a number of bug fixes and improvements. Key changes include:

  • Enhanced support for Surface Duo 2
  • Introducing Touch support for Surface Duo 2*
  • Introducing USBFn/MTP support for Surface Duo 2
  • Bug fixes and improvements for Surface Duo 1 charging stack
  • Enables retrieving manufacturing date for both batteries via powercfg /batteryreport for Surface Duo 1
  • Enables new sensors for Surface Duo 1
  • Enables inbox Windows OS Posture Sensor for Surface Duo 1
  • Addresses an issue impacting panel refresh performance for Surface Duo 1
  • General Updates to Touch Firmwares and Components for both devices
  • Workarounds issues related to WMILIB.SYS BSODs and "Other User" issue in the Out of box experience

A more detailed changelog will be made available later in the week.

*You will need to currently disable the second Surface Touch Pen Processor device in device manager otherwise you will only be able to use the right side of the device to interact and not the left side

Full Changelog: 2212.12...2301.32

Version 2212.12 (B)

07 Dec 23:55
Compare
Choose a tag to compare

This update addresses specific reliability issues present in version 2212.12. For a complete list of changes present in this update please refer to the version 2212.12 changelog.

This update must be paired with Surface Duo UEFI version 2212.12 (B).

NB: This update may not work on Surface Duo 2 currently. If you want to check out Duo 2 right now refer to the 2211.43 update paired with the 2211.43 UEFI.

NB: As always, in order to update you only need to run Driverupdater again as per changelog. You never need to reinstall Windows; Please make sure you use the latest driverupdater version (latest one released this week)

NB: If you still want to reinstall windows regardless of above notice, you only need to format the Windows partition again within mass storage as NTFS (and only this one) and then re-apply the wim file, and run driverupdater. Nothing else is required.

NB: As usual, observing graphical glitches during boot is both expected and normal currently, and only requires you to close the device and open it again (fold/unfold).

NB: Windows Setup is a delicate operation, please do not force reboot the device even if you think it is hanging, (especially if you see such graphical glitch, just get rid of it). If it feels like it's taking some time, just please patiently wait. A moving spinner is a happy spinner, do not force reboot the device or you'll end up with a broken windows installation anyway

Last NB: Some people may get a BSOD about the WMILIB.SYS driver (which is a Microsoft Windows Inbox Driver). While the root cause of this issue at the moment is not known, you may fix it by simply not having a cable plugged in, or, uninstalling the SurfaceBattery.inf driver using DISM (or using Driverupdater by simply removing such driver from the release zip beforehand)

[Pulled] Version 2212.12

04 Dec 17:48
Compare
Choose a tag to compare
Pre-release

Surface Duo Drivers BSP - Version 2212.12

Released: 12/4/2022 07:00 PM UTC+1

NOTE: This Update has been pulled due to BSOD issues. A new update has been made available with some of the core issues fixed. Please use the newer version. (https://github.com/WOA-Project/SurfaceDuo-Drivers/releases/tag/2212.12b)

Quality: Preview

Surface Duo Dual Screen Windows

General information

You can view compatibility for this release, along with important information and what works, and what doesn't at this link: https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/Status.md

Release notes


Important information

  • ⚠️⚠️ IMPORTANT: This version of the drivers needs to be paired with UEFI version greater or equal to 2212.12. ⚠️⚠️
  • The issue affecting broken installations using Driver Updater has finally been fixed! Please make sure you download the latest version of driver updater released on 12/4/2022!

Changelog

Surface Duo 1

What's new?

Screenshot (43)

  • Charging finally works under Windows! This is a first version of the charging stack, as a result a few things are currently limited. The charging input is limited to low current for safety measures while work is ongoing. Big thanks to @MollySophia for helping in this area!

image

  • Adds a driver for the Qualcomm SMB1380 Secondary Charger

  • Adds a driver for the Qualcomm PM8150B Fuel Gauge and Primary Charger

CABL

image

  • Adds support for Duo's Pedometer Sensor.

  • Adds support for Duo's Light Fusion Sensor.

New Tablet Experience FRE

Tablet Settings

New Tablet Experience

MTP

  • Addresses an issue preventing USB Function Mode from working. This issue mainly affected USB File Transfers using a computer.

  • Updates Surface Duo firmware to the latest Android OTA release of November

  • Long forgotten bug fixes & enhancements

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Improvements to CPU core clock frequency will come in an upcoming release

Surface Duo 2

  • Addresses an issue preventing USB Function Mode from working. This issue mainly affected USB File Transfers using a computer.

  • Updates Surface Duo 2 firmware to the latest Android OTA release of November

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Sensor Calibration Provisioning (Mandatory)

In order to get most sensors currently working, some manual steps are required.
Please follow the steps described at https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/InstallWindows-SurfaceDuo1.md#temporary-and-optional-copy-over-calibration-filesconfiguration-files-for-the-sensors

It may also be possible to provision it using data from the SFPD partition exposed in windows. This manual step will not be required in future releases.

Known issues

  • Automatic Orientation only works for the left panel, using the right panel orientation sensor
  • USB Dongles that are not externally powered may not currently work
  • USB C Billboard devices will not currently work
  • External Display Stream support will not currently work
  • Additional information provided by the posture sensor is currently not available for public consumption, this includes peek events.
  • Digitizers will not react to the device being folded over
  • Displays will not react to the device being folded over most of the time
  • Physical device data is incorrect
  • Digitizers aren't calibrated correctly

Accessing Foldable Sensors from your applications

In order to currently access the sensor data given by the foldable sensors, you need to use the following apis:

  • Windows.Devices.Sensors.HingeAngleSensor*
  • Windows.Internal.Devices.Sensors.FlipSensor* (2)
  • Windows.Internal.System.TwoPanelHingeFolioPostureDevice* (2)

(2): These apis require the use of an externally sourced winmd available from https://github.com/ADeltaX/InternalWinMD/blob/master/%23winmd/Windows.Internal.Devices.Sensors.winmd

In the future, further apis will be functional (specifically under the Windows.System.Preview namespace). Consider this an early "thing".

The following API may be used to determine if your app is used on a dual screen device: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.windowingenvironment.getdisplayregions?view=winrt-22621

The following API may be used to determine on which display region your app is currently being shown: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.getdisplayregions?view=winrt-22621

The following API may be used to move your application to the other display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmoverelativetodisplayregion?view=winrt-22621

THe following API may be used to move your application to a specific display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmovetodisplayregion?view=winrt-22621

The following API may be used for spanning purposes: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestsize?view=winrt-22621

The Windowing Environment for Windows Desktop editions (outside of tablet mode) is Overlapped. Tiled is used for Tablet Mode and Windows Core OS's ModernPC.

Code Samples

#include <iostream>
#include <windows.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Internal.Devices.Sensors.h>
#include <winrt/Windows.Internal.System.h>
#include <winrt/Windows.System.Preview.h>
#include <winrt/Windows.UI.WindowManagement.h>
#include <winrt/Windows.Foundation.Collections.h>

using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Internal::Devices::Sensors;
using namespace Windows::Internal::System;
using namespace Windows::System::Preview;
using namespace Windows::UI::WindowManagement;
using namespace Windows::Foundation::Collections;

VOID OnFoldSensorReadingChanged(FoldSensor const&, FoldSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Fold sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Fold started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Fold stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Fold cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Fold unknown\n" << std::endl;
			break;
		}

		for (auto panel : args.Reading().ContributingPanel())
		{
			printf("Panel: %s\n", to_string(panel).c_str());
		}
		
		std::cout << "Initial angle " << args.Reading().InitialAngle() << std::endl;
		std::cout << "Final angle " << args.Reading().FinalAngle() << std::endl;
		
		switch (args.Reading().FoldType())
		{
		case FoldType::Closing:
			std::cout << "Fold Closing\n" << std::endl;
			break;
		case FoldType::Opening:
			std::cout << "Fold Opening\n" << std::endl;
			break;
		case FoldType::NotDetected:
			std::cout << "Fold NotDetected\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID PrintFolioDetails(TwoPanelFolioHingeDevicePostureReading const& args)
{
	try {
		std::cout << "Panel1 " << args.Panel1Id().c_str() << "\n" << std::endl;
		std::cout << "Panel2 " << args.Panel2Id().c_str() << "\n" << std::endl;

		std::cout << "Panel1 Orientation " << (int)args.Panel1Orientation() << "\n" << std::endl;
		std::cout << "Panel2 Orientation " << (int)args.Panel2O...
Read more

Version 2211.43

13 Nov 20:31
Compare
Choose a tag to compare

Surface Duo Drivers BSP - Version 2211.43

Released: 11/13/2022 12:30 PM UTC-7

Quality: Preview

Surface Duo Dual Screen Windows

General information

You can view compatibility for this release, along with important information and what works, and what doesn't at this link: https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/Status.md

Release notes


Important information

  • ⚠️⚠️ IMPORTANT: This version of the drivers needs to be paired with UEFI version greater or equal to 2211.16. ⚠️⚠️
  • ⚠️⚠️ IMPORTANT: If you get a BSOD/Bugcheck "SOC_SUBSYSTEM_FAILURE" when upgrading, you will have to reinstall Windows ⚠️⚠️

Changelog

Surface Duo 1

  • Addresses all known issues currently known with the Device crashing during sleep with a workaround built into the Power Engine Plugin driver.

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Improvements to CPU core clock frequency will come in an upcoming release

Surface Duo 2

  • Addresses an issue preventing first boot from working. (Disables UCSI USB stack for now)

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Sensor Calibration Provisioning (Mandatory)

In order to get most sensors currently working, some manual steps are required.
Please follow the steps described at https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/InstallWindows.md#temporary-copy-over-calibration-filesconfiguration-files-for-the-sensors

It may also be possible to provision it using data from the SFPD partition exposed in windows. This manual step will not be required in future releases.

Known issues

  • Automatic Orientation only works for the left panel, using the right panel orientation sensor
  • USB Dongles that are not externally powered may not currently work
  • USB C Billboard devices will not currently work
  • External Display Stream support will not currently work
  • Additional information provided by the posture sensor is currently not available for public consumption, this includes peek events.
  • Digitizers will not react to the device being folded over
  • Displays will not react to the device being folded over most of the time
  • Physical device data is incorrect
  • Digitizers aren't calibrated correctly

Accessing Foldable Sensors from your applications

In order to currently access the sensor data given by the foldable sensors, you need to use the following apis:

  • Windows.Devices.Sensors.HingeAngleSensor*
  • Windows.Internal.Devices.Sensors.FlipSensor* (2)
  • Windows.Internal.System.TwoPanelHingeFolioPostureDevice* (2)

(2): These apis require the use of an externally sourced winmd available from https://github.com/ADeltaX/InternalWinMD/blob/master/%23winmd/Windows.Internal.Devices.Sensors.winmd

In the future, further apis will be functional (specifically under the Windows.System.Preview namespace). Consider this an early "thing".

The following API may be used to determine if your app is used on a dual screen device: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.windowingenvironment.getdisplayregions?view=winrt-22621

The following API may be used to determine on which display region your app is currently being shown: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.getdisplayregions?view=winrt-22621

The following API may be used to move your application to the other display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmoverelativetodisplayregion?view=winrt-22621

THe following API may be used to move your application to a specific display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmovetodisplayregion?view=winrt-22621

The following API may be used for spanning purposes: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestsize?view=winrt-22621

The Windowing Environment for Windows Desktop editions (outside of tablet mode) is Overlapped. Tiled is used for Tablet Mode and Windows Core OS's ModernPC.

Code Samples

#include <iostream>
#include <windows.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Internal.Devices.Sensors.h>
#include <winrt/Windows.Internal.System.h>
#include <winrt/Windows.System.Preview.h>
#include <winrt/Windows.UI.WindowManagement.h>
#include <winrt/Windows.Foundation.Collections.h>

using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Internal::Devices::Sensors;
using namespace Windows::Internal::System;
using namespace Windows::System::Preview;
using namespace Windows::UI::WindowManagement;
using namespace Windows::Foundation::Collections;

VOID OnFoldSensorReadingChanged(FoldSensor const&, FoldSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Fold sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Fold started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Fold stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Fold cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Fold unknown\n" << std::endl;
			break;
		}

		for (auto panel : args.Reading().ContributingPanel())
		{
			printf("Panel: %s\n", to_string(panel).c_str());
		}
		
		std::cout << "Initial angle " << args.Reading().InitialAngle() << std::endl;
		std::cout << "Final angle " << args.Reading().FinalAngle() << std::endl;
		
		switch (args.Reading().FoldType())
		{
		case FoldType::Closing:
			std::cout << "Fold Closing\n" << std::endl;
			break;
		case FoldType::Opening:
			std::cout << "Fold Opening\n" << std::endl;
			break;
		case FoldType::NotDetected:
			std::cout << "Fold NotDetected\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID PrintFolioDetails(TwoPanelFolioHingeDevicePostureReading const& args)
{
	try {
		std::cout << "Panel1 " << args.Panel1Id().c_str() << "\n" << std::endl;
		std::cout << "Panel2 " << args.Panel2Id().c_str() << "\n" << std::endl;

		std::cout << "Panel1 Orientation " << (int)args.Panel1Orientation() << "\n" << std::endl;
		std::cout << "Panel2 Orientation " << (int)args.Panel2Orientation() << "\n" << std::endl;

		switch (args.Hinge1State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge1State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge1State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge1State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge1State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge1State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge1State Full\n" << std::endl;
			break;
		}

		switch (args.Hinge2State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge2State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge2State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge2State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge2State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge2State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge2State Full\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID OnFolioPostureChanged(TwoPanelFolioHingeDevicePosture const&, TwoPanelFolioHingeDevicePostureReadingChangedEventArgs const& args)
{
	try {
		printf("Folio posture sensor state changed.\n");
		PrintFolioDetails(args.Reading());
	}
	catch (...) {}
}

VOID OnSensorReadingChanged(FlipSensor const&, FlipSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Flip sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Flip started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Flip stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Flip cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Flip unknown\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

int main()
{
    init_apartment();
	printf("Trying to get flip sensor.\n");
	try {
		FlipSensor flip = FlipSensor::GetDefaultAsync().get();
		if (flip == nullptr)
		{
			printf("Flip sensor not found.\n");
		}
		else
		{
			printf("Starting listening session for flip sensor.\n");
			flip.ReadingChanged(On...
Read more

Version 2211.20

06 Nov 20:50
Compare
Choose a tag to compare

Surface Duo Drivers BSP - Version 2211.20

Released: 11/06/2022 01:00 PM UTC-7

Quality: Preview

Surface Duo Dual Screen Windows

General information

You can view compatibility for this release, along with important information and what works, and what doesn't at this link: https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/Status.md

Release notes


Important information

  • ⚠️⚠️ IMPORTANT: This version of the drivers needs to be paired with UEFI version greater or equal to 2211.16. ⚠️⚠️
  • ⚠️⚠️ IMPORTANT: If you get a BSOD/Bugcheck "SOC_SUBSYSTEM_FAILURE" when upgrading, you will have to reinstall Windows ⚠️⚠️

Changelog

Surface Duo 1

  • Enables the Secure Processing Unit, you will be able to find it under Device Manager -> Security Devices

  • Preliminary work to Enable WiFi AX

  • Addresses an issue with WLAN Extension settings for China not being applied correctly

  • Renames a few drivers in Device Manager for better readability

  • Improvements to the USB-C Driver Stack: Addresses an issue with the Display Port Phy reg settings not being applied, addresses an issue leading to the state machine often getting stuck. Addresses an issue with the interface between PEP and the TypeC port manager being broken. (External displays do not work still)

  • Enables basic USB functionality when the device has no driver installed

  • Enables the device to boot into Windows with no driver installed

  • Updates Device IDs when plugging in the device into a PC to match Surface Duo device product identifier

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Improvements to CPU core clock frequency will come in an upcoming release

Surface Duo 2

  • Enables the Secure Processing Unit, you will be able to find it under Device Manager -> Security Devices

  • Updates Device IDs when plugging in the device into a PC to match Surface Duo device product identifier

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Sensor Calibration Provisioning (Mandatory)

In order to get most sensors currently working, some manual steps are required.
Please follow the steps described at https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/InstallWindows.md#temporary-copy-over-calibration-filesconfiguration-files-for-the-sensors

It may also be possible to provision it using data from the SFPD partition exposed in windows. This manual step will not be required in future releases.

Known issues

  • Automatic Orientation only works for the left panel, using the right panel orientation sensor
  • USB Dongles that are not externally powered may not currently work
  • USB C Billboard devices will not currently work
  • External Display Stream support will not currently work
  • Additional information provided by the posture sensor is currently not available for public consumption, this includes peek events.
  • Digitizers will not react to the device being folded over
  • Displays will not react to the device being folded over most of the time
  • Physical device data is incorrect
  • Graphical Rendering Issues

Accessing Foldable Sensors from your applications

In order to currently access the sensor data given by the foldable sensors, you need to use the following apis:

  • Windows.Devices.Sensors.HingeAngleSensor*
  • Windows.Internal.Devices.Sensors.FlipSensor* (2)
  • Windows.Internal.System.TwoPanelHingeFolioPostureDevice* (2)

(2): These apis require the use of an externally sourced winmd available from https://github.com/ADeltaX/InternalWinMD/blob/master/%23winmd/Windows.Internal.Devices.Sensors.winmd

In the future, further apis will be functional (specifically under the Windows.System.Preview namespace). Consider this an early "thing".

The following API may be used to determine if your app is used on a dual screen device: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.windowingenvironment.getdisplayregions?view=winrt-22621

The following API may be used to determine on which display region your app is currently being shown: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.getdisplayregions?view=winrt-22621

The following API may be used to move your application to the other display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmoverelativetodisplayregion?view=winrt-22621

THe following API may be used to move your application to a specific display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmovetodisplayregion?view=winrt-22621

The following API may be used for spanning purposes: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestsize?view=winrt-22621

The Windowing Environment for Windows Desktop editions (outside of tablet mode) is Overlapped. Tiled is used for Tablet Mode and Windows Core OS's ModernPC.

Code Samples

#include <iostream>
#include <windows.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Internal.Devices.Sensors.h>
#include <winrt/Windows.Internal.System.h>
#include <winrt/Windows.System.Preview.h>
#include <winrt/Windows.UI.WindowManagement.h>
#include <winrt/Windows.Foundation.Collections.h>

using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Internal::Devices::Sensors;
using namespace Windows::Internal::System;
using namespace Windows::System::Preview;
using namespace Windows::UI::WindowManagement;
using namespace Windows::Foundation::Collections;

VOID OnFoldSensorReadingChanged(FoldSensor const&, FoldSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Fold sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Fold started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Fold stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Fold cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Fold unknown\n" << std::endl;
			break;
		}

		for (auto panel : args.Reading().ContributingPanel())
		{
			printf("Panel: %s\n", to_string(panel).c_str());
		}
		
		std::cout << "Initial angle " << args.Reading().InitialAngle() << std::endl;
		std::cout << "Final angle " << args.Reading().FinalAngle() << std::endl;
		
		switch (args.Reading().FoldType())
		{
		case FoldType::Closing:
			std::cout << "Fold Closing\n" << std::endl;
			break;
		case FoldType::Opening:
			std::cout << "Fold Opening\n" << std::endl;
			break;
		case FoldType::NotDetected:
			std::cout << "Fold NotDetected\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID PrintFolioDetails(TwoPanelFolioHingeDevicePostureReading const& args)
{
	try {
		std::cout << "Panel1 " << args.Panel1Id().c_str() << "\n" << std::endl;
		std::cout << "Panel2 " << args.Panel2Id().c_str() << "\n" << std::endl;

		std::cout << "Panel1 Orientation " << (int)args.Panel1Orientation() << "\n" << std::endl;
		std::cout << "Panel2 Orientation " << (int)args.Panel2Orientation() << "\n" << std::endl;

		switch (args.Hinge1State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge1State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge1State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge1State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge1State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge1State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge1State Full\n" << std::endl;
			break;
		}

		switch (args.Hinge2State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge2State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge2State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge2State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge2State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge2State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge2State Full\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID OnFolioPostureChanged(TwoPanelFolioHingeDevicePosture const&, TwoPanelFolioHingeDevicePostureReadingChangedEventArgs const& args)
{
	try {
		printf("Folio posture sensor state changed.\n");
		PrintFolioDetails(args.Reading());
	}
	catch (...) {}
}

VOID OnSensorReadingChanged(FlipSensor const&, FlipSensorRead...
Read more

Version 2211.16

05 Nov 21:25
Compare
Choose a tag to compare

Surface Duo Drivers BSP - Version 2211.16

Released: 11/05/2022 02:00 PM UTC-7

Quality: Preview

Surface Duo Dual Screen Windows

General information

You can view compatibility for this release, along with important information and what works, and what doesn't at this link: https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/Status.md

Release notes


Important information

  • This release is mainly for Surface Duo 2 users

  • ⚠️⚠️ IMPORTANT: This version of the drivers needs to be paired with UEFI version greater or equal to 2211.16. ⚠️⚠️

  • ⚠️⚠️ IMPORTANT: If you get a BSOD/Bugcheck "SOC_SUBSYSTEM_FAILURE" when upgrading, you will have to reinstall Windows ⚠️⚠️

Changelog

Surface Duo 1

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Improvements to CPU core clock frequency will come in an upcoming release

Surface Duo 2

  • Initial supported release (more documentation update is to come)

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Sensor Calibration Provisioning (Mandatory)

In order to get most sensors currently working, some manual steps are required.
Please follow the steps described at https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/InstallWindows.md#temporary-copy-over-calibration-filesconfiguration-files-for-the-sensors

It may also be possible to provision it using data from the SFPD partition exposed in windows. This manual step will not be required in future releases.

Known issues

  • Automatic Orientation only works for the left panel, using the right panel orientation sensor
  • USB Dongles that are not externally powered may not currently work
  • USB C Billboard devices will not currently work
  • External Display Stream support will not currently work
  • Additional information provided by the posture sensor is currently not available for public consumption, this includes peek events.
  • Digitizers will not react to the device being folded over
  • Displays will not react to the device being folded over most of the time
  • Physical device data is incorrect
  • Graphical Rendering Issues

Accessing Foldable Sensors from your applications

In order to currently access the sensor data given by the foldable sensors, you need to use the following apis:

  • Windows.Devices.Sensors.HingeAngleSensor*
  • Windows.Internal.Devices.Sensors.FlipSensor* (2)
  • Windows.Internal.System.TwoPanelHingeFolioPostureDevice* (2)

(2): These apis require the use of an externally sourced winmd available from https://github.com/ADeltaX/InternalWinMD/blob/master/%23winmd/Windows.Internal.Devices.Sensors.winmd

In the future, further apis will be functional (specifically under the Windows.System.Preview namespace). Consider this an early "thing".

The following API may be used to determine if your app is used on a dual screen device: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.windowingenvironment.getdisplayregions?view=winrt-22621

The following API may be used to determine on which display region your app is currently being shown: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.getdisplayregions?view=winrt-22621

The following API may be used to move your application to the other display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmoverelativetodisplayregion?view=winrt-22621

THe following API may be used to move your application to a specific display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmovetodisplayregion?view=winrt-22621

The following API may be used for spanning purposes: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestsize?view=winrt-22621

The Windowing Environment for Windows Desktop editions (outside of tablet mode) is Overlapped. Tiled is used for Tablet Mode and Windows Core OS's ModernPC.

Code Samples

#include <iostream>
#include <windows.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Internal.Devices.Sensors.h>
#include <winrt/Windows.Internal.System.h>
#include <winrt/Windows.System.Preview.h>
#include <winrt/Windows.UI.WindowManagement.h>
#include <winrt/Windows.Foundation.Collections.h>

using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Internal::Devices::Sensors;
using namespace Windows::Internal::System;
using namespace Windows::System::Preview;
using namespace Windows::UI::WindowManagement;
using namespace Windows::Foundation::Collections;

VOID OnFoldSensorReadingChanged(FoldSensor const&, FoldSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Fold sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Fold started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Fold stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Fold cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Fold unknown\n" << std::endl;
			break;
		}

		for (auto panel : args.Reading().ContributingPanel())
		{
			printf("Panel: %s\n", to_string(panel).c_str());
		}
		
		std::cout << "Initial angle " << args.Reading().InitialAngle() << std::endl;
		std::cout << "Final angle " << args.Reading().FinalAngle() << std::endl;
		
		switch (args.Reading().FoldType())
		{
		case FoldType::Closing:
			std::cout << "Fold Closing\n" << std::endl;
			break;
		case FoldType::Opening:
			std::cout << "Fold Opening\n" << std::endl;
			break;
		case FoldType::NotDetected:
			std::cout << "Fold NotDetected\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID PrintFolioDetails(TwoPanelFolioHingeDevicePostureReading const& args)
{
	try {
		std::cout << "Panel1 " << args.Panel1Id().c_str() << "\n" << std::endl;
		std::cout << "Panel2 " << args.Panel2Id().c_str() << "\n" << std::endl;

		std::cout << "Panel1 Orientation " << (int)args.Panel1Orientation() << "\n" << std::endl;
		std::cout << "Panel2 Orientation " << (int)args.Panel2Orientation() << "\n" << std::endl;

		switch (args.Hinge1State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge1State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge1State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge1State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge1State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge1State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge1State Full\n" << std::endl;
			break;
		}

		switch (args.Hinge2State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge2State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge2State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge2State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge2State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge2State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge2State Full\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID OnFolioPostureChanged(TwoPanelFolioHingeDevicePosture const&, TwoPanelFolioHingeDevicePostureReadingChangedEventArgs const& args)
{
	try {
		printf("Folio posture sensor state changed.\n");
		PrintFolioDetails(args.Reading());
	}
	catch (...) {}
}

VOID OnSensorReadingChanged(FlipSensor const&, FlipSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Flip sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Flip started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Flip stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Flip cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Flip unknown\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

int main()
{
    init_apartment();
	printf("Trying to get flip sensor.\n");
	try {
		FlipSensor flip = FlipSensor::GetDefaultAsync().get();
		if (flip == nullptr)
		{
			printf("Flip sensor not found.\n");
		}
		else
		{
			printf("Starting listening session for flip sensor.\n");
			flip.ReadingChanged(OnSensorReadingChanged);
		}
		printf("Press any key to stop\n");
		std::cin.get();
	}
	catch (...) {}

	printf("Trying to get...
Read more

Version 2211.1

31 Oct 23:03
Compare
Choose a tag to compare

Surface Duo Drivers BSP - Version 2211.1

Released: 11/01/2022 00:00 AM UTC+1

Quality: Preview

Surface Duo Dual Screen Windows

General information

You can view compatibility for this release, along with important information and what works, and what doesn't at this link: https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/Status.md

Release notes


Important information

  • This release is mainly for Surface Duo 2 users

  • ⚠️⚠️ IMPORTANT: This version of the drivers needs to be paired with UEFI version greater or equal to 2211.01. ⚠️⚠️

  • ⚠️⚠️ IMPORTANT: If you get a BSOD/Bugcheck "SOC_SUBSYSTEM_FAILURE" when upgrading, you will have to reinstall Windows ⚠️⚠️

  • ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

  • ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️You cannot update an older installation to this update. A reinstall is required⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

  • ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

Changelog

Surface Duo 1

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Improvements to CPU core clock frequency will come in an upcoming release

Surface Duo 2

  • PEP, PMIC LEICA, GPU, Touch, Buttons, FLASH Light, USB C, XHCI, USBFN, ADC, GLINK, PMICGLINK, GPU, Panel, NFC (WIP), TrEE, IPA, GSI, REMOTEFS, Subsys, PIL, SK, TSENS, QUP, GPI, SPI, UART, BT, I2C enablement

  • Some Subsystems start on Surface Duo 2 now as well (Sensors, Camera DSP, Neural Processing Unit, Secure Processor)

  • GPU device is now exposed to the OS. GPU Driver is work in progress.

  • Touch is now exposed to the OS but not yet functional (Work in progress)

  • Complete overhaul of the thermal sensor / management subsystem

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Sensor Calibration Provisioning (Mandatory)

In order to get most sensors currently working, some manual steps are required.
Please follow the steps described at https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/InstallWindows.md#temporary-copy-over-calibration-filesconfiguration-files-for-the-sensors

It may also be possible to provision it using data from the SFPD partition exposed in windows. This manual step will not be required in future releases.

Known issues

  • Automatic Orientation only works for the left panel, using the right panel orientation sensor
  • USB Dongles that are not externally powered may not currently work
  • USB C Billboard devices will not currently work
  • External Display Stream support will not currently work
  • Additional information provided by the posture sensor is currently not available for public consumption, this includes peek events.
  • Digitizers will not react to the device being folded over
  • Displays will not react to the device being folded over most of the time
  • Physical device data is incorrect
  • Graphical Rendering Issues

Accessing Foldable Sensors from your applications

In order to currently access the sensor data given by the foldable sensors, you need to use the following apis:

  • Windows.Devices.Sensors.HingeAngleSensor*
  • Windows.Internal.Devices.Sensors.FlipSensor* (2)
  • Windows.Internal.System.TwoPanelHingeFolioPostureDevice* (2)

(2): These apis require the use of an externally sourced winmd available from https://github.com/ADeltaX/InternalWinMD/blob/master/%23winmd/Windows.Internal.Devices.Sensors.winmd

In the future, further apis will be functional (specifically under the Windows.System.Preview namespace). Consider this an early "thing".

The following API may be used to determine if your app is used on a dual screen device: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.windowingenvironment.getdisplayregions?view=winrt-22621

The following API may be used to determine on which display region your app is currently being shown: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.getdisplayregions?view=winrt-22621

The following API may be used to move your application to the other display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmoverelativetodisplayregion?view=winrt-22621

THe following API may be used to move your application to a specific display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmovetodisplayregion?view=winrt-22621

The following API may be used for spanning purposes: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestsize?view=winrt-22621

The Windowing Environment for Windows Desktop editions (outside of tablet mode) is Overlapped. Tiled is used for Tablet Mode and Windows Core OS's ModernPC.

Code Samples

#include <iostream>
#include <windows.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Internal.Devices.Sensors.h>
#include <winrt/Windows.Internal.System.h>
#include <winrt/Windows.System.Preview.h>
#include <winrt/Windows.UI.WindowManagement.h>
#include <winrt/Windows.Foundation.Collections.h>

using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Internal::Devices::Sensors;
using namespace Windows::Internal::System;
using namespace Windows::System::Preview;
using namespace Windows::UI::WindowManagement;
using namespace Windows::Foundation::Collections;

VOID OnFoldSensorReadingChanged(FoldSensor const&, FoldSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Fold sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Fold started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Fold stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Fold cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Fold unknown\n" << std::endl;
			break;
		}

		for (auto panel : args.Reading().ContributingPanel())
		{
			printf("Panel: %s\n", to_string(panel).c_str());
		}
		
		std::cout << "Initial angle " << args.Reading().InitialAngle() << std::endl;
		std::cout << "Final angle " << args.Reading().FinalAngle() << std::endl;
		
		switch (args.Reading().FoldType())
		{
		case FoldType::Closing:
			std::cout << "Fold Closing\n" << std::endl;
			break;
		case FoldType::Opening:
			std::cout << "Fold Opening\n" << std::endl;
			break;
		case FoldType::NotDetected:
			std::cout << "Fold NotDetected\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID PrintFolioDetails(TwoPanelFolioHingeDevicePostureReading const& args)
{
	try {
		std::cout << "Panel1 " << args.Panel1Id().c_str() << "\n" << std::endl;
		std::cout << "Panel2 " << args.Panel2Id().c_str() << "\n" << std::endl;

		std::cout << "Panel1 Orientation " << (int)args.Panel1Orientation() << "\n" << std::endl;
		std::cout << "Panel2 Orientation " << (int)args.Panel2Orientation() << "\n" << std::endl;

		switch (args.Hinge1State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge1State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge1State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge1State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge1State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge1State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge1State Full\n" << std::endl;
			break;
		}

		switch (args.Hinge2State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge2State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge2State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge2State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge2State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge2State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge2State Full\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID OnFolioPostureChanged(TwoPanelFolioHingeDevicePosture const&, TwoPanelFolioHingeDevicePostureReadingChangedEventArgs const& args)
{
	try {
		printf("Folio posture sensor state changed.\n");
		PrintFolioDetails(args.Reading());
	}
	catch (...) {}
}

VOID OnSensorReadingChanged(FlipSensor const&, FlipSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Flip sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Flip started\n" << std:...
Read more

Version 2210.80

25 Oct 22:13
Compare
Choose a tag to compare

Surface Duo Drivers BSP - Version 2210.80

Released: 10/26/2022 00:00 AM UTC+2

Quality: Preview

Surface Duo Dual Screen Windows

General information

You can view compatibility for this release, along with important information and what works, and what doesn't at this link: https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/Status.md

Release notes


Important information

  • ⚠️⚠️ IMPORTANT: This version of the drivers needs to be paired with UEFI version greater or equal to 2210.80. ⚠️⚠️
  • ⚠️⚠️ IMPORTANT: If you get a BSOD/Bugcheck "SOC_SUBSYSTEM_FAILURE" when upgrading, you will have to reinstall Windows ⚠️⚠️
  • ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
  • ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️You cannot update an older installation to this update. A reinstall is required⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
  • ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

Changelog

Surface Duo 1

  • Complete Touch stack update. Should resolve a lot of issues regarding touch responsiveness, pen pairing.

  • Updates Firmware packages for both Surface Slim Pen 1 and Surface Slim Pen 2

  • Core Surface System drivers updates (General bug fixes)

  • Core Surface Duo 1 Firmware Update (LA.2.0.1 -> LA.2.0.2):

  • Improves device stability with Video Encoding and Video Decoding

  • Updates to Carrier Specific modem settings, should improve VoLTE and LTE registration on some networks

  • ADSP firmware update for audio, improves audio codec support for bluetooth

  • Sensor firmware update, inherits all changes brought by the Android 12L update

  • CDSP firmware update, inherits all changes brought by the Android 12L update

  • WLAN firmware update, improves device stability and fixes an issue with the device crashing when seeing a WiFi 6E network in range

  • WDSP Firmware update, improvements to the Codec IC for Audio

  • SPSS firmware update, improvements to the SoC Security Processor Unit (SPU)

  • GPU Shader firmware update.

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Improvements to CPU core clock frequency will come in an upcoming release

Surface Duo 2

  • Complete Core driver system update. I have no idea what's new anymore there is just too much to list them all. Still nothing to share.
  • This update requires updated UEFI builds available on the SurfaceDuoPkg and is required to boot Windows from now on
  • Updates to touch driver stack
  • Added support for PM8350B and PMR735B PMICs found on Surface Duo 2
  • Updates to core system firmware files are coming at a later date

Sensor Calibration Provisioning (Mandatory)

In order to get most sensors currently working, some manual steps are required.
Please follow the steps described at https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/InstallWindows.md#temporary-copy-over-calibration-filesconfiguration-files-for-the-sensors

It may also be possible to provision it using data from the SFPD partition exposed in windows. This manual step will not be required in future releases.

Known issues

  • Automatic Orientation only works for the left panel, using the right panel orientation sensor
  • USB Dongles that are not externally powered may not currently work
  • USB C Billboard devices will not currently work
  • External Display Stream support will not currently work
  • Additional information provided by the posture sensor is currently not available for public consumption, this includes peek events.
  • Digitizers will not react to the device being folded over
  • Displays will not react to the device being folded over most of the time
  • Physical device data is incorrect
  • Graphical Rendering Issues

Accessing Foldable Sensors from your applications

In order to currently access the sensor data given by the foldable sensors, you need to use the following apis:

  • Windows.Devices.Sensors.HingeAngleSensor*
  • Windows.Internal.Devices.Sensors.FlipSensor* (2)
  • Windows.Internal.System.TwoPanelHingeFolioPostureDevice* (2)

(2): These apis require the use of an externally sourced winmd available from https://github.com/ADeltaX/InternalWinMD/blob/master/%23winmd/Windows.Internal.Devices.Sensors.winmd

In the future, further apis will be functional (specifically under the Windows.System.Preview namespace). Consider this an early "thing".

The following API may be used to determine if your app is used on a dual screen device: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.windowingenvironment.getdisplayregions?view=winrt-22621

The following API may be used to determine on which display region your app is currently being shown: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.getdisplayregions?view=winrt-22621

The following API may be used to move your application to the other display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmoverelativetodisplayregion?view=winrt-22621

THe following API may be used to move your application to a specific display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmovetodisplayregion?view=winrt-22621

The following API may be used for spanning purposes: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestsize?view=winrt-22621

The Windowing Environment for Windows Desktop editions (outside of tablet mode) is Overlapped. Tiled is used for Tablet Mode and Windows Core OS's ModernPC.

Code Samples

#include <iostream>
#include <windows.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Internal.Devices.Sensors.h>
#include <winrt/Windows.Internal.System.h>
#include <winrt/Windows.System.Preview.h>
#include <winrt/Windows.UI.WindowManagement.h>
#include <winrt/Windows.Foundation.Collections.h>

using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Internal::Devices::Sensors;
using namespace Windows::Internal::System;
using namespace Windows::System::Preview;
using namespace Windows::UI::WindowManagement;
using namespace Windows::Foundation::Collections;

VOID OnFoldSensorReadingChanged(FoldSensor const&, FoldSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Fold sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Fold started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Fold stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Fold cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Fold unknown\n" << std::endl;
			break;
		}

		for (auto panel : args.Reading().ContributingPanel())
		{
			printf("Panel: %s\n", to_string(panel).c_str());
		}
		
		std::cout << "Initial angle " << args.Reading().InitialAngle() << std::endl;
		std::cout << "Final angle " << args.Reading().FinalAngle() << std::endl;
		
		switch (args.Reading().FoldType())
		{
		case FoldType::Closing:
			std::cout << "Fold Closing\n" << std::endl;
			break;
		case FoldType::Opening:
			std::cout << "Fold Opening\n" << std::endl;
			break;
		case FoldType::NotDetected:
			std::cout << "Fold NotDetected\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID PrintFolioDetails(TwoPanelFolioHingeDevicePostureReading const& args)
{
	try {
		std::cout << "Panel1 " << args.Panel1Id().c_str() << "\n" << std::endl;
		std::cout << "Panel2 " << args.Panel2Id().c_str() << "\n" << std::endl;

		std::cout << "Panel1 Orientation " << (int)args.Panel1Orientation() << "\n" << std::endl;
		std::cout << "Panel2 Orientation " << (int)args.Panel2Orientation() << "\n" << std::endl;

		switch (args.Hinge1State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge1State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge1State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge1State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge1State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge1State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge1State Full\n" << std::endl;
			break;
		}

		switch (args.Hinge2State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge2State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge2State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge2State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge2State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge2State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge2State Full\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID OnFoli...
Read more

Version 2210.67

20 Oct 22:33
Compare
Choose a tag to compare

Surface Duo Drivers BSP - Version 2210.67

Released: 10/21/2022 00:00 AM UTC+2

Quality: Preview

Surface Duo Dual Screen Windows

General information

You can view compatibility for this release, along with important information and what works, and what doesn't at this link: https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/Status.md

Release notes


Important information

  • ⚠️⚠️ IMPORTANT: This version of the drivers needs to be paired with UEFI version greater or equal to 2210.67. ⚠️⚠️
  • ⚠️⚠️ IMPORTANT: If you get a BSOD/Bugcheck "SOC_SUBSYSTEM_FAILURE" when upgrading, you will have to reinstall Windows ⚠️⚠️

Changelog

  • Introduces More Device specific drivers for Surface Duo 2. None of it is ready yet.

  • Enables Audio DSP Subsystem for Surface Duo 1 users. Key features available today with this update:

  • USB Analog Audio Dongles

  • Bluetooth Audio

  • Mic array (headset)

  • Mic array (external)

  • Mic array (earpiece)

  • Spatial Audio support depending on the device orientation

  • Resolves an issue with broken Audio Codec chip support

  • Workarounds an issue with Speaker Amplifier IC not coming online for now (this means main device speakers still do not work unfortunately)

  • Resolves an additional issue that could have led to the device crashing during sleep.

  • Call provisioning is work in progress, if calls do not work for you at the moment, you may need to provision the call functionality manually. (Same as on Lumia 950s: https://woa-project.github.io/LumiaWOA/guides/ican0/, value is not different between 950s and Duo either, so if you already have such value, you're good to go, this is temporary!)

Improvements to CPU core clock frequency will come in an upcoming release

Sensor Calibration Provisioning (Mandatory)

In order to get most sensors currently working, some manual steps are required.
Please follow the steps described at https://github.com/WOA-Project/SurfaceDuo-Guides/blob/main/InstallWindows.md#temporary-copy-over-calibration-filesconfiguration-files-for-the-sensors

It may also be possible to provision it using data from the SFPD partition exposed in windows. This manual step will not be required in future releases.

Known issues

  • Automatic Orientation only works for the left panel, using the right panel orientation sensor
  • USB Dongles that are not externally powered may not currently work
  • USB C Billboard devices will not currently work
  • External Display Stream support will not currently work
  • Additional information provided by the posture sensor is currently not available for public consumption, this includes peek events.
  • Digitizers will not react to the device being folded over
  • Displays will not react to the device being folded over most of the time
  • Physical device data is incorrect
  • Graphical Rendering Issues

Accessing Foldable Sensors from your applications

In order to currently access the sensor data given by the foldable sensors, you need to use the following apis:

  • Windows.Devices.Sensors.HingeAngleSensor*
  • Windows.Internal.Devices.Sensors.FlipSensor* (2)
  • Windows.Internal.System.TwoPanelHingeFolioPostureDevice* (2)

(2): These apis require the use of an externally sourced winmd available from https://github.com/ADeltaX/InternalWinMD/blob/master/%23winmd/Windows.Internal.Devices.Sensors.winmd

In the future, further apis will be functional (specifically under the Windows.System.Preview namespace). Consider this an early "thing".

The following API may be used to determine if your app is used on a dual screen device: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.windowingenvironment.getdisplayregions?view=winrt-22621

The following API may be used to determine on which display region your app is currently being shown: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.getdisplayregions?view=winrt-22621

The following API may be used to move your application to the other display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmoverelativetodisplayregion?view=winrt-22621

THe following API may be used to move your application to a specific display: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestmovetodisplayregion?view=winrt-22621

The following API may be used for spanning purposes: https://docs.microsoft.com/en-us/uwp/api/windows.ui.windowmanagement.appwindow.requestsize?view=winrt-22621

The Windowing Environment for Windows Desktop editions (outside of tablet mode) is Overlapped. Tiled is used for Tablet Mode and Windows Core OS's ModernPC.

Code Samples

#include <iostream>
#include <windows.h>
#include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Internal.Devices.Sensors.h>
#include <winrt/Windows.Internal.System.h>
#include <winrt/Windows.System.Preview.h>
#include <winrt/Windows.UI.WindowManagement.h>
#include <winrt/Windows.Foundation.Collections.h>

using namespace std;
using namespace winrt;
using namespace Windows::Foundation;
using namespace Windows::Internal::Devices::Sensors;
using namespace Windows::Internal::System;
using namespace Windows::System::Preview;
using namespace Windows::UI::WindowManagement;
using namespace Windows::Foundation::Collections;

VOID OnFoldSensorReadingChanged(FoldSensor const&, FoldSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Fold sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Fold started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Fold stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Fold cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Fold unknown\n" << std::endl;
			break;
		}

		for (auto panel : args.Reading().ContributingPanel())
		{
			printf("Panel: %s\n", to_string(panel).c_str());
		}
		
		std::cout << "Initial angle " << args.Reading().InitialAngle() << std::endl;
		std::cout << "Final angle " << args.Reading().FinalAngle() << std::endl;
		
		switch (args.Reading().FoldType())
		{
		case FoldType::Closing:
			std::cout << "Fold Closing\n" << std::endl;
			break;
		case FoldType::Opening:
			std::cout << "Fold Opening\n" << std::endl;
			break;
		case FoldType::NotDetected:
			std::cout << "Fold NotDetected\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID PrintFolioDetails(TwoPanelFolioHingeDevicePostureReading const& args)
{
	try {
		std::cout << "Panel1 " << args.Panel1Id().c_str() << "\n" << std::endl;
		std::cout << "Panel2 " << args.Panel2Id().c_str() << "\n" << std::endl;

		std::cout << "Panel1 Orientation " << (int)args.Panel1Orientation() << "\n" << std::endl;
		std::cout << "Panel2 Orientation " << (int)args.Panel2Orientation() << "\n" << std::endl;

		switch (args.Hinge1State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge1State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge1State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge1State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge1State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge1State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge1State Full\n" << std::endl;
			break;
		}

		switch (args.Hinge2State())
		{
		case Windows::Internal::System::HingeState::Unknown:
			std::cout << "Hinge2State Unknown\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Closed:
			std::cout << "Hinge2State Closed\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Concave:
			std::cout << "Hinge2State Concave\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Flat:
			std::cout << "Hinge2State Flat\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Convex:
			std::cout << "Hinge2State Convex\n" << std::endl;
			break;
		case Windows::Internal::System::HingeState::Full:
			std::cout << "Hinge2State Full\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

VOID OnFolioPostureChanged(TwoPanelFolioHingeDevicePosture const&, TwoPanelFolioHingeDevicePostureReadingChangedEventArgs const& args)
{
	try {
		printf("Folio posture sensor state changed.\n");
		PrintFolioDetails(args.Reading());
	}
	catch (...) {}
}

VOID OnSensorReadingChanged(FlipSensor const&, FlipSensorReadingChangedEventArgs const& args)
{
	try {
		printf("Flip sensor state changed.\n");
		switch (args.Reading().GestureState())
		{
		case GestureState::Started:
			std::cout << "Flip started\n" << std::endl;
			break;
		case GestureState::Completed:
			std::cout << "Flip stopped\n" << std::endl;
			break;
		case GestureState::Cancelled:
			std::cout << "Flip cancelled\n" << std::endl;
			break;
		case GestureState::Unknown:
			std::cout << "Flip unknown\n" << std::endl;
			break;
		}
	}
	catch (...) {}
}

int main()
{
    init_apartment();
	printf("Trying to get flip sensor.\n");
	try {
		FlipSensor flip = FlipSensor::GetDefaultAsync().get();
		if (flip == nullptr)
		{
			printf("Flip sensor not found.\n");
		}
		else
		{
			printf("Starting listening session for flip sensor.\n");
			flip...
Read more