Jump to content
Corsair Community

(Unofficial) Linux / OSX Driver


MSC

Recommended Posts

Updated my motherboard firmware and turned on some switches in the bios about fully initializing the USB ports and now any combo of USB2.0 ports works fine.. anything with the USB 3.0 ports refuses to boot at all.

 

One or two strange things:

1. during linux boot it hangs probably 3 minutes unless I unplug the keyboard marked connector... then eventually proceeds to the login gui.... At this point it takes about 2 more minutes before the keyboard is recognized and I can type anything... so patience.... I assume this is because the driver is in user space verse a kernel module? Be nice if they incorporated the basics of this driver into the kernel...

 

2. during linux shutdown the computer hangs for as long as 30 minutes if I let it... or unplug the keyboard marked cable and it proceeds right down... no idea why this is unless something is hanging on shutting down the USB ports?

 

your welcome on the donation - I always like to contribute for software that I actually use, especially for someone doing it on their own time...and since my coding outside of perl or python is pretty lacking money is it.

Link to comment
Share on other sites

  • Replies 824
  • Created
  • Last Reply

Top Posters In This Topic

No the last update won't work on my k70rgb. I have an Imac and now I have to unplug

it every time I start up. This problem I don't have before..strange.

Any ideas

 

Same problem for me... What was the version of CKB when it worked?

 

Hmm... which download did you use and how did you install it (binary/source, quickinstall/manual install)? Latest version still works for me, maybe try reinstalling it, or run the daemon manually (sudo /Applications/ckb.app/Contents/Resources/ckb-daemon) and see if it gives you any error messages.

 

Updated my motherboard firmware and turned on some switches in the bios about fully initializing the USB ports and now any combo of USB2.0 ports works fine.. anything with the USB 3.0 ports refuses to boot at all.

 

One or two strange things:

1. during linux boot it hangs probably 3 minutes unless I unplug the keyboard marked connector... then eventually proceeds to the login gui.... At this point it takes about 2 more minutes before the keyboard is recognized and I can type anything... so patience.... I assume this is because the driver is in user space verse a kernel module? Be nice if they incorporated the basics of this driver into the kernel...

 

2. during linux shutdown the computer hangs for as long as 30 minutes if I let it... or unplug the keyboard marked cable and it proceeds right down... no idea why this is unless something is hanging on shutting down the USB ports?

 

your welcome on the donation - I always like to contribute for software that I actually use, especially for someone doing it on their own time...and since my coding outside of perl or python is pretty lacking money is it.

 

Out of curiosity, do you see anything like "error -110" in dmesg? It seems to be a common factor in boot problems, though I don't know how to solve it yet. I think you can get rid of it if you tell the kernel driver to ignore the keyboard, but then you run the risk of having no key input if ckb-daemon doesn't start for some reason.

Link to comment
Share on other sites

Hmm... which download did you use and how did you install it (binary/source, quickinstall/manual install)? Latest version still works for me, maybe try reinstalling it, or run the daemon manually (sudo /Applications/ckb.app/Contents/Resources/ckb-daemon) and see if it gives you any error messages.

 

I downloaded version v0.0.57 and compiled it by myself. I'll try v0.0.59.

Link to comment
Share on other sites

Installed this on Arch Linux using the AUR ckb-git. After updating my firmware, finding the best suited USB (my board delays boot for several minutes if I use a USB3 port) and fiddling with settings it seems to be working great!

 

I am at a loss as to how to load the ckb program minimized, however. On the Github instructions page I see you can add a --background switch to ckb, but adding this to the exec line of my autostart file still opens the window on login. Gracefully killing it and starting ckb --background from a terminal still opens it.

 

Did I miss a step? Thanks for this great project!

Link to comment
Share on other sites

[ 0.526307] hidraw: raw HID events driver © Jiri Kosina

[ 0.526440] usbcore: registered new interface driver usbhid

[ 0.526442] usbhid: USB HID core driver

[ 2.099795] hid-generic 0003:047D:1020.0001: input,hidraw0: USB HID v1.10 Mouse [Kensington Kensington Expert Mouse] on usb-0000:04:00.0-2/input0

[ 2.320081] usb 1-1.3: Product: Corsair K95 RGB Gaming Keyboard

[ 2.320084] usb 1-1.3: Manufacturer: Corsair

[ 2.324441] input: Corsair Corsair K95 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:1B1C:1B11.0002/input/input7

[ 2.324554] hid-generic 0003:1B1C:1B11.0002: input,hidraw1: USB HID v1.11 Keyboard [Corsair Corsair K95 RGB Gaming Keyboard] on usb-0000:00:1a.0-1.3/input0

[ 20.441224] usbhid 1-1.3:1.1: can't add hid device: -32

[ 20.441240] usbhid: probe of 1-1.3:1.1 failed with error -32

[ 20.445436] usbhid 1-1.3:1.2: can't add hid device: -32

[ 20.445449] usbhid: probe of 1-1.3:1.2 failed with error -32

[ 20.449560] usbhid 1-1.3:1.3: can't add hid device: -32

[ 20.449568] usbhid: probe of 1-1.3:1.3 failed with error -32

[ 25.330008] usb 1-1.3: Product: Corsair K95 RGB Gaming Keyboard

[ 25.330010] usb 1-1.3: Manufacturer: Corsair

[ 25.334989] input: Corsair Corsair K95 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:1B1C:1B11.0003/input/input17

[ 25.335368] hid-generic 0003:1B1C:1B11.0003: input,hidraw1: USB HID v1.11 Keyboard [Corsair Corsair K95 RGB Gaming Keyboard] on usb-0000:00:1a.0-1.3/input0

[ 60.337497] usbhid 1-1.3:1.1: can't add hid device: -110

[ 60.337526] usbhid: probe of 1-1.3:1.1 failed with error -110

[ 95.337879] usbhid 1-1.3:1.2: can't add hid device: -110

[ 95.337898] usbhid: probe of 1-1.3:1.2 failed with error -110

[ 130.338277] usbhid 1-1.3:1.3: can't add hid device: -110

[ 130.338295] usbhid: probe of 1-1.3:1.3 failed with error -110

 

 

Out of curiosity, do you see anything like "error -110" in dmesg? It seems to be a common factor in boot problems, though I don't know how to solve it yet. I think you can get rid of it if you tell the kernel driver to ignore the keyboard, but then you run the risk of having no key input if ckb-daemon doesn't start for some reason.

Link to comment
Share on other sites

When i quickinstall I get this info

Finished!

Install ckb system-wide [Y/n]? y

Password:

Installed at /Applications/ckb.app

 

No supported system service daemons detected.

You will need to start the driver manually.

Start it now [Y/n]?

 

But It works when I install manually.

I still have to unplug and plug in the keyboard on start-up

I am using 0.059 version

Link to comment
Share on other sites

[ 0.526307] hidraw: raw HID events driver © Jiri Kosina

[ 0.526440] usbcore: registered new interface driver usbhid

[ 0.526442] usbhid: USB HID core driver

[ 2.099795] hid-generic 0003:047D:1020.0001: input,hidraw0: USB HID v1.10 Mouse [Kensington Kensington Expert Mouse] on usb-0000:04:00.0-2/input0

[ 2.320081] usb 1-1.3: Product: Corsair K95 RGB Gaming Keyboard

[ 2.320084] usb 1-1.3: Manufacturer: Corsair

[ 2.324441] input: Corsair Corsair K95 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:1B1C:1B11.0002/input/input7

[ 2.324554] hid-generic 0003:1B1C:1B11.0002: input,hidraw1: USB HID v1.11 Keyboard [Corsair Corsair K95 RGB Gaming Keyboard] on usb-0000:00:1a.0-1.3/input0

[ 20.441224] usbhid 1-1.3:1.1: can't add hid device: -32

[ 20.441240] usbhid: probe of 1-1.3:1.1 failed with error -32

[ 20.445436] usbhid 1-1.3:1.2: can't add hid device: -32

[ 20.445449] usbhid: probe of 1-1.3:1.2 failed with error -32

[ 20.449560] usbhid 1-1.3:1.3: can't add hid device: -32

[ 20.449568] usbhid: probe of 1-1.3:1.3 failed with error -32

[ 25.330008] usb 1-1.3: Product: Corsair K95 RGB Gaming Keyboard

[ 25.330010] usb 1-1.3: Manufacturer: Corsair

[ 25.334989] input: Corsair Corsair K95 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0/0003:1B1C:1B11.0003/input/input17

[ 25.335368] hid-generic 0003:1B1C:1B11.0003: input,hidraw1: USB HID v1.11 Keyboard [Corsair Corsair K95 RGB Gaming Keyboard] on usb-0000:00:1a.0-1.3/input0

[ 60.337497] usbhid 1-1.3:1.1: can't add hid device: -110

[ 60.337526] usbhid: probe of 1-1.3:1.1 failed with error -110

[ 95.337879] usbhid 1-1.3:1.2: can't add hid device: -110

[ 95.337898] usbhid: probe of 1-1.3:1.2 failed with error -110

[ 130.338277] usbhid 1-1.3:1.3: can't add hid device: -110

[ 130.338295] usbhid: probe of 1-1.3:1.3 failed with error -110

 

Yep, definitely seems that's the cause of the problem. What happens is that something (it seems to be some combination of BIOS and operating system) makes the keyboard freeze at boot, which is why it doesn't work until you remove it. I'm hoping that the firmware update Corsair have been promising will sort it out.

 

When i quickinstall I get this info

Finished!

Install ckb system-wide [Y/n]? y

Password:

Installed at /Applications/ckb.app

 

No supported system service daemons detected.

You will need to start the driver manually.

Start it now [Y/n]?

 

But It works when I install manually.

I still have to unplug and plug in the keyboard on start-up

I am using 0.059 version

 

Apparently there was a problem with the service detection on 10.9 - should be fixed now. Not sure why the keyboard won't work, though. Did you move it to a different port or anything? You could try putting it in BIOS mode as well, though it's not a good long term solution.

 

EDIT: Try saving this as com.ckb.daemon.plist and replacing the LaunchDaemon with it:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>Label</key>
   <string>com.ckb.daemon</string>
   <key>ProgramArguments</key>
   <array>
       <string>/Applications/ckb.app/Contents/Resources/ckb-daemon</string>
       <string>--layout=us</string>
   </array>
   <key>KeepAlive</key>
   <true/>
   <key>StandardOutPath</key>
   <string>/var/log/ckb.log</string>
</dict>
</plist>

Paste ckb.log here and I'll see if I can make anything of it (Finder: Cmd+Shift+G, enter /var/log, you should find the log file there)

Edited by MSC
Link to comment
Share on other sites

Yep, definitely seems that's the cause of the problem. What happens is that something (it seems to be some combination of BIOS and operating system) makes the keyboard freeze at boot, which is why it doesn't work until you remove it. I'm hoping that the firmware update Corsair have been promising will sort it out.

 

On my system the boot doesn't freeze, but it takes a VERYYYYYY looooooong time with some error messages sometimes.

I do NOT understand how these things work with coding of firmware nor programs, but wouldn't it be logical to assume that ONLY if Corsair took into account the Linux [and Mac] operating systems [which I believe they give NO attention to!], that any firmware update would only solve problems people are having with MS systems....just my not fully informed two cents. It would therefore follow that anyone who wishes them to devote some effort along the lines of compatibility with Mac and /or Linux should loudly and soon make their interests known to Corsair! I have, but got a very cold reception. However, if they get many such responses they may act on it!...so please all, for me and thee...move on it! MSC has done great work, but can only do so much without help from Corsair.

Edited by crazybear
Link to comment
Share on other sites

--background should do it. Which desktop environment do you use?

 

I have the same result whether I launch it in the latest versions of XFCE (my primary) or Gnome. I've even tried removing it from the startup and hitting ALT+F2, typing ckb --background still calls the main window.

 

I'm currently using Arch Linux 64 bit with the ckb-git AUR.

 

The ckb application is ckb alpha-v0.0.59

 

Thanks!

Link to comment
Share on other sites

On my system the boot doesn't freeze, but it takes a VERYYYYYY looooooong time with some error messages sometimes.

I do NOT understand how these things work with coding of firmware nor programs, but wouldn't it be logical to assume that ONLY if Corsair took into account the Linux [and Mac] operating systems [which I believe they give NO attention to!], that any firmware update would only solve problems people are having with MS systems....just my not fully informed two cents. It would therefore follow that anyone who wishes them to devote some effort along the lines of compatibility with Mac and /or Linux should loudly and soon make their interests known to Corsair! I have, but got a very cold reception. However, if they get many such responses they may act on it!...so please all, for me and thee...move on it! MSC has done great work, but can only do so much without help from Corsair.

 

It affects a lot of windows users as well (~50% of the posts in this forum are from people having BIOS/startup/freezing issues). According to Corsair James these problems are all going to be fixed by the new firmware, so that's what I'm hoping for.

 

I have the same result whether I launch it in the latest versions of XFCE (my primary) or Gnome. I've even tried removing it from the startup and hitting ALT+F2, typing ckb --background still calls the main window.

 

I'm currently using Arch Linux 64 bit with the ckb-git AUR.

 

The ckb application is ckb alpha-v0.0.59

 

Thanks!

 

Found the problem: ckb-git from the AUR doesn't pass command line arguments. Open /usr/bin/ckb (it's a shell script) and change it to this:

#!/bin/sh

cd /opt/ckb
./ckb $@

Package maintainer needs to update this :)

Link to comment
Share on other sites

Hi MSC!

I installed your driver and now my Corsair k70 gaming keyboard doesn't work at all.

It also messed up my ubuntu. I have super sized fonts in my system (file names, firefox texts, etc..) and my Firefox appearance has changed to year 1980 (all gray everything).

 

I'm new ubuntu user and I blindly just installed your driver because of this thread and all the glory you had from it. I'm sure it's great once you get it to work but now I just want to get my system back where it was and remove this recent driver that I installed. Can you help me with this?

 

Edit: For clarification: I still want to get this to work so what I'm doing wrong here

Edited by AkAntA
Link to comment
Share on other sites

Found the problem: ckb-git from the AUR doesn't pass command line arguments. Open /usr/bin/ckb (it's a shell script) and change it to this:

#!/bin/sh

cd /opt/ckb
./ckb $@

Package maintainer needs to update this :)

 

Thanks! That took care of it!

Link to comment
Share on other sites

Hi I got this to work and one day my computer restarted and after that, my device can no longer be detected by the CKB software anymore. I tried replugging it back in and restarting again but nothing works. It shows that the daemon is working in terminal. What should I do?
Link to comment
Share on other sites

Hi MSC!

I installed your driver and now my Corsair k70 gaming keyboard doesn't work at all.

It also messed up my ubuntu. I have super sized fonts in my system (file names, firefox texts, etc..) and my Firefox appearance has changed to year 1980 (all gray everything).

 

I'm new ubuntu user and I blindly just installed your driver because of this thread and all the glory you had from it. I'm sure it's great once you get it to work but now I just want to get my system back where it was and remove this recent driver that I installed. Can you help me with this?

 

Edit: For clarification: I still want to get this to work so what I'm doing wrong here

 

Look under System Settings > Displays and check if "Scale for menu and title bars" is set to anything weird. It should be at 1 unless you have a HiDPI display. Also check under Universal Access and see if High Contrast or Large Text is turned on. Not sure about Firefox, could you send me a screenshot of it? Might just need a reboot or something.

 

Hi I got this to work and one day my computer restarted and after that, my device can no longer be detected by the CKB software anymore. I tried replugging it back in and restarting again but nothing works. It shows that the daemon is working in terminal. What should I do?

 

Does it not work at all or is it just the lighting that's unresponsive? Try plugging it into a different port, or a different computer if possible.

Link to comment
Share on other sites

Look under System Settings > Displays and check if "Scale for menu and title bars" is set to anything weird. It should be at 1 unless you have a HiDPI display. Also check under Universal Access and see if High Contrast or Large Text is turned on. Not sure about Firefox, could you send me a screenshot of it? Might just need a reboot or something.

 

I did check all the settings I could find but there were nothing unusual. Also the firefox problem seemed to dissappear on its own. Still the icons and texts on the system were really big.

I already reinstalled ubuntu :biggrin:, so no screenshots. Now I just want to know how I can prevent this from happening again before I reinstall your driver.

Link to comment
Share on other sites

Look under System Settings > Displays and check if "Scale for menu and title bars" is set to anything weird. It should be at 1 unless you have a HiDPI display. Also check under Universal Access and see if High Contrast or Large Text is turned on. Not sure about Firefox, could you send me a screenshot of it? Might just need a reboot or something.

 

 

 

Does it not work at all or is it just the lighting that's unresponsive? Try plugging it into a different port, or a different computer if possible.

 

It is set back to default with the red lighting. The CKB program is unable to detect it. I tried plugging it into another port, nothing.

Link to comment
Share on other sites

Hello,

 

I am writing a kernel space driver for the K90 (https://github.com/cvuchener/k90-linux-driver/) and I was wondering if you wrote any documentation on the control messages for the keyboards you are supporting.

 

If I'm not mistaken, the K90 uses the same commands as the non-RGB K95. My non-RGB testers seem to have disappeared so I don't have much support for it, but look at nk95cmd in usb.h/c. There's also this thread: https://github.com/ccMSC/ckb/issues/38

 

I did check all the settings I could find but there were nothing unusual. Also the firefox problem seemed to dissappear on its own. Still the icons and texts on the system were really big.

I already reinstalled ubuntu :biggrin:, so no screenshots. Now I just want to know how I can prevent this from happening again before I reinstall your driver.

 

My guess is that it was caused by one of the packages you installed. The exact list should be: qt5-default, libudev-dev, build-essential, zlib1g-dev

Try installing them one by one and then rebooting. If the issue doesn't appear again, it *should* be safe to reinstall the driver.

 

I got the quickinstall to work now.

But I have still to plug out and plug in the keyboard on start-up ( I have tried different ports) and the

volume wheel is not working.

I have K70 rgb keyboard and I have an Imac with OS X 10.9.5

 

Any luck with the modified LaunchDaemon file that I posted? I'd like to see if there are any errors from the daemon.

 

Hi, why do you not do the same driver for windows ? the official softwar has bug (specialy when we spam the CAPSLOCK )

 

I don't have any plans to port it to Windows, sorry.

 

It is set back to default with the red lighting. The CKB program is unable to detect it. I tried plugging it into another port, nothing.

 

Can you still type with the keyboard? If so, does the caps lock light work?

Link to comment
Share on other sites

If I'm not mistaken, the K90 uses the same commands as the non-RGB K95. My non-RGB testers seem to have disappeared so I don't have much support for it, but look at nk95cmd in usb.h/c. There's also this thread: https://github.com/ccMSC/ckb/issues/38

 

Thanks. If did not miss anything you only have these commands:

#define NK95_HWOFF  0x020030    // Hardware playback off
#define NK95_HWON   0x020001    // Hardware playback on
#define NK95_M1     0x200001    // Mode switches
#define NK95_M2     0x200002
#define NK95_M3     0x200003

If you are interested, I have more: https://github.com/cvuchener/k90-linux-driver/blob/master/control_messages.md

For the profile switching you are using bRequest = 0x20 but I use 20 in decimal (0x14), so I think you have a bug there.

 

PS: The capture in the issue thread are different from mine, I will have a look at them.

Edited by Clément
Link to comment
Share on other sites

My guess is that it was caused by one of the packages you installed. The exact list should be: qt5-default, libudev-dev, build-essential, zlib1g-dev

Try installing them one by one and then rebooting. If the issue doesn't appear again, it *should* be safe to reinstall the driver.

 

Alright so I did what you suggested and it didn't flip out anymore. However now when I try to start the driver manually (ckb-daemon) it gives me this error "usbinput (firmware.c:26): Forbidden function" (or something like that, I don't have english OS so I have to translate the "forbidden" part) and after that it attemps a reset over and over again. Keyboard also stops working after that.

Link to comment
Share on other sites

Thanks. If did not miss anything you only have these commands:

#define NK95_HWOFF  0x020030    // Hardware playback off
#define NK95_HWON   0x020001    // Hardware playback on
#define NK95_M1     0x200001    // Mode switches
#define NK95_M2     0x200002
#define NK95_M3     0x200003

If you are interested, I have more: https://github.com/cvuchener/k90-linux-driver/blob/master/control_messages.md

For the profile switching you are using bRequest = 0x20 but I use 20 in decimal (0x14), so I think you have a bug there.

 

PS: The capture in the issue thread are different from mine, I will have a look at them.

 

Cool, thanks :) You're right about the typo btw.

 

I don't know for sure if the protocols are the same or not - it was an educated guess. Might be that some of the commands are the same on both devices but some aren't.

 

Alright so I did what you suggested and it didn't flip out anymore. However now when I try to start the driver manually (ckb-daemon) it gives me this error "usbinput (firmware.c:26): Forbidden function" (or something like that, I don't have english OS so I have to translate the "forbidden" part) and after that it attemps a reset over and over again. Keyboard also stops working after that.

 

"Operation not permitted" probably? Usually means there was a problem talking to the keyboard. Try the troubleshooting section and see if that fixes it.

Link to comment
Share on other sites


×
×
  • Create New...