Jump to content
Corsair Community

(Unofficial) Linux / OSX Driver


MSC

Recommended Posts

Hi,

 

Sice the applications that I ran with G keys were allways launched to the screen where the ckb was opened, I made a patch that looks the selected screen (the screen where the mouse is) and launches the application to that screen.

 

I tried to do it with Qt, but it wasn't possible to determine which screen is selected with Qt (http://stackoverflow.com/questions/32040202/qt-5-get-the-mouse-position-in-a-screen/32045873) so I finally choosed to make it with libX11.

 

I could share the patch if you're interested on that feature, so you can add it to the master branch of the ckb.

 

Another comment I wanted to make: when you run an application with a G key, it's not possible to run the same application again. It might be a bad thing if you want, for example, open a terminal with a G key. Since you can open lots of terms, it would be interesting to allow to launch the application as many times as you want.

 

I removed that behavior in code (because it's not useful to me) but I think that it could be a good decision to allow the user to configure that behavior in the key binding configuration.

 

Thank you very much for that driver, it's great :).

Link to comment
Share on other sites

  • Replies 824
  • Created
  • Last Reply

Top Posters In This Topic

The spaces were a copy/paste fail into the forum, not present in the original. Setting your suggested line doesn't make any difference, but setting 0x4 instead (per the readme) to blacklist the device does work. Not totally happy with that as a solution, given the caveats in the readme and the additional (somewhat bizarre) issue that about 50% of the time after rebooting out of Linux, the keyboard doesn't work on the GRUB screen, but I'm not sure there's a better way to unbork whatever's causing USBHID to hang. (The keyboard did work before I installed ckb.)

 

 

This is likely due to the window manager they're using doing some helpful session resuming - I get the same issue. The process listing should include something like "ckb -session <long identifier here>". Apparently this gets run before the startup items at least on my system (KDE5), so it's starting that one before the one with the --background argument (which I guess quits because ckb is already running). The "proper" fix for this would be to support session resuming and check if the resumed session was minimised when it exited. At least on KDE it's possible to work around it by going to System Settings > Startup and Shutdown > Desktop Session and adding ckb to the "Applications to be excluded from sessions" box.

Ah that makes sense. Figuring out whether it's supposed to be in the background or not would probably be a PITA so I'll just make it go to the background automatically when it sees that.

 

Hi,

 

Sice the applications that I ran with G keys were allways launched to the screen where the ckb was opened, I made a patch that looks the selected screen (the screen where the mouse is) and launches the application to that screen.

 

I tried to do it with Qt, but it wasn't possible to determine which screen is selected with Qt (http://stackoverflow.com/questions/32040202/qt-5-get-the-mouse-position-in-a-screen/32045873) so I finally choosed to make it with libX11.

 

I could share the patch if you're interested on that feature, so you can add it to the master branch of the ckb.

 

Another comment I wanted to make: when you run an application with a G key, it's not possible to run the same application again. It might be a bad thing if you want, for example, open a terminal with a G key. Since you can open lots of terms, it would be interesting to allow to launch the application as many times as you want.

 

I removed that behavior in code (because it's not useful to me) but I think that it could be a good decision to allow the user to configure that behavior in the key binding configuration.

 

Thank you very much for that driver, it's great :).

Can you send me a pull request for the mouse polling? It's a niche feature since most people use a single head for multi displays, but I'd like to add it anyhow.

 

The program launching behavior was intentional since it takes up ckb's resources and I didn't want the program to crash if you spammed a key (also, closing ckb will close the launched app), but it shouldn't be too hard to add a workaround for those.

Link to comment
Share on other sites

Just installed on OS X Yosemite.. There is seems to be a strange offset on the keys. ie. When I click on G18, G8 is selected. This is on a Macbook Pro Retina with K95 RGB US Latyout. Let me know if you need anymore details.

 

Awesome work btw. I might get another K95 if everything else checks out..

Link to comment
Share on other sites

Just installed on OS X Yosemite.. There is seems to be a strange offset on the keys. ie. When I click on G18, G8 is selected. This is on a Macbook Pro Retina with K95 RGB US Latyout. Let me know if you need anymore details.

 

Awesome work btw. I might get another K95 if everything else checks out..

 

All of them? What happens to G1-G9? That sounds like a really strange issue, you might want to plug it into a Windows computer to make sure the firmware is up to date and it isn't some kind of hardware issue.

Link to comment
Share on other sites

I get an interesting error when compiling the daemon (the front end compiles fine). I'm attaching the compile text.

 

I do have all preq, as far as I know (zlib-devel, libudev-devel, glibc-devel, and Qt 5.4 from package repo)

 

Also, in the interest of full disclosure, this is not Vanilla RHEL, it's OpenClient)

compile.txt

Link to comment
Share on other sites

Great work! I'm currently running arch linux with a k70 and M65 rbg.

I'm getting this error:

 

This application failed to start because it could not find or load the Qt platform plugin "xcb".

 

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

 

Reinstalling the application may fix this problem.

[1] 2788 abort (core dumped) ckb

 

and when I run pacman -Qs ckb

 

local/cairo 1.14.2-1

Cairo vector graphics library

local/lib32-libxcb 1.11-1

X11 client-side library (32-bit)

local/libxcb 1.11-1

X11 client-side library

local/xcb-proto 1.11-1

XML-XCB protocol descriptions

local/xcb-util 0.4.0-1

Utility libraries for XC Binding

local/xcb-util-image 0.4.0-1

Utility libraries for XC Binding - Port of Xlib's XImage and XShmImage

functions

local/xcb-util-keysyms 0.4.0-1

Utility libraries for XC Binding - Standard X key constants and conversion

to/from keycodes

local/xcb-util-wm 0.4.1-1

Utility libraries for XC Binding - client and window-manager helpers for

ICCCM

 

Any Idea how to fix my issue?

Link to comment
Share on other sites

I get an interesting error when compiling the daemon (the front end compiles fine). I'm attaching the compile text.

 

I do have all preq, as far as I know (zlib-devel, libudev-devel, glibc-devel, and Qt 5.4 from package repo)

 

Also, in the interest of full disclosure, this is not Vanilla RHEL, it's OpenClient)

Try adding "-fms-extensions" to QMAKE_CFLAGS in src/ckb-daemon/ckb-daemon.pro. It seems this option is usually enabled by default, but your GCC might be configured differently.

 

Great work! I'm currently running arch linux with a k70 and M65 rbg.

I'm getting this error:

 

This application failed to start because it could not find or load the Qt platform plugin "xcb".

 

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

 

Reinstalling the application may fix this problem.

[1] 2788 abort (core dumped) ckb

 

and when I run pacman -Qs ckb

 

local/cairo 1.14.2-1

Cairo vector graphics library

local/lib32-libxcb 1.11-1

X11 client-side library (32-bit)

local/libxcb 1.11-1

X11 client-side library

local/xcb-proto 1.11-1

XML-XCB protocol descriptions

local/xcb-util 0.4.0-1

Utility libraries for XC Binding

local/xcb-util-image 0.4.0-1

Utility libraries for XC Binding - Port of Xlib's XImage and XShmImage

functions

local/xcb-util-keysyms 0.4.0-1

Utility libraries for XC Binding - Standard X key constants and conversion

to/from keycodes

local/xcb-util-wm 0.4.1-1

Utility libraries for XC Binding - client and window-manager helpers for

ICCCM

 

Any Idea how to fix my issue?

$ pacman -Qs xcb
local/cairo 1.14.2-1
   Cairo vector graphics library
local/lib32-libxcb 1.11-1
   X11 client-side library (32-bit)
local/libxcb 1.11-1
   X11 client-side library
local/libxkbcommon-x11 0.5.0-1
   Keyboard handling library using XKB data for X11 XCB clients
local/xcb-proto 1.11-1
   XML-XCB protocol descriptions
local/xcb-util 0.4.0-1
   Utility libraries for XC Binding
local/xcb-util-image 0.4.0-1
   Utility libraries for XC Binding - Port of Xlib's XImage and XShmImage functions
local/xcb-util-keysyms 0.4.0-1
   Utility libraries for XC Binding - Standard X key constants and conversion to/from keycodes
local/xcb-util-renderutil 0.3.9-1
   Utility libraries for XC Binding - Convenience functions for the Render extension
local/xcb-util-wm 0.4.1-1
   Utility libraries for XC Binding - client and window-manager helpers for ICCCM

It might also be necessary to install the entire Qt5 group instead of just qt5-base. Someone had this issue before but never reported back on how (or if) they got it fixed, but I'm fairly certain it's a package issue.

Link to comment
Share on other sites

Try adding "-fms-extensions" to QMAKE_CFLAGS in src/ckb-daemon/ckb-daemon.pro. It seems this option is usually enabled by default, but your GCC might be configured differently.

 

 

$ pacman -Qs xcb
local/cairo 1.14.2-1
   Cairo vector graphics library
local/lib32-libxcb 1.11-1
   X11 client-side library (32-bit)
local/libxcb 1.11-1
   X11 client-side library
local/libxkbcommon-x11 0.5.0-1
   Keyboard handling library using XKB data for X11 XCB clients
local/xcb-proto 1.11-1
   XML-XCB protocol descriptions
local/xcb-util 0.4.0-1
   Utility libraries for XC Binding
local/xcb-util-image 0.4.0-1
   Utility libraries for XC Binding - Port of Xlib's XImage and XShmImage functions
local/xcb-util-keysyms 0.4.0-1
   Utility libraries for XC Binding - Standard X key constants and conversion to/from keycodes
local/xcb-util-renderutil 0.3.9-1
   Utility libraries for XC Binding - Convenience functions for the Render extension
local/xcb-util-wm 0.4.1-1
   Utility libraries for XC Binding - client and window-manager helpers for ICCCM

It might also be necessary to install the entire Qt5 group instead of just qt5-base. Someone had this issue before but never reported back on how (or if) they got it fixed, but I'm fairly certain it's a package issue.

 

That did the trick! I installed the group and everything workeed flawlessly. Thank you

Link to comment
Share on other sites

v0.2.1 is up now! This is primarily a bug fix release, but it also includes an all-new Performance tab for keyboards which offers more control over the indicator lights, as well as the ability to indicate lock states (Caps lock, num lock, etc) on the key itself instead of the white LEDs at the top of the keyboard.

 

Added the qmake flag, still didn't build though. Did have a different error occur this time :)

 

Would any other information help, like build levels of gcc and/or libraries?

So I dug a bit deeper into this and it looks like the problem was my usage of "-std=c99" instead of "-std=gnu99". I've corrected it now - if the latest release doesn't work, try "-std=c11" instead (same line as before, QMAKE_CFLAGS in ckb-daemon.pro). Not sure why you're the first person to have this error because apparently everyone should be getting it, but anyway, I think that will solve it.

 

I Cannot change my dpi now on my corsair m65.

How can I solve this problem?

I assume you're referring to the DPI sliders not doing anything? It's been fixed in the latest release.

 

Hi, a big thank you for the support of the M65 (i'm a bit late but better latter than never !)

You're very welcome :)

Link to comment
Share on other sites

Ah okay. Figured it might be something like that. Glad you got it working!

 

When I start up my Imac i can change dpi with the buttons but

when I do the quickinstall to start the ckb program i cannot longer use

the dpi down and up buttons.

I have deleted the old files and downloaded the latest version 0.2.1

Have you checked to make sure that the DPI stages are all enabled, and set to different values (Performance tab) as well as looking into the Binding tab to see if the DPI buttons are still bound correctly?

Link to comment
Share on other sites

I just got the K70 RGB keyboard with an updated firmware (1.30). It works in Windows, and mostly does not work in Linux (Ubuntu 14.04). I think I've been able to boot into Linux twice with it working, but mostly I can't even type my password to log in (no keystrokes are registered).

 

I tried going through the 30 pages of this post, but it's late :)

 

Does this driver allow the keyboard to work ON BOOT, or does it need to be loaded by having *another* keyboard plugged in?

 

Thanks!

Link to comment
Share on other sites

Moppy said:
I just got the K70 RGB keyboard with an updated firmware (1.30). It works in Windows, and mostly does not work in Linux (Ubuntu 14.04). I think I've been able to boot into Linux twice with it working, but mostly I can't even type my password to log in (no keystrokes are registered).

 

I tried going through the 30 pages of this post, but it's late 🙂

 

Does this driver allow the keyboard to work ON BOOT, or does it need to be loaded by having *another* keyboard plugged in?

 

Thanks!

Depends on whether you're using full-disk encryption or not. If you are (as in you need to enter a password before the OS can boot at all) then no, ckb won't make it work at startup. If you're NOT using full disk encryption and you're having a problem at the login screen, then it should work. You should also try the usbhid.quirks line from the manual if you haven't already.

 

EDIT: also, if it's a new keyboard then you should update the firmware as soon as possible. You can do this within ckb assuming you can get it to connect at some point.

Link to comment
Share on other sites

All of them? What happens to G1-G9? That sounds like a really strange issue, you might want to plug it into a Windows computer to make sure the firmware is up to date and it isn't some kind of hardware issue.

 

Everything is fine in windows.. I see you have a new version up, I'll test again when I've upgraded. Also having issues with the K95 when an external monitor is also plugged in. The monitor doesn't get any signal. Though I think this is an OS issue, as I've had the problem even without ckb installed. I'll also try with a usb hub as I'm wondering if only plugging in the cable with the keyboard icon is causing some weirdness.

Link to comment
Share on other sites

I'm 95% sure this is not an issue with ckb, but I have troubles binding my G keys to launch programs on linux. It used to work a few weeks ago, so I'm positive this is a plasma 5.4 quirk, but I'll ask here trying to troubleshoot it.

Basically the option to launch a program doesn't work. The keys do work if I bind them to anything else. The commands are recognized somehow (I think) as binding a key to 'yakuake' successfully opens my yakuake window (as long as yakuake is already running). Binding them to whatever other program needs to be run (as simple as 'xterm') doesn't do anything. Is there a way to debug this issue?

Thanks again!

Link to comment
Share on other sites

nezro said:
Everything is fine in windows.. I see you have a new version up, I'll test again when I've upgraded. Also having issues with the K95 when an external monitor is also plugged in. The monitor doesn't get any signal. Though I think this is an OS issue, as I've had the problem even without ckb installed. I'll also try with a usb hub as I'm wondering if only plugging in the cable with the keyboard icon is causing some weirdness.

Definitely give that a try - the USB behavior isn't always consistent across operating systems, can cause weird connection issues even if it works in one OS. Let me know if you have any luck.

 

gondsman said:
I'm 95% sure this is not an issue with ckb, but I have troubles binding my G keys to launch programs on linux. It used to work a few weeks ago, so I'm positive this is a plasma 5.4 quirk, but I'll ask here trying to troubleshoot it.

Basically the option to launch a program doesn't work. The keys do work if I bind them to anything else. The commands are recognized somehow (I think) as binding a key to 'yakuake' successfully opens my yakuake window (as long as yakuake is already running). Binding them to whatever other program needs to be run (as simple as 'xterm') doesn't do anything. Is there a way to debug this issue?

Thanks again!

I think this is actually a bug in a newer version of ckb. I'll try to get it fixed soon.

Link to comment
Share on other sites

Upgraded to the latest version and hooked up the k95 using a usb3 hub (no external power). All seems well. Able to use the keyboard and external monitor without issues. The mapping also looks like it's working.

 

Thanks again!

Link to comment
Share on other sites

Ok, so the problem I'm getting is probably based on the fact that I don't really know what you are talking about. Anyways, I'm getting this error.

 

"Last login: Tue Sep 1 19:44:28 on ttys000

Connors-MacBook-Pro:~ Connor$ /Users/Connor/Downloads/ckb-master/osx/package ; exit;

macdeployqt not found.

Invoke with MACDEPLOYQT=/path/to/macdeployqt to locate it manually.

logout

 

[Process completed]"

 

(Pasted from terminal)

 

When I look in the applications folder ckb.app is not in there. I'm assuming that has something to do with the above message.

 

Is this a complicated program to use, or is it kinda like corsairs windows version? I have a Windows PC but I would like to use the K95 on my mac.

 

Thanks,

Connor

Link to comment
Share on other sites

Are you trying to compile from source, or do you just want the binary version? If the former, the package script is actually what I use for generating ckb.pkg. For installing the program, use "quickinstall" in the main source folder. Qt needs to be installed in a standard location in order to be detected; it's best to use /Applications/Qt.

 

If you want the actual program, you can find it here: https://github.com/ccMSC/ckb/releases/latest

Click on "ckb.pkg" at the top of the Downloads section.

Link to comment
Share on other sites

Hi :)

 

So I just bought a corsair Strafe keyboard. Unfortunately your custom driver doesn't currently support this keyboard.

 

In Ubuntu atm the keyboard works for the most part, except when I try change the brightness of the lighting with the key at the top right of the keyboard. When I do this the entire keyboard stops working and I have to restart Ubuntu for it to work again. It works correctly in Windows so I'm pretty sure it's just a driver problem on linux.

 

I've got no idea how much work it would be to add support for this keyboard. Do you need the actual keyboard or has Corsair given you the spec for the other keyboards?

 

I've never written a driver before but if you are unable to look into this then I'll probably give it a go later in the year when I'm not that busy.

Link to comment
Share on other sites


×
×
  • Create New...