Jump to content

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


mnorthern
 Share

182 posts in this topic

Recommended Posts

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

Hi mnorthern!

You have disappeared the last two days. I know you must have a lot to do. I hope you dont abandon us.

Thanks in advance for you grate efforts.

Link to comment
Share on other sites

Hi mnorthern!

You have disappeared the last two days. I know you must have a lot to do. I hope you dont abandon us.

Thanks in advance for you grate efforts.

 

Hello ! I am still here :)

 

I am trying to do some work on enabling the HDMI out.

 

I am also looking at some people's DSDT's. So this is actually a note to everyone: If I haven't answered your questions yet, please send me a private message :wink2:

Link to comment
Share on other sites

Hello ! I am still here :)

 

I am trying to do some work on enabling the HDMI out.

 

I am also looking at some people's DSDT's. So this is actually a note to everyone: If I haven't answered your questions yet, please send me a private message :wink2:

Good. I am still struggling with the backlight issue after sleep, please se the post 47 with details.

Thanks.

Link to comment
Share on other sites

i'm having the next bug: mine BAR1 is 0xF7000004 what should I put F or F7 ? anyway, I tried both, I always get the bar in prefences, but brightness doesn't change, i mean, for example my brightness bar is low, but it still shines like a sun... Could you please check my dsdt?

Link to comment
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.

http://www.insanelymac.com/forum/topic/286092-guide-1st-generation-intel-hd-graphics-qeci/ - in this topic you'll find video drivers for 1st gen intel HD Graphics qe/ci 10.8.3 attached. Download it, there you'll find framebuffers, I recommend you (also I've chosen on my own) LVDS+VGA, work good :)
Link to comment
Share on other sites

http://www.insanelym...-graphics-qeci/ - in this topic you'll find video drivers for 1st gen intel HD Graphics qe/ci 10.8.3 attached. Download it, there you'll find framebuffers, I recommend you (also I've chosen on my own) LVDS+VGA, work good :)

 

Thank you! I'm now running ML 10.8.2. Will the 10.8.3 drivers work on the 10.8.2 system?

Link to comment
Share on other sites

Thank you! I'm now running ML 10.8.2. Will the 10.8.3 drivers work on the 10.8.2 system?

Nope. Update to 10.8.3 (it can report an error at the end of the update process, e.g. i had cache error), reboot in single user mode, delete HDGraphics kext (rm -Rf /System/Library/Extensions/AppleIntelHDGraphics*) then reboot and install 10.8.3 kexts... I think thats easy enough) feel free to pm)

Link to comment
Share on other sites

Nope. Update to 10.8.3 (it can report an error at the end of the update process, e.g. i had cache error), reboot in single user mode, delete HDGraphics kext (rm -Rf /System/Library/Extensions/AppleIntelHDGraphics*) then reboot and install 10.8.3 kexts... I think thats easy enough) feel free to pm)

 

Thanks but doesn't seem to work here. Would you tell me which is the LVDS+VGA kext? I only see SingleLink LCD+VGA.

Link to comment
Share on other sites

Nope. Update to 10.8.3 (it can report an error at the end of the update process, e.g. i had cache error), reboot in single user mode, delete HDGraphics kext (rm -Rf /System/Library/Extensions/AppleIntelHDGraphics*) then reboot and install 10.8.3 kexts... I think thats easy enough) feel free to pm)

 

I've upgraded to 10.8.3 and followed the instructions as you pointed out. However, the VGA port still doesn't work. I'm using a ThinkPad x201i. What's your model, andrio.b?

Link to comment
Share on other sites

Hello everybody, first I want to THANK all of you because of all this kexts and fixes for our hackintoshes, and well I've been followed all guides and I can say that I'm writing from my Gateway NV59c and it works perfect!!! or almost perfect, I recently updated to 10.8.3 and reinstall the FB alternate and works like a charm, (even the Shell screensaver). But anyway, getting to the point of this guide for backlight and brightness I'm just very carefully about it because I'm a little confused and I dont wanna mess my installation. I tried to follow this but I'm working without a DSDT and my Motherboard is not listed on the DSDT data base, I dont know how to get this fix to work if I can't even get my own DSDT.

 

I will be very happy if you point me to some direction, so my hackintosh is nearly perfect. Theres are a couple of things that also are not working as I would like to, one is the battery, it seems that is doesn't charge anymore, neither in my windows partition, it only gets like 18% and stucks there... And the other one is the awake task, when my gateway sleeps it doesn't awake, it can display a very very dark frame that seems to be the user login, but I can do anything, I have to shutdown and restart everytime it happens. And it is also the same problem on my windows partition, but the difference is that in win 7 the user login frame doesn't shows at all. I think is a problem with the hardware itself and not precisely a OSX kext or fix related, but if you have any suggestions I'll be happy to hear.

 

Well thanx again for your time and sorry if I missed a little for the main topic of the post, hope somebody can help me. See you!!! :blush:

Link to comment
Share on other sites

Hi everyone.

Intel ACPI Component Architecture

ASL Optimizing Compiler version 20110112-32 [Jan 13 2011]

Copyright © 2000 - 2011 Intel Corporation

 

/Applications/x86tools/DSDTSE.app/Contents/Resources/DSDTFiles/dsdt.dsl 14132: Return (^^PCI0.GFX0.DD03._BQC ())

Error 4065 - Object not found or not accessible from scope ^ (^^PCI0.GFX0.DD03._BQC)

 

/Applications/x86tools/DSDTSE.app/Contents/Resources/DSDTFiles/dsdt.dsl 14136: ^^PCI0.GFX0._DOS (Arg0)

Error 4065 - Object not found or not accessible from scope ^ (^^PCI0.GFX0._DOS)

 

ASL Input: - 15843 lines, 569525 bytes, 6951 keywords

Compilation complete. 2 Errors, 0 Warnings, 0 Remarks, 14 Optimizations

 

I got this error when i add the code to PNLF

I need a little help. Excuse my bad english!

dsdt.zip

Link to comment
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

Refer to the above, I gathered more informations in RW-everything on all memory registers that can do with my system and all DSDTs generated by AIDA-64. Please have a look. It must be something I am missing when everything is working except the backlight after sleep.

DSDTs.zip

MemRegisters.zip

systeminfo.zip

Link to comment
Share on other sites

Hi everyone.

Intel ACPI Component Architecture

ASL Optimizing Compiler version 20110112-32 [Jan 13 2011]

Copyright © 2000 - 2011 Intel Corporation

 

/Applications/x86tools/DSDTSE.app/Contents/Resources/DSDTFiles/dsdt.dsl 14132: Return (^^PCI0.GFX0.DD03._BQC ())

Error 4065 - Object not found or not accessible from scope ^ (^^PCI0.GFX0.DD03._BQC)

 

/Applications/x86tools/DSDTSE.app/Contents/Resources/DSDTFiles/dsdt.dsl 14136: ^^PCI0.GFX0._DOS (Arg0)

Error 4065 - Object not found or not accessible from scope ^ (^^PCI0.GFX0._DOS)

 

ASL Input: - 15843 lines, 569525 bytes, 6951 keywords

Compilation complete. 2 Errors, 0 Warnings, 0 Remarks, 14 Optimizations

 

I got this error when i add the code to PNLF

I need a little help. Excuse my bad english!

dsdt.zip

 

Hi, try with this.

Note: I recommend you use MBP6.2 smbios.

 

Regards

DSDT.aml.zip

Link to comment
Share on other sites

I'm having trouble enabling the brightness slider on my Thinkpad T410. The screen can sleep and wake to the proper brightness by using the _WAK and OperationRegion settings from your help with FelixChan. I've tried toggling the BCQ use index in ACPIBacklight.text without any luck. My machine does not have any _BCM or BCQ methods in the LCD0 section (they don't exist when I do a DSDT dump from Linux). Any suggestions?

 

Thanks in advance.

 

DSDT.aml.zip

Link to comment
Share on other sites

Awesome! I disable the nvindia card in bios and now the backlight are working perfectly, but only with slider, with key not working.

The new problem is the trackpad and the keyboard not work after sleep.

Thank you for your help in advance.

DSDT.aml.zip

Link to comment
Share on other sites

Turns out that the values sent to the register are dependent on your display. If you send a value higher than the display supports, it simply maxes out and you see the effect of the 'sun' graphic going higher, but the brightness staying the same. I simplified and adjusted the PNLF Device to accomodate my system (Lenovo Thinkpad T410):

 

 Device (PNLF)
 {
	 Name (_HID, EisaId ("APP0002"))
	 Name (_CID, "backlight")
	 Name (_UID, 0x0A)
	 Name (_STA, 0x0B)
	 Method (_BCL, 0, NotSerialized)
	 {
		 Return (Package (0x13)
		 {
                0x0640,
                0x03E8,
                Zero,
                0x0064,
                0x00C8,
                0x012C,
                0x0190,
                0x01F4,
                0x0258,
                0x02BC,
                0x0320,
                0x0384,
                0x03E8,
                0x044C,
                0x04B0,
                0x0514,
                0x0578,
                0x05DC,
                0x0640
		 })
	 }
	 Method (_BCM, 1, NotSerialized)
	 {
		 Store (0x80000000, LEVW)
		 Store (0x061A061A, LEVX)
		 Store (0x80000000, LEV2)
		 Store (Arg0, LEVL)
	 }
	 Method (_BQC, 0, NotSerialized)
	 {
		 Return (BRTL)
	 }

        Method (_DOS, 1, NotSerialized)
        {
            ^^PCI0.VID._DOS (Arg0)
        }    
 }

 

I also simplified the OperationRegions (add right above the start of Scope (_SB)):

   OperationRegion (BRIT, SystemMemory, 0xF2048250, 0x00800008)
   Field (BRIT, AnyAcc, Lock, Preserve)
   {
       LEV2,   32, 
       LEVL,   32, 
       Offset (0x80000), 
       LEVW,   32, 
       LEVX,   32
   }

 

And finally add these to _WAK:

 Store (0x80000000, LEVW)
 Store (0x061A061A, LEVX)
 Store (0x80000000, LEV2)
 Store (0x065B, LEVL)

 

The levels might could use some tweaking to get them to rise/fall more uniformly. I also decided to emulate the Mac behaviour of having the backlight go off when you bring the brightness to "zero" (no boxes lit).

  • Like 4
Link to comment
Share on other sites

Turns out that the values sent to the register are dependent on your display. If you send a value higher than the display supports, it simply maxes out and you see the effect of the 'sun' graphic going higher, but the brightness staying the same. I simplified and adjusted the PNLF Device to accomodate my system (Lenovo Thinkpad T410):

 

 Device (PNLF)
 {
	 Name (_HID, EisaId ("APP0002"))
	 Name (_CID, "backlight")
	 Name (_UID, 0x0A)
	 Name (_STA, 0x0B)
	 Method (_BCL, 0, NotSerialized)
	 {
		 Return (Package (0x13)
		 {

0x0640,
0x03E8,
Zero,
0x0064,
0x00C8,
0x012C,
0x0190,
0x01F4,
0x0258,
0x02BC,
0x0320,
0x0384,
0x03E8,
0x044C,
0x04B0,
0x0514,
0x0578,
0x05DC,
0x0640
		 })
	 }
	 Method (_BCM, 1, NotSerialized)
	 {
		 Store (0x80000000, LEVW)
		 Store (0x061A061A, LEVX)
		 Store (0x80000000, LEV2)
		 Store (Arg0, LEVL)
	 }
	 Method (_BQC, 0, NotSerialized)
	 {
		 Return (BRTL)
	 }
 }

 

I also simplified the OperationRegions (add right above the start of Scope (_SB)):

OperationRegion (BRI1, SystemMemory, 0xF2048250, 0x08)
Field (BRI1, AnyAcc, Lock, Preserve)
{
 LEV2, 32,
 LEVL, 32
}
OperationRegion (BRI2, SystemMemory, 0xF20C8250, 0x08)
Field (BRI2, AnyAcc, Lock, Preserve)
{
 LEVW, 32,
 LEVX, 32
}

 

And finally add these to _WAK:

 Store (0x80000000, LEVW)
 Store (0x061A061A, LEVX)
 Store (0x80000000, LEV2)
 Store (0x065B, LEVL)

 

The levels might could use some tweaking to get them to rise/fall more uniformly. I also decided to emulate the Mac behaviour of having the backlight go off when you bring the brightness to "zero" (no boxes lit).

 

Thanks jerrywilborn, i will add the link to your finding to the main post

  • Like 2
Link to comment
Share on other sites

Thanks jerrywilborn, i will add the link to your finding to the main post

Thank you both for your efforts on bringing this guides, I have been struggling with this wakeup from sleep brightness for weeks, thanks to "jerrywilborn"s simplified guide I can wake my screen from sleep :D , keep :thumbsup_anim: up a good work.

  • Like 1
Link to comment
Share on other sites

Hi all, I've two problem the brightness slider and the fn key works but the sun icon not appear, the slider works only from the lowest to the middle and when I try to wake from sleep I've a black screen. Can anyone look my DSDT?

Thank you.

Link to comment
Share on other sites

Hi all, I've two problem the brightness slider and the fn key works but the sun icon not appear, the slider works only from the lowest to the middle and when I try to wake from sleep I've a black screen. Can anyone look my DSDT?

Thank you.

 

Make sure you have:

1. ACPIBacklight.kext loaded (run 'kextstat' and run 'grep ACPIBacklight /var/log/system.log')

2. All four ACPI methods in your PNLF Device (_BQC, _BCL, _BCM _DOS)

3. You've given a EisaId to your LCD Device

4. You have all the HasPanel, Haslid, backlight-control, boot-display and built-in properties set in your _DSM of your graphics device

5. You have the four lines in your _WAK

6. You have your OperationRegions set

 

See my post (#68) for your "only works from lowest to middle", your levels probably need tweaking. I don't know of a good way to find the true upper limit besides trial/error. Mine ended up being 1600 decimal (0x0640)

  • Like 1
Link to comment
Share on other sites

Make sure you have:

1. ACPIBacklight.kext loaded (run 'kextstat' and run 'grep ACPIBacklight /var/log/system.log')

2. All four ACPI methods in your PNLF Device (_BQC, _BCL, _BCM _DOS)

3. You've given a EisaId to your LCD Device

4. You have all the HasPanel, Haslid, backlight-control, boot-display and built-in properties set in your _DSM of your graphics device

5. You have the four lines in your _WAK

6. You have your OperationRegions set

 

See my post (#68) for your "only works from lowest to middle", your levels probably need tweaking. I don't know of a good way to find the true upper limit besides trial/error. Mine ended up being 1600 decimal (0x0640)

ACPIBacklight is loaded, OperationRegions is set, and I given a EiasaId. Can you have a look to my DSDT? Specially for point 2, 4 and 5 ?

Thanx

Link to comment
Share on other sites

ACPIBacklight is loaded, OperationRegions is set, and I given a EiasaId. Can you have a look to my DSDT? Specially for point 2, 4 and 5 ?

Thanx

 

This issue is a real tough one to troubleshoot remotely; you're going to have to play around with it. Read my post for questions about point 2 and 5; read this for details on point 4.

Link to comment
Share on other sites

 Share

×
×
  • Create New...