Skip to content

Everything - #15

Open
obiwac wants to merge 6 commits into
mainfrom
everything
Open

Everything#15
obiwac wants to merge 6 commits into
mainfrom
everything

Conversation

@obiwac

@obiwac obiwac commented Feb 25, 2026

Copy link
Copy Markdown
Owner

This is the branch I maintain for external users to test out s2idle/S0ix on their machines.

The amdgpio suspend commit is not necessary for most machines, this is just because I have been told not servicing GPIO interrupts could be a blocker for S0i3 entry on some AMD machines.

@obiwac
obiwac changed the base branch from main to working2 April 21, 2026 09:36
@obiwac
obiwac changed the base branch from working2 to main April 21, 2026 09:36
@clausecker

Copy link
Copy Markdown
Contributor

Works for me, had to apply this patch for the tree to build:

--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -4213,8 +4213,6 @@ static void
 acpi_system_eventhandler_wakeup(struct acpi_softc *const sc,
     const enum power_stype stype)
 {
-    struct acpi_softc *sc = (struct acpi_softc *)arg;
-
     ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype);
 
     sc->acpi_s2idle_wake = true;

@clausecker

Copy link
Copy Markdown
Contributor

Weirdly though, my Thinkpad T16 only wakes up on lid switch, not on power button press. I would prefer for it to be the other way round. Had a history of the lid switch randomly triggering when the laptop is in my backpack on my previous one.

obiwac added 2 commits August 13, 2026 15:46
Mask all interrupts when suspending and warn when there are unserviced interrupts which might block entry to S0i3.

In the future we won't want to mask wake interrupts.

Once we can actually make use of GPIO interrupts on x86, we'll also want to unmask relevant pins when resuming.

Differential Revision:	https://reviews.freebsd.org/D51589
obiwac and others added 4 commits August 13, 2026 15:58
Not sure why this is being done in the first place, but either way for
s2idle we need to be able to actually idle CPUs when suspended.
Reviewed by:	adrian
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D49452
Suspend routine for USB4 v1.0 NHIs. This will work on v2.0 NHIs too for
now, but there's ideally a different method we should be using for those
in fine.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D49453
@obiwac

obiwac commented Aug 13, 2026

Copy link
Copy Markdown
Owner Author

Works for me, had to apply this patch for the tree to build:

--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -4213,8 +4213,6 @@ static void
 acpi_system_eventhandler_wakeup(struct acpi_softc *const sc,
     const enum power_stype stype)
 {
-    struct acpi_softc *sc = (struct acpi_softc *)arg;
-
     ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, stype);
 
     sc->acpi_s2idle_wake = true;

fixed, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants