razer_chroma_drivers
razer_chroma_drivers copied to clipboard
can't install using makefile in manjaro kde
here is the output of the comand:
::\033[32m COMPILING librazer_chroma.so\033[0m
================================
::\033[32m COMPILING librazer_chroma.so [DEBUG]\033[0m
========================================
::\033[32m COMPILING razer_bcd [SHARED]\033[0m
================================
::\033[32m COMPILING razer_bcd daemon\033[0m
==============================
::\033[32m COMPILING razer_bcd daemon [DEBUG]\033[0m
======================================
/usr/bin/ld: cannot find -lrazer_chroma_debug
collect2: error: ld returned 1 exit status
Makefile:34: recipe for target 'daemon_debug' failed
make[1]: *** [daemon_debug] Error 1
Makefile:26: recipe for target 'razer_daemon' failed
make: *** [razer_daemon] Error 2
Haven't tried compiling it on ~~Fedora~~ Manjaro but I'm sure some alterations will be needed. Give me a day or two to whip up a test vm and ill look into it
Thanks! It's the kde edition of manjaro
Hi, same to me. I can't install it on Manjaro (xfce). Thanks for your kind help mate! Even tried this => http://pollonamid.de/index.php/en/my-devices/computer/90-how-to-get-the-razer-blackwidow-chroma-backlight-to-work-with-linux But couldn't make it.
I have the same problem on Fedora 23.
gcc -L../lib -rdynamic razer_daemon.do razer_daemon_dbus.do razer_daemon_effects.do razer_daemon_libraries.do razer_daemon_parameters.do razer_daemon_render_nodes.do razer_daemon_types.do -lrazer_chroma_debug -lm -ldl -o razer_bcd_debug_shared
/usr/bin/ld: cannot find -lrazer_chroma_debug
There is a issue with the command in the lib/Makefile (and the others that use LIBDBUS) which doesn't set the LIBDBUS flag. Ensure you have dbus headers installed. Also you'll also need the kernel-headers installed for the kernel your running (aka output of uname -a
)
I have a pull request which fixes the command which should then work for arch. This commit terrycain/razer_blackwidow_chroma_driver@32f607a contains the differences you need to get the Makefiles to work.
Also I'm not expecting make install
to work. Someone will need to package things for arch and make sure files go in the right place etc... Once the driver is installed (do it manually) you can test some stuff manually by echoing stuff to the device driver files.
BenoitMartin2. Dont post massive errors in pull requests, its just annoying.
What files are in the lib folder after you typed make
Next time I'll use a paste, sry. Here are the files in /lib => http://imgur.com/z23g32x
Thanks. cd into the daemon_controller and run make
, what does that output + what files are there in there
Same :/
Complete output: http://pastebin.archlinux.fr/1746199
Hi folks,
I did the changes to the makefiles but I still get the same problem:
http://pastebin.com/nq61YKj5 chown: cannot access ‘/etc/init.d/razer_bcd’: Not a directory
I am not sure if it'd help if I create that directory before doing make?
@terrycain Can you give a small introduction how to start the driver and how to echo stuff to it (if it finishes compiling one day :-)). And again, if there is anyhting to help, just let me know. I really appreciate all the hard work!
@BenoitMartin2 I don't speak/read french, but collect2: erreur: ld a retourné 1 code d'état d'exécution looks like an error I had before. As far as I remember you're missing some packages. Make sure you got all you need. I don't know which on it was, try: sdl, sdl2, sdl_image, sdl2_image, dbus-glib, glib2
Thanks!
Edit: As far as I can understand the problem is that the makefile tries to create a deamon with use of SysV but Arch based ditros only have systemd available. So the init script must be adjusted. Have a look here: http://0pointer.de/blog/projects/systemd-for-admins-3.html I'm not sure if I am right about this. Can someone with a little bit more knowledge give advice?
@BenoitMartin2 make sure you have all the libraries installed as @Fennic said. Otherwise im not sure whats wrong.
@Flennic make install wont work on arch, its designed for debian. There is a daemon start script in install_files/init.d/razer_bcd_debian
. It wont work out of the box but what it essentially does is unbinds the chroma from the generic-hid driver and binds it to our driver and then starts the daemon.
Just do be curious: I executed ./activate_driver.sh and what I got is this:
Unbinding device (0003:1532:0203.0003) from hid-generic
Binding device (0003:1532:0203.0003) to razerkbd
Bind Successful
Which looks good in my eyes. If the deamon is running now, is there a way to to send commands to it like make all keys illuminated in blue or smth. like this?
Unless my script is giving you false hope looks like the kernel driver is loaded.
Whats the output of ls /sys/bus/hid/drivers/razerkbd/
?
Best make sure the driver is actually binded before trying other things
Output is:
ls /sys/bus/hid/drivers/razerkbd/
0003:1532:0203.0003 bind module new_id uevent unbind
How to check if the driver is actually binded?
Hell I feel like a 4 years old kid asking all those questions but I have no idea how drivers work or how close/far I am from getting it to run. I also found a folder systemd with a razer_bcd.service file. Is it possilbe if I copy all needed files manually to the correct location that it could work?
Run ls /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/
The fact that 0003:1532:0203.0003
is there means its binded but knowing the contents makes it easier to explain
That's fine it takes a while to tame the linux kernel and its many drivers. Yes, essentially if you copy all the required files to the specific places then things will work. If you give me a few days Im starting to populate the wiki to document all of this. (And reduce the question ;) ).
The daemon still needs a lot of work but you can manually operate the driver (once again ill make a wiki page to say what data the device driver files accept).
ls /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/
country input mode_breath mode_reactive mode_wave reset subsystem
driver macro_keys mode_custom mode_spectrum power set_brightness temp_clear_row
hidraw modalias mode_none mode_static report_descriptor set_key_row uevent
The Wiki idea sounds really good. I really appreciate all of your hard work, sadly I can't help you that much. If I get more into this after the Wiki is up, maybe I can do some work. We will see. Just letting you know that I am really thankful.
Another question is: The deamon that already exists, does it work the same way in ubuntu and arch or are there differences? Because you said it still needs a lot of work? I guess just one color-backlight would be awesome too :-)
Take your time to do this and if there is paperwork to do (Wiki or somethink where your could need help), just let me know!
As sudo run this
echo "1" > /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/mode_wave
"should" set the keyboard into wave mode.
The wiki should be good once I've done it. The daemon works well its just not very flexible at the moment. The only issue is the differences in the layout of the filesystems between ubuntu and arch, if everything is where the daemon expect it to be it should run.
sudo echo "1" > /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/mode_wave
bash: /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/mode_wave: Permission denied
No idea why that is. Can't really change the 0 to 1 with vim either, says sync error and that the file has been modified since opening it.
One last question: I can see the ubuntu location for all of the files in the makefile. Do you have any idea where the files for systemd go? Like /etc/init.d/racer_bcd where I have to put that? Becasue as far as I can read the makefile is works well until the point where it's trying to create /etc/init.d/ files and symlinks.
If we get to the point where everything is working as intended (yeah I know :D), is it hard to make a pacman package for the AUR, do you have any idea how much work that is? But anyways, that's not on the list right now. But if I am bored, I am willing to try it. Could help a lot of people.
Run it as root sudo su then the echo thing.
Once I get the wiki up and running ill document everything, then feel free to make an AUR package and update the documentation to getting it working on arch
[root@pc razer_blackwidow_chroma_driver]# echo "1" > /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/mode_wave
Works now, but nothing's happening :/
What about
echo "1" > /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/mode_spectrum
echo "1" > /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/mode_spectrum
Same behaviour. Works but nothing happens.
FYI: https://github.com/pollonamid/razer_blackwidow_chroma_driver_arch I don't know if that helps. Seems like he fixed some things for newer kernels but I don't know if that has anything to do with systemd.
Edit:
echo -n -e "\x255\x255\x255" > /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/mode_static
Makes the keys glow reall really low in white.
Edit2:
echo "255" > /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/set_brightness
Makes the keybord glow! :+1:
Edit3:
echo -n -e "\x0\x0\x255" > /sys/bus/hid/drivers/razerkbd/0003:1532:0203.0003/mode_static
This does not work, so no colors for the moment.
Edit4:
echo -n "1" > mode_wave
Worked, my keyboard looks like a rainbow now. Other modes seem to work too. The "-n" fixed things for me. Still I can't turn of some modes (e.g. my keyboard now slowly changes colors but I can't stop it. Tried echo -n "0" to all valid files, doesn't stop). But that is better than nothing working. So for now it looks like the core driver is working. So basically the daemon needs to be at the right place for systemd and the makefile should be adjusted for arch linux systems. It should also try to install missing dependencies with pacman. I'll try around more, maybe I can find the right places and put them into a makefile so that you can have a look at that. Cheers!
Yeh the mode_static takes hexadecimal. \xFF\xFF\x0 should be yellow.
I'm going to write a page about the driver files. Then about what goes where on the filesystem and then about the daemon.
It "migh" just work if you run GIT_CHECKOUT/daemon/razer_bcd -fv
GIT_CHECKOUT
being the path to the folder you cloned. If it runs and doesn't exit straight away, start typing into a text editor and see if the daemon effect is working.
The wiki is getting there. Using driver page
Hey there, hexadecimal works.
But therefore I have another strange thing: When I start my computer and booting into arch, the keyboard mode is set so spectrum. So somehow the driver is started instantly, even before decrypting my harddrive. After booting I have to active the driver, so that the 0003:... file appears and after that I can sent instructions to the keyboard again. But I can't "disable" colors. What worked is setting static mode, but I was unable to stop the spectrum mode.
How can the keybord be illuminated even before the OS booted? I thought there is no daemon running? :-)
Thanks for the "Using driver page!"
The keyboard illumination is at a hardware level, it'll turn on the backlights as soon as its given power. Evidence of this is if you were to use the keyboard in your bios, it would light up. On Nov 29, 2015 12:24, "Maximilian Pfundstein" [email protected] wrote:
Hey there, hexadecimal works.
But therefore I have another strange thing: When I start my computer and booting into arch, the keyboard mode is set so spectrum. So somehow the driver is started instantly, even before decrypting my harddrive. After booting I have to active the driver, so that the 0003:... file appears and after that I can sent instructions to the keyboard again. But I can't "disable" colors. What worked is setting static mode, but I was unable to stop the spectrum mode.
How can the keybord be illuminated even before the OS booted? I thought there is no daemon running? :-)
— Reply to this email directly or view it on GitHub https://github.com/pez2001/razer_blackwidow_chroma_driver/issues/37#issuecomment-160433195 .
Okay, seems like I do not fully understand how this works. After my PC starts, which part sends the data to the keyboard? You say it's on hardware level, so which hardware is doing that? As far as I know the keyboard itself is stupid (unlike Logitech's keyboards) and is not able to save any information itself.
Or is it possible it's still powered via USB and can keep the data that way?
No the keyboard is not stupid. There are a few effects that the keyboard can perform itself, the driver only allows us to tell the keyboard "do this effect".
The keyboard knows how to do spectrum,wave,reactive,static,none and breathing effects
I'm not real sure if the keyboard can save what backlighting mode to run, but the LEDs will turn on as soon as they're given power. The microcontroller in the keyboard must have a small amount of onboard memory (either flash or RAM) to store backlighting profiles, otherwise you wouldn't be able to use them at all. On Nov 29, 2015 12:53, "Maximilian Pfundstein" [email protected] wrote:
Okay, seems like I do not fully understand how this works. After my PC starts, which part sends the data to the keyboard? You say it's on hardware level, so which hardware is doing that? As far as I know the keyboard itself is stupid (unlike Logitech's keyboards) and is not able to save any inforamtion on itself.
— Reply to this email directly or view it on GitHub https://github.com/pez2001/razer_blackwidow_chroma_driver/issues/37#issuecomment-160439317 .
Thanks for all the information. I configured the keyboard on Mac OS X before and when I plugged it into my Linux machine it didn't show any light effects. Therefore I thought the wrong way.
If you plan to develop an opensource driver, how do you know how to communicate with the keyboard? It's not like Razer is telling us how. But anyways, thats not part of this issue.
Back before razer went all cloud sync, there used to be ways to store stuff on the keyboard. The keyboard can probably still do that but to find that out I'd need to find an ancient version of the razer tool.
As for how we communicate with the keyboard, we find out what makes it tick by reverse engineering the USB traffic. Then using that knowledge we send stuff to the keyboard.
The driver doesn't actually do anything clever, it just allows us to send messages to the keyboard, for the basic effects the keyboard does all the heavy lifting.