Jump to content
mnorthern

[Guide] Backlight + Brightness for Intel 8086:0046 (1st gen HD) (GMA 5700MHD)

181 posts in this topic

Recommended Posts

Hmmm i see that your _WAK method is really big and there are a lot of calls to both EC and the video module.

 

Maybe those calls actually override the magic numbers that we are trying to store?

 

I suggest moving our four Store(..)Store(..)Store(...)Store(...) lines and seeing what happens

 

Let's put them at the end of the _WAK method, to make sure we override whatever else was stored before.

 

To be exact , let's put them between "Store (Zero, RRBF)" and "Return (WAKI)", and see what happens!

 

Hi mnorthern, sadly it doesn't work. Actually my LCD0 device doesn't have methods such as _BCM, etc. Maybe this is the problem. Anyway thank you very much for your help :)

Share this post


Link to post
Share on other sites
Advertisement

Hi mnorthern!

I did everything as you said, but the brightness does not work. Scroll brightness and keyboard shortcut work, but the brightness does not change. Could you see my dsdt. Any ideas?

Brightness wake after sleep also doesn't work.

Thank you for your help.

DSDT and ioreg http://cl.ly/2M451I3W0J3Q

Share this post


Link to post
Share on other sites

Here is my log after sleep:

 

3/18/13 8:56:52.000 AM kernel[0]: sleep

3/18/13 8:56:52.000 AM kernel[0]: Wake reason = power-button

3/18/13 8:56:52.000 AM kernel[0]: No interval found for . Using 8000000

3/18/13 8:56:52.000 AM kernel[0]: Previous Sleep Cause: 5

3/18/13 8:56:52.013 AM SyncServer[199]: [0x7f80c8c0be30] |SyncServer|Warning| Refreshing watchdog because of a calendar time change alert.

3/18/13 8:56:52.275 AM WindowServer[94]: handle_will_sleep_auth_and_shield_windows: no action for lock state 1

3/18/13 8:56:55.000 AM kernel[0]: disk1s2: media is not present.

3/18/13 8:56:55.000 AM kernel[0]: hfs: err 6 reading VH blk (iATKOS ML2)

3/18/13 8:56:55.239 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.240 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.241 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.243 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.243 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.244 AM UserEventAgent[11]: Captive: [mySCCopyWiFiDevices:162] WiFi Device Name == NULL

3/18/13 8:56:55.244 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.244 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.245 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.246 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.246 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.246 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.247 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.247 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.248 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.248 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.249 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.250 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.250 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.251 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.251 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.251 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.252 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.252 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.252 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.253 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.254 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.254 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.254 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.255 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.255 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.255 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.255 AM YoudaoDict[179]: Reachability Flag Status: - ------- networkStatusForFlags

3/18/13 8:56:55.432 AM _networkd[233]: /usr/libexec/ntpd-wrapper: scutil key State:/Network/Global/DNS not present after 30 seconds

3/18/13 8:56:55.000 AM kernel[0]: USBMSC Identifier (non-unique): 20071114173400000 0xbda 0x159 0x5888

3/18/13 8:56:56.271 AM _networkd[238]: Unable to resolve hostname(s)

3/18/13 8:56:56.322 AM ntpd[97]: proto: precision = 1.000 usec

3/18/13 8:57:07.826 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:07.826 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:07.826 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:07.827 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:07.828 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:07.829 AM WindowServer[94]: dict count after removing entry for window 0x22 is 0

3/18/13 8:57:08.966 AM com.apple.launchd.peruser.501[121]: (com.tencent.ScreenCapture[177]) Exited: Killed: 9

3/18/13 8:57:08.966 AM com.apple.launchd.peruser.501[121]: (com.tencent.localserver[176]) Exited: Killed: 9

3/18/13 8:57:08.966 AM com.apple.launchd.peruser.501[121]: ([0x0-0x15015].com.baidu.inputmethod.BaiduIM[198]) Exited: Killed: 9

3/18/13 8:57:08.977 AM coreservicesd[74]: SendFlattenedData, got error #268435460 (ipc/send) timed out from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=198

3/18/13 8:57:08.989 AM com.apple.launchd.peruser.501[121]: (org.pqrs.KeyRemap4MacBook.server[158]) Exited: Killed: 9

3/18/13 8:57:08.990 AM coreservicesd[74]: SendFlattenedData, got error #268435459 (ipc/send) invalid destination port from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=164

3/18/13 8:57:09.006 AM com.apple.launchd.peruser.501[121]: (com.apple.talagent[135]) Exited: Killed: 9

