pez2001 / razer_chroma_drivers

A collection of Linux drivers for Razer Chroma devices, it supports all lighting modes and includes a daemon for advanced effects + gui configuration app
GNU General Public License v2.0
231 stars 31 forks source link

Fixes ubuntu package and add new devices support to daemon #130

Closed laurentdinclaux closed 8 years ago

laurentdinclaux commented 8 years ago

New Ubuntu releases do run on systemd, so the systemd helper script has to be added to the Ubuntu build.

I also completed the support of the just added devices (the Blackwidow Original and the Blackwidow Ultimate 2012) with adding support for those to the daemon.

terricain commented 8 years ago

Revert the ./package_for_ubuntu.sh script, you should use the ./package_for_debian.sh script, as documented here.

The Ubuntu script installs upstart files not systemd ones.

Udev should automatically bind the driver though. If it doesn't that would be a bigger issue.

laurentdinclaux commented 8 years ago

In current state udev doesn't bind the driver at boot, only when pluging in the keyboard. It seems like doing it at boot is a daemon's task. So, fixing the daemon fixed the "not binded at boot" issue.

If I use package_for_debian.sh the .deb will not install because of a dependency issue. Adding the systemd helper script to package_for_ubuntu.sh just makes it works for either upstart or systemd systems.

Unpacking razer-chroma-driver (1.0.0) over (1.0.0) ...
dpkg: dependency problems prevent configuration of razer-chroma-driver:
 razer-chroma-driver depends on libsdl2-image-dev (>= 2.0.0+dfsg-3+b4); however:
  Version of libsdl2-image-dev:amd64 on system is 2.0.0+dfsg-3build2.

dpkg: error processing package razer-chroma-driver (--install):
 dependency problems - leaving unconfigured
terricain commented 8 years ago

Merged but reverted the changes to ./package_for_ubuntu.sh as you should be using ./package_for_debian.sh for systemd distros.

terricain commented 8 years ago

@laurentdinclaux Udev should bind it at boot also (but if the daemon fails it will unbind everything which doesnt help), if it doesnt then that needs to be fixed.

The daemon should never need to deal with kernel binding at all. In an ideal world hid-generic would not cause us so many issues (its the root of the problem which cant be fixed).

And to fix that run apt-get install -f after the dpkg install. That wouldn't be an issue if the deb was in a repository as dpkg cannot do dependency resolution but apt will.

laurentdinclaux commented 8 years ago

Ok so if the daemon unbinds on failed start, that makes sense it was showing unbinded at boot for me.

I did apt-get install -f but the package version asked doesn't exists: ubuntu: 2.0.0+dfsg-3build2 against 2.0.0+dfsg-3+b4

terricain commented 8 years ago

@laurentdinclaux remove the deb, pull changes from the repo and try again. The requirements were a bit too fine grained. They should be more relaxed now.