Jump to content

Laptop - Lenovo IdeaPad Y510p - 10.9 - Mavericks


useletters
 Share

332 posts in this topic

Recommended Posts

Well, I'm starting to feel lost. What do you want to do? What does _Q11 and _Q12 have to do with Elan Touchpad? I mean I had to patch these events because the key combinations leading to these events were not handled by VoodooPS2Controller and left to the ACPI so got to patch the DSDT. If ApplePS2ElanTouchpad handles these events (I don't know if EMlyDinEsH provides a way to test this) then it may override the events in ACPI by remapping so your hope is to remap through that kext (I may be wrong). If not, do the patch. Anyway, try the patch there's nothing to lose.

 

Edit:

 

Not to be mean, but three-finger gesture works but had to be configured first.

Link to comment
Share on other sites

Well, from what I understood, _Q11 and _Q12 are for ACPI Brightness control which is FN + ArrowUP/DOWN. Now, what I should do is redirect (notify) it to the corresponding event on ApplePS2ElanTouchpad.kext which triggers its brightness control. Again, this is from what I understood.

Also, my machine can't sleep. Wake reason: EHC1 EHC2 XHC

I have GenericUSBXHCI.kext on my Clover/kexts and also have -gux_defer_usb2 on my boot flags and patched my DSDT with _WAK Arg0 v2, but still can't sleep.

Link to comment
Share on other sites

I think it's the other way around and brightness is not related to _Q11 and _Q12. What happens when you press Fn+Up the ACPI looks for _Q12 because it's the event it's connected to (I tested this myself). Before it wouldn't find anything related to brightness in this event but there comes the patch rule. It add the brightness control functionality into these events.

 

Unless the keyboard kext you use override this event, you should be able to patch the DSDT and fix that. And again, try it after backing up your DSDTshould be no harm.

 

Regarding sleep, this is what I'm looking into now. I tried what you tried and I got the same problem but only when AC is connected. Have you tried sleep while on battery?

Link to comment
Share on other sites

Well I think we have the same idea about _Q11 and _Q12. That is actually what I meant, FN + UP = _Q12. Having that said, I can call an event or inside _Q12 that toggles/triggers brightness up, which is I don't know what does triggers it. Though from ApplePS2ElanTouchpad.kext, it's explained to be "Right context menu" or "Shift + Caps" + "F5" for FN Keys Mode 2. See http://forum.osxlatitude.com/index.php?/topic/5969-details-about-the-enhanced-keyboard-for-elan-touchpad-driver/?p=32304

Problem is I'm not sure how I can call this from DSDT.

About sleep, I'll try when AC is not connected.

 

Thanks!

 

Edit:

Can't also sleep on battery. Though last time I got it working, from my old config, and sadly I have no backups..

Link to comment
Share on other sites

I toke a look at it but I'm thinking of the developer of the kext made standard presets for functions keys and user will have to select one preset to work with. But pressing F1 to decrease brightness in Fn Keys Mode 1 doesn't mean it's the only combination to control brightness. You could have as other keys do brightness control as well as the one defined in kext preset. For example, ACPIBacklight.kext defines Fn+Insert for brightness decrease and I still have this combination functioning even after having Fn+Down for doing this.

 

I still think you need to patch the DSDT for the specific combination you want regardless of what the kext provides for the same function unless the kext would override the keys themselves. Do you have any information about ApplePS2ElanTouchpad deals with our Y510P Fn+Up/Down in any way? If there is then this where to start. If not, it's ignored by the driver altogether and should be done directly from DSDT.

Link to comment
Share on other sites

Well, FN+Insert/Home doesn't work with the kext, though disabling FN Keys mode may solve this (I'll report back after a reboot).

How can I know which specific combination to trigger on DSDT? Can you link me to a guide/reference for this?

And no, I don't have any information about the kext dealing with Y510P

 

Also, I found my old config and using it as of the moment, I get sleep on battery again. I'll try with AC connected in the moment.
Here is my current config.plist http://pastebin.com/PJremVW1

Link to comment
Share on other sites

I'll look into that.
Disabling FN keys mode does not allow me to FN+insert, I need to test more to this with the link you gave.

About sleep, it sleep once. But when trying to sleep again, I get nothing. My keyboard backlight is on but screen is off. Pressing anything doesn't put back the display. I have to hard reset my machine to get it working.

 

Edit:

Okay I got this;

10/27/14 3:29:35.000 PM kernel[0]: ACPIDebug: "EC _Q11 enter"
10/27/14 3:29:35.000 PM kernel[0]: ACPIDebug: "EC _Q11 exit"
10/27/14 3:29:35.000 PM kernel[0]: ACPIDebug: "EC _Q12 enter"
10/27/14 3:29:35.000 PM kernel[0]: ACPIDebug: "EC _Q12 exit"

from

 

 
        Method (_Q11, 0, NotSerialized)  // _Qxx: EC Query
        {
            \RMDT.P1 ("EC _Q11 enter")
            Notify (PS2K, 0x0205)
            Notify (PS2K, 0x0285)
            \RMDT.P1 ("EC _Q11 exit")
        }
 
        Method (_Q12, 0, NotSerialized)  // _Qxx: EC Query
        {
            \RMDT.P1 ("EC _Q12 enter")
            Notify (PS2K, 0x0206)
            Notify (PS2K, 0x0286)
            \RMDT.P1 ("EC _Q12 exit")
        }
Link to comment
Share on other sites

That's perfect. Means it's handled by ACPI so go ahead and patch your DSDT.

 

That's the problem. I don't know which events I should trigger...  :wallbash:

 

Edit:

 

Okay, I think I'm going somewhere. I was able to turn activate the debug on the kext.

Got this from the logs

 

FN Keys Mode = 2

Brightness Control remapped to 'Right context menu + ArrowDown/Up' accordingly.

Right context menu + ArrowDown:
 
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xe0 (224)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0x5d (093)
ApplePS2Keyboard :: Received Extended Scan Code 0x5d (093) as Key code 0x5d (093)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xe0 (224)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0x50 (080)
ApplePS2Keyboard :: Received Extended Scan Code 0x50 (080) as Key code 0x50 (080)
ApplePS2Keyboard :: Dispatched Fn key for Key code 0x50 (080), ExtendedKey YES, Key Down YES, TP 1, DP 0
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xe0 (224)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xd0 (208)
ApplePS2Keyboard :: Received Extended Scan Code 0xd0 (208) as Key code 0x50 (080)
ApplePS2Keyboard :: Dispatched Fn key for Key code 0x50 (080), ExtendedKey YES, Key Down NO, TP 1, DP 0
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xe0 (224)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xdd (221)
ApplePS2Keyboard :: Received Extended Scan Code 0xdd (221) as Key code 0x5d (093)
ApplePS2Keyboard :: Dispatched Scan code 0xdd (221) as Key code 0xa2 (162), ExtendedKey YES, GoingDown NO
 
Right context menu + ArrowUp:
 
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xe0 (224)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0x5d (093)
ApplePS2Keyboard :: Received Extended Scan Code 0x5d (093) as Key code 0x5d (093)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xe0 (224)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0x48 (072)
ApplePS2Keyboard :: Received Extended Scan Code 0x48 (072) as Key code 0x48 (072)
ApplePS2Keyboard :: Dispatched Fn key for Key code 0x48 (072), ExtendedKey YES, Key Down YES, TP 1, DP 0
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xe0 (224)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xc8 (200)
ApplePS2Keyboard :: Received Extended Scan Code 0xc8 (200) as Key code 0x48 (072)
ApplePS2Keyboard :: Dispatched Fn key for Key code 0x48 (072), ExtendedKey YES, Key Down NO, TP 1, DP 0
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xe0 (224)
ApplePS2Keyboard :: PS2 Keyboard Interrupt Received with Scan Code 0xdd (221)
ApplePS2Keyboard :: Received Extended Scan Code 0xdd (221) as Key code 0x5d (093)
ApplePS2Keyboard :: Dispatched Scan code 0xdd (221) as Key code 0xa2 (162), ExtendedKey YES, GoingDown NO

Edit2:

 

I know there is something to this. Changing 0x0286 from

Notify (PS2K, 0x0286)
 to the correct key, I just don't know which.

I'll try to rest for now as I think I'm getting burned out. xD

 

Report to you back whenever.

 

THANKS!

Link to comment
Share on other sites

Awesome news for us (thanks vidi2000 for bringing our attention here to this) !

 

Though we have been able to have QE/CI on our Mobile HD4600 for some time (since the early betas, kudos to Pike'R Alpha). However, we had problems with Preview, Photo Booth, Profile Picture Manipulation, Some screen savers ... the list goes on. The reason was that additional patching is needed to fully enable OpenCL / OpenGL without any problems.

 

The patch have been revealed and it's fabuolous !! This is the required patch (everything from here):

# Patch libCLVMIGILPlugin for HD4600 OpenCL / OpenGL
sudo perl -i.bak -pe 's|([\xFF\xFC\x3D])\x86\x80\x12\x04|$1\x86\x80\x16\x04|sg' /System/Library/Frameworks/OpenCL.framework/Libraries/libCLVMIGILPlugin.dylib

sudo codesign -f -s - /System/Library/Frameworks/OpenCL.framework/Libraries/libCLVMIGILPlugin.dylib

I tried it and it's awesome.

  • Like 1
Link to comment
Share on other sites

Some small customization to our Hackintosh. I've been looking for a way to make the context menu key (second to the right of space bar) to work actually as a context menu. I thought to take advantage of VoodooPS2Controller's feature to cusomize keys but that was not easy to do and required changing in the code as RehabMan told me. He adviced me to try Karabiner for that matter and I did. Karabiner is a utility allows custom keys to be remaped to other functions by defining all changes in a XML file called private.xml.

 

If you want the same functionality:

  1. Download Karabiner from https://pqrs.org/osx/karabiner/ and run it.
  2. Click on its icon on menu bar then chose Preferences.
  3. Select "Misc & Uninstall" tab.
  4. Click on "Open private.xml"
  5. Open the file using any xml editor (any text editor would do as well if kept plain text).
  6. Paste the following code to add the functionality:
    <?xml version="1.0"?>
    <root>
      <item>
        <name>Change Context Key from Option_R to Right-Click</name>
        <identifier>private.right_command_to_escape</identifier>
        <autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::VK_MOUSEKEY_BUTTON_RIGHT</autogen>
      </item>
    </root>
    
  7. Save the file and go back to Karabiner Preferences.
  8. On the "Change Key" tab, hit ReloadXML
  9. Check the new entry added on top of the list.
  10. Done !

Have fun :)

Link to comment
Share on other sites

Awesome news for us (thanks vidi2000 for bringing our attention here to this) !

 

Though we have been able to have QE/CI on our Mobile HD4600 for some time (since the early betas, kudos to Pike'R Alpha). However, we had problems with in Preview, Photo Booth, Profile Picture Manipulation, Some screen savers ... the list goes on. The reason was that additional patching is needed to fully enable OpenCL / OpenGL without any problems.

 

The patch have been revealed and it's fabuolous !! This is the required patch (everything from here):

# Patch libCLVMIGILPlugin for HD4600 OpenCL / OpenGL
sudo perl -i.bak -pe 's|([\xFF\xFC\x3D])\x86\x80\x12\x04|$1\x86\x80\x16\x04|sg' /System/Library/Frameworks/OpenCL.framework/Libraries/libCLVMIGILPlugin.dylib

sudo codesign -f -s - /System/Library/Frameworks/OpenCL.framework/Libraries/libCLVMIGILPlugin.dylib

I tried it and it's awesome.

 

That's awesome! I'll give this a try.

Regarding the Karabinder, I think I'll stick with that on trying to get my FN + ArrowUp/Down keys. :D Thanks!

 

Edit:

Seems like Karabinder can't override ACPI and Kext FN keys. Hmm..

Link to comment
Share on other sites

Okaaay take this as well :yes:

 

Some progress regarding sleep/wake. I had sleep/wake partially working with these symptoms:

  1. On battery, sleep/wake works successfully.
  2. OS X was able to sleep on AC but wakes immediately with wake reason EHC1, EHC2, and XHC.
  3. Either way, on wake all USB ports and devices don't work including Bluetooth.

To fix problem 2, I tried many DSDT patches to solve EHCI problems but couldn't get it to work. Until I read that I can remove the method _PRW for each of them (EHC1, EHC2, XHC) in DSDT so they don't have any way to wake the system. Some say we should try to edit the method _PSW first before removing _PRW but I don't have the knowledge to do this yet. I removed all three _PRW methods and the system was able to sleep/wake regardless of power state. I tried sleep/wake a many time in succession and all went fine.

To fix problem 3, I had to use GenericUSBXHCI.kext along with the kernel flag gux-defer-usb2. I got it fixed thought it take a few moments after wake up to get all USB devices back to work. I don't mind to wait a couple of seconds since the wake process is immediate anyway.

Now I find more problems occurs after system wake up:

  1. Graphics gets distorted like reverting to 16-bit mode. It may not be easy to notice but once you open Launch Pad it's obvious.
  2. The system loses the ability to restart. The restart process only put the system into a halt mode where everything seems still working but none responsive while display is off. Have to force power off (using power button) to regain control of the pc.

Though I don't have a clue yet, I guess the two problems are connected one way or another. I have tried before ig-platform-id = 0a26000a instead of 0a260006 and found it better that it doesn't have the small glitches at login screen (first time). However, this value causes the system to lose restart functionality. So maybe a scenario like this happens here:

  • System is fine
  • System goes to sleep and been waken up
  • System loses few details about graphics that have been injected through Clover on boot
  • System have problems due to graphics not correctly configured
  • System loses restart functionality

If this was the case, then we might need to make sure all graphics patching and so are either on ACPI or inside system kexts. That mean keeping Clover away from graphic related stuff. Just a theory may or may not work.

Link to comment
Share on other sites

Nice work!

I actually get those symptoms also.

I think there is more to sleep + graphics.

 

I'll try your instructions on mine if would work.

 

Thanks!

 

Edit:

Also, we have to throughly patch our graphics as HDMI, before sleep, still doesn't work.

 

Edit2:

 

Now I find more problems occurs after system wake up:

  1. Graphics gets distorted like reverting to 16-bit mode. It may not be easy to notice but once you open Launch Pad it's obvious.
  2. The system loses the ability to restart. The restart process only put the system into a halt mode where everything seems still working but none responsive while display is off. Have to force power off (using power button) to regain control of the pc.

 

Regarding 1, I do not get any graphical issue.

2, I'll try it right now.

 

Also, I can't re-sleep after system wake up, the same as the ability to restart. Making it re-sleep, system halts, so I also have to force power off.

 

Edit3:

Okay, I get all of that.. I get the 16-bit mode as seen on Launch Pad and Login Screen.

Also lost the ability to restart, no display.

Re-sleep, no display after waking up..

 

Edit4:

You might want to look into this regarding sleep/hibernate and SDD

 

Edit5:

VoodooHDA doesn't auto detect headphone on plug (using apple earphones)

Link to comment
Share on other sites

Hi, hello, I read your posts, like you have a laptop, I am a Chinese boy, English is difficult for me, I am currently just installed the Yosemite, in terms of I was a novice driver, can you tell me what to do next it? How do I get my own DSDT? Thank you, sincerely request guidance

Link to comment
Share on other sites

@wdk5233, what to do is what you think you want to achieve and there's no rule of thumb to follow. We are trying to push Y510P as far as we can but it's not perfect for OS X and I don't think it will be. Don't think about DSDT until you are sure graphics, wifi, ethernet, sound, keyboard, touchpad, and bluetooth are all working for you. Simply put, get the basics up and running first. You should know that working with DSDT (and SSDT) is not something easy and we are struggling to get few things to work already.

Link to comment
Share on other sites

@useletters, could you inform me what have you achieved and what are you trying to achieve now? I need to focus the work maybe we can get further.

Currently I have these things on my list:

  • Fix graphics distortion after wake from sleep
  • Fix Restart malfunctioning after wake from sleep
  • Allow system to sleep on lid close and maybe wake on lid open if system is already sleeping
  • Getting power button to show Shut Down Dialog:
    shutdown_window.png
    or at least to sleep directly
  • Do more key mappings to customize the system (PrtSc key to capture screen shot foe example)

 
PS: Colors reflects importance.

Link to comment
Share on other sites

Well basically I was able to achieve most of the stuff you have. Though I will not stress much of the keyboard mappings as we have different kext loaded, and most of what I use functions well. About sleep, the only thing that matters to me would be sleep/lock display not the whole system sleep as I'd be running OSx on a SSD which wouldn't make alot difference against system shutdown.

 

What I'm trying to achieve now is HDMI hotplug, Audio, headphones, auto-detect and mostly of your list, though not really a big deal but it woukd be nice to have them. Also disable nvidia graphics.

Link to comment
Share on other sites

You're right about key remapping we can't work this with different kext. Though I understand your point of view regarding sleep, you still would need sleep (at least deep sleep/hibernation) to preserve your work. If you don't care about preserving your work and open files and willing to do shutdown instead utilizing SSD speed, then you don't need to think about sleep or hibernate at all and use only locking mechanism. This is different to me though, sleep is essential.

 

Regarding disabling nvidia graphics you more than an option. One of my SSDT's will do that for you and you can forget about it. You can also try nv_disable=1 kernel flag in config.plist. Said that, I can boot while nvidia is enabled but I only disable it to save battery juice.

 

Audio, headphones ... you're not satisfied with VoodooHDA are you?

Link to comment
Share on other sites

Well actually, preserving my work and open files is not much of a factor to me. So yeah, I use it only as locking mechanism. But again, it would still be nice if I can get it working.

I'll try your SSDT again for this matter.

Actually, I'm satisfied with VoodooHDA, but, I'm just not sure why headphones auto-detect seem not to work on mine, even though you said it works well on you system.

Link to comment
Share on other sites

 Share

×
×
  • Create New...