Closed JuanCAlpizar closed 8 years ago
Did you use npm install to get dependencies from this project ? Also i see you are using node, maybe its version is too old, on ubuntus there are node and nodejs, which aren’t the same. you could try
sudo apt-get remove node
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
msibacklight -k on
I'm using nodejs v0.10.25 and npm 1.4.21, it is working fine here
Please let me know if your if your issue get solved
Do you mean npm install over this module or over msi-keyboard module? I did under msi-keyboard one, if I make a npm install
under this directory I get the following ouput
npm WARN package.json led-manager@ No repository field.
npm WARN package.json led-manager@ No license field.
I'm using opensuse 13.2, I'll check if there's also a node and nodejs here, if I type npm version
I get the following output:
{ npm: '2.14.2',
ares: '1.10.1-DEV',
http_parser: '2.5.0',
modules: '46',
node: '4.0.0',
openssl: '1.0.2d',
uv: '1.7.3',
v8: '4.5.103.30',
zlib: '1.2.8' }
EDIT: after checking the nodejs package form my distro it says it provides the following:
Version:
4.0.0-2.3.1
Provides:
nodejs = 4.0.0-2.3.1
nodejs(abi) = 0.10
nodejs(engine) = 4.0.0
npm = 2.14.2
nodejs(x86-64) = 4.0.0-2.3.1
/usr/bin/node
I updated the installation instructions in this github. You shoud just download this repo and do npm install in it, there is no need t handle msi-keyboard separatly as this project use it as a dependency with the help of npm which is a dependency handler.
so just use this as needed (starting with git clone in your case), and do the npm install in the cloned project
sudo apt-get install npm nodejs
sudo ln -s `which nodejs` /usr/bin/node
git clone https://github.com/Kwaadpepper/msi-keyboard-CLI.git ~/.msi-klm
cd ~/.msi-klm
npm install
msibacklight -k on
(OR)
sudo nodejs msi-keyboard-CLI.js -k on
EDIT: indeed npm install was missing in the installation instructions, it is needed nevertheless.
I wasn't home, I'll check it out and update as soon as possible :+1:
Back: just two things on the new instructions:
git clone https://github.com/Kwaadpepper/msi-keyboard-CLI.git
it will create a new folder msi-keyboard-CLI and put the files inside, so just typing npm install under .msi-klm will fail because it won't find pakage.json in the current folder, when I copied the content of the msi-keyboard-CLI into .msi-klm it worked after sudoAs far as I understand in Ubuntu there's the deb package and the one version compiled form source, the deb package command is nodejs
, and the compiled from source is just node
. In my distrubution the package itself is compiled from source, so my command is just node
, whenever I use ./msibacklight
or sh msibacklight
I get the following output:
sh msibacklight /usr/bin/env: nodejs: No such file or directory
Is there a way to add an option for node as well? How can I tweak it on my own?.
After uninstalling msi-keyboard via the following command:
sudo npm -g uninstall msi-keyboard
root's password:
unbuild msi-keyboard@0.0.4
to make a clean install, type npm install
under the folder and attempt to run it as node msi-keyboard-CLI.js -k on
I still get this error:
jc@linux-dbvn:~/.msi-klm> node msi-keyboard-CLI.js -k on
/home/jc/.msi-klm/node_modules/msi-keyboard/lib/setColor.js:24
keyboard.sendFeatureReport(activate);
^
Error: could not send feature report to device
at Error (native)
at module.exports (/home/jc/.msi-klm/node_modules/msi-keyboard/lib/setColor.js:24:11)
at HID.board.color (/home/jc/.msi-klm/node_modules/msi-keyboard/lib/findKeyboard.js:12:3)
at /home/jc/.msi-klm/msi-keyboard-CLI.js:251:16
at FSReqWrap.cb [as oncomplete] (fs.js:212:19)
I've heard this works for GT70 Keyboard, just in case you missed it and that matters mine is the next model, a GT72 MSI laptop with the steelseries keyboard.
A very interesting fact however is they keyboard has a button to turn the lights on, and whenever I reboot from windows and boot in openSUSE, the keyboard lights work with just turning on the button, but if I'm turning the laptop on straight from openSUSE some of the leds are not recognized and the colors are all set to white.
Is there a way to add an option for node as well? How can I tweak it on my own?.
I just made a quick change so it would work now with both node and nodejs
When you type git clone https://github.com/Kwaadpepper/msi-keyboard-CLI.git it will create a new folder msi-keyboard-CLI and put the files inside, so just typing npm install under .msi-klm will fail because it won't find pakage.json in the current folder, when I copied the content of the msi-keyboard-CLI into .msi-klm it worked after sudo
Thank you for pointing this out i just corrected on the README
Now you've installed properly this looks pretty sure it is a issue with msi-keyboard itself.
Just two thing before, did you have any error during npm install ? Have you installed libusb-dev or equivalent in opensuse (using redhat i think) so could be libusb-1_0-0 libusb-devel or something like that This is a development package so you may have to do an extra move like described here https://forums.opensuse.org/showthread.php/435722-about-installing-development-packages
Now regarding this open issue https://github.com/wearefractal/msi-keyboard/issues/9 on the msi lib it should be working on GT72.
EDIT: i just found this package https://build.opensuse.org/package/show?project=hardware%3Alibusb0&package=libusb maybe
Yes, I have libusb-1_0-0
libsub-1_0-devel
and some compatibility libraries. About node I don't remember having any issues, I use other modules like ripple-emulator and they work. I was going to escalate this to msi-keyboard package because it looks an issue over there to be honest and not your fault but looks like you already did, thanks :+1: hopefully we'll find out what's going on soon
Agreed, you may also open a new thread anyway i think on msi-keyboard. I just link this one and it wasn't intentional (some automatic behaviour of github)
With the new instructions and some updates since this was written, the commands are working flawlessly now, so I'm closing this issue. The only thing not working are some two lights of the keyboard has in front of the laptop, one to the right side on the power, cpu and battery indicators and the other one at the left side of the laptop, I'm not sure if that's because of the original project not recognizing that region from the G72 keyboard. or if it needs to be added to the cli
FIY the cli is using all the orignal lib possibilities, it may evolve or you may point out on the lib the possibilities of your own laptop. Then this could be updated. Glad it is working for you now.
Same thing for me.
npm install -g ny ny 0.10.25 npm 1.4.21
working
Hello, I tried to use this repo as the readme specifies, but when I try to run
node msi-keyboard-CLI.js
or adding any params returns the following message:I have the msi-keyboard installed from the other repository, I'm running the commands as root and I'm using an MSI-GT72 steelseries keyboard. Am I missing something?