The Corsair User Forums  

Go Back   The Corsair User Forums > Corsair Product Discussion > Keyboards and Mice

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 130 votes, 5.00 average. Display Modes
  #31  
Old 11-11-2014, 04:13 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 741215
MSC Reputation: 10
Default

Are you running "echo rgb off > /dev/input/ckb1/cmd" ? If you were writing to ckb0 or didn't use that exact path, the command won't do anything. If you run the ckb program with an animation (like "bin/ckb ripple white blue") does that work? If so, you should be able to turn it off with "bin/ckb solid black" as well.
Reply With Quote


  #32  
Old 11-11-2014, 05:06 AM
SimpleStreet SimpleStreet is offline
Registered User
 
Join Date: Nov 2014
Posts: 36
POST ID # = 741223
SimpleStreet Reputation: 10
Default

Quote:
Originally Posted by MSC View Post
Are you running "echo rgb off > /dev/input/ckb1/cmd" ? If you were writing to ckb0 or didn't use that exact path, the command won't do anything. If you run the ckb program with an animation (like "bin/ckb ripple white blue") does that work? If so, you should be able to turn it off with "bin/ckb solid black" as well.


Yes it works but the problem is, once i start the ripple effect i need to CTRL+C it to stop it and then i can change the colors.
but yeh i didnt know of the command "echo rgb off > /dev/input/ckb1/cmd", thanks that works now

Lovely program thanks
Reply With Quote


  #33  
Old 11-11-2014, 09:57 AM
SpeedFreak01 SpeedFreak01 is offline
Registered User
SpeedFreak01's PC Specs
 
Join Date: Oct 2014
Posts: 17
POST ID # = 741252
SpeedFreak01 Reputation: 10
Default

Quote:
Originally Posted by MSC View Post
By the way, for Linux users: I did what I mentioned earlier and stopped using libusb, so now it just runs with udev and usbfs. The dependencies are different, so check your package manager for "libudev" or "libudev-dev" if it doesn't compile anymore. The driver seems to be a little bit more stable now, at least on my machine. Hopefully the change doesn't make it blow up for anyone.
Still seems to be working fine, no noticeable difference for me.

Still getting the strange issue where F keys seem to have weird mappings after i kill the daemon and restart it.
Maybe you have noticed this as well, but if you kill the daemon the keyboard still works fine. F key bindings are also correct.
But as soon as you restart the driver without unplugging the keyboard and plugging it back in, the F keys are always messed up.

Certainly not a massive issue though.

Appreciate the work as always
Reply With Quote


  #34  
Old 11-12-2014, 04:19 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 741404
MSC Reputation: 10
Default

Quote:
Originally Posted by SimpleStreet View Post
Yes it works but the problem is, once i start the ripple effect i need to CTRL+C it to stop it and then i can change the colors.
but yeh i didnt know of the command "echo rgb off > /dev/input/ckb1/cmd", thanks that works now

Lovely program thanks
Glad you got it working :D
You do have to stop ckb and restart it in order to change the animation, that's a limitation of the current version. I'm going to start work on a better utility very soon so you won't have to do that anymore.

Quote:
Originally Posted by SpeedFreak01 View Post
Still seems to be working fine, no noticeable difference for me.

Still getting the strange issue where F keys seem to have weird mappings after i kill the daemon and restart it.
Maybe you have noticed this as well, but if you kill the daemon the keyboard still works fine. F key bindings are also correct.
But as soon as you restart the driver without unplugging the keyboard and plugging it back in, the F keys are always messed up.

Certainly not a massive issue though.

Appreciate the work as always
Yeah, I haven't had that problem exactly but I definitely run into strange behavior after closing the daemon. I've tried everything I can think of, including doing a USB reset after releasing the device, so I'm giving up on this issue. I think there's something particular about the Linux kernel driver that the keyboard doesn't like (the problem doesn't occur on OSX), and if that's the case I probably can't do anything about it. Won't be a big deal for long, since my goal is to have the daemon run in the background and never need to be restarted. Thanks for the feedback anyway :)
Reply With Quote


  #35  
Old 11-12-2014, 09:02 AM
SpeedFreak01 SpeedFreak01 is offline
Registered User
SpeedFreak01's PC Specs
 
Join Date: Oct 2014
Posts: 17
POST ID # = 741420
SpeedFreak01 Reputation: 10
Default

Quote:
Originally Posted by MSC View Post
Yeah, I haven't had that problem exactly but I definitely run into strange behavior after closing the daemon. I've tried everything I can think of, including doing a USB reset after releasing the device, so I'm giving up on this issue. I think there's something particular about the Linux kernel driver that the keyboard doesn't like (the problem doesn't occur on OSX), and if that's the case I probably can't do anything about it. Won't be a big deal for long, since my goal is to have the daemon run in the background and never need to be restarted. Thanks for the feedback anyway :)
No worries, maybe the next firmware update from corsair will help. :)

Just out of curiosity, would it be possible to bind the M1,M2 and M3 keys to the different profiles stored on the keyboard?
Reply With Quote


  #36  
Old 11-13-2014, 07:22 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 741579
MSC Reputation: 10
Default

Yes, but indirectly. I added an ability to generate a notification when a keypress occurs. My plan for it is to have a (much better) ckb utility store all the profiles/modes as user settings, including animations and other effects. So the ckb utility will tell the daemon to print a notification whenever an M-key is pressed, and then as soon as it receives that notification it switches modes. There are one or two things left that I need to implement in the daemon (mostly the ability to print out the RGB settings from the hardware) but I'll get started on the new user utility in the next 2-3 days.
Reply With Quote


  #37  
Old 11-13-2014, 04:48 PM
tolga9009 tolga9009 is offline
OverclocKing
tolga9009's PC Specs
 
Join Date: Jul 2009
Location: Germany
Posts: 45
POST ID # = 741659
tolga9009 Reputation: 10
Default

Hi there,

great to see someone working on the Linux drivers! Did I understand it correctly, that this keyboard gets unresponsive on a vanilla Linux install, as soon as you press a special / macro key?

Also, for the Linux support, have you taken a look at hidraw (kernel module)? It passes raw HID events directly to userspace - they don't get processed in contrast to hiddev. You wouldn't need to de-attach the keyboard from the hid-generic kernel module, so general stuff can still be done using it. You can talk to the keyboard via HID feature requests.

Keep up the great work!

Cheers,
Tolga
Reply With Quote


  #38  
Old 11-13-2014, 09:42 PM
The_Jolly_Roger The_Jolly_Roger is offline
Registered User
 
Join Date: Nov 2014
Posts: 1
POST ID # = 741698
The_Jolly_Roger Reputation: 10
Default

MSC, congratulations on writing this driver! It is working very good on my K70 and I very much appreciate it. If you have need for any K70 testing pm me.

So the last week little by little i have been writing a new lighting effect, and now that its complete i'd like show it to you guys and ask for oppinions. The effect is called Life and its based on a evloutionary cell game called Conways Game of Life.


The idea was to create an effect much like MSC-s random effect, that will always change the lighting to something different and interesting, but won't be too flashy so that it draws your attention off the screen. I have also made it interactive so that each key (cell) you press comes to life and then interacts with its environment (surrounding keys) and continues the cycle of life.
When the effect is run, life is generated randomly and lives on for 30-60 sec, and then it dies out (except for still life, wiki it). After that every live cell and any interactions between them are the direct result of your typing, so it is a interactive lighting effect with its own little game running with rules and so on. If youre interested read the wiki.
It is not very flashy and fabolous as most of the windows effects, but that was exactly the intention so that its pretty and interesting for everyday use and not showcasing 16m colours to friends.

The effect is only beta now. I have integrated it into MSCs ckb program as one of the available effect so that , if he doesnt mind, he can include it in his future releases. I have forked it so you can compile it and try out, and i would like to hear your opinions on it.

There is only one problem with the effect right now and that is the key press reader. Since MSC hasnt integrated a keypress reader API or smthing like it i have written a function that will read directly from the input files, on my ubuntu located on /dev/input/event0-9. The program probes these files if they are keyboard input files, and if they are starts reading from them. I have no idea how that will function on other linux systems, let alone mac, so feel fre to post your problems and lets hope that MSC will make a real system for this and not this junk that i use for reading.

EDIT: I just saw that you included some keypress notifications in the last release, i will check tomorrow if i can use them for keypres reports.

I added another video demonstrating two oscilators and two forms of still life, since the initial video is pretty boring.

Last edited by The_Jolly_Roger; 11-14-2014 at 02:47 AM.
Reply With Quote


  #39  
Old 11-14-2014, 05:25 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 741728
MSC Reputation: 10
Default

Dude, that's brilliant. Love it!

I had an idea, once I write a better user-level utility, to have a setting where it can get the animation data by running a custom program. So it would write something to the program's stdin pipe every time it wants a frame (or could be configured to write on keypress), and it would get the RGB data from the stdout pipe, or something like that. Any thoughts on that? Should be a lot easier than reading the event device directly. I'd love to include this one if you don't mind.

Quote:
Originally Posted by tolga9009 View Post
Hi there,

great to see someone working on the Linux drivers! Did I understand it correctly, that this keyboard gets unresponsive on a vanilla Linux install, as soon as you press a special / macro key?

Also, for the Linux support, have you taken a look at hidraw (kernel module)? It passes raw HID events directly to userspace - they don't get processed in contrast to hiddev. You wouldn't need to de-attach the keyboard from the hid-generic kernel module, so general stuff can still be done using it. You can talk to the keyboard via HID feature requests.

Keep up the great work!

Cheers,
Tolga
Correct, the keyboard will freeze with the standard HID driver when you press one of the rebindable keys. Reason being the keyboard tries to send a nonstandard USB interrupt-in transfer and the Linux HID won't acknowledge it, so the keyboard's CPU blocks waiting for the transfer to complete (which it never will). The reason why I have ckb detach the kernel driver is partly because of that, and partly because even the standard HID input just plain doesn't work for me ~50% of the time. I think a couple of other people have the same problem. It isn't worth the effort IMO to figure out why exactly it doesn't like the Linux HID or how to make them work together, so I found it simpler to detach the driver completely.

Incidentally, OSX doesn't have this issue (in fact, I do make use of OSX's native HID driver), so it's definitely operating system specific. Even weirder is the fact that it's usually not enough just to detach the driver; the keyboard often requires 1-3 USB resets *after* claiming the device before normal communication can occur. It's not every time, though, just most of the time. It's a very strange firmware issue and, like I said, I don't think it's worth the time to debug. I'll definitely look into using hidraw if the firmware is ever fixed, though.
Reply With Quote


  #40  
Old 11-14-2014, 09:53 PM
CorpNewt CorpNewt is offline
Registered User
CorpNewt's PC Specs
 
Join Date: Nov 2014
Posts: 34
POST ID # = 741855
CorpNewt Reputation: 10
Default

First, thank you so much for the work you have done with this! I know how to use the ckb application to change lighting and etc, but how do we work in reactive lighting? I would just like to accomplish something as simple as when you press a key, it goes white, then fades back to off or some other color. Any help would be appreciated! Thanks again!

Edit: I also just noticed that when I run ckb and have it set to a wave, then try to type fast (even just hitting the backspace key to delete a sentence or two) it drops keys like crazy and only sends keypresses at ~5 times a second even if I'm hitting the key at least twice that speed.

Last edited by CorpNewt; 11-14-2014 at 09:59 PM.
Reply With Quote


  #41  
Old 11-15-2014, 05:05 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 741894
MSC Reputation: 10
Default

Reactive lighting is coming soon. I haven't experienced any issues with dropped keys. Is this happening on Linux or on OSX? Do you have the rate switch on your keyboard set to 1ms? If it's caused by animations, you might try starting ckb-daemon with "sudo bin/ckb-daemon --fps=30" to see if that fixes it. I don't think the animations can interfere with the input anymore, but there might be something happening at a hardware level too. I'll take another look at the code and see if there's anything else I can do to improve it.
Reply With Quote


  #42  
Old 11-15-2014, 05:13 AM
CorpNewt CorpNewt is offline
Registered User
CorpNewt's PC Specs
 
Join Date: Nov 2014
Posts: 34
POST ID # = 741896
CorpNewt Reputation: 10
Default

I tried with the polling switch on both extremes to no avail. I will try with "sudo bin/ckb-daemon --fps=30" and see if that helps. The OS I'm running into issues on is OSX. I will post back when I have more info for you.
Reply With Quote


  #43  
Old 11-15-2014, 07:20 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 741912
MSC Reputation: 10
Default

Hmm, alright. I haven't had any problems with the animations under OSX, but let me know what you find. One other question: have you plugged this keyboard into a Windows PC to do a firmware update? The keyboards don't ship with the latest firmware AFAIK. I'm considering adding a firmware update to ckb in case the older firmware has more bugs, but if you've already updated it then that wouldn't be the issue.
Reply With Quote


  #44  
Old 11-16-2014, 12:40 AM
CorpNewt CorpNewt is offline
Registered User
CorpNewt's PC Specs
 
Join Date: Nov 2014
Posts: 34
POST ID # = 742023
CorpNewt Reputation: 10
Default

I just got back from work so I will try and switch the fps on the mac side. I dual boot windows and Mac OSX. I am running the latest firmware (1.15). I will let you know what I find out tonight. Thanks again for your help.

Edit: I just tried it with --fps=30 and that seems to have cleared up the issue.

Last edited by CorpNewt; 11-16-2014 at 01:54 AM.
Reply With Quote


  #45  
Old 11-17-2014, 08:13 AM
MSC's Avatar
MSC MSC is offline
Linux/OSX driver
 
Join Date: Oct 2014
Posts: 246
POST ID # = 742271
MSC Reputation: 10
Default

Interesting, didn't realize that would cause problems. I'll make a note of that.

I finally got a Qt-based UI started. Build instructions are completely different now, so check the readme again. It's not much of an improvement over the old command-line utility, but it does offer the ability to adjust colors and framerate on the fly and it can run in the background without having to keep a terminal open. I'll make an install script for the daemon soon so that you won't have to run it separately.
Reply With Quote


Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:56 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.