3/18/13 8:57:09.019 AM UserEventAgent[11]: Captive: [userAgentDied:139] User Agent @port=43527 Died

3/18/13 8:57:09.020 AM com.apple.launchd.peruser.501[121]: ([0x0-0xd00d].com.apple.iTunesHelper[175]) Exited with code: 1

3/18/13 8:57:09.021 AM coreservicesd[74]: SendFlattenedData, got error #268435459 (ipc/send) invalid destination port from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=115

3/18/13 8:57:09.023 AM com.apple.launchd.peruser.501[121]: (com.apple.UserEventAgent-Aqua[124]) Exited: Killed: 9

3/18/13 8:57:09.025 AM com.apple.launchd.peruser.501[121]: (com.apple.mdworker.shared.04000000-0000-0000-0000-000000000000[223]) Exited: Killed: 9

3/18/13 8:57:09.025 AM com.apple.launchd.peruser.501[121]: (com.apple.mdworker.single.08000000-0000-0000-0000-000000000000[225]) Exited: Killed: 9

3/18/13 8:57:09.027 AM com.apple.launchd.peruser.501[121]: (com.apple.mdworker.lsb.01000000-0000-0000-0000-000000000000[224]) Exited: Killed: 9

3/18/13 8:57:09.262 AM com.apple.launchd[1]: (com.apple.dock.extra[250]) XPC Service could not exec(3). Resetting port.

3/18/13 8:57:09.263 AM coreservicesd[74]: SendFlattenedData, got error #268435459 (ipc/send) invalid destination port from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=144

3/18/13 8:57:09.264 AM NotificationCenter[145]: Connection interrupted.

3/18/13 8:57:09.271 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:09.271 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:09.271 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:09.272 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:09.272 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:12.713 AM loginwindow[54]: DEAD_PROCESS: 54 console

3/18/13 8:57:13.394 AM loginwindow[54]: Application hardKill returned -600

3/18/13 8:57:13.395 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:13.395 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:13.396 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:13.396 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:13.396 AM WindowServer[94]: CGXGetConnectionProperty: Invalid connection 43267

3/18/13 8:57:13.455 AM shutdown[252]: halt by Felix:

3/18/13 8:57:13.455 AM shutdown[252]: SHUTDOWN_TIME: 1363568233 454866

 

At the end I shut down the computer. Between then, there are no graphics related messages, I guess.

Any ideas?

Share this post


Link to post
Share on other sites

Hello I will have a look, if you can also send me the same screenshots as Felix Chan, that might help too!

 

Hi, I don't have Windows installed so I can't send you the screenshot but I can dump whole PCI configuration space. This is the result. And also, my BAR0 is 0xf0000004.

Please tell me if this could help you or not.

 

Thanks.

root@ubuntu:~# lspci -s 00:02.0 -vvxxxx
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 12) (prog-if 00 [VGA controller])
Subsystem: Dell Device 0434
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 42
Region 0: Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
Region 2: Memory at d0000000 (64-bit, prefetchable) [size=256M]
Region 4: I/O ports at 1800 [size=8]
Expansion ROM at <unassigned> [disabled]
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
 Address: fee0f00c  Data: 4169
Capabilities: [d0] Power Management version 2
 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [a4] PCI Advanced Features
 AFCap: TP+ FLR+
 AFCtrl: FLR-
 AFStatus: TP-
Kernel driver in use: i915
Kernel modules: i915
00: 86 80 46 00 07 04 90 00 12 00 00 03 00 00 00 00
10: 04 00 00 f0 00 00 00 00 0c 00 00 d0 00 00 00 00
20: 01 18 00 00 00 00 00 00 00 00 00 00 28 10 34 04
30: 00 00 00 00 90 00 00 00 00 00 00 00 05 01 00 00
40: 09 00 0c 01 26 61 b1 00 88 00 c0 00 0f 17 17 17
50: 00 00 50 03 09 00 00 00 00 00 00 00 00 00 00 be
60: 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 05 d0 01 00 0c f0 e0 fe 69 41 00 00 00 00 00 00
a0: 11 11 11 00 13 00 06 03 00 00 14 60 25 04 3a 30
b0: 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 01 a4 22 00 00 00 00 00 00 00 00 00 00 01 02 00
e0: 00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 ab 0f 14 00 18 e0 78 bb

Share this post


Link to post
Share on other sites

I have a lot of DSDT's too look at so sorry for any delays guys, I will try to get them sorted as soon as i can

 

In the meantime, If anyone wants to do their own experimenting with different Operation Regions, this document gives you the registers to look at (search for Backlight)

 

http://www.x.org/doc...3_Part2_BJS.pdf

 

 

In that document, if they say there is a register at 48250h, it means take your bar value and make it to look like 0xB0048250, and use RW-everything for seeing what this value looks like, and then try using DSDT to write these values to Operation Regions

 

Also try googling for the source code for Linux intel i915 drivers, especially Ironlake patches to those drivers, they're very educational

Share this post


Link to post
Share on other sites

Edit: Does anyone know how difficult is it to write a program that dumps some arbitrary memory locations (like our graphics MMIO registers) on wake up from sleep? This would be so extremely useful for debugging for people who can't enable their backlight

Share this post


Link to post
Share on other sites

I have a lot of DSDT's too look at so sorry for any delays guys, I will try to get them sorted as soon as i can

 

In the meantime, If anyone wants to do their own experimenting with different Operation Regions, this document gives you the registers to look at (search for Backlight)

 

http://www.x.org/doc...3_Part2_BJS.pdf

 

 

In that document, if they say there is a register at 48250h, it means take your bar value and make it to look like 0xB0048250, and use RW-everything for seeing what this value looks like, and then try using DSDT to write these values to Operation Regions

 

Also try googling for the source code for Linux intel i915 drivers, especially Ironlake patches to those drivers, they're very educational

 

Holly Cow! That was a hole science for me, but anyway I found these values on page 59-60 and put it in my dsdt , but nothing.

"My BAR1 0xFAC00004" Am I doing it wrong? I dont know.

post-21176-0-49960600-1363641245_thumb.png

post-21176-0-01763300-1363641254_thumb.png

post-21176-0-73262500-1363641263_thumb.png

DSDT.aml.zip

Share this post


Link to post
Share on other sites

Hello, backlight is enabled after wake from sleep, the only issue for me is the keyboard. I can't write the password to login again.

I'm using VoodooPS2Controller.kext. (Trackpad and keyboard)

Anyone know how fix this issue? I need modify my dsdt or the kext?

 

Regards.

Share this post


Link to post
Share on other sites

Hello, backlight is enabled after wake from sleep, the only issue for me is the keyboard. I can't write the password to login again.

I'm using VoodooPS2Controller.kext. (Trackpad and keyboard)

Anyone know how fix this issue? I need modify my dsdt or the kext?

 

Regards.

 

What did you do to enable backlight after wakeup?

Delete every PS2Controller you have, install the latest voodoops2controller.kext and ApplePS2Nub.kext.

Share this post


Link to post
Share on other sites

I have read through all the linux drivers + Intel documentation and this should be the (nearly) complete list of registers you need to experiment with. Since people's laptops are so different, it's difficult for me to do this remotely :worried_anim:

 

The procedure should be:

  • Use RW-everything to note down the value in the register
  • Try defining that register using Operation Regions and storing its correct value in your _WAK method in your DSDT

The following are related to the PCH (south display) controllers

registers ending in C7200, C7204, C7208, C720C C7210 -- should be saved and then restored on wake up

 

The following are related to the display port and power-related

registers ending in E1180, C6014, C6018, C6040

 

The following are strictly backlight related

registers ending in 48250, 48254, c8250, c8254

 

The following is a Legacy Backlight Register. It is possible that your laptop uses legacy mode to set brightness. This register is not memory mapped. Therefore it is not in BAR0 (BAR1). Instead, it is directly in the PCI configuration space.

It is on the device 0:2:0 on the PCI, at the offset 0xF4 (bits 0 to 7)

By writing 0xFF to that location, you will achieve max brightness if legacy mode is enabled.

 

Please let me know your findings.

 

Holly Cow! That was a hole science for me, but anyway I found these values on page 59-60 and put it in my dsdt , but nothing.

"My BAR1 0xFAC00004" Am I doing it wrong? I dont know.

 

Yes what you're forgetting is that you're defining the same thing twice! (Look at your third screenshot)

 

Your BRIT region is the same as your BRI4 region and your LEVL field is at the exactly same location as your LEVX

The same problem is with BRI2 being in the same location as BRI3 and therefore LEV2=LEVW, so it doesn't make sense to define thing twice

You should define a different region (you can name them BRI5, BRI6 etc) and a different field in that region (LEV3, LEV4 etc) and then make them to point to different registers (E1180, 48250, C6018, etc etc) and then store different values in them depending on your system's values (eg. from RW-everything)

 

Update:

 

i STRONGLY suspect that if you write Zero (0x00000000) to your BLC_PWM_CPU_CTL2 (this is in BAR0 at offset 0x00048250) then you should be able to manipulate the brightness by writing to the LBB (Legacy Brightness) register (which is not memory mapped therefore not in BAR0 but instead on the device 0:2:0 on the PCI, at the offset 0xF4 ), so that by writing 0xFF to it you should be able to enable the backlight without having to manipulate all those other registers... the downside would be, you lose all the OS X brightness sliders and buttons unless you hack them somehow

 

I am trying to learn how to write drivers so that maybe in a few weeks time I will be able to write a kext patch or something, this is a really cool hobby (not advisable if you have a girlfriend/boyfriend)

 

Question:

 

Could someone confirm that a _WAK method is guaranteed to be called on computer's wake up from sleep? If it's not guaranteed to be called, then we may be wasting time, because it's simply not called on some people's computers, and they need a kext instead of a DSDT patch

Share this post


Link to post
Share on other sites

I have read through all the linux drivers + Intel documentation and this should be the (nearly) complete list of registers you need to experiment with. Since people's laptops are so different, it's difficult for me to do this remotely :worried_anim:

 

The procedure should be:

  • Use RW-everything to note down the value in the register
  • Try defining that register using Operation Regions and storing its correct value in your _WAK method in your DSDT

The following are related to the PCH (south display) controllers

registers ending in C7200, C7204, C7208, C720C C7210 -- should be saved and then restored on wake up

 

The following are related to the display port and power-related

registers ending in E1180, C6014, C6018, C6040

 

The following are strictly backlight related

registers ending in 48250, 48254, c8250, c8254

 

The following is a Legacy Backlight Register. It is possible that your laptop uses legacy mode to set brightness. This register is not memory mapped. Therefore it is not in BAR0 (BAR1). Instead, it is directly in the PCI configuration space.

It is on the device 0:2:0 on the PCI, at the offset 0xF4 (bits 0 to 7)

By writing 0xFF to that location, you will achieve max brightness if legacy mode is enabled.

 

Please let me know your findings.

 

 

 

Yes what you're forgetting is that you're defining the same thing twice! (Look at your third screenshot)

 

Your BRIT region is the same as your BRI4 region and your LEVL field is at the exactly same location as your LEVX

The same problem is with BRI2 being in the same location as BRI3 and therefore LEV2=LEVW, so it doesn't make sense to define thing twice

You should define a different region (you can name them BRI5, BRI6 etc) and a different field in that region (LEV3, LEV4 etc) and then make them to point to different registers (E1180, 48250, C6018, etc etc) and then store different values in them depending on your system's values (eg. from RW-everything)

 

Update:

 

i STRONGLY suspect that if you write Zero (0x00000000) to your BLC_PWM_CPU_CTL2 (this is in BAR0 at offset 0x00048250) then you should be able to manipulate the brightness by writing to the LBB (Legacy Brightness) register (which is not memory mapped therefore not in BAR0 but instead on the device 0:2:0 on the PCI, at the offset 0xF4 ), so that by writing 0xFF to it you should be able to enable the backlight without having to manipulate all those other registers... the downside would be, you lose all the OS X brightness sliders and buttons unless you hack them somehow

 

I am trying to learn how to write drivers so that maybe in a few weeks time I will be able to write a kext patch or something, this is a really cool hobby (not advisable if you have a girlfriend/boyfriend)

 

Question:

 

Could someone confirm that a _WAK method is guaranteed to be called on computer's wake up from sleep? If it's not guaranteed to be called, then we may be wasting time, because it's simply not called on some people's computers, and they need a kext instead of a DSDT patch

 

Guess that my _WAK is not called; also I don't have _BCM method in my dsdt. Weird.

Share this post


Link to post
Share on other sites

Guess that my _WAK is not called; also I don't have _BCM method in my dsdt. Weird.

 

Possibly, but on the other hand, the ACPI specification says http://www.acpi.info...PIspec-2-0c.pdf

 

"_WAK: Power management control method run once system is awakened."

 

"7.3.5 \_WAK (System Wake)

After the system wakes from a sleeping state, it will invoke the \_WAK method and pass the sleeping state

value that has ended. This operation occurs asynchronously with other driver notifications in the system

and is not the first action to be taken when the system wakes"

 

:wallbash: whats going on lol

Share this post


Link to post
Share on other sites

Felix Chan, can you add the following code to the end of your _WAK method and tell me what happens?

Notify (\_SB.PCI0.VID.LCD0, 0x86)
Notify (\_SB.PCI0.PEG.VID.LCD0, 0x86)
Store (0xFF, \BRLV)
\_SB.PCI0.LPC.EC.BRNS ()

 

 

I moved here.I applied the BAR1 magic number to the dsdt and compiled without error, but it doesn't work.Any more ides?Edit. I found this in kernel log.

 

 

Calmesal I think I know what you could try.. Can you make a backup of your ACPI BACKLIGHT kext, then copy the original kext to your desktop, show package contents, change the 'BQC use index' property in the Info.plist file to the opposite of whatever it is saying now, then reinstall using kext wizard, and restart. Let me know if anything changed and if you are still getting those messages in your log, thanks

 

EVERYONE, one more thing i forgot to mention

 

You will need the following properties to be injected into your screen's properties. Either via Natit or DSDT (in your GFX0/VID0/graphics device, find or create Method (_DSM, 4, NotSerialized)

and inside it Store (Package ( ) { X }, Local0 )

then call DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))

Return (Local0)

 

where X is the code below:

 

"AAPL,BacklightRestore",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"AAPL,HasPanel",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"AAPL,Haslid",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"AAPL,backlight-control",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"@0,backlight-control",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"@0,AAPL,boot-display",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},

"@0,built-in",
Buffer ()
{
One
},

Share this post


Link to post
Share on other sites

What did you do to enable backlight after wakeup?

Delete every PS2Controller you have, install the latest voodoops2controller.kext and ApplePS2Nub.kext.

 

 

Hello, I tried with these kexts, but still I can't write the password, I think is another issue. Someone can login after wake from sleep? (with or without backlight enabled)

I modified my DSDT with this guide, only I changed the "levels" of 17 steps, because in the low levels my backlight were too dark. Only after reboot, backlight is restored to 100%.

Note: I added code in my DD03 device inside IGPU not in PNLF.

 

Regards

Share this post


Link to post
Share on other sites

EVERYONE, one more thing i forgot to mention

 

You will need the following properties to be injected into your screen's properties. Either via Natit or DSDT (in your GFX0/VID0/graphics device, find or create Method (_DSM, 4, NotSerialized)

Hello,

I added DSM method to my GFX0 and nothing changed.

Only backlight slider works.

Backlight keys don't work and screen is still black after wake up.

 

I also have my backlight at 100% after boot. Does anyone know how to fix this?

 

Thanks.

Share this post


Link to post
Share on other sites

I have read through all the linux drivers + Intel documentation and this should be the (nearly) complete list of registers you need to experiment with. Since people's laptops are so different, it's difficult for me to do this remotely :worried_anim:

 

The procedure should be:

  • Use RW-everything to note down the value in the register
  • Try defining that register using Operation Regions and storing its correct value in your _WAK method in your DSDT

The following are related to the PCH (south display) controllers

registers ending in C7200, C7204, C7208, C720C C7210 -- should be saved and then restored on wake up

 

The following are related to the display port and power-related

registers ending in E1180, C6014, C6018, C6040

 

The following are strictly backlight related

registers ending in 48250, 48254, c8250, c8254

 

The following is a Legacy Backlight Register. It is possible that your laptop uses legacy mode to set brightness. This register is not memory mapped. Therefore it is not in BAR0 (BAR1). Instead, it is directly in the PCI configuration space.

It is on the device 0:2:0 on the PCI, at the offset 0xF4 (bits 0 to 7)

By writing 0xFF to that location, you will achieve max brightness if legacy mode is enabled.

 

Please let me know your findings.

 

 

 

Yes what you're forgetting is that you're defining the same thing twice! (Look at your third screenshot)

 

Your BRIT region is the same as your BRI4 region and your LEVL field is at the exactly same location as your LEVX

The same problem is with BRI2 being in the same location as BRI3 and therefore LEV2=LEVW, so it doesn't make sense to define thing twice

You should define a different region (you can name them BRI5, BRI6 etc) and a different field in that region (LEV3, LEV4 etc) and then make them to point to different registers (E1180, 48250, C6018, etc etc) and then store different values in them depending on your system's values (eg. from RW-everything)

 

Update:

 

i STRONGLY suspect that if you write Zero (0x00000000) to your BLC_PWM_CPU_CTL2 (this is in BAR0 at offset 0x00048250) then you should be able to manipulate the brightness by writing to the LBB (Legacy Brightness) register (which is not memory mapped therefore not in BAR0 but instead on the device 0:2:0 on the PCI, at the offset 0xF4 ), so that by writing 0xFF to it you should be able to enable the backlight without having to manipulate all those other registers... the downside would be, you lose all the OS X brightness sliders and buttons unless you hack them somehow

 

I am trying to learn how to write drivers so that maybe in a few weeks time I will be able to write a kext patch or something, this is a really cool hobby (not advisable if you have a girlfriend/boyfriend)

 

Question:

 

Could someone confirm that a _WAK method is guaranteed to be called on computer's wake up from sleep? If it's not guaranteed to be called, then we may be wasting time, because it's simply not called on some people's computers, and they need a kext instead of a DSDT patch

I solved the problem with the backlight.kext by changing the "BQC use index" to FALSE, no there is no error.

But frankly I am confused regarding the BAR1 and BRI values. I cannot manage to find the right values, it is here my my problem.

I will be grateful if you could take a look at my dsdt file.

post-21176-0-21727400-1363721100_thumb.png

post-21176-0-52185000-1363721107_thumb.png

post-21176-0-43905900-1363721115.png

DSDT.aml.zip

Share this post


Link to post
Share on other sites

@mnorthern, good news here! I'm now able to wake up with backlight, finally! Attached is my working dsdt.

 

The changes are that I removed the original _WAK contents and added what you gave me:

 

Method (_WAK, 1, NotSerialized)
{
 Store (0x80000000, LEVW)
 Store (0x061A061A, LEVX) // This value should vary based on the RW Everything inspect results
 Store (0x80000000, LEV2)
 Store (0x12FF, LEVL)
 Return (Package (0x02)
 {
	 Zero,
	 Zero
 })
}

 

To enable sleep, I also removed my EHC2 device, which maybe the SD card slot; however I have to keep the EHC1 device so that my external USB wireless card (with a RTL8192CU7 chip) will resume working after waking up.

 

This is, however, only a special case for this strange graphic card. I'm not sure why it works without all the wake up logic; also, I don't understand why my Fn+Brightness keys work without showing the sun icon on screen.

 

BTW, the annoying coil sound remains.

 

Again thank you very much @mnorthern!

Archive.zip

Share this post


Link to post
Share on other sites

@mnorthern, good news here! I'm now able to wake up with backlight, finally! Attached is my working dsdt.

 

The changes are that I removed the original _WAK contents and added what you gave me:

 

Method (_WAK, 1, NotSerialized)
{
 Store (0x80000000, LEVW)
 Store (0x061A061A, LEVX) // This value should vary based on the RW Everything inspect results
 Store (0x80000000, LEV2)
 Store (0x12FF, LEVL)
 Return (Package (0x02)
 {
	 Zero,
	 Zero
 })
}

 

To enable sleep, I also removed my EHC2 device, which maybe the SD card slot; however I have to keep the EHC1 device so that my external USB wireless card (with a RTL8192CU7 chip) will resume working after waking up.

 

This is, however, only a special case for this strange graphic card. I'm not sure why it works without all the wake up logic; also, I don't understand why my Fn+Brightness keys work without showing the sun icon on screen.

 

BTW, the annoying coil sound remains.

 

Again thank you very much @mnorthern!

 

This is interesting. You think this will work on my laptop? But why did you have to remove EHC2? How did you know that was causing a problem?

Share this post


Link to post
Share on other sites

I solved the problem with the backlight.kext by changing the "BQC use index" to FALSE, no there is no error.

But frankly I am confused regarding the BAR1 and BRI values. I cannot manage to find the right values, it is here my my problem.

I will be grateful if you could take a look at my dsdt file.

Ok. A Little progress. I found the operation region values and put it in my dsdt, and now I can change backlight with slider and Fn-keys with the Sunlight apearing on the screen. Now to the resume after sleep and and resetting the backlight level. I will post the same screenshots to you as Filip chan in hoping you can figure out my _wak method, I suspect that it is something wrong with it.

Still can not get rid of the message "getindexforlevel(50)not found in _BCL table"

post-21176-0-85228200-1363803093_thumb.png

post-21176-0-02899100-1363803105_thumb.png

post-21176-0-59987600-1363803117_thumb.png

post-21176-0-47978400-1363803131_thumb.png

DSDT.zip

post-21176-0-33769100-1363804113_thumb.png

post-21176-0-33259600-1363804123_thumb.png

post-21176-0-56328000-1363807563_thumb.png

post-21176-0-74152900-1363981850_thumb.png

Share this post


Link to post
Share on other sites

This is interesting. You think this will work on my laptop? But why did you have to remove EHC2? How did you know that was causing a problem?

 

I've to remove EHC2 since it wakes up the system automatically right after it sleeps; after removing EHC2, the system sleeps well :)

Also, my EHC1 has to be kept so that the USB ports should work. If not, the external wireless card driver will not work.

Share this post


Link to post
Share on other sites

Also, does any one know how to enable VGA support for this graphic card? My ThinkPad's VGA port doesn't output any signals.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Majed DH
      Hi everyone. 
      I have HP 15-da0xxx series laptop. i got macos mojave installed on it. but I was trying to get my intel graphics working but i couldn't change dmvt preallocation. 
      So I updated the bios (unfortunately). And since then i could not boot any version of clover. 
      I tried two versions that were working and even an installer that worked before is not working:
       
      I searched alot about the error and found nothing relared to macos or hackintosh..  would it be solved by patching the dsdt? 

      Any suggestions people ? 
    • By MaLd0n
      ---INSTALLATION TUTORIAL---
       
      ---Original Post---
      https://olarila.com/forum/viewtopic.php?f=45&t=9172
       
      ---USB---
      https://pikeralpha.wordpress.com/2016/07/13/simple-skylake-usb-fix-no-kexts-required/
       
      ---CLOVER FOLDER---
       
      CLOVER.zip
       
       
      --MOBO
      GigaByte Z390 M Gaming



      --PROCESSOR
      Intel Core i9-9900K


      --COOLER
      CoolerMaster MasterLiquid ML120R RGB


      --MEMORY
      Corsair Dominator Platinum 16GB (2 x 8GB)


      --GPU
      Sapphiretech Radeon RX 590 8 GB GDDR5


       
      --SSD
      Samsung 970 EVO NVMe M2 Flash Drive


      --POWER SUPPLY
      EVGA 750 N1, 750W


      --WIRELESS
      TP-Link Archer T9E


      --BLUETOOTH
      Orico BTA-403


      --CASE
      Thermaltake View 21 Tempered Glass Edition


      --DSDT Patches--
      -FIX ERRORS AND WARNINGS -FIX ACPI ERRORS -REMOVE UNUSED SCOPES / DEVICES -HIGH PRECISION EVENT TIMER -SATA SERIE 10 ID -DMAC -REMOVE 22K LINES, PROBLEMATIC and UNUSED -FIX K.P in REBOOT -NVRAM / REAL TIME CLOCK -SLPB -DARWIN / WINDOWS 2015 -XHCI -PLUGIN TYPE -HDAS to HDEF -HDEF -REAL TIME CLOCK -ARTC -IRQs -SBUS -MIKEY -BUS1 -MCHC -ALS0 -SHUTDOWN -UAR1 -LAN -FWHD -USBX -PMCR -PPMC -XSPI -GMM -IMEI -EC -PNLF -ARPT -GFX0 -NVME -DTGP -ACQUIRE MUT0 0XFFFF -OPERATION REGION GPIO -MUTEX MUT0 0x00 -EXTERNAL REFERENCES -UNKNOWNOBJ -HDMI / HDAU -FULL RENAMED DEVICES  
      --SCREENSHOTS--





























      --BruceX--
       
      --USB-C-- test with SanDisk Ultra USB-STICK 128gb


       
      -Credits and thanks to the old and new people in the community who developed patches, kexts and bootloaders!
      Slice, Kabyl, usr-sse2, jadran, Blackosx, dmazar, STLVNUB, pcj, apianti, JrCs, pene, FrodoKenny, skoczy, ycr.ru, Oscar09, xsmile, SoThOr, RehabMan, Download-Fritz, Zenit432, cecekpawon, Intel, Apple, Oracle, Chameleon Team, crazybirdy, Mieze, Mirone, Oldnapalm, netkas, Elconiglio, artut-pt, ErmaC, Pavo, Toleda, Master Chief and family, bcc9, The King, PMheart, Sherlocks, Micky1979, vit9696, vandroiy2013, Voodoo Team, Pike R. Alpha, lvs1974, Austere.J, CVad, Sampath007, onemanosx, erroruser, Jenny David, Olarila Facebook Community, Hackintosh Facebook Community and many others!
      We're all here to have fun and learn from each other!
    • By Drovosek
      For my laptop Hp Pavilion 15-au028ur worked patch for HP 3165sf
      I also experimented with manual patching and assembled my own version:

      #Maintained by: RehabMan for: Laptop Patches #Battery_HP-DV6-1380ek.txt # created by RehabMan 2019-xx-xx # based on Battery_HP-DV6-1380ek.txt # additional patches for dv6-1380ek provided by chihab222, credit gsly # works for: #  HP Pavilion 15-au028ur, per Drovosek into method label B1B2 remove_entry; into definitionblock code_regex . insert begin Method (B1B2, 2, NotSerialized) { Return (Or (Arg0, ShiftLeft (Arg1, 8))) }\n end; # 16-bit EC0 registers #                BADC,   16, #                BFCC,   16, #                MCUR,   16, #                MBRM,   16, #                MBCV,   16, into device label EC0 code_regex BADC,\s+16, replace_matched begin ADC0,8,ADC1,8, end; into device label EC0 code_regex BFCC,\s+16, replace_matched begin FCC0,8,FCC1,8, end; into device label EC0 code_regex MCUR,\s+16, replace_matched begin CUR0,8,CUR1,8, end; into device label EC0 code_regex MBRM,\s+16, replace_matched begin BRM0,8,BRM1,8, end; into device label EC0 code_regex MBCV,\s+16, replace_matched begin BCV0,8,BCV1,8, end; # 16-bit method access into method label CLRI code_regex (\^.*)MBRM replaceall_matched begin B1B2\(%1BRM0,%1BRM1\) end; into method label UPBS code_regex (\^.*)MBRM replaceall_matched begin B1B2\(%1BRM0,%1BRM1\) end; into method label UPBI code_regex (\^.*)BFCC replaceall_matched begin B1B2\(%1FCC0,%1FCC1\) end; into method label UPBS code_regex (\^.*)MCUR replaceall_matched begin B1B2\(%1CUR0,%1CUR1\) end; into method label UPBS code_regex (\^.*)MBCV replaceall_matched begin B1B2\(%1BCV0,%1BCV1\) end;
      The only problem - when it reaches 100% charge, it no longer falls until you reset the CMOS (15-30 seconds hold down the power button on the laptop). In the rehabman guide there is a patch for ASUS in this case, there is a patch method FBST. There is no such method in my DSDT.
      Can someone help?
      Here's a patched and clean DSDT: https://vk.com/doc183234383_509697931
    • By jamesxxx1997
      Hi everyone~
      Now using mojave 10.14.4 , I am patching my dsdt and ssdt but have four syntax error with my dsdt.dsl , and I don't know how to fix it.
       
      My specs:
      lenovo thinkpad x1 yoga 3rd
      CPU : i7-8550u
      graphics : uhd620
       
      The file of my dsdt and ssdt , ioreg , and my efi is in this link:https://drive.google.com/drive/folders/1T1nv1QgqDtczXrohdlQUJ_8O-kPpoSEf?usp=sharing
       
      thanks!
    • By bcuraboy3
      Good morning everyone. I have a HP Pavillion with the following specs
      I have managed to install MOjave on it, using Rehabman's config for Intel HD5500. 
      But I need some help with a DSDT for it.
      Would anyone be kind enough to have a look at the zip file, which contains the EFI folder, a IOREG, and some screenshots from DPCI Manager,
      and help me with a good DSDT patched and a correct config.plist for it?   
      Thank you very much.  Highly appreciated 
      I have also included a report from Aida64 in case anyone needs it 
       
      15-p200np
       
      Número do equipamento
      L5Z67EA
      Microprocessador
      Intel Core i7-5500U com placa gráfica Intel HD 5500 (2,4 GHz, 4 MB de cache, 2 núcleos);
      Memória
      SDRAM DDR3L de 4 GB a 1600 MHz (1 x 4 GB)
      Placa de vídeo
      NVIDIA GeForce 840M (DDR3 dedicada de 2 GB) >>  disabled already using the config.plist provided 
      Disco rígido
      SATA 1 TB 5400 rpm
      Unidade multimédia
      Gravador de DVD SuperMulti
      Visor
      HD BrightView com retroiluminação WLED de 39,6 cm (15,6 pol.) na diagonal (1366 x 768)
      Placa de rede
      Ethernet LAN Base-T 10/100 integrada
      Conectividade sem fio
      Combo 802.11b/g/n (1x1) e Bluetooth 4.0 (compatível com Miracast) >> It's not supported, but a DW1550 it's on it's way 
      Som
      BeatsAudio com 2 altifalantes >>  it's a ALC 290 
      Teclado
      Tamanho completo tipo ilha com teclado numérico
      Dispositivo
      HP Imagepad com suporte de gestos multi-toque
      Portas externas
      1 leitor de cartões multimédia SD multi-formato
      1 HDMI
      1 combinação auscultadores/microfone
      1 USB 2.0
      2 USB 3.0
      1 RJ-45
      Dimensões
      38,45 x 26,02 x 2,39 cm
      Peso
      2,27 kg
      Alimentação
      Transformador de alimentação CA de 65 W
      Polímero de iões de lítio 4 cél. 41 Wh
      Câmara
      Câmara Web HP TrueVision HD (frontal) com microfone digital de matriz dupla integrado
      Mac-Pro-Noi.zip
      Report.htm
×