pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
https://pqrs.org/osx/karabiner/
The Unlicense
18.87k stars 838 forks source link

event_manipulator_ is not ready. #448

Closed gamesbrainiac closed 6 years ago

gamesbrainiac commented 7 years ago

For some reason, the event manipulator does not seem to work. Here is what I'm getting when I plug in my Razor Black Widow Tournament Edition.

2016-11-28 14:06:58.028] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-28 14:06:59.028] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-28 14:07:00.028] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-28 14:07:01.028] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-28 14:07:02.029] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-28 14:07:03.029] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.
[2016-11-28 14:07:04.029] [warning] [grabber] event_manipulator_ is not ready. Please wait for a while.

Any way to resolve this issue?

gamesbrainiac commented 7 years ago

Changed back to 0.9.66, and it works like a charm again. Perhaps we should skip version 0.9.67.

hugomc92 commented 7 years ago

Excuse me, can you tell me how can I download version 0.9.66 once I've updated and got this error? I can't find .dmg from any older version than latest. Thanks in advance

quadbyte commented 7 years ago

Same issue here. I was not able to rollback to 0.9.66 so I just used the uninstall feature on the misc tab, then reinstalled 0.9.67. It kept my settings and the issue is gone.

During trouble shooting I manually deleted the kext in /Library/Extensions before the uninstall. Not sure if that helps or not.

hugomc92 commented 7 years ago

Thank you so much! It's worked great!

RobbeR commented 7 years ago

+1 How can I change back the prev version?

UPDATED: Uninstall and install again worked for me too

clipset commented 7 years ago

how to rollback to 0.9.66? have a link the package?

quadbyte commented 7 years ago

no need to rollback, see my previous message.

ibejohn818 commented 7 years ago

Same issue and re-installing fixed the issue. Misc>Uninstall Download Install Working like a charm :-)

pohkit commented 7 years ago

I'd done the step on re-installing, but still have encounter the warning log and I couldn't remap the key too.

aparajita commented 7 years ago

I tried reinstalling 0.9.67 with no luck, 0.9.66 works.

https://pqrs.org/osx/karabiner/files/Karabiner-Elements-0.90.66.dmg

hronro commented 7 years ago

Same with me, and reinstall fix.

dsaxton commented 7 years ago

Reinstall worked until I rebooted, then it gave the same error. Had to go back to 0.9.66.

xrealtimex commented 7 years ago

I have this issue too. I can confirm that a rollback to .66 works, and that an uninstall-reinstall works too (until you reboot). Thanks

pdiniz13 commented 7 years ago

Had the same issue and revert fixed the problem

quadbyte commented 7 years ago

still using the reinstalled 0.67 and no problem even after rebooting. Probably because i deleted the .kext in /Library/Extensions
I'm sure the devs will fix all this for 0.68

saagarjha commented 7 years ago

@tekezo I'm still seeing this in 0.90.68.

[EDIT]: Thanks @llelf

llelf commented 7 years ago

I confirm that the bug is still there with [edit:] 0.90.98 0.90.68.

sainho93 commented 7 years ago

The bug is still there (0.90.68) with my Mac.

jackwakefield commented 7 years ago

I'm getting this with the MacBook Pro (Retina, 15-inch, Mid 2015) on 10.12.1 with no devices plugged in. I am running kwm with khd though (a hotkey daemon). I wonder if there's a conflict?

saagarjha commented 7 years ago

I've updated to macOS Sierra 10.12.2 Beta (16C63a), which has made not only 0.90.68 unusual, but 0.90.66 as well.

tdauria1 commented 7 years ago

Shift key on my MBA built-in keyboard is stuck on electronically, I believe hardware problem with trackpad. 0.90.68 was working fine when initially booted in clamshell mode (internal kb disabled). After restarting and not having access to a keyboard/monitor, event viewer still showed mouse clicks flagged with shift. Uninstall/reinstall of 0.90.68 did not work for me but uninstall/rollback to 0.90.66 and it is working fine. I think it may have had something to do with not being able to properly/fully init the program, as I was getting "eventmanipulator is not ready" and something about a problem with key repeat. macOS 10.12.1, macbook air A1465 Thank you everyone for keeping my macbook usable!

dsaxton commented 7 years ago

Using macOS Sierra 10.12.1 and had to switch back to .66 to get the caps lock / escape swap to work, now suddenly this version doesn't work either and I'm back to getting the eventmanipulator warning. Fortunately I'm not using vim as much lately, but would be nice to have this resolved.

saagarjha commented 7 years ago

The issue seems to have away for me on 10.12.2 (and 0.90.68), at least for now.

pawelnowak commented 7 years ago

+1 on 0.90.68, reinstalling the app solved the problem.

jacoscaz commented 7 years ago

+1

I've encountered the same problem on Mac OS X Sierra 10.21.1 using Karabiner-Elements 0.90.68 and a Microsoft Comfort Keyboard 5050. Reinstalling did not fix my issue while reverting to 0.90.66 did.

Edit to provide more context: I'm using a MacBook Pro (Retina, 13-inch, Late 2013).

MikhailTNY commented 7 years ago

The issue is back for me in the latest 70 build.

tekezo commented 7 years ago

What's the result of this command in Terminal?

sudo kextload /Library/Extensions/org.pqrs.driver.Karabiner.VirtualHIDDevice.kext
thethreeonee commented 7 years ago

@tekezo I got this in 0.90.72 on macOS 10.12.2

/Library/Extensions/org.pqrs.driver.Karabiner.VirtualHIDDevice.kext failed to load - (libkern/kext) not found; check the system/kernel logs for errors or try kextutil(8).
derekperkins commented 7 years ago

I'm getting the exact same error on 0.90.73 on macOS 10.12.2

tekezo commented 7 years ago

The reinstallion Karabiner-Elements and reboot might solve this issue. https://github.com/tekezo/Karabiner-Elements/issues/527

There is a known issue that Karabiner-Elements installer does not complete the post process in some environment. (But I have not determined the cause yet.)

@Murriouz Thank you for information! Are there any logs related with kextload in Console.app?

thethreeonee commented 7 years ago

@tekezo

I checked. There's no org.pqrs.driver.Karabiner.VirtualHIDDevice.kext file under /Library/Extensions/

I build Karabiner-Elements from source then get this file, copy it to /Library/Extensions/, and everything works fine.

I guess the pkg installer didn't copy that file to the correct location.

MikhailTNY commented 7 years ago

73 still has this issue. I ran the command, no output in terminal but I checked the console, it shows the following:

default 07:09:51.096041 -0800   sudo       miket : TTY=ttys000 ; PWD=/Users/miket ; USER=root ; COMMAND=/sbin/kextload /Library/Extensions/org.pqrs.driver.Karabiner.VirtualHIDDevice.kext
default 07:09:51.111990 -0800   kextd   Can't create kext from cache: /Library/Extensions/org.pqrs.driver.Karabiner.VirtualHIDDevice.kext is already open and has a different CFBundleIdentifier from identifier->path cache entry 11.
default 07:09:51.468417 -0800   kernel  org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDRoot_v040000::start

default 07:09:51.468788 -0800   kernel  org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDRoot_UserClient_v040000::initWithTask

I do see the kext in my \Library\Extensions folder. Last modified on 12/30/16. Here's the md5 hash I did on the VIrtualHIDDEvice inside the kext package:

MD5 (/Library/Extensions/org.pqrs.driver.Karabiner.VirtualHIDDevice.kext/Contents/MacOS/VirtualHIDDevice) = 875bd3631d1ce15c72f1422ff8b10dbf

MikhailTNY commented 7 years ago

I did a clean install with .73, it didn't install any file to /Library/Extensions and I got the same error. I have to fall back to .66 instead, which worked instantly.

The only thing I saw was sandbox violations on mdworker for using com.apple.FileCoordination but no other specific errors.

iturn commented 7 years ago

Running into the same issue on .73

esambo commented 7 years ago

I also got that consistent log entry.

My workaround that reliably seems to work

  1. Verify problem:
    • Karabiner-Elements | Log
      • [time stamp that increases every second] [warning] [grabber] event_manipulator_ is not ready. (virtual_hid_device_client is not ready) Please wait for a while.
    • You can also see that with:
      • tail /private/var/log/karabiner/*
    • shows a result for:
      • kextstat -l | grep pqrs
        • 144 0 0xffffff7f80cc5000 0x7000 0x7000 org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 (4.0.0) EA3906F2-099C-32F4-B2FC-106BC4DC68F8 <35 5 4 3 1>
    • shows no result for:
      • ls -al /Library/Extensions | grep pqrs
  2. Clean uninstall:
    • Karabiner-Elements
      • Devices | Deactivate your keyboards
      • Misc | Launch uninstaller
    • Verify that uninstall wasn't clean because the following cannot be unloaded
      • sudo kextunload -b org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 -verbose
    • restart computer to unload it
    • verify restart was successful
      • the following should not return anything anymore
        • kextstat -l | grep pqrs
    • install Karabiner-Elements again
  3. Verify good install:
    • Existing extension
      • The following should now finally show an entry
        • ls /Library/Extensions | grep pqrs
          • org.pqrs.driver.Karabiner.VirtualHIDDevice.kext
    • Enable your keyboard in:
      • Karabiner-Elements | Devices
    • Verify no new "[warning]" or "[error]" log entries every second in:
      • Karabiner-Elements | Log
  4. Further troubleshooting:
    • If you still get the "[warnings]" log entry every second
      • Karabiner-Elements | Simple-Modifications | Quit Karabiner-Elements
      • Karabiner-Elements | Log
        • It should now finally be quiet & working again!
  5. Upgrade:
    • I get prompted to download the latest version:
      • Karabiner-Elements 0.90.75
    • I agree to download it (since it's not in the GitHub releases)
    • I do NOT click on the "Install and Relaunch" in the Ready to Install: popup, as this would break my current installation again, since I need to cleanly uninstall it first before I can install a new version!
    • Copy the newly downloaded version:
      • cp -r ~/Library/Caches/org.pqrs.Karabiner-Elements-Updater/org.sparkle-project.Sparkle/Karabiner-Elements\ 0.90.75/Karabiner-Elements-0.90.75.dmg ~/Downloads
    • Quit the upgrade
      • Kill Karabiner-Elements through Activity Monitor
    • uninstall & reboot
    • Install the new version from your ~/Downloads
    • But this upgrade breaks the "standalone_keys" (which used to be called "standalone_modifiers")
  6. Add custom config:
    • Add a custom config file:
      • ~/.config/karabiner/karabiner.json (which used to be ~/.karabiner.d/configuration/karabiner.json)
        {
        "profiles": [
        {
        "devices": [],
        "name": "Default profile",
        "selected": true,
        "simple_modifications": {
            "caps_lock": "left_control",
            "return_or_enter": "right_control"
        },
        "standalone_keys": {
            "caps_lock": "escape",
            "return_or_enter": "return_or_enter"
        }
        }
        ]
        }

Root Cause

I believe that the root of the problem is the failed unloading of the extension, which is being done in Karabiner-VirtualHIDDevice/uninstall.sh:

Output from: sudo kextunload -b org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 -verbose

(kernel) Can't unload kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000; classes have instances:
(kernel)     Kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 class org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDKeyboard_v040000 has 1 instance.
(kernel)     Kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 class org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDEventService_v040000 has 1 instance.
(kernel)     Kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 class org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDRoot_UserClient_v040000 has 1 instance.
Failed to unload org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 - (libkern/kext) kext is in use or retained (cannot unload).

Or more verbose: sudo kextunload -b org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 -verbose 6

Kext user-space log filter changed from 0xff2 to 0xfff.
Kext kernel-space log filter changed from 0xff2 to 0xfff.
Requesting unload of org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 (with termnation of IOServices).
(kernel) User-space log flags changed from 0x0 to 0xfff.
(kernel) Received 'Unload' request from user space.
(kernel) Can't unload kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000; classes have instances:
(kernel)     Kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 class org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDKeyboard_v040000 has 1 instance.
(kernel)     Kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 class org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDEventService_v040000 has 1 instance.
(kernel)     Kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 class org_pqrs_driver_Karabiner_VirtualHIDDevice_VirtualHIDRoot_UserClient_v040000 has 2 instances.
Kernel error handling kext request - (libkern/kext) kext is in use or retained (cannot unload).
Failed to unload org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 - (libkern/kext) kext is in use or retained (cannot unload).

It is also recommended to do it with the absolute path, but it doesn't seem to make a difference sudo kextunload -b /Library/Extensions/org.pqrs.driver.Karabiner.VirtualHIDDevice.kext -verbose 6

hariseldon78 commented 7 years ago

@esambo this is happening to me with version 0.90.83, the first restart after the update.

the commandls -al /Library/Extensions | grep pqrs shows me this: drwxr-xr-x 3 root wheel 102 10 Gen 15:18 org.pqrs.driver.Karabiner.VirtualHIDDevice.kext

reinstalling fix the problem, without reboot. and the kext is correctly unloaded when uninstalling: sudo kextunload -b org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 -verbose Password: (kernel) Kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 not found for unload request. Failed to unload org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 - (libkern/kext) not found.

So i think there is a different cause or an additional one to this problem...

sloanlance commented 7 years ago

I just updated to macOS 10.12 and I learned that I needed Karabiner-Elements instead of the old Karabiner. I thought the old one had uninstalled correctly before I installed the new one, but apparently not. After Karabiner-Elements didn't work for me, I dug around and found pieces of it were still left in /Library/Extensions and /Library/Application Support. Manually deleting all of those things from a shell prompt, rebooting, and reinstalling Karabiner-Elements finally got it all working for me.

I miss the command-line interface that Karabiner provided, though.

qria commented 7 years ago

Following esambo's instructions, after I restarted the driver didn't get unloaded. Trying to unload it I got this error.

Qrias-MacBook-Pro:~ qria$ sudo kextunload -b org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 -verbose
(kernel) Kext org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 not found for unload request.
Failed to unload org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 - (libkern/kext) not found.

I changed org.pqrs.driver.Karabiner.VirtualHIDDevice.v040000 to org.pqrs.driver.Karabiner and it works.

Qrias-MacBook-Pro:~ qria$ sudo kextunload -b org.pqrs.driver.Karabiner -verbose
org.pqrs.driver.Karabiner unloaded and personalities removed.
Qrias-MacBook-Pro:~ qria$ kextstat -l | grep pqrs
Qrias-MacBook-Pro:~ qria$
pdiniz13 commented 7 years ago

are there any updates on this issue or should we keep using .66

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.