ivik Posted December 9, 2010 Author Share Posted December 9, 2010 Nice!! Could you check if VoodooPS2 is corectly mapped? This is info that i have found and mapped those keys: http://cgit.freedesktop.org/~dkukawka/hal-...keymap-dell.fdi this is what i currently have in mine VoodooPS2Keyboard.cpp 0x00,0xe0,0x06, //90 Main Brightness Up 0x00,0xe0,0x05, //91 Main Brightness Down ..... NX_KEYTYPE_BRIGHTNESS_UP, 0x90, // brightness up NX_KEYTYPE_BRIGHTNESS_DOWN, 0x91 // brightness down ApplePS2ToADBMap.h 0x91, // e0 05 fn+down to brightness down 0x90, // e0 06 fn+up to brightness up I assume that was correct to do or am i missing something what was stated in the code is the default voodoo mapping it has from when i was getting the scancodes This is only modification to VoodooPS2Keyboard.cpp: // special key definition 0x0d, // number of special keys // ( NX_KEYTYPE, Virtual ADB code ) NX_KEYTYPE_CAPS_LOCK, 0x39, NX_KEYTYPE_HELP, 0x72, NX_POWER_KEY, 0x7f, NX_KEYTYPE_MUTE, 0x4a, NX_KEYTYPE_SOUND_UP, 0x48, NX_KEYTYPE_SOUND_DOWN, 0x49, // remove arrow keys as special keys. They are generating double up/down scroll events // in both carbon and coco apps. //NX_UP_ARROW_KEY, 0x7e, // ADB is 3e raw, 7e virtual (KMAP) //NX_DOWN_ARROW_KEY, 0x7d, // ADB is 0x3d raw, 7d virtual NX_KEYTYPE_NUM_LOCK, 0x47, // ADB combines with CLEAR key for numlock NX_KEYTYPE_VIDMIRROR, 0x70, NX_KEYTYPE_PLAY, 0x34, NX_KEYTYPE_NEXT, 0x42, // if this event repeated, act as NX_KEYTYPE_FAST NX_KEYTYPE_PREVIOUS, 0x4d, // if this event repeated, act as NX_KEYTYPE_REWIND NX_KEYTYPE_BRIGHTNESS_UP, 0x90, NX_KEYTYPE_BRIGHTNESS_DOWN, 0x91 and ApplePS2ToADB: DEADKEY,// e0 04 0x91,// e0 05 dell brdown 0x90,// e0 06 dell brup DEADKEY,// e0 07 Link to comment Share on other sites More sharing options...
jusasweet69 Posted December 9, 2010 Share Posted December 9, 2010 it ried what you just recommended and removed my 0x00,0xe0,0x06, //90 Main Brightness Up 0x00,0xe0,0x05, //91 Main Brightness Down lines from the file and still only getting dells brightness adjustment on here maybe i have an issue with my dsdt which i dont think i do but here it is just in case Device (PNLF) { Name (_HID, EisaId ("APP0002")) Name (_CID, "backlight") Name (_UID, 0x0A) Name (_STA, 0x0B) Name (BTVL, 0x64) Name (DBCL, Package (0x0A) {}) Method (_BCL, 0, NotSerialized) { SX10 () SX30 (0x19) SX30 (Zero) SX11 () Store (SX40 (), Index (DBCL, Zero)) Store (SX40 (), Index (DBCL, One)) Store (SX40 (), Index (DBCL, 0x02)) Store (SX40 (), Index (DBCL, 0x03)) Store (SX40 (), Index (DBCL, 0x04)) Store (SX40 (), Index (DBCL, 0x05)) Store (SX40 (), Index (DBCL, 0x06)) Store (SX40 (), Index (DBCL, 0x07)) Store (SX40 (), Index (DBCL, 0x08)) Store (SX40 (), Index (DBCL, 0x09)) SX12 () Return (DBCL) } Method (_BCM, 1, NotSerialized) { SX10 () SX30 (0x19) SX30 (One) SX30 (Arg0) Store (Arg0, BTVL) SX11 () SX12 () } Method (_BQC, 0, NotSerialized) { SX10 () SX30 (0x19) SX30 (0x02) SX11 () Store (SX40 (), Local0) Store (Local0, BTVL) SX12 () Return (Local0) } } really confused as to why remapping the keys wont override dells default brightness adjustment which btw works independently of the slider in displays Link to comment Share on other sites More sharing options...
ivik Posted December 9, 2010 Author Share Posted December 9, 2010 0x00,0x00,0x00, //81 Spotlight 0x00,0x00,0x00, //82 Dashboard 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, //90 Main Brightness Up 0x00,0x00,0x00, //91 Main Brightness Down 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, This is vanilla. Don't change this. Link to comment Share on other sites More sharing options...
Slice Posted December 9, 2010 Share Posted December 9, 2010 ok so the new files almost fixed my issues with up and down keysif i reboot i can up the brightness but if i go down its like it locks in and goes to 0 I saw that at 15.09.2010 My experiment with brightness keys has a bug so I exclude it in the version. It is not only key remapping needed. I don't know. I decided to use Apple's keys Fn+Scroll/Pause and don't remap brightness in PS2 driver. Link to comment Share on other sites More sharing options...
jusasweet69 Posted December 9, 2010 Share Posted December 9, 2010 It is not only key remapping needed. I don't know. I decided to use Apple's keys Fn+Scroll/Pause and don't remap brightness in PS2 driver. ok so its not just me experiencing this must be another dell issue like black screen on boot ill just use the defaults than also Link to comment Share on other sites More sharing options...
ivik Posted December 9, 2010 Author Share Posted December 9, 2010 Maybe dell keys don't generate up event? Link to comment Share on other sites More sharing options...
weizh126 Posted December 10, 2010 Share Posted December 10, 2010 @ivik, could you please upload the source? I mean I want to modify the source and change the hotkeys. I just want to use Fn+PgUp/PgDn instead of ScrLK&Pause. Fn+PgUp mapping to brightness down ApplePS2Keyboard: PS/2 scancode 0xe0 ApplePS2Keyboard: PS/2 scancode 0x47 ApplePS2Keyboard: ADB key code 0x73 down ApplePS2Keyboard: PS/2 scancode 0xe0 ApplePS2Keyboard: PS/2 scancode 0xc7 ApplePS2Keyboard: ADB key code 0x73 up Fn+PgDn mapping to brightness up ApplePS2Keyboard: PS/2 scancode 0xe0 ApplePS2Keyboard: PS/2 scancode 0x4f ApplePS2Keyboard: ADB key code 0x77 down ApplePS2Keyboard: PS/2 scancode 0xe0 ApplePS2Keyboard: PS/2 scancode 0xcf ApplePS2Keyboard: ADB key code 0x77 up After mapping is done, I won't use Pause and ScrLK at all, so how can I block them, I mean nothing will happen when pressed. And report a bug. When I use touchpad(Synaptics ), I find something very strange. 1) It needs double clicks on the touchpad to instead of one click, for example, when I click on the close button to close an application, it should be one click, but now I have to click twice. 2)When clicking (not moving ) touchpad in an application, sometimes I cannot left click the usb mouse and right&middle click are ok , and the keyboard is OK, so I have to use ALT+Q to close the application, then everything goes right again. Thanks Edit: I am sorry, ivik. The strange things are caused by the prepane of voodoops2controller.kext. It's my own fault. Using this prepane, everything goes well, though the function of this prepane is very limited.Trackpad.prefPane.zip Link to comment Share on other sites More sharing options...
maczx Posted December 10, 2010 Share Posted December 10, 2010 <br />@Scorpy22 - Thank you so much for your work on Nvidia. My Vostro 3500 now behaving wonderfully, complete with auto-dim on battery.<br />Nice one!<br /> <img src="style_emoticons/default/smile.gif" style="vertical-align:middle" emoid="" border="0" alt="smile.gif" /> <br /><br />@Ivik, thanks too for all the work you have done on this thread that kick started a lot of thought on brightness.<br /><br /><br /><br /> hello MiniHack could u upload your worked dsdt?my laptop's graphics card is gt240m , now the situation is that max and min are aways 0 in ioreg as you case. and how do you driver your Nvidia card?dsdt or gfx string ? what about 'PNLF' ,is it necessary? please upload them together. thx advance! Link to comment Share on other sites More sharing options...
ivik Posted December 10, 2010 Author Share Posted December 10, 2010 @weizh126 You wanna map HOME and END to brightness? Link to comment Share on other sites More sharing options...
weizh126 Posted December 10, 2010 Share Posted December 10, 2010 @ivik Yes, it is much more convenient for me. Link to comment Share on other sites More sharing options...
ivik Posted December 10, 2010 Author Share Posted December 10, 2010 These keys are already mapped. You could use spark for that. Link to comment Share on other sites More sharing options...
weizh126 Posted December 10, 2010 Share Posted December 10, 2010 Oh yes, I forget that, I'll try it now. : ) Edit: The brightness changed, but the SUN did not show... Edit2: Sorry, I forget checking the "display notification icon". This time the SUN appears. Link to comment Share on other sites More sharing options...
sw170 Posted December 11, 2010 Share Posted December 11, 2010 SUCCESS !!!... Hi Scorpy22, thanks a ton for sharing, I have now brightness&SUN logo with Efi string + my card info via DSDT and Ivik's kext, do you or any of you guys reading this know how I can convert these kind of values and inject them into DSDT ?: <key>@0,EDID</key> <data>AP///////wBMo0UyAAAAAAASAQCAIhN4Cof1lFdPjCcnUFQAAAABAQEBAQEBAQEBAQEBAQEBQRxWoFAAFjAwICUAWMIQAAAZAAAADwAAAAAAAAAAACOHAmQBAAAA/gBTQU1TVU5HCiAgICAgAAAA/gBMVE4xNTZBVDAyMDAwAHw=</data> , <key>@0,pwm-info</key> <data>AhgAZJBZAgAIUgAApRwAAAAEAAABAAAA</data> I tried to look in forum but failed basically. Again Huge thanks to you Ivik for all your brilliant work, I must say I got really attached to your brightness terminal utility, especially brightness set command, now with PNLF method this doesn't work, is there any OSX equivalent for that? (Tried to find it as well but failed here too) if not - any chance you could adapt it to PNLF method ? Regards s EDIT: no idea how to change this over stretched code, sorry for that Link to comment Share on other sites More sharing options...
weizh126 Posted December 11, 2010 Share Posted December 11, 2010 @swavek Hi swavek, maybe you can try this method, I managed to inject the pmw-info. so the @0,pmw-info is <01140064 a8610000 08520000 01000000 00040000> then I inject the following codes into DSDT "@0,pwm-info", Buffer (0x14) { /* 0000 */ 0x01, 0x14, 0x00, 0x64, 0xA8, 0x61, 0x00, 0x00, /* 0008 */ 0x08, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, /* 0010 */ 0x00, 0x04, 0x00, 0x00 }, I do not inject @0,EDID, because after injecting @0,pwm-info, everything seems OK. Link to comment Share on other sites More sharing options...
ivik Posted December 11, 2010 Author Share Posted December 11, 2010 edid: 00FFFFFF FFFFFF00 4CA34532 00000000 00120100 80221378 0A87F594 574F8C27 27505400 00000101 01010101 01010101 01010101 0101411C 56A05000 16303020 250058C2 10000019 0000000F 00000000 00000000 00238702 64010000 00FE0053 414D5355 4E470A20 20202020 000000FE 004C544E 31353641 54303230 3030007C pwm: 02180064 90590200 08520000 A51C0000 00040000 01000000 Link to comment Share on other sites More sharing options...
sw170 Posted December 11, 2010 Share Posted December 11, 2010 @swavek Hi swavek, maybe you can try this method, I managed to inject the pmw-info. ... I do not inject @0,EDID, because after injecting @0,pwm-info, everything seems OK. Hi weizh126, Thank you for fast reply and help, so with this code in my GFX DSDT part (only @0,pwm-info added): Method (_DSM, 4, NotSerialized) { Store (Package (0x16) { "@0,AAPL,boot-display", Buffer (One) {}, "@0,built-in", Buffer (One) {}, "@0,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@0,device_type", Buffer (0x08) { "display" }, "@0,pwm-info", Buffer (0x14) { /* 0000 */ 0x01, 0x14, 0x00, 0x64, 0xA8, 0x61, 0x00, 0x00, /* 0008 */ 0x08, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, /* 0010 */ 0x00, 0x04, 0x00, 0x00 }, "@0,name", Buffer (0x0F) { "NVDA,Display-A" }, "NVCAP", Buffer (0x18) { /* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, /* 0010 */ 0x00, 0x00, 0x00, 0x00 }, "VRAM,totalsize", Buffer (0x04) { 0x00, 0x00, 0x00, 0x10 }, "device_type", Buffer (0x0D) { "NVDA,GeForce" }, "model", Buffer (0x17) { "Nvidia GeForce Go 7600" }, "rom-revision", Buffer (0x0E) { "5.73.22.47.21" } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } and Scorpy's Efi string removed from apple.boot.plist I'm loosing brightness controlled via system+SUN logo, maybe you can spot in my code something that is missing from Scorpy's plist which you also got in you DSDT? If not I shall add piece by piece and trace missing part, parts thanks for posting your guide how to convert info from plists, really appreciate that Best Regards swavek Link to comment Share on other sites More sharing options...
weizh126 Posted December 11, 2010 Share Posted December 11, 2010 @swavek Hi swavek, here is my GFX DSDT part, Method (_DSM, 4, NotSerialized) { Store (Package (0x22) { "AAPL,slot-name", Buffer (0x0F) { "PCI Slot@1,0,0" }, "@0,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@0,backlight-control", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "@0,display-cfg", Buffer (0x04) { 0x03, 0x01, 0x00, 0x00 }, "@0,pwm-info", Buffer (0x14) { /* 0000 */ 0x01, 0x14, 0x00, 0x64, 0xA8, 0x61, 0x00, 0x00, /* 0008 */ 0x08, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, /* 0010 */ 0x00, 0x04, 0x00, 0x00 }, "@0,device_type", Buffer (0x08) { "display" }, "@0,name", Buffer (0x0F) { "NVDA,Display-A" }, "@0,built-in", Buffer (One) { 0x01 }, "@1,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@1,device_type", Buffer (0x08) { "display" }, "@1,name", Buffer (0x0F) { "NVDA,Display-B" }, "NVCAP", Buffer (0x18) { /* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, /* 0008 */ 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0010 */ 0x00, 0x00, 0x00, 0x00 }, "VRAM,totalsize", Buffer (0x04) { 0x00, 0x00, 0x00, 0x10 }, "device_type", Buffer (0x0D) { "NVDA,GeForce" }, "model", Buffer (0x18) { "NVIDIA GeForce 9300M GS" }, "rom-revision", Buffer (0x26) { "NVIDIA GeForce 9300M GS OpenGL Engine" }, "hda-gfx", Buffer (0x0A) { "onboard-1" } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } and I think the following codes may be useful for you, too "@0,backlight-control", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "@0,display-cfg", Buffer (0x04) { 0x03, 0x01, 0x00, 0x00 }, I do not test one by one, I inject the three parts, @0,backlight-control,@0,display-cfg and @0,pwm-info at fist time, then it works very well. Maybe it will help you : ) Link to comment Share on other sites More sharing options...
sw170 Posted December 11, 2010 Share Posted December 11, 2010 edid: 00FFFFFF FFFFFF00 4CA34532 00000000 00120100 80221378 0A87F594 574F8C27 27505400 00000101 01010101 01010101 01010101 0101411C 56A05000 16303020 250058C2 10000019 0000000F 00000000 00000000 00238702 64010000 00FE0053 414D5355 4E470A20 20202020 000000FE 004C544E 31353641 54303230 3030007C pwm: 02180064 90590200 08520000 A51C0000 00040000 01000000 Hey Ivik, Heh, rather more interested in what way or what program you used to convert those numbers, but appreciate this ready meal too thanks mate s Link to comment Share on other sites More sharing options...
weizh126 Posted December 11, 2010 Share Posted December 11, 2010 Maybe it is Base64, not hex. Here is the explanation Link to comment Share on other sites More sharing options...
sw170 Posted December 11, 2010 Share Posted December 11, 2010 @swavek Hi swavek, here is my GFX DSDT part, ... Great ! going to do some testing now, will post results ... cheers s Link to comment Share on other sites More sharing options...
sw170 Posted December 11, 2010 Share Posted December 11, 2010 Maybe it is Base64, not hex.Here is the explanation thanks buddy,will study that next free eve, in the meantime two things:those two parts of code made my backlight back without Efi string, thanks again for your help weizh126 !"@0,backlight-control", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "@0,pwm-info", Buffer (0x14) { /* 0000 */ 0x01, 0x14, 0x00, 0x64, 0xA8, 0x61, 0x00, 0x00, /* 0008 */ 0x08, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, /* 0010 */ 0x00, 0x04, 0x00, 0x00 }, second: backlight after every reboot switches itself to max level, is that my machine only ?Regardss Link to comment Share on other sites More sharing options...
weizh126 Posted December 11, 2010 Share Posted December 11, 2010 @swavek Hi swavek, congratulations! The brightness is quite normal here on my laptop, maybe you can try this genericbrightness And also you can read Post #266. I modified the ivik's source and changed the timeout to 1 second, it works perfectly here. Edit: Yes, swavek. You are right, @0,backlight-control and @0,pwm-info are the necessary parts to make the brightness right. @0,display-cfg is not necessary. Thanks, man Edit2: Oh sorry,swavek, I mean the brightness is also normal after reboot and the brightness value stays the same as the last shut down, no strange things happen. Link to comment Share on other sites More sharing options...
sw170 Posted December 11, 2010 Share Posted December 11, 2010 @swavek Hi swavek, congratulations! The brightness is quite normal here on my laptop, maybe you can try this genericbrightness And also you can read Post #266. I modified the ivik's source and changed the timeout to 1 second, it works perfect here. ugh, actually I wanted to say that my brightness works fine here - slider works, SUN logo too, its just after reboot I have to decrease brightness straight away bacause it sets itself to max ehh will try to sort that out tomorrow.. bed now seya! EDIT: ps. what you mean you changed timeout to 1sec ? nevermind, yeah post 266. Link to comment Share on other sites More sharing options...
janek202 Posted December 11, 2010 Share Posted December 11, 2010 I menaged to get almost fully working native brightness control with DSDT patch. (with help of Bungo)I can change it using keys (sun logo appears) and I can change it smoothly using slider in system preferences.I have one problem, when I set it to minimum the backlight is being turned off, and I can't turn it on, only reboot helps.I found source of that issue. In IOreg in backlight section I have:max: 0x400min: 0x0I think the problem is value 0x0 in minimum and it disables the backlight. It should be something like 0x8. If anyone have an idea how to fix it I would be thankful.PNLF Device (PNLF) { Name (_HID, EisaId ("APP0002")) Name (_CID, "backlight") Name (_UID, 0x0A) Name (_STA, 0x0B) }IGPUDevice (IGPU) { Name (_ADR, Zero) Method (_DSM, 4, NotSerialized) { Store (Package (0x2E) { "@0,AAPL,blackscreen-preferences", Buffer (0x04) { 0x00, 0x00, 0x00, 0x08 }, "@0,AAPL,boot-display", Buffer (Zero) {}, "@0,backlight-control", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "@0,connector-type", Buffer (0x04) { 0x02, 0x00, 0x00, 0x00 }, "@0,built-in", Buffer (Zero) {}, "@0,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@0,device_type", Buffer (0x08) { "display" }, "@0,name", Buffer (0x0F) { "NVDA,Display-A" }, "@0,fboffset", Buffer (0x04) { 0x00, 0x00, 0x01, 0x00 }, "@0,pwm-info", Buffer (0x14) { /* 0000 */ 0x01, 0x14, 0x00, 0x64, 0xA8, 0x61, 0x00, 0x00, /* 0008 */ 0x1C, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, /* 0010 */ 0x00, 0x04, 0x00, 0x00 }, "@0,use-backlight-blanking", Buffer (Zero) {}, "@1,can-hot-plug", Buffer (Zero) {}, "@1,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@1,device_type", Buffer (0x08) { "display" }, "@1,name", Buffer (0x0F) { "NVDA,Display-B" }, "AAPL,aux-power-connected", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "AAPL,backlight-control", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "NVCAP", Buffer (0x14) { /* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, /* 0008 */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, /* 0010 */ 0x00, 0x00, 0x00, 0x00 }, "NVPM", Buffer (0x1C) { /* 0000 */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0018 */ 0x00, 0x00, 0x00, 0x00 }, "device_type", Buffer (0x0D) { "NVDA,Parent" }, "model", Buffer (0x11) { "GeForce 9200M GS" }, "rom-revision", Buffer (0x10) { "62.98.3C.00.15s" }, "VRAM,totalsize", Buffer (0x04) { 0x00, 0x00, 0x00, 0x20 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } Link to comment Share on other sites More sharing options...
ivik Posted December 11, 2010 Author Share Posted December 11, 2010 @swavek Could you please read post 50 and 193? It looks like brightness register is BAR0 + 61c084 for nvidia. Problem is that you have this register set to max, but your laptop controls brightness with EC. Try moving slider, and read that memory. If this values changes, then we could easy sync boot brightness to one from EC. Link to comment Share on other sites More sharing options...
Recommended Posts