Contribute
Register

Night Shift Mode

Status
Not open for further replies.
I can see night shift in display preferences, it activates when the 'Turn on until tomorrow' checkbox is checked. Using iMac14,2 definition, GTX 970 with Nvidia web driver. IGPU disabled in BIOS and DSDT. Connected HDMI Samsung TV. Card injected like this

Code:
DefinitionBlock ("", "SSDT", 1, "Apple", "Gfx", 0x00001000)
{
    External (_SB_.PCI0.P0P1, DeviceObj)

    Scope (\_SB.PCI0.P0P1)
    {
        Device (NVD0)
        {
            Name (_ADR, Zero)  // _ADR: Address
            Name (_UID, 0x11)  // _UID: Unique ID
            Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
            {
                If (Arg2 == Zero)
                {
                    Return (Buffer (One)
                    {
                         0x03                                             /* . */
                    })
                }

                Return (Package (0x40)
                {
                    "AAPL,slot-name",
                    "PCIe Slot 1",
                    "name",
                    Buffer (0x17)
                    {
                        "Nvidia GeForce GTX 970"
                    },

                    "model",
                    Buffer (0x17)
                    {
                        "Nvidia GeForce GTX 970"
                    },

                    "device_type",
                    Buffer (0x0D)
                    {
                        "NVDA,Parent"
                    },

                    "hda-gfx",
                    Buffer (0x0A)
                    {
                        "onboard-1"
                    },

                    "VRAM,totalMB",
                    Buffer (0x04)
                    {
                         0x00, 0x10, 0x00, 0x00                           /* .... */
                    },

                    "rom-revision",
                    Buffer (0x0F)
                    {
                        "84.04.36.00.f1"
                    },

                    "@0,device_type",
                    Buffer (0x08)
                    {
                        "display"
                    },

                    "@0,name",
                    Buffer (0x0F)
                    {
                        "NVDA,Display-A"
                    },

                    "@0,connector-type",
                    Buffer (0x04)
                    {
                         0x00, 0x08, 0x00, 0x00                           /* .... */
                    },

                    "@0,compatible",
                    Buffer (0x0B)
                    {
                        "NVDA,NVMac"
                    },

                    "@1,device_type",
                    Buffer (0x08)
                    {
                        "display"
                    },

                    "@1,name",
                    Buffer (0x0F)
                    {
                        "NVDA,Display-B"
                    },

                    "@1,connector-type",
                    Buffer (0x04)
                    {
                         0x00, 0x08, 0x00, 0x00                           /* .... */
                    },

                    "@1,compatible",
                    Buffer (0x0B)
                    {
                        "NVDA,NVMac"
                    },

                    "@2,device_type",
                    Buffer (0x08)
                    {
                        "display"
                    },

                    "@2,name",
                    Buffer (0x0F)
                    {
                        "NVDA,Display-C"
                    },

                    "@2,connector-type",
                    Buffer (0x04)
                    {
                         0x00, 0x08, 0x00, 0x00                           /* .... */
                    },

                    "@2,compatible",
                    Buffer (0x0B)
                    {
                        "NVDA,NVMac"
                    },

                    "@2,AAPL,boot-display",
                    Buffer (Zero) {},
                    "@3,device_type",
                    Buffer (0x08)
                    {
                        "display"
                    },

                    "@3,name",
                    Buffer (0x0F)
                    {
                        "NVDA,Display-D"
                    },

                    "@3,connector-type",
                    Buffer (0x04)
                    {
                         0x00, 0x08, 0x00, 0x00                           /* .... */
                    },

                    "@3,compatible",
                    Buffer (0x0B)
                    {
                        "NVDA,NVMac"
                    },

                    "@4,device_type",
                    Buffer (0x08)
                    {
                        "display"
                    },

                    "@4,name",
                    Buffer (0x0F)
                    {
                        "NVDA,Display-E"
                    },

                    "@4,connector-type",
                    Buffer (0x04)
                    {
                         0x00, 0x08, 0x00, 0x00                           /* .... */
                    },

                    "@4,compatible",
                    Buffer (0x0B)
                    {
                        "NVDA,NVMac"
                    },

                    "@5,device_type",
                    Buffer (0x08)
                    {
                        "display"
                    },

                    "@5,name",
                    Buffer (0x0F)
                    {
                        "NVDA,Display-F"
                    },

                    "@5,connector-type",
                    Buffer (0x04)
                    {
                         0x00, 0x08, 0x00, 0x00                           /* .... */
                    },

                    "@5,compatible",
                    Buffer (0x0B)
                    {
                        "NVDA,NVMac"
                    }
                })
            }
        }

        Device (HDAU)
        {
            Name (_ADR, One)  // _ADR: Address
            Name (_UID, 0x12)  // _UID: Unique ID
            Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
            {
                If (Arg2 == Zero)
                {
                    Return (Buffer (One)
                    {
                         0x03                                             /* . */
                    })
                }

                Return (Package (0x02)
                {
                    "hda-gfx",
                    Buffer (0x0A)
                    {
                        "onboard-1"
                    }
                })
            }
        }
    }
}

I recently purchased a LG 38UC99-W 3840x1600 monitor and having issues with Nightshift because the display is appearing as a TV. Is there anyway to change the 'tv' to appear as a 'display'? I tried with the monitor connected via DP, HDMI and even USB C and no luck still. I noticed you had luck with the SSDT, what would I have to change in it for it to work on my 1080Ti and Z170-UD5-TH system?

Thanks in advance :)
 
I recently purchased a LG 38UC99-W 3840x1600 monitor and having issues with Nightshift because the display is appearing as a TV. Is there anyway to change the 'tv' to appear as a 'display'? I tried with the monitor connected via DP, HDMI and even USB C and no luck still. I noticed you had luck with the SSDT, what would I have to change in it for it to work on my 1080Ti and Z170-UD5-TH system?

Thanks in advance :)
The method that seems to work for most people getting NightShift working is using the fixEDID app in conjunction with DarwinDumper app generate an injection kext. See post #50

For injection you could try this HDMI audio script by toleda which generates the SSDT. Alternatively there is a guide from shilohh using maciASL patches here.
 
The method that seems to work for most people getting NightShift working is using the fixEDID app in conjunction with DarwinDumper app generate an injection kext. See post #50

For injection you could try this HDMI audio script by toleda which generates the SSDT. Alternatively there is a guide from shilohh using maciASL patches here.
I managed to get Nightshift working with the fixEDID and DarwinDumper method however I'm interested in your second method. Just to confirm you managed to get the display to work with nightshift and not to show up as 'television' under system profile? Im working on SSDT gpu injection now
 
I managed to get Nightshift working with the fixEDID and DarwinDumper method however I'm interested in your second method. Just to confirm you managed to get the display to work with nightshift and not to show up as 'television' under system profile? Im working on SSDT gpu injection now
Nightshift 'just worked' for me, it could be down to the EDID of the TV/monitor.

Any SSDT is supplemental to your DSDT so your Scope will be the graphics card device e.g. PEGP if it is already defined there:
Code:
External (_SB_.PCI0.PEG0.PEGP, DeviceObj)

Scope (\__SB_.PCI0.PEG0.PEGP)
{
  Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
  {
  ...
  }
}
Where you see the lengths of the types e.g.
Code:
Package (0x40)
Buffer (0x17)
Remove these in the DSL so you can have fields of whatever length
Code:
Package ()
Buffer ()
 

Attachments

  • SSDT.dsl
    5.4 KB · Views: 244
Last edited:
Nightshift 'just worked' for me, it could be down to the EDID of the TV/monitor.

Any SSDT is supplemental to your DSDT so your Scope will be the graphics card device e.g. PEGP if it is already defined there:
Code:
External (_SB_.PCI0.PEG0.PEGP, DeviceObj)

Scope (\__SB_.PCI0.PEG0.PEGP)
{
  Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
  {
  ...
  }
}
Where you see the lengths of the types e.g.
Code:
Package (0x40)
Buffer (0x17)
Remove these in the DSL so you can have fields of whatever length
Code:
Package ()
Buffer ()

Appreciate your assistance, I'm still working on it, so your monitor was recognised as a 'television' too?
Is there any patch in clover to change the display from being recognised as 'television'? Or would there be anyway to edit the EDID so that issue goes away?

Thanks in advance
 
Appreciate your assistance, I'm still working on it, so your monitor was recognised as a 'television' too?
Is there any patch in clover to change the display from being recognised as 'television'? Or would there be anyway to edit the EDID so that issue goes away?

Thanks in advance
It is one of these - EDID attached. You can use a custom EDID in Clover, but i believe it gets read from the hardware later during boot. This is why there is the need for an injection kext. Editing the hardware EDID might be possible through the TV service menu or even modifying an LG software update binary, but probably better to use FixEDID.
 

Attachments

  • EDID.txt
    3.7 KB · Views: 201
Alright so I have done a lot of research and testing with many custom EDIDs and come to this conclusion.
I can get a resolution 3832x1598 soo very very close to 3840x1600 and Nightshift will work and display won't show up as TV. so a big win!
It seems that apple has made it that when it detects a monitor runs at QHD '4k' resolution (well the 3840 part, which is the case with my ultra wide resolution), it just assumes it is a TV

Now the real question is, how can somehow get past this limitation?
 
There still is a color depth reduction problem since Sierra 10.12.4, so it appeared with the introduction of Nightshift.

It happens here on a GT330m, 10.12.6 and Radeon R7 250:

The color depth is degraded, it does not show 8 bit per channel anymore. Grandients will have steps.

Do you guys do not experience that? Can you test it with a black white grandient like backdrop, e.g. the apple provided "stone beach" image?

EDIT:
The Graphics info shows me: "pixeldepth: 30bit color (ARGB2101010)"

Is that normal? Was that 24bit or 32bit in Sierra 10.12.1?

EDIT: Changing it to 8bit using SwitchResX did not change anything.
 
Last edited:
Status
Not open for further replies.
Back
Top