Comments (34)
What your distrib ?
from g810-led.
Arch Linux x86_64
from g810-led.
How do you install g810-led?
Now you have my package in aur : g810-led-git
Before installing the aur version, uninstall your current version with make uninstall
from g810-led.
Yeah I just noticed that a few minutes ago. I'm now using your AUR g810-led-git package. Same problem.
from g810-led.
Can you more discribe symptom of your crash...
Do you have recently maked a firmware upgrade with Windows (grrr).
from g810-led.
Well not between switching g810-led versions. It works with the above mentioned commit. But not with any commit afterwards. Last firmware update in windows was at least two weeks ago.
from g810-led.
After this commit, I have full refactored the code
It's possible that a byte is false for the g910 in the new refactored version
But is very strange that your keyboard firmware crash
What do you mean by firmware crash ? (keyboard is dead, sending more command don't work, ...)
from g810-led.
All colors except the G logo and the G910 logo are off
It usually keeps like that. Sometimes it switches back to the rainbow effect.
After some more testing I can also switch the color of the logo group but it only does that if I disable the LEDs with the keyboard button and reenable them.
from g810-led.
I just set g810-led up as a project in CLion. If you want me to debug anything... I should be able to do that now.
from g810-led.
The "disable the LEDs with the keyboard button and reenable them" is a sign that commit don't work...
from g810-led.
It seem a bug...
from g810-led.
Try to make your update, new version here
from g810-led.
Thanks. Now it works. But only with libusb. hidapi seems to be broken
from g810-led.
What's your problem with hidapi, it's the new implementation...
from g810-led.
It works. But it's not stable. A simple -a FF0000 leaves about one third of my keys with the wrong color
After multiple runs it finally changes them all
from g810-led.
Yes, what's your CPU ?
In the sendDataInternal function of Keyboard.cpp on line 509, I have set the value to 500...
It's a possible bug for more perf cpu than mind
from g810-led.
Intel(R) Core(TM) i5-4690.
a usleep(1000) works a lot better. But I can still trigger an error with a simple while true loop which starts g810-led multiple times very fast.
from g810-led.
I have not understood everything but the usleep and the CPU is a key...
from g810-led.
Can you give me the result of time g810-led -a ff0000
with your CPU and usleep 1000
from g810-led.
This should help you understand what I tried to explain before: https://gist.github.com/CReimer/ea69e571945cc874c10f54b85aafa517
And here's the time output
real 0m0,018s
user 0m0,000s
sys 0m0,000s
from g810-led.
I looked your link and when I launch the script with my G810, it's work and ctrl+c don't breack anything...
For your result : Less than 0.02... try to increase usleep
from g810-led.
That doesn't help. Even very extreme values like 10000 don't fix it. It looks like multiple commands are overlapping.
usleeps don't solve anything here and I can't find anything in hidapi's API documentation which could help fix this.
I'll take a closer look at it tomorrow. Thanks.
from g810-led.
Thanks for your return, I must also watch if I don't have an other error in g910 data...
from g810-led.
I can't find anything. I think it's a bug in hidapi. It shouldn't be possible that multiple commands to the keyboard overlap. But for me it looks like that.
I'd stick with libusb. It's a well known mature library. If it's too slow, there might be some way to improve that.
from g810-led.
If you have time, you can test this three options (one at a time) :
- In makefile, remove -O2 on line 2.
- In Keyboard.cpp, in sendDataInternal on line 509 and 512
comment the usleep
and replace the 0 by a 1 at the end of hid_read_timeout - In Keyboard.cpp, in setKeys line 316
decrease the max key sent at a time. sample :
const uint8_t maxKeyCount = (data_size - 8) / 4 - 1;
For libusb it's very slow because the libusb_detach_kernel_driver function take 100ms and can not be skipped.
from g810-led.
Hmm. That fixed it. Great.
from g810-led.
Cool but what option ?
It's just a tempory patch but I need to find the real bug.
from g810-led.
OK. Finally tried these on it's own.
- Doesn't change anything. BTW. -O3 works quite well too
- This does the trick. It's not 100% reliable, but it's at least changing all key colors and doesn't leave a few out.
- Doesn't change anything.
With not 100% reliable I mean, that if i run g810-led -a ff0000 on the console and quickly press arrow up and enter. It crashes and tells me to try the libusb version.
from g810-led.
The usleep is the devil part of the code...
Need to find best solution
from g810-led.
With not 100% reliable I mean, that if i run g810-led -a ff0000 on the console and quickly press arrow up and enter. It crashes and tells me to try the libusb version.
This problem is strange ...
Does anyone else encounter this problem?
Bug or not bug?
usleed stay an obscure solution...
from g810-led.
@CReimer I investigate but I can not reproduce...
What's your distro ?
from g810-led.
Arch Linux x86_64
from g810-led.
Thanks, Same as me...
I will try to test on other computer than mine.
from g810-led.
With all the tinkering for #39 I stumbled upon this a few times. And I think I found a solution.
Remove the usleep(500) in line 565 of Keyboard.cpp
And replace the 0 at the end in line 568 with a 1.
This makes hidapi wait for something to read for at least 1ms. Which seems to be enough.
from g810-led.
Related Issues (20)
- Ripple Effect HOT 1
- server down? HOT 2
- [G815] Alias "num." is working but "numdot" and "num_dot" are not HOT 2
- G915 : any support ? HOT 5
- [G512 - Fedora] Matching or compatible device not found ! HOT 3
- [G815] -gkm, -mn, -mr doesn´t seem to work HOT 1
- mode 666 in /dev/input/event* is a severe security issue
- What does --on-board-mode software/onboard do HOT 1
- Feature request: Read (pick) current RGB value of a key
- Feature request: new groups "letters" and "kpnumbers"
- Auto-set color after Suspending/Waking system HOT 1
- Inefficient sendDataInternal HOT 1
- Get keyboard color status or effect
- Feature request: Add Methods to assign functions to F-Keys
- g810-led does not compile with gcc13.1.1 using AUR pkgbuild on Archlinux HOT 4
- G413 TLK SE - 046d:c34a HOT 5
- CAPSLOCK key on longer set via group keys option or ALL (-a) option
- Alt + 4 not working
- Basic Logitech Help
- Build failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from g810-led.