Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

Backlight, all resolutions and hot plug DVI/VGA for T60p

OS-X on ThinkPads
Post Reply
Message
Author
bgm
Posts: 4
Joined: Sat May 07, 2011 4:27 pm
Location: Washington, DC

Backlight, all resolutions and hot plug DVI/VGA for T60p

#1 Post by bgm » Wed May 11, 2011 2:15 pm

Finally got backlight, all resolutions and external monitor output/detection working on my QXGA T60p (v5200) with 10.6.7

Updated May 12 2011: Dual link DVI output is fully functional too, see bellow.

Backlight

By default ATI1600Controller uses 0x5208 as backlight-PWM-freq, which after some convoluted processing in the driver becomes a 0 in LVTMA_BL_MOD_REF_DIV, apparently that doesn't work well for T60p, which usually has values like 0x80 in that field. The result is uneven left-to-right backlight on all but the brightest levels.

Setting backlight-PWM-freq to 0x100 brings the LVTMA_BL_MOD_REF_DIV to 0xF0, which seems to work nicely on my laptop. Please be careful experimenting with it, I don't know if setting this too high or too low might damage your inverter. The following works for my T60p just fine (note that it's little-endian in the plist - 0x00010000) :

Code: Select all

 
<key>@0,backlight-PWM-freq</key>
<data>
AAEAAA==
</data>
See http://www.x.org/docs/AMD/RRG-216M56-03oOEM.pdf for the ATI X1600 registers description.

Resolutions

My QXGA panel is programmed with the following EDID (found here on forums):

Code: Select all

	# EDID version 1 revision 3
Section "Monitor"
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
	Identifier "LEN:4940"
	VendorName "LEN"
	ModelName "LEN:4940"
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
	# DPMS capabilities: Active off:yes  Suspend:yes  Standby:yes

	Mode 	"2048x1536"	# vfreq 50.088Hz, hfreq 77.185kHz
		DotClock	164.250000
		HTimings	2048 2080 2096 2128
		VTimings	1536 1537 1540 1541
		Flags	"-HSync" "-VSync"
	EndMode
	Mode 	"2048x1536"	# vfreq 50.467Hz, hfreq 77.770kHz
		DotClock	164.250000
		HTimings	2048 2080 2096 2112
		VTimings	1536 1537 1540 1541
		Flags	"-HSync" "-VSync"
	EndMode
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
EndSection
It doesn't have maximum HorizSync, VertRefresh and Dot Clock specified. So ATI driver can't figure out proper timing for all derived resolutions.

Replacing this EDID with a fixed stock one, which has all the information, completely solves the problem.

Code: Select all

00 FF FF FF FF FF FF 00 24 94 CE 22 00 00 00 00 
00 00 01 03 80 1E 17 78 0A CD 71 91 55 4F 8B 26 
21 54 56 00 00 00 01 01 01 01 01 01 01 01 01 01 
01 01 01 01 01 01 29 40 00 60 80 00 13 60 10 10 
11 00 30 E4 10 00 00 1E 00 00 00 FD 00 30 32 4C 
4D 11 00 0A 20 20 20 20 20 20 00 00 00 0F 00 A9 
43 32 A9 43 28 14 02 0A 0A 0A 0A 0A 00 00 00 FE 
00 49 41 51 58 31 30 0A 20 20 20 20 20 20 00 3D

Code: Select all

Section "Monitor"
	# Block type: 2:0 3:fd
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
	Identifier "IDT:ce22"
	VendorName "IDT"
	ModelName "IDT:ce22"
	# Block type: 2:0 3:fd
	HorizSync 76-77
	VertRefresh 48-50
	# Max dot clock (video bandwidth) 170 MHz
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
	# DPMS capabilities: Active off:no  Suspend:no  Standby:no

	Mode 	"2048x1536"	# vfreq 49.266Hz, hfreq 76.609kHz
		DotClock	164.250000
		HTimings	2048 2064 2080 2144
		VTimings	1536 1537 1538 1555
		Flags	"+HSync" "+VSync"
	EndMode
	# Block type: 2:0 3:fd
	# Block type: 2:0 3:f
	# Block type: 2:0 3:fe
EndSection

So, to make all derived resolutions work, put the missing information into your EDID and add it as shown bellow to your ATI parameters.

Code: Select all

                <key>AAPL00,override-has-edid-digital</key>
                <data>
                AP///////wAklM4iAAAAAAAAAQOAHhd4Cs1xkVVPiyYhVFYAAAABAQEBAQEB
                AQEBAQEBAQEBKUAAYIAAE2AQEBEAMOQQAAAeAAAA/QAwMkxNEQAKICAgICAg
                AAAADwCpQzKpQygUAgoKCgoKAAAA/gBJQVFYMTAKICAgICAgAD0=
                </data>
External monitor detection (VGA only for now)

This one requires ATIFramebuffer.kext patching.

Here is a quote from bcc9
"The problem:
Under OSX the ATI driver uses a hard-coded set of personalities to define some of the video card's capabilities, most notably the connector layout. This is sufficient to support the limited number of configurations that Apple ships, but leads to non-working monitors (black displays) in many hackintosh configurations. Users have limited success & limited functionality by simply guessing which hard-coded personality best matches their video card."
See his post for more info:
http://www.insanelymac.com/forum/index. ... ed&start=0

Apparently ATI,Wormy personality in ATIFramebufer has the following ConnectorInfo

Code: Select all

0000000    02  00  00  00  40  00  00  00  29  00  00  00  00  01  01  03
0000010    04  00  00  00  16  00  00  00  00  00  00  00  00  10  02  01
Which makes the ATI drivers think that VGA port is connected to DAC B, when in fact it is connected to DAC A. So when the monitor is attached/detached OSX turns on and off the wrong DAC. If monitor was there at the power-on the correct DAC is initialized by the BIOS and is never touched by the ATI driver after that.

Changing 0x10 to 0x00 solves the problem. Now the external monitor detection and output works even if the monitor wasn't there at power-on.

Code: Select all

0000000    02  00  00  00  40  00  00  00  29  00  00  00  00  01  01  03
0000010    04  00  00  00  16  00  00  00  00  00  00  00  00  00  02  01
The DVI output will probably require a little bit more hacking, perhaps someone else could have a look at it, as I just don't have means to test it at this point.

Update May 12, 2011:

Got the DVI output working. Sometimes there is no output signal on DVI connector after reboot, though a monitor is properly detected. Reconnecting the monitor or turning Mirroring on and off usually fixes the issue.

The ATY,Wormy personality has only 2 ConnectorInfo's. The DVI output is on 3rd. So we need to pick another personality if we want DVI.
I used ATY,Flicker. To do it I set @0,name, @1,name and @2,name to ATY,Flicker and removed all x@,compatible settings. In the ATIFramebufer
I copied two Wormy ConnectorInfo's over Flipper's ones, and created a third one for DVI:

Code: Select all

Personality: Flicker
ConnectorInfo count in decimal: 3
Disk offset in decimal 225336
0000000    02  00  00  00  40  00  00  00  29  00  00  00  00  01  01  03
0000010    04  00  00  00  16  00  00  00  00  00  00  00  00  00  02  01
0000020    04  00  00  00  16  00  00  00  00  00  00  00  00  10  03  02
Also I replaced references to Wormy with references to Flicker in the ATIFramebuferr's Info.plist. Though this step is optional.

You can download the patched ATIFramebuffer.kext with my com.apple.Boot.plist and ATI.plist from
https://rapidshare.com/files/856477928/ ... 10.6.7.zip

Note that you need to remove my EDID from ati plist and change the Graphics mode in the boot plist if you don't have a QXGA panel.


Enjoy,
Bgm.

grandflash
Posts: 18
Joined: Thu Jan 29, 2009 11:00 am
Location: Darmstadt, Germany

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#2 Post by grandflash » Mon May 16, 2011 3:21 am

Hi Bgm,

how can I find out the right PWM adress for my Lenovo X61 - Tablet with X3100? Maybe with Reggie SE?

Yours, Alex
_________________
Lenovo X61t
Intel CoreDuo 1,6 GHz (L7500)
4 GB / 80GBSSD / GMA965 / FW 400 / SD Card
Bluetooth / Wifi AR5BXB6 / Tablet
MacOSX 10.7.3 (DSDT patch)

bgm
Posts: 4
Joined: Sat May 07, 2011 4:27 pm
Location: Washington, DC

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#3 Post by bgm » Mon May 16, 2011 4:39 pm

Alex,

That backlight-PWM-freq parameter is only applicable to ATI1600Contorller. I don't think any other kext uses it.
As for the X3100, you should be able to control the backlight on it using pci-utils, see

http://www.insanelymac.com/forum/index. ... pic=101966

Thanks,
Bgm.

adidasprince
Posts: 34
Joined: Wed Mar 07, 2007 1:54 am
Location: Tokyo, Japan
Contact:

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#4 Post by adidasprince » Sun May 29, 2011 4:27 am

NICE WORK!!!

I'm hoping if you can share the process that you get eq/ci with ATIFramebuffer instead of ATINDRV.
IBM ThinkPad T60p 2007-93J

Silencer
Junior Member
Junior Member
Posts: 345
Joined: Sat Dec 25, 2004 8:17 pm
Location: Riga, Latvia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#5 Post by Silencer » Wed Jun 01, 2011 1:53 pm

Great job! Haven't yet tested it, but I was looking for this for months back in the days when I was messing with my T60p. Will try soon and report back.
ThinkPad T60p with Snow Leopard 10.6.8
Intel Core 2 Duo T7600
4GB RAM, ATI FireGL V5200 256MB (1400x1050)

Silencer
Junior Member
Junior Member
Posts: 345
Joined: Sat Dec 25, 2004 8:17 pm
Location: Riga, Latvia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#6 Post by Silencer » Sun Jun 19, 2011 2:48 pm

Brightness trick works like a charm! Thanks for that.

With resolutions it's a bit unclear. I've snatched by EDID from Windows a while ago, and I used as per your example, but some resolutions are still produce blank screen. How do you get a stock EDID for a particular screen? I have SXGA+ (1400x1050).

Didn't apply ATIFramebuffer.kext patch, I'm keeping /S/L/E untouched, but I suppose this will work just fine.
ThinkPad T60p with Snow Leopard 10.6.8
Intel Core 2 Duo T7600
4GB RAM, ATI FireGL V5200 256MB (1400x1050)

Silencer
Junior Member
Junior Member
Posts: 345
Joined: Sat Dec 25, 2004 8:17 pm
Location: Riga, Latvia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#7 Post by Silencer » Sun Jun 19, 2011 2:55 pm

adidasprince wrote: I'm hoping if you can share the process that you get eq/ci with ATIFramebuffer instead of ATINDRV.
For me it's only a com.apple.Boot.plist with a proper 'device-properties' string.

You can try the following com.apple.Boot.plist if you have 1400x1050 screen: http://www.mediafire.com/file/f8wb5x9xp ... .plist.zip Just make sure you disable ATINDRV and ATIRadeonX1000 patches/loading.
ThinkPad T60p with Snow Leopard 10.6.8
Intel Core 2 Duo T7600
4GB RAM, ATI FireGL V5200 256MB (1400x1050)

Buble
Posts: 3
Joined: Sun Jul 31, 2011 8:52 am
Location: Minsk, Belarus

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#8 Post by Buble » Fri Mar 30, 2012 6:45 am

bgm, Thank you for backlight fix. It works

but i put it in dsdt:

Code: Select all

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

lvs1974
Posts: 6
Joined: Wed Aug 01, 2012 12:13 pm
Location: Saint-Petersburg, Russia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#9 Post by lvs1974 » Wed Aug 01, 2012 12:23 pm

Hi Bgm,

I'm really impressed by your results!
It's inspired me to try ATI1600Controller on my laptop Asus F3Se (video ATI1700 - 71DE) and Lion 10.7.3.

And an experiment is successful!

But I came across with only 2 problems (I haven't tried external outputs yet):
1. I had to use @0,override-no-connect, without it i get black screen.
2. Laptop is always restarts after wake because of kernel panic (there's no problem with ATINDRV).


Probably you could advise something, the way of injecting video for example...
Thank you in advance,

and best regards,
Sergey!

allex
Posts: 4
Joined: Wed Aug 11, 2010 4:20 am
Location: Moscow, Russia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#10 Post by allex » Sat Aug 04, 2012 2:39 pm

bgm wrote: You can download the patched ATIFramebuffer.kext with my com.apple.Boot.plist and ATI.plist from
https://rapidshare.com/files/856477928/ ... 10.6.7.zip
The file is not available anymore. Please, give me another chance to download it. Thanks.

lvs1974
Posts: 6
Joined: Wed Aug 01, 2012 12:13 pm
Location: Saint-Petersburg, Russia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#11 Post by lvs1974 » Sun Aug 05, 2012 9:11 am

Silencer wrote: You can try the following com.apple.Boot.plist if you have 1400x1050 screen: http://www.mediafire.com/file/f8wb5x9xp ... .plist.zip Just make sure you disable ATINDRV and ATIRadeonX1000 patches/loading.
Hi! Probably only you can help us with DVI and VGA outputs.

There's no chance to get help from bgm:
bgm: Last visited: Wed Jun 08, 2011 9:42 am

Have you managed to get that outputs working?

Silencer
Junior Member
Junior Member
Posts: 345
Joined: Sat Dec 25, 2004 8:17 pm
Location: Riga, Latvia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#12 Post by Silencer » Sun Aug 05, 2012 5:35 pm

lvs1974 wrote: Hi! Probably only you can help us with DVI and VGA outputs.
Have you managed to get that outputs working?
Unfortunately I never actually needed external outputs, so I never spent any time making them work. It's possible that I'll look into it when I try to install Mountain Lion.
ThinkPad T60p with Snow Leopard 10.6.8
Intel Core 2 Duo T7600
4GB RAM, ATI FireGL V5200 256MB (1400x1050)

lvs1974
Posts: 6
Joined: Wed Aug 01, 2012 12:13 pm
Location: Saint-Petersburg, Russia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#13 Post by lvs1974 » Mon Aug 06, 2012 1:15 am

Silencer wrote: Unfortunately I never actually needed external outputs, so I never spent any time making them work. It's possible that I'll look into it when I try to install Mountain Lion.
It would be very good!

Thank you in advance!

adidasprince
Posts: 34
Joined: Wed Mar 07, 2007 1:54 am
Location: Tokyo, Japan
Contact:

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#14 Post by adidasprince » Tue Dec 04, 2012 10:57 am

Tried in 10.7.2@T60p.

Backlight tweak worked (needed this for YEARS)

Dual display tweak worked too with some fix on ATI1600Controller versus ATIFrameBuffer.
Althou I need to "Detect Display" every time when I plug/unplug the cable, I am very satisfied.

Thank you!!!
IBM ThinkPad T60p 2007-93J

lvs1974
Posts: 6
Joined: Wed Aug 01, 2012 12:13 pm
Location: Saint-Petersburg, Russia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#15 Post by lvs1974 » Tue Dec 04, 2012 11:15 am

adidasprince wrote:Tried in 10.7.2@T60p.

Backlight tweak worked (needed this for YEARS)

Dual display tweak worked too with some fix on ATI1600Controller versus ATIFrameBuffer.
Althou I need to "Detect Display" every time when I plug/unplug the cable, I am very satisfied.

Thank you!!!
Do you mean working VGA and DVI outputs?
Could you give us some details about fixes on ATI1600Controller/ATIFrameBuffer?

Thank you!

adidasprince
Posts: 34
Joined: Wed Mar 07, 2007 1:54 am
Location: Tokyo, Japan
Contact:

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#16 Post by adidasprince » Sat Dec 08, 2012 7:51 am

lvs1974 wrote:
Do you mean working VGA and DVI outputs?
Could you give us some details about fixes on ATI1600Controller/ATIFrameBuffer?

Thank you!
My T60p only has one VGA output.

1. Search "02 00 00 00 40" in ATI1600Controller.
2. Find all 4 entries.
3. Change the "10 02 01" to "00 02 01"
4. Restart and enjoy
IBM ThinkPad T60p 2007-93J

lvs1974
Posts: 6
Joined: Wed Aug 01, 2012 12:13 pm
Location: Saint-Petersburg, Russia

Re: Backlight, all resolutions and hot plug DVI/VGA for T60p

#17 Post by lvs1974 » Sat Dec 08, 2012 11:28 am

adidasprince wrote: My T60p only has one VGA output.

1. Search "02 00 00 00 40" in ATI1600Controller.
2. Find all 4 entries.
3. Change the "10 02 01" to "00 02 01"
4. Restart and enjoy
Thank you!
I have VGA and DVI outputs, and I don't understand how to get them both working using Wormy...

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “OS-X Questions”

Who is online

Users browsing this forum: No registered users and 41 guests