Jump to content

mnorthern

Members
  • Content Count

    52
  • Joined

  • Last visited

Everything posted by mnorthern

  1. FOREWORD: Be warned this is a messy guide for advanced users. This guide will apply if you have first generation Intel graphics also known as GMA 5700MHD (PCI id 8086:0046) It is guaranteed to work on a HP G62 laptop (this laptop doesn't seem to use EC to manage brightness) It may also work on other laptops, with some experimenting! If it doesn't work, see the replies in this thread before asking for help. Update: make sure you read other posts in this thread, if your laptop is not a HP G62 laptop, especially post 68 from jerrywilborn which may help you http://www.insanelymac.com/forum/topic/287133-guide-backlight-brightness-for-intel-80860046-1st-gen-hd-gma-5700mhd/page__st__60?do=findComment&comment=1903273 OBJECTIVES: This guide should help you enable: Brightness keys Brightness slider in preference panel Backlight will work on waking up from ACPI sleep (note: if you ONLY want to enable this fix, and no other fixes, then see post number #6 ) Screen dimming will work after a short period of inactivity Screen sleeping will work off after a longer period of inactivity Automatic screen dim when switching to battery power If you have applied my fixes from another thread, you will need to review them, as a lot has changed. PREREQUISITES: First you will need to install hotKoffy's ACPI BACKLIGHT kext (attached). (Note: Do not install the Generic Brightness kext -- if you have it , try and delete it) ---- GUIDE ---- Step1: Find out our graphics BAR0 register (sometimes known as BAR1 register because some people count from 1...) Mine is at 0xB0000004 so you will notice all my "magic numbers" starting with 0xB.... To find your BAR0/BAR1 address, you will have to look at your integrated graphics PCI configuration space. It will usually be the second device on PCI bus 0 (device 00:02:00) You have two options, Expert option: You can use the 64bit lspci driver from these forums and do it on your Mac. Easier option: you can find this info even easier using RW-Everything on windows, but you will have to boot from windows. Download the RW-everything app from Download | RWEverything , start it, go to PCI window, and select your Intel Graphics from the drop down, take note of the BAR1 number (screenshot below:) The screenshot above is from giofrida's system. Because his BAR0 starts with 0xC.. we will need to modify the OperationRegions below so that 0xB00048254 becomes 0xC00048254, and 0xB00048250 becomes 0xC0048250 etc. You will need to do this for your system. Step 2: --- ACTUAL PATCHES--- Open your DSDT.aml in a DSDT Editor (see other threads for how to use this. MODIFYING DSDT MAY SCREW UP YOUR COMPUTER SO BE SURE YOU KNOW WHAT YOU'RE DOING.) The following needs to be placed just before the beginning of " Scope (_SB)" ( before the first occurence of this string in your DSDT). Make sure you change the magic numbers to comply with your BAR0. OperationRegion (BRIT, SystemMemory, 0xB0048254, 0x04) Field (BRIT, AnyAcc, Lock, Preserve) { LEVL, 32 } OperationRegion (BRI2, SystemMemory, 0xB0048250, 0x04) Field (BRI2, AnyAcc, Lock, Preserve) { LEV2, 32 } OperationRegion (BRI3, SystemMemory, 0xB00C8250, 0x04) Field (BRI3, AnyAcc, Lock, Preserve) { LEVW, 32 } OperationRegion (BRI4, SystemMemory, 0xB00C8254, 0x04) Field (BRI4, AnyAcc, Lock, Preserve) { LEVX, 32 } 2. Now, the following assumes your graphics module is called GFX0 and that the LCD is listed as the second sub-device of GFX0. To find your graphics module, you can try and look for the line "Name (_ADR, 0x00020000)". The LCD should be the second sub device, mine is called DD02. You can use IOREG to confirm the name of your graphics (eg. GFX0). You can use the following method to identify the LCD sub-device: simply, go to your GFX0 (or equivalent), and then under that device, identify the sub-device that has those methods (_BCM, _BCQ, _BCL). YOU NEED TO REMEMBER TO NAME THIS SUB- DEVICE by adding the following line: Name (_HID, EisaId ("LCD1234")) in my case it looks like this Device (DD02) { Name (_HID, EisaId ("LCD1234")) ... 3. Then, you will need to add a new device PNLF. Usually you will have to add this before the beginning of Scope _PR, or after all other devices. IF YOU ALREADY HAVE ANOTHER PNLF DEVICE, you will need to replace any other PNLF you may already have (delete it and then use my code instead). Device (PNLF) { Name (_HID, EisaId ("APP0002")) Name (_CID, "backlight") Name (_UID, 0x0A) Name (_STA, 0x0B) Method (_BCL, 0, NotSerialized) { Return (Package (0x13) { 0x64, 0x32, Zero, 0x06, 0x0C, 0x12, 0x18, 0x1E, 0x24, 0x2A, 0x30, 0x36, 0x3C, 0x42, 0x48, 0x4E, 0x54, 0x5A, 0x64 }) } Method (_BCM, 1, NotSerialized) { Store (0x80000000, LEV2) If (LGreaterEqual (Arg0, 0x64)) { Store (0x12FF, LEVL) } Else { If (LGreaterEqual (Arg0, 0x5A)) { Store (0x11FF, LEVL) } Else { If (LGreaterEqual (Arg0, 0x54)) { Store (0x103A, LEVL) } Else { If (LGreaterEqual (Arg0, 0x4E)) { Store (0x0EBB, LEVL) } Else { If (LGreaterEqual (Arg0, 0x48)) { Store (0x0B24, LEVL) } Else { If (LGreaterEqual (Arg0, 0x42)) { Store (0x0873, LEVL) } Else { If (LGreaterEqual (Arg0, 0x3C)) { Store (0x065B, LEVL) } Else { If (LGreaterEqual (Arg0, 0x36)) { Store (0x04C8, LEVL) } Else { If (LGreaterEqual (Arg0, 0x30)) { Store (0x0396, LEVL) } Else { If (LGreaterEqual (Arg0, 0x2A)) { Store (0x02B0, LEVL) } Else { If (LGreaterEqual (Arg0, 0x24)) { Store (0x0266, LEVL) } Else { If (LGreaterEqual (Arg0, 0x1E)) { Store (0x0218, LEVL) } Else { If (LGreaterEqual (Arg0, 0x18)) { Store (0x01D1, LEVL) } Else { If (LGreaterEqual (Arg0, 0x12)) { Store (0x0191, LEVL) } Else { If (LGreaterEqual (Arg0, 0x0C)) { Store (0x0161, LEVL) } Else { If (LGreaterEqual (Arg0, 0x06)) { Store (0x0132, LEVL) } Else { If (LGreaterEqual (Arg0, Zero)) { Store (0x82, LEVL) } Else { Store (0x11FF, LEVL) } } } } } } } } } } } } } } } } } } Method (_BQC, 0, NotSerialized) { Return (^^PCI0.GFX0.DD02._BQC ()) } Method (_DOS, 1, NotSerialized) { ^^PCI0.GFX0._DOS (Arg0) } } In the code snippet above, you may have to change whenever it says "PCI0.GFX0..." to your equivalent, eg. say "_SB.PCI0.VGA0" or something. Provided, the KEXTs were installed, this will enable your brightness slider, and it should work without problems incrementing/decrementing brightness in 17 discrete brightness steps (16 + zero state), and this is the number of steps needed to enable the brightness keys, so they will work now! The final step is to enable Backlight after wake-up. The 1st gen HD graphics uses two special registers to achieve this, and the following will fix it for you: Search your DSDT for the method _WAK Add two lines to the beginning, so that it looks like this: Method (_WAK, 1, Serialized) { Store (0x80000000, LEVW) Store (0x13121312, LEVX) ... Voila! Happy to help you with your DSDT's if you have any problems! Report if it's worked! ACPIBacklight.kext.zip
  2. mnorthern

    [GUIDE] 1st Generation Intel HD Graphics QE/CI

    did anyone get HDMI out working?
  3. Thanks jerrywilborn, i will add the link to your finding to the main post
  4. mnorthern

    AppleIntelHDGraphicsFB fixed (SL 10.6.8)

    Does anyone have any of the following problems... Take a picture that's big but not too big (say 1280 x 1024) and open it in Preview app. Try making color adjustments through Adjust Colour. I am suffering terrible lag with simple stuff like Highlights and Shadows. And if I try to adjust Sharpness to make it look softer, the whole picture disappears. Is this normal ? Also, do I understand correctly.. to enable the shell screen saver, I need to update to 10.8.3 ?
  5. 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:
  6. mnorthern

    Realtek WLAN Client Utility Facelift

    Thanks that's amazing! I'm gonna play with it too
  7. mnorthern

    Realtek WLAN Client Utility Facelift

    Thanks it looks good! Can you please tell us how you did it (what steps)? Did you have to decompile the original application? I am just starting with XCode and any pointers would be useful Thanks!!
  8. 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 () 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 },
  9. mnorthern

    AppleIntelHDGraphicsFB fixed (SL 10.6.8)

    I don't think it's possible to make an artificial generic EDID because timings are different for different panels! So are you saying Windows creates an EDID for you? Can you not inject that one?
  10. 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" whats going on lol
  11. 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 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
  12. mnorthern

    AppleIntelHDGraphicsFB fixed (SL 10.6.8)

    Pentothal, maybe what I say will be useful , maybe not I was playing with my IOPlatformPluginFamily.kext and changed it so that it loaded without its component ACPI_SMC_PlatformPlugin. This was a bad idea, and I ended up seeing exactly what you saw in your second screenshot. I got a grey screen, and then the computer ended up overheating and turned off. Which leads me to suspect that the framebuffer will not work if CPU power states are not working properly So I would suggest you make sure your power kexts are working fine (IOPlatformPluginFamily.kext must be untouched from original, also check FakeSMC and other power plugins), check your SSDT, if you dont have one then try to generate one, then enable all P states C states and C2-C4 states. Maybe the framebuffer doesnt have enough power to load or something.. just my theory
  13. mnorthern

    AppleIntelHDGraphicsFB fixed (SL 10.6.8)

    Well coil whine is "normal" if there is too much power load on coils, i.e. bad power management And i'm pretty sure its not my HDD cos i dont have a HDD I do use SSDT though In early macbooks, the coil noise was present and could be removed by a work around by disabling C4 state, but that decreased battery life so it was never an ideal workaround. People made apps such as ShhMBP to remove the noise, but all those apps had side effects. I wonder if its worth trying those apps out are you saying using a dual link fb instead of single link could possibly help ?
  14. 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
  15. 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
  16. mnorthern

    AppleIntelHDGraphicsFB fixed (SL 10.6.8)

    I have the same problem! I wouldn't have noticed if you didn't say. Shell doesn't work at all. Also, my graphics are really "loud" under OS X. Things like scrolling or editing pictures generate this funny squealing noise (coil whine). I don't have this under Windows.. any ideas anyone
  17. Hi guys I have a question I have recently moved my HDD to my optical bay using a caddy, and I am using an SSD to boot up I usually eject the HDD from Finder and set the disk sleep to 1 using pmset. However, I've noticed (using SpindownHD) that even when unmounted, the HDD will spin up randomly every 4-5 minutes and then go to sleep again... this is audible, and actually very annoying. Do you have any ideas why this is happening and how to solve it?
  18. mnorthern

    AppleIntelHDGraphicsFB fixed (SL 10.6.8)

    Hey that second screenshot is so cool! How did you manage to get BAR1 on your MAC? What command did you use? I will have a look to see why it's not working, but I may need some more screenshots from you (look at the screenshots by Felix Chan in the other brightness thread)
  19. Hello I will have a look, if you can also send me the same screenshots as Felix Chan, that might help too! hiya no it shouldnt be needed for wake-up! also, i think i could write an app that uses LPCI to get the BAR0, actually thats a good idea yes gonna have a look tonight or tomorrow
  20. Okies I will have a look tonight
  21. Can you send me your original DSDT , and your DSDT after patching with the stuff above? That's really peculiar. If you put a correct BAR0 number, then the only affected thing should be your graphics controller. Your keyboard or other buttons shouldn't be affected, unless there's something weird going on that I haven't figured out I hope you didn't delete any stuff from your _WAK method, only added my stuff to the beginning
  22. 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!
  23. mnorthern

    [GUIDE] 1st Generation Intel HD Graphics QE/CI

    Does anyone have a HDMI-out working with this card, and how did you achieve it? Thx
  24. mnorthern

    AppleIntelHDGraphicsFB fixed (SL 10.6.8)

    I actually use NATIT and i Have pnlf installed. What happens if you add a really basic PNLF like the following Device (PNLF) { Name (_HID, EisaId ("APP0002")) Name (_CID, "backlight") Name (_UID, 0x0A) Name (_STA, 0x0B) }
  25. mnorthern

    AppleIntelHDGraphicsFB fixed (SL 10.6.8)

    Hi what do you suspect? I am not an expert in DSDT, I am not sure at this time what the problem is, but I'm thinking Also at which point are you getting restarts, after booting?
×