Seil icon indicating copy to clipboard operation
Seil copied to clipboard

Seil doesn't load under 10.12

Open neilio opened this issue 8 years ago • 104 comments

I know this was released today, but Seil doesn't load its kernel extension under 10.12. I can't seem to get the kext to load manually as with previous updates - is there way to work around this issue for now?

neilio avatar Jun 13 '16 23:06 neilio

I'll confirm this issue. Please wait for a while.

tekezo avatar Jun 14 '16 06:06 tekezo

If it helps you, I've done a little digging. tl;dr is kext loads fine, but doesn't do anything for me (I remap caps).

$ sudo kextload /Library/Application\ Support/org.pqrs/Seil/Seil.10.11.signed.kext
$ kextstat | grep -v com.apple
Index Refs Address            Size       Wired      Name (Version) UUID <Linked Against>
  140    0 0xffffff7f834d4000 0x2000     0x2000     com.nvidia.CUDA (1.1.0) 5AFE550D-6361-3897-912D-897C13FF6983 <4 1>
  146    0 0xffffff7f82b0d000 0x6000     0x6000     org.pqrs.driver.Seil (12.1.0) 9420A514-D737-3FA6-B008-CDEA735BC820 <32 5 4 3 1>

For future reference, this is on DP 1:

$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.12 (16A201w)
      Kernel Version: Darwin 16.0.0
      ...

notjosh avatar Jun 14 '16 12:06 notjosh

Also fwiw, seems like it's hanging onto something and refusing to terminate/unload:

$ sudo kextunload /Library/Application\ Support/org.pqrs/Seil/Seil.10.11.signed.kext
(kernel) Can't unload kext org.pqrs.driver.Seil; classes have instances:
(kernel)     Kext org.pqrs.driver.Seil class org_pqrs_driver_Seil has 1 instance.
Failed to unload org.pqrs.driver.Seil - (libkern/kext) kext is in use or retained (cannot unload).

I assume it used to terminate/unload just fine on 10.11 at least :)

It's too late at night for me to dig into this now, but I'll take a look tomorrow if you haven't had a chance!

notjosh avatar Jun 14 '16 14:06 notjosh

macOS 10.12 changes of the generic keyboard and mouse drivers made a great impact on Karabiner and Seil. We should make a large changes in Karabiner and Seil architecture. There is not a workaround for this issue.

Please wait an update of Karabiner and Seil for macOS 10.12. (It may take a long time.)

tekezo avatar Jun 18 '16 13:06 tekezo

Thank you tekezo for the analysis and the hard work.

Best regards!

On June 18, 2016 at 3:26:36 PM, Takayama Fumihiko ([email protected](mailto:[email protected])) wrote:

macOS 10.12 changes of the generic keyboard and mouse drivers made a great impact on Karabiner and Seil. We should make a large changes in Karabiner and Seil architecture. There is not a workaround for this issue.

Please wait an update of Karabiner and Seil for macOS 10.12. (It may take a long time.)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub(https://github.com/tekezo/Seil/issues/68#issuecomment-226942446), or mute the thread(https://github.com/notifications/unsubscribe/AB2NvLMMKgKvKlmPz0HdVtARFwvxQtwMks5qM_IMgaJpZM4I01Nb).

bosr avatar Jun 18 '16 13:06 bosr

Thanks so much @tekezo!

ariporad avatar Jun 19 '16 19:06 ariporad

Is there still no way to remap caps to esc without seil? I really depend on this mapping.. (Yes I have done the googling)

BjornMulder avatar Jun 22 '16 18:06 BjornMulder

@BjornMulder Unfortunately, I don't know another way. Please use OS X 10.11 for a while.

tekezo avatar Jun 23 '16 02:06 tekezo

@tekezo Alright, thanks for the response.

BjornMulder avatar Jun 23 '16 13:06 BjornMulder

If anyone reading this is impatient like me, I found a hacky alternative way to map keys. This only works with AppleEmbeddedKeyboard, which is most/all of Apple's own keyboards (run ioreg | grep AppleEmbeddedKeyboard to see if you have one).

You need to have System Integrity Protection disabled. I think that's sufficient these days (used to require setting the kext-dev-mode boot argument but that doesn't seem to be used anymore, despite still showing up in kextcache's output).

Find the IOKit personality corresponding to your keyboard, which should be in either /System/Library/Extensions/AppleHIDKeyboard.kext/Contents/Info.plist or /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyEventDriver.kext/Contents/Info.plist. Identify the right one by comparing ProductID/VendorID to your keyboard's IDs, which you can find in the System Information app under USB (builtin keyboards) or Bluetooth (I think). You'll need to convert from hex to decimal.

You should see something like:

        <key>IOClass</key>
        <string>AppleEmbeddedKeyboard</string>
        [..more stuff..]
        <key>ProductID</key>
        <integer>601</integer>
        <key>VendorID</key>
        <integer>1452</integer>

Edit the file (you need sudo), and put in anywhere:

        <key>KeyboardUsageMap</key>
        <dict>
            <key>0x00070039</key>
            <integer>0x00070029</integer>
        </dict>

note: 7,0x39 and 7,0x29 are the HID usage codes for caps lock and escape, respectively; you can look these up. You can remap any keys; to remap multiple entries, repeat the two lines with 0x in them.

Make sure the file is owned by user root and group wheel. If you edited it from within sudo this should be the case, but if you copied the file or something it might not be; in that case run sudo chown root:wheel /whatever/path/to/Info.plist.

Run sudo touch /System/Library/Extensions && sudo kextcache -update-volume /. You should see something like this (depending on which kext you modified):

kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleUSBTCKeyEventDriver.kext
kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleUSBTopCase.kext

And reboot. If it worked, your mappings should be in effect. If it didn’t work, it’s probably because it decided not to load the driver (in which case it uses the generic HID keyboard driver and your function keys will be broken); you can try doing the touch/kextcache/reboot sequence again.

You'll have to redo this if you update the OS.

comex avatar Jun 29 '16 05:06 comex

@comex Thank you! Just want to confirm this works as written with SIP disabled and without any other actions required. To bind CapsLock via a shortcut, I remapped it to F13 (0x00070068) so that it's recognized as a valid key. FWIW on my MacBook the internal keyboard has a ProductID of 610 and is located in AppleUSBTopCase.kext, but I imagine this may be different between different models.

zeux avatar Jun 29 '16 15:06 zeux

@BjornMulder If you're wanting to just re-map to ESC, you could use Keyboard Maestro. Ex. http://dsh.re/b3cd6

However, doing more of the complex setup of using it primarily as a ~F19 key and then remapping that to CMD+CTRL+SHIFT+OPT isn't possible with Keyboard Maestro. At least not that I've been able to achieve.

kennonb avatar Jul 03 '16 02:07 kennonb

@kennonb Does Keyboard Maestro work with Sierra then? And just to be clear, if I want to use remap Caps as F19 and use as my Alfred toggle - Keyboard Maestro would do the trick?

vmax77 avatar Jul 04 '16 09:07 vmax77

You won't be able to remap the key in that fashion unfortunately. At least not in a way that's really responsive. You could use AppleScript to try and pass key shortcuts back to Keyboard Maestro, but I found it to cause too much of a delay in processing, so I abandoned that idea.

kennonb avatar Jul 05 '16 04:07 kennonb

@tekezo any updates on an ETA for even a bleeding edge version of Seil :)

BrendanThompson avatar Jul 17 '16 23:07 BrendanThompson

For any fellow Sierra beta-testers looking to emulate the Seil/Karabiner "F19" trick to remap their CapsLock key to a vim-friendly "press-for-ctrl/tap-for-escape" configuration (as outlined nicely by @brendonrapp here), I was able to accomplish this by simply remapping CapsLock to Ctrl in System Prefs > Keyboard > Keyboard > Modifier Keys, then applying @kennonb's Keyboard Maestro example. (Thanks, @kennonb!)

I'll still be waiting with bated breath for a Sierra-compatible version of Karabiner though, so I can get my universal Vi Mode back!

paul-howard avatar Jul 30 '16 12:07 paul-howard

@vmax77 @paul-howard This is my workaround atm with keyboard maestro: http://imgur.com/a/DhOzr It works pretty good :) You can easily choose F19 or other F keys.

LoMiLiMiT avatar Aug 02 '16 23:08 LoMiLiMiT

@LoMiLiMiT worked like a charm. Thanks a ton!

mistadikay avatar Aug 03 '16 04:08 mistadikay

Here's a quick python script that makes the changes as described by @comex.

Note that you will probably have to twiddle the xpath syntax a bit since I have only tested it on my own setup (macOS w/ SPI keyboard).

nhynes avatar Aug 04 '16 13:08 nhynes

Here https://stackoverflow.com/a/16125341 are the keycodes, that can be used with comex's approach.

priezz avatar Aug 18 '16 16:08 priezz

Does anyone know how to get the product IDs for @comex's approach on a macbook (late 2015)?

The built in keyboard doesn't show up under USB, nor does the microsoft sculpt keyboard. The latter shows up as "Wireless Transceiver" (and the dongle indeed is connected to a mouse as well).

Thanks in advance!

sprig avatar Sep 03 '16 01:09 sprig

Has anyone been able to simulate ctrl+alt+cmd+shift (hyper) in Sierra? I updated today and I used in combination with BetterTouchTool to launch programs with capslock and a letter (for example Capslock + S for Spotify).

Does anyone have idea how to achieve that while I'm waiting for new versions of Seil and Karabiner?

Thanks

nklmilojevic avatar Sep 11 '16 11:09 nklmilojevic

App ain't working, and may take more time than it seems to be, so you know.

On Sunday, September 11, 2016, Nikola Milojević [email protected] wrote:

Has anyone been able to simulate ctrl+alt+cmd+shift (hyper) in Sierra? I updated today and I used in combination with BetterTouchTool to launch programs with capslock and a letter (for example Capslock + S for Spotify).

Does anyone have idea how to achieve that while I'm waiting for new versions of Seil and Karabiner?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tekezo/Seil/issues/68#issuecomment-246175922, or mute the thread https://github.com/notifications/unsubscribe-auth/ADKNgn9w2tsOZR4KvYqZpLCdLm0Ey1itks5qo-jEgaJpZM4I01Nb .

xmwa avatar Sep 11 '16 14:09 xmwa

Yeah, I know that, but I found some kind of a workaround with Keyboard Maestro and recording the keysequence in BTT.

nklmilojevic avatar Sep 11 '16 18:09 nklmilojevic

Karabiner Elements now has a build that is working for me fine on OSX 10.12. There is not a preferences pane yet so you have to modify the key via json config file. @tekezo has provided quick examples for typical mappings here.

asethwright avatar Sep 15 '16 18:09 asethwright

Incredible, working on karabiner-elements, anything that we could do to simulate two keys when pressing one key? I did not see an example like that.

On Sep 16, 2016, at 02:43, Seth Wright [email protected] wrote:

Karabiner Elements https://github.com/tekezo/Karabiner-Elements now has a build that is working for me fine on OSX 10.12. There is not a preferences pane yet so you have to modify the key via json config file. @tekezo https://github.com/tekezo has provided quick examples for typical mappings here https://github.com/tekezo/Karabiner-Elements/blob/master/usage/README.md.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tekezo/Seil/issues/68#issuecomment-247415019, or mute the thread https://github.com/notifications/unsubscribe-auth/ADKNgotVkaBcfZc2lmsmA1NWweC0Zx_2ks5qqZHCgaJpZM4I01Nb.

xmwa avatar Sep 16 '16 04:09 xmwa

@asethwright Hey, I cant seem to get Caps Lock to trigger F19 key. This is the json file I tried to use https://github.com/vmax77/Karabiner-Elements/blob/master/examples/change_caps_lock_to_f19.json. Am I doing something wrong?

vmax77 avatar Sep 16 '16 06:09 vmax77

no comma after “fn”?

On Sep 16, 2016, at 14:13, Vinny [email protected] wrote:

@asethwright https://github.com/asethwright Hey, I cant seem to get Caps Lock to trigger F19 key. This is the json file I tried to use https://github.com/vmax77/Karabiner-Elements/blob/master/examples/change_caps_lock_to_f19.json https://github.com/vmax77/Karabiner-Elements/blob/master/examples/change_caps_lock_to_f19.json. Am I doing something wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tekezo/Seil/issues/68#issuecomment-247525952, or mute the thread https://github.com/notifications/unsubscribe-auth/ADKNgu91E4klfJWKWmZZgoAJJOfT35FOks5qqjOcgaJpZM4I01Nb.

xmwa avatar Sep 16 '16 07:09 xmwa

Another alternative is using Controller Mate It is very powerful and will allow you to re-map your caps lock key. screen shot 2016-09-16 at 10 45 48 am

I'm not sure what the limitations are for the unregistered version but it doesn't seem to affect the basic usage.

tseven avatar Sep 16 '16 17:09 tseven

@wxmtech @vmax77 Sorry, I only successfully remapped my caps lock to escape. Maybe there is still a problem with f19 remapping.

asethwright avatar Sep 16 '16 17:09 asethwright