Jump to content

UPDATED 20.12. GenericBrightness.kext


ivik
 Share

674 posts in this topic

Recommended Posts

That worked fine! There was a typo error in the dsdt for the FFFFE000 step (it was FFFE0000), so I corrected. Now is working as spected.

 

You said I could have brightness control without your driver. Could you explain a little more what would be needed?

 

Thanks a lot for your work!

Link to comment
Share on other sites

Yes.. all that have in ioreg max and min values. Max must be different from zero, and you have to have _BCM and _BCL methods in DSDT.

 

Do you now have some eratic changes when you move slider just a bit?

 

You could now add all levels. Driver is modified to call _bcm method with pure osx value-1ee for max for you.

 

So, if you have 19 brightness levels,

1. divide 1ee with 19(19 must be converted to hex) = 26 (1A in hex) =this is step

2. max value is 1ee-1a=1d4.

3 if osx called bcm with value greater-equal 1d4, then we store to LEVL max brightness and so on... (0xFFFFFFFF)

1ba is one level lower than max... so ve store next value for brightessmax 0xFFFFFF00

 

 

 

I think that max brightness value is wrong. If it was lover, then maybe osx could write right values in that register.

Link to comment
Share on other sites

How can I get my laptop scancode map ? voodooPS2Controller is good, but I can not use it to wake up my computer, so I use ApplePS2Controller instead. I know you trackpad is synaptics, can you use two finger scroll with your modified kext .

Link to comment
Share on other sites

Here is vodoops2 with debuging enabled. Watch console message when pressing FN-up/down.

 

Hi, thanks you again for the patience, I down and install, here is the log when I press Fn+up&down.

11/15/10 11:09:09 PM	kernel	ApplePS2Keyboard: ADB key code 0x71 up
11/15/10 11:09:10 PM	kernel	ApplePS2Keyboard: PS/2 scancode 0xe1
11/15/10 11:09:10 PM	kernel	ApplePS2Keyboard: PS/2 scancode 0x1d
11/15/10 11:09:10 PM	kernel	ApplePS2Keyboard: PS/2 scancode 0x45
11/15/10 11:09:10 PM	kernel	ApplePS2Keyboard: ADB key code 0x71 down
11/15/10 11:09:10 PM	kernel	ApplePS2Keyboard: PS/2 scancode 0xe1
11/15/10 11:09:10 PM	kernel	ApplePS2Keyboard: PS/2 scancode 0x9d
11/15/10 11:09:10 PM	kernel	ApplePS2Keyboard: PS/2 scancode 0xc5
11/15/10 11:09:10 PM	kernel	ApplePS2Keyboard: ADB key code 0x71 up

 

And I have one question ,which is possible to assign Stop action via scancode map, cause my laptop keyboard have for media keys.Fn + F9~F12, each of them is Play,Stop,Previous,Next.

Link to comment
Share on other sites

Are u sure these are from fn keys?

 

From Voodoops2 source:

    // The sequence actually sent to us by the keyboard for the Pause Key is:
   //
   // 1. E1  Extended Sequence for Pause Key
   // 2. 1D  Useless Data, with Up Bit Cleared
   // 3. 45  Pause Key, with Up Bit Cleared
   // 4. E1  Extended Sequence for Pause Key
   // 5. 9D  Useless Data, with Up Bit Set
   // 6. C5  Pause Key, with Up Bit Set
   //
   // The reason items 4 through 6 are sent with the Pause Key is because the
   // keyboard hardware never generates a release code for the Pause Key and
   // the designers are being smart about it.  The sequence above translates
   // to this parser as two separate events, as it should be -- one down key
   // event and one up key event (for the Pause Key).

 

And 71 ADB code is F15. So... so when you press FN-up/down... then pause is generated. Weird...

Press all extra keys and watch what are scancodes.

Link to comment
Share on other sites

I dont know which keys are that... Watch messages from Console.app. Just press your hardware key for brightness and then watch.

 

And this :

11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0x32
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: ADB key code 0x2e down
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0xb2
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: ADB key code 0x2e up
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0x1e
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: ADB key code 0x0 down
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0x9e
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: ADB key code 0x0 up
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0x2e
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: ADB key code 0x8 down
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0xae
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: ADB key code 0x8 up
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0x1c
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: ADB key code 0x24 down
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0x9c
11/16/10 12:11:46 AM	kernel	ApplePS2Keyboard: ADB key code 0x24 up

Link to comment
Share on other sites

Damn... Log appers on every key press...

And which scancode is for up?!

 

Are you using Console.app?

Tell me:

FN+UP=scancode?

FN+DOWN=scancode?

 

Simple as that..

 

FN+Down:

11/16/10 12:55:56 AM	kernel	ApplePS2Keyboard: ADB key code 0x7d up
11/16/10 12:55:56 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0xe0
11/16/10 12:55:56 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0x50
11/16/10 12:55:56 AM	kernel	ApplePS2Keyboard: ADB key code 0x7d down
11/16/10 12:55:56 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0xe0
11/16/10 12:55:56 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0xd0

 

FN+UP:

 

11/16/10 12:54:16 AM	kernel	ApplePS2Keyboard: ADB key code 0x7e up
11/16/10 12:55:00 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0xe0
11/16/10 12:55:00 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0x48
11/16/10 12:55:00 AM	kernel	ApplePS2Keyboard: ADB key code 0x7e down
11/16/10 12:55:00 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0xe0
11/16/10 12:55:00 AM	kernel	ApplePS2Keyboard: PS/2 scancode 0xc8

Link to comment
Share on other sites

Maybe not, I just reboot and check. It is exact.

 

One more question, How to get ride this message:

11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDKeyboardModifierMappingPairs Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDResetPointer Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDPointerAcceleration Value: 45056
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDPointerButtonMode Value: 2
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDScrollReset Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDScrollAcceleration Value: 20480
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDResetKeyboard Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDKeyRepeat Value: 83333333
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDInitialKeyRepeat Value: 500000000
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDMouseAcceleration Value: 131072
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDTrackpadAcceleration Value: 45056
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDMouseScrollAcceleration Value: 32768
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: HIDDefaultParameters Value: ??
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: TrackpadPinch Value: 1
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: TrackpadScroll Value: 1
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: TrackpadMomentumScroll Value: 1
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: TrackpadHorizScroll Value: 1
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: Dragging Value: 0
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: Clicking Value: 0
11/16/10 1:37:19 AM	kernel	ApplePS2ALPSGlidePoint: Dictionary Object: DragLock Value: 0

Link to comment
Share on other sites

ivik, Im using your driver together with the code you wrote in my dsdt. It works fine for the most of it.

The only problem is that brightness isnt restored on screen-wake. Is it possible to solve by adding some sort of call in the WAK method?

Thanks!

Link to comment
Share on other sites

Too many errors... I get Maximum error count (200) exceeded. It is difficult to debug this.

 

god but thx all the same

 

 

now

 

Brightness doesn't change and the slider keeps back to 100% when i drug itmy dsdt is very difficult to modify .

Link to comment
Share on other sites

 Share

×
×
  • Create New...