Jump to content

d620 Docking station VGA out


Fireman Sam

Recommended Posts

Morning,

Thanks for all the great work you guys have been doing. I thought I would share a success story from the weekend. I wanted to use my d620 as a desktop machine - in the docking station with an external monitor + keyboard + mouse with the lid closed. What I found that while the external monitor would work when the laptop lid was open and I used both monitors, I could not get the external monitor to work when the lid was closed. I discovered that the external monitor worked in this configuration when I booted without a modified DSDT. I tracked this down to the inclusion of the AAPL,HasPanel device property. If the property was there, the external monitor only worked when the lid was open. This was all good but it was a hassle having to select a different DSDT whenever I wanted to use the d620 as a laptop or a desktop.

 

After several hours of hacking the DSDT I found a way to detect if the laptop is docked and whether the lid is closed. From this I was able to modify the _DSM method of the VID device. I added the following to the start of the method:

 


Method (_DSM, 4, NotSerialized)
{
   Store (MIS2, Local0)
   If (LNotEqual (Local0, 0x00))
   {
       Store (SMI (0x84, Zero), Local0)
       If (LEqual (Local0, 0x00))
       {
           Return (0x00)
       }
   }

   < ... snip normal _DSM code ... >
}

 

I discovered that the value in MIS2 is 0 when the laptop is not docked and SMI(0x84, Zero) returns 0 when the lid is closed.

 

My tests show that this works with the official EDP DSDT (extracted from the bios mod).

 

EDIT: I neglected to mention that I had to remove the device-properties line from /Extra/com.apple.boot.plist.

Link to comment
Share on other sites

I performed a quick test last night when I got home and as I thought, currently this doesn't work when the laptop is not docked, an external monitor connected, and the lid closed. To get it to work with the external display only simply remove the first conditional (which checks to see if the laptop is docked).

 

Method (_DSM, 4, NotSerialized)
{
   Store (SMI (0x84, Zero), Local0)
   If (LEqual (Local0, 0x00))
   {
       Return (0x00)
   }

   < ... snip normal _DSM code ... >
}

Link to comment
Share on other sites

Hi all,

 

First nice work by all. I have not been an Apple user, but now that I have access to a machine running the

Apple OS, it has given me something to think about.

 

Since I have an interest in using a D620 in a docking station, I decided to try the solution posted by "Fireman Sam".

I was able to implement the documented changes, and found it worked at advertised.

 

I started looking at why the DVI port did now work. I looked over "dumps" from real Apple machines, and found an

interesting different between the Apple version of a variable, and the one in the D620 DSDT. The variable, from the

EDP 1.7 DSDT is:

 

"AAPL,Haslid"

 

Apple uses

 

"AAPL,HasLid"

 

Note the "Capital-L".

 

I updated the DSDT, and gave it a try. It still worked.

 

I backed-out the DSDT change (detection of lid/dock), and gave it a try.

It still worked. Using "system profiler" I was able to note the internal display

was not "configured" when docked, but was when not docked. This should

help save on power, I guess.

 

So my modified fix is;

1) Remove the device-properties from com.apple.boot.plist (As documented by Fireman Sam).

2) Change "AAPL,Haslid" to "AAPL,HasLid" in DSDT.

 

To be accurate, I did update two of the other variables, "subsystem-vendor-id", and "subsystem-id".

This should not matter. I also noted that there are various other variables, in the Apple version. Most

I do not know what they do, and I am not clear which should be in DSDT, and which should be in

com.apple.boot.plist.

 

This version of the fix, seems to move the decision making from the DSDT, to the OS level. This fix should

be more portable across laptops, and other VGA chipsets. "Wake from sleep" still works. I did not

try mirror, and there are still other things to test.

Link to comment
Share on other sites

It has been a while since I updated this, but I have some additional information.

 

First, using EDP 1.7, I went back to see if I could add back the device-properties

line in com.apple.boot.plist. After adding it back it still worked correctly when in

the docking station. It also worked out of the docking station. The only problem

I observed is then the screen entered display sleep. It does exit display sleep, but

the screen seems to be at a lower resolution. It is still 1440x900, but it is as if half

the pixels are not being used. I was able to track the problem to the option

 

AAPL01,DualLink

 

It seems with displays of this size, 1440x900, this needs to be set. So I updated

and added the following

 

"AAPL01,DualLink",

Buffer (0x04)

{

0x01, 0x00, 0x00, 0x00

},

 

"AAPL01,Height",

Buffer (0x04)

{

0x84, 0x03, 0x00, 0x00

},

 

"AAPL01,Width",

Buffer (0x04)

{

0xA0, 0x05, 0x00, 0x00

},

 

This fixes the display sleep problem, and it still works in the docking station.

 

I have also moved from 10.6.7 and EDP 1.7 to 10.6.8 and EDP 1.9. I have

not had time to update to EDP 1.9.1 or 1.9.2. Things have changed in Chameleon

since EDP 1.7. The com.apple.boot.plist has been changed to org.chameleon,Boot.plist.

The device-properties is no longer present in the new file. The good news is these

changes have not been a problem for this docking station fix.

 

At this point I decided to look back at the fix to this parameter.

 

"AAPL,HasLid",

Buffer (0x04)

{

0x01, 0x00, 0x00, 0x00

},

 

This parameter had been updated from AAPL,Haslid to AAPL,HasLid.

 

I did a strings on /System/Library/Extensions/AppleIntelIntegratedFramebuffer.kext/AppleIntelIntegratedFramebuffer

 

After pruning back some of the junk I got.

 

AAPL,HasPanel

AAPL,HasLid

AAPL,NumFramebuffers

AAPL,NumDisplays

AAPL,DisplayConfig

AAPL,SelfRefreshSupported

AAPL,display-alias

AAPL,boot-display

saved-config

saved-timing0

saved-timing1

AAPL00,CurrentDisplay

AAPL00,IODisplayMode

AAPL00,Pipe

AAPL00,BootDisplay

AAPL00,Depth

AAPL00,Width

AAPL00,Height

AAPL00,Interlace

AAPL00,Refresh

AAPL00,EDID

AAPL00,display-alias

AAPL00,IgnoreConnection

AAPL00,no-hotplug-interrupt

AAPL01,DualLink

AAPL01,T1

AAPL01,T2

AAPL01,T3

AAPL01,T4

AAPL01,T5

AAPL01,T6

AAPL01,T7

AAPL01,PixelFormat

AAPL01,BacklightIntensity

AAPL01,InverterFrequency

AAPL01,CurrentDisplay

AAPL01,IODisplayMode

AAPL01,Pipe

AAPL01,BootDisplay

AAPL01,Depth

AAPL01,Width

AAPL01,Height

AAPL01,Interlace

AAPL01,Refresh

AAPL01,EDID

AAPL01,display-alias

AAPL01,IgnoreConnection

AAPL01,no-hotplug-interrupt

 

So this driver does reference AAPL,HasLid.

 

I have also found the same string in

 

/System/Library/Extensions/AppleIntelGMAX3100FB.kext/AppleIntelGMAX3100FB

 

I am not clear what systems use this driver, but the same fix might work in that case.

 

Anyway this fix has been stable for me for some time now.

 

I still have not found a way to get the DVI port to work, but it is still on the list.

Link to comment
Share on other sites

Hi,

 

I'm interested in this as I've got a docking station that I'd like to use.

 

I've followed the instructions and edited the dsdt.aml file, however, I cannot find the/Extra/com.apple.boot.plist file to delete the device-properties.

 

Any suggestions?

 

I'm running Lion on a D620.

 

Thanks

 

Pete

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...