Jump to content

UPDATED 20.12. GenericBrightness.kext


  • Please log in to reply
671 replies to this topic

#101
BlackCH

BlackCH

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,615 posts
  • Gender:Male
  • Location:BCN
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!

#102
maczx

maczx

    InsanelyMac Protégé

  • Members
  • Pip
  • 19 posts
hi ivik

dose this method support all graphics cards in theory?

thx!

#103
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
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.

#104
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN
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 .

#105
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN

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.

#106
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
Are u sure these are from fn keys?

From Voodoops2 source:[codebox] // 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).
[/codebox]

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.

#107
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN
This is new one.Attached File  logs.rtf   26.03KB   6 downloads

#108
ivik

ivik

    InsanelyMac Sage

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

#109
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN

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


#110
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
common... tell me which key you press when log appears. i can't see anything from this.

#111
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN
I just press Fn+up&down. This is new log, after reboot. Sorry about that.Attached File  logs.rtf   5.08KB   2 downloads

#112
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
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..

#113
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN

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


#114
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN

Try this driver. Copy it under plugins in vodoops2controller.


Still no effect, after pressing Fn+up&down, the backlight is changed, but no SUN. Pause & Fn+Delete can both adjust brightness and appears SUN.

#115
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
Wrong codes?

#116
Zprood

Zprood

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 251 posts
  • Gender:Male
  • Location:CHN
Maybe not, I just reboot and check. It is exact.

One more question, How to get ride this message:
[codebox]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[/codebox]

#117
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
I mapped 0xe0 0xd0 to down and 0xe0 0xc8 to up.

It is debuging driver. If your keys don't work with onscreen then use your driver.

#118
BlackCH

BlackCH

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,615 posts
  • Gender:Male
  • Location:BCN
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!

#119
ivik

ivik

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
Screen wake or wake from sleep?

#120
maczx

maczx

    InsanelyMac Protégé

  • Members
  • Pip
  • 19 posts
hi ivik



i am so confused about my dsdt

please have alook thx very much



Attached File  dcpdsdt.zip   32.83KB   5 downloads





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy