Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K65 Non-RGB is not detected #31

Closed
mmolad opened this issue Jan 17, 2017 · 31 comments
Closed

K65 Non-RGB is not detected #31

mmolad opened this issue Jan 17, 2017 · 31 comments

Comments

@mmolad
Copy link

mmolad commented Jan 17, 2017

Using beta .27, I am unable to detect my K65 Non RGB in macOS.

@tatokis
Copy link
Collaborator

tatokis commented Jan 20, 2017

Alright, make sure your keyboard is plugged in and the switch is not in the BIOS mode.
On a terminal, run

sudo launchctl unload /Library/LaunchDaemons/com.ckb.daemon.plist && sudo killall -9 ckb-daemon && sudo /Applications/ckb.app/Contents/Resources/ckb-daemon

all in a single line, and then paste the output of the command here.

@mmolad
Copy link
Author

mmolad commented Jan 20, 2017

No matching processes were found

@tatokis
Copy link
Collaborator

tatokis commented Jan 20, 2017

Oops, try this

sudo launchctl unload /Library/LaunchDaemons/com.ckb.daemon.plist && sudo killall -9 ckb-daemon ; sudo /Applications/ckb.app/Contents/Resources/ckb-daemon

@mmolad
Copy link
Author

mmolad commented Jan 20, 2017

/Library/LaunchDaemons/com.ckb.daemon.plist: Could not find specified service
    ckb: Corsair RGB driver beta-v0.2.7
[I] Root controller ready at /var/run/ckb0
[I] Connecting Corsair K65 Gaming Keyboard at /var/run/ckb1
[W] add_hid (usb_mac.c:679): Got unknown handle (I: 2, O: 0, F: 0)
[W] add_hid (usb_mac.c:679): Got unknown handle (I: 8, O: 1, F: 8)

After I changed from non-BIOS to BIOS...

[I] Disconnecting /var/run/ckb1
[I] Removed device path /var/run/ckb1
[I] Removed device path /var/run/ckb1
[W] add_hid (usb_mac.c:705): Tried to set up ifhid[2] for device ckb1, but it was already set up. Skipping...
[W] add_hid (usb_mac.c:679): Got unknown handle (I: 2, O: 0, F: 0)
[W] add_hid (usb_mac.c:679): Got unknown handle (I: 8, O: 1, F: 8)

@tatokis
Copy link
Collaborator

tatokis commented Jan 20, 2017

Interesting, what firmware version is it running?

@mmolad
Copy link
Author

mmolad commented Jan 20, 2017 via email

@tatokis
Copy link
Collaborator

tatokis commented Jan 20, 2017

Since I don't have the keyboard, you'll have to modify the daemon to provide more info.
Open up src/ckb-daemon/usb_mac.c and on line 682 add
ckb_info("Got handle (I: %d, O: %d, F: %d)\n", (int)input, (int)output, (int)feature);
save and re-run quickinstall.
Once it installs, run
sudo launchctl unload /Library/LaunchDaemons/com.ckb.daemon.plist && sudo killall -9 ckb-daemon ; sudo /Applications/ckb.app/Contents/Resources/ckb-daemon
and attach the output again.

@mmolad
Copy link
Author

mmolad commented Jan 23, 2017

    ckb: Corsair RGB driver beta-v0.2.7
[I] Root controller ready at /var/run/ckb0
[I] Connecting Corsair K65 Gaming Keyboard at /var/run/ckb1
[I] Got handle (I: 15, O: 0, F: 0)
[W] add_hid (usb_mac.c:679): Got unknown handle (I: 2, O: 0, F: 0)
[W] add_hid (usb_mac.c:679): Got unknown handle (I: 8, O: 1, F: 8)

Switching back to BIOS...

[I] Disconnecting /var/run/ckb1
[I] Removed device path /var/run/ckb1
[I] Removed device path /var/run/ckb1
[I] Got handle (I: 15, O: 0, F: 0)
[W] add_hid (usb_mac.c:706): Tried to set up ifhid[2] for device ckb1, but it was already set up. Skipping...
[W] add_hid (usb_mac.c:679): Got unknown handle (I: 2, O: 0, F: 0)
[W] add_hid (usb_mac.c:679): Got unknown handle (I: 8, O: 1, F: 8)

@tatokis
Copy link
Collaborator

tatokis commented Jan 26, 2017

Interesting, it seems to expose a handle that is used by RGB keyboards. (At least according to comments in the code, anyway.)

I made a patch, by attempting to guess which handle does what.
Please apply it, recompile, and if it is detected test both the normal and the media keys.

Should be as easy as downloading it to the root of the repo (where quickinstall is) and then running from a terminal patch -p1 < k65nrgbtest.patch

https://vps.tasossah.com/bugs/ckb-next/k65nrgbtest.patch

@mmolad
Copy link
Author

mmolad commented Jan 26, 2017

Patch reports patch: **** strip count l is not a number

@tatokis
Copy link
Collaborator

tatokis commented Jan 26, 2017

After -p, It's the number one, not the letter l.

@mmolad
Copy link
Author

mmolad commented Jan 26, 2017

Yup, just caught that. Retrying now!

@mmolad
Copy link
Author

mmolad commented Jan 26, 2017

It looks like itis dedteecint . igg t now but with major keyboard/keyprpess issuess andd duplicate keypreesses.

@mmolad
Copy link
Author

mmolad commented Jan 26, 2017

How do I undo? 😢

@tatokis
Copy link
Collaborator

tatokis commented Jan 26, 2017

sudo killall -9 ckb-daemon
should do it

@mmolad
Copy link
Author

mmolad commented Jan 26, 2017

That doesn't appear to resolve the issue.

Now that I'm on my backup keyboard... in BIOS mode the keys have very erratic behavior (demonstrated above). In normal modes, the keys are completely nonfunctional (before only some keys didn't work, like Enter).

@tatokis
Copy link
Collaborator

tatokis commented Jan 26, 2017

Well, since I don't know how to kill ckb-daemon on macOS, what you can (and should do, in order to do further testing) is run patch -p1 -R < k65nrgbtest.patch and recompile.

That should revert the patch and return the file to its previous state.

@mmolad
Copy link
Author

mmolad commented Jan 26, 2017

Will revert for now. Was hopeful we had it figured out. :(

@tatokis
Copy link
Collaborator

tatokis commented Jan 26, 2017

Another guess, how about https://vps.tasossah.com/bugs/ckb-next/k65nrgbtestv2.patch
Same procedure but different filename on the patch command.

@ghost
Copy link

ghost commented Jan 26, 2017

To stop the daemon you write:

sudo launchctl unload /Library/LaunchDaemons/com.ckb.daemon.plist

To start the daemon you write:

sudo launchctl load /Library/LaunchDaemons/com.ckb.daemon.plist

@mmolad
Copy link
Author

mmolad commented Jan 27, 2017

With patch v2, the keyboard continues to function in BIOS mode with no apparent issues (outside some latency issues as before), but fails to be detected.

In standard modes, it is detected but non functional or the key appears to be stuck (I saw no response and then the spacebar was infinitely repeated).

@Wertuoz
Copy link

Wertuoz commented Jan 30, 2017

Hi 2all!
I have the same problem, my k65 rgb is No devices connected.
Sometimes it works fine, but after reboot - i spend a lot of time to make it work(https://puu.sh/tGvWB/0ab4722308.png

@frickler24
Copy link
Collaborator

@Wertuoz ist anything more than the line ending with /var/run/ckb0?
can you pls look into that directory: There should be 3 files: connected, pid, version.
Interesting is the content of connectet. You can cat or open it in a viewer / texteditor.

@tatokis
Copy link
Collaborator

tatokis commented Jan 30, 2017

@Wertuoz @frickler24 this thread is about the Non RGB version of the keyboard.
As this is clearly a different problem, please run the ckb-dev-detect script from this repository and open a new issue.

@mmolad
Copy link
Author

mmolad commented Feb 6, 2017

@tatokis any update on developing a new solution?

@tatokis
Copy link
Collaborator

tatokis commented Feb 6, 2017 via email

@rijujohnx rijujohnx mentioned this issue Jan 2, 2018
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants