Implement _DSM with UUID "3e5b41c6-eb1d-4260-9d15-c71fbadae414"
On HP Fury G7 Workstations, graphics output is re-routed from Intel GFX to discrete GFX after S3:
Before S3, HDMI plugged:
/sys/class/drm/card0$ find | grep "/enabled" | xargs grep .
./card0-HDMI-A-1/enabled:disabled
./card0-eDP-1/enabled:enabled
./card0-DP-2/enabled:disabled
./card0-HDMI-A-2/enabled:disabled
./card0-DP-3/enabled:disabled
./card0-HDMI-A-3/enabled:enabled
./card0-DP-1/enabled:disabled
After S3, HDMI plugged:
/sys/class/drm/card0$ find | grep "/enabled" | xargs grep .
./card0-HDMI-A-1/enabled:disabled
./card0-eDP-1/enabled:enabled
./card0-DP-2/enabled:disabled
./card0-HDMI-A-2/enabled:disabled
./card0-DP-3/enabled:disabled
./card0-HDMI-A-3/enabled:disabled
./card0-DP-1/enabled:disabled
HP BIOS team root caused the issue and it's because _SB.PCI0.HGME and _SB.PCI0.GFX0._DSM weren't called.
I can find UUID is updated by this unmerged patch: https://lore.kernel.org/intel-gfx/1460040732-31417-4-git-send-email-animesh.manna@intel.com/ However many bits are still missing. Here's the relevant DSDT code:
Scope (\_SB.PCI0.GFX0)
{
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
If ((Arg0 == ToUUID ("3e5b41c6-eb1d-4260-9d15-c71fbadae414") /* Unknown UUID */))
{
Switch (ToInteger (Arg2))
{
Case (Zero)
{
If ((Arg1 == One))
{
Debug = "iGfx Supported Functions Bitmap "
If (CondRefOf (\_SB.PCI0.HGME))
{
\_SB.PCI0.HGME (One)
}
Return (0x0001E7FF)
}
}
Case (One)
{
If ((Arg1 == One))
{
Debug = " Adapter Power State Notification "
If (((S0ID == One) && (OSYS < 0x07DF)))
{
If (((DerefOf (Arg3 [Zero]) & 0xFF) == One))
{
\GUAM (One)
}
Local0 = (DerefOf (Arg3 [One]) & 0xFF)
If ((Local0 == Zero))
{
\GUAM (Zero)
}
}
If ((DerefOf (Arg3 [Zero]) == Zero))
{
Local0 = CLID /* \_SB_.PCI0.GFX0.CLID */
If ((0x80000000 & Local0))
{
CLID &= 0x0F
GLID (CLID)
}
}
Return (One)
}
}
Case (0x02)
{
If ((Arg1 == One))
{
Debug = "Display Power State Notification "
Return (One)
}
}
Case (0x03)
{
If ((Arg1 == One))
{
Debug = "BIOS POST Completion Notification "
Return (One)
}
}
Case (0x04)
{
If ((Arg1 == One))
{
Debug = "Pre-Hires Set Mode "
Return (One)
}
}
Case (0x05)
{
If ((Arg1 == One))
{
Debug = "Post-Hires Set Mode "
Return (One)
}
}
Case (0x06)
{
If ((Arg1 == One))
{
Debug = "SetDisplayDeviceNotification"
Return (One)
}
}
Case (0x07)
{
If ((Arg1 == One))
{
Debug = "SetBootDevicePreference "
IBTT = (DerefOf (Arg3 [Zero]) & 0xFF)
Return (One)
}
}
Case (0x08)
{
If ((Arg1 == One))
{
Debug = "SetPanelPreference "
IPSC = (DerefOf (Arg3 [Zero]) & 0xFF)
If ((DerefOf (Arg3 [One]) & 0xFF))
{
IPAT = (DerefOf (Arg3 [One]) & 0xFF)
IPAT--
}
IBIA = ((DerefOf (Arg3 [0x02]) >> 0x04) & 0x07)
Return (One)
}
}
Case (0x09)
{
If ((Arg1 == One))
{
Debug = "FullScreenDOS "
Return (One)
}
}
Case (0x0A)
{
If ((Arg1 == One))
{
Debug = "APM Complete "
Local0 = (LIDS << 0x08)
Local0 += 0x0100
Return (Local0)
}
}
Case (0x0D)
{
If ((Arg1 == One))
{
Debug = "GetBootDisplayPreference "
Local0 = ((DerefOf (Arg3 [0x03]) << 0x18) | (DerefOf (
Arg3 [0x02]) << 0x10))
Local0 &= 0xEFFF0000
Local0 &= (DerefOf (DBTB [IBTT]) << 0x10)
Local0 |= IBTT
Return (Local0)
}
}
Case (0x0E)
{
If ((Arg1 == One))
{
Debug = "GetPanelDetails "
Local0 = IPSC /* \IPSC */
Local0 |= (IPAT << 0x08)
Local0 += 0x0100
Local0 |= (LIDS << 0x10)
Local0 += 0x00010000
Local0 |= (IBIA << 0x14)
Return (Local0)
}
}
Case (0x0F)
{
If ((Arg1 == One))
{
Debug = "GetInternalGraphics "
Local0 = GIVD /* \_SB_.PCI0.GFX0.GIVD */
Local0 ^= One
Local0 |= (GMFN << One)
Local0 |= 0x1800
Local0 |= (IDMS << 0x11)
Local0 |= (DerefOf (DerefOf (CDCT [HVCO]) [CDVL]) <<
0x15)
Return (Local0)
}
}
Case (0x10)
{
If ((Arg1 == One))
{
Debug = "GetAKSV "
Name (KSVP, Package (0x02)
{
0x80000000,
0x8000
})
KSVP [Zero] = KSV0 /* \KSV0 */
KSVP [One] = KSV1 /* \KSV1 */
Return (KSVP) /* \_SB_.PCI0.GFX0._DSM.KSVP */
}
}
}
}
Return (Buffer (One)
{
0x00 // .
})
}
}