Razer-Linux / razer-laptop-control-no-dkms

GNU General Public License v2.0
109 stars 28 forks source link

Support Razer Blade 15 2022 #12

Closed christian-bendiksen closed 2 years ago

christian-bendiksen commented 2 years ago

Please make support for Razer Blade 15 2022 3070TI

phush0 commented 2 years ago

Provide PCI ID of the laptop to enable it

christian-bendiksen commented 2 years ago

That worked, however something seems to be up with the service.

okt. 11 22:17:25 blade systemd[1]: Started Razer laptop control daemon. okt. 11 22:17:25 blade daemon[899]: suported devices found: 27 okt. 11 22:17:25 blade daemon[899]: thread 'main' panicked at 'called Result::unwrap() on an Err value> okt. 11 22:17:25 blade daemon[899]: note: run with RUST_BACKTRACE=1 environment variable to display a ba> okt. 11 22:17:25 blade systemd[1]: razerdaemon.service: Main process exited, code=exited, status=101/n/a okt. 11 22:17:25 blade systemd[1]: razerdaemon.service: Failed with result 'exit-code'.

But running the daemon file in the program folder as root works

phush0 commented 2 years ago

No it is not working your device is not supported. I need device ID to enable it. Please post lsusb output

christian-bendiksen commented 2 years ago

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 1532:028a Razer USA, Ltd Razer Blade Bus 001 Device 002: ID 13d3:5279 IMC Networks Integrated RGB Camera Bus 001 Device 004: ID 8087:0033 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I added the VID and PID in the devices.json, it works when i run the daemon as root. I tried to run the fan control and it worked. Running the daemon as service is not working

phush0 commented 2 years ago

It works as root because your normal user is missing udev rules installed. Run install script and reboot your laptop. Then it should work.

christian-bendiksen commented 2 years ago
christian@blade:~/Nedlastinger/razer-laptop-control-no-dkms/razer_control_gui$ ./install.sh
Finished release [optimized] target(s) in 10.90s
[sudo] passord for christian: 
Install complete!

after reboot

christian@blade:~$ razer-cli 
Error. Socket doesn't exit. Is daemon running?
christian@blade:~/Nedlastinger/razer-laptop-control-no-dkms/razer_control_gui/target/release$ sudo ./daemon 
[sudo] passord for christian: 
suported devices found: 27
supported device: "Blade 15 Advanced early 2022"
Online AC0: true
No effects save, creating a new one
thread '<unnamed>' panicked at 'failed to connect to D-Bus session bus: D-Bus error: /usr/bin/dbus-launch terminated abnormally without any error message (org.freedesktop.DBus.Error.Spawn.ExecFailed)', src/daemon.rs:90:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
battery percentage: 37.0
REQ: SetFanSpeed { ac: 1, rpm: 5000 }
Error write config Os { code: 2, kind: NotFound, message: "No such file or directory" }
REQ: GetFanSpeed { ac: 1 }

For some reason the service won't run without me running it manually as root

phush0 commented 2 years ago

systemctl --user status razerdaemon.service

Also what distro is this? Also you have to add USB vid and pid in udev rules file not just laptops.json. From previous log is visible that daemon can not open USB.

christian-bendiksen commented 2 years ago
christian@blade:~/Nedlastinger/razer-laptop-control-no-dkms/razer_control_gui/target/release$ systemctl --user status razerdaemon.service
○ razerdaemon.service - Razer laptop control daemon
     Loaded: loaded (/usr/lib/systemd/user/razerdaemon.service; enabled; preset: enabled)
     Active: inactive (dead) since Wed 2022-10-12 20:37:14 CEST; 40min ago
   Duration: 5ms
    Process: 1909 ExecStart=/usr/share/razercontrol/daemon (code=exited, status=1/FAILURE)
   Main PID: 1909 (code=exited, status=1/FAILURE)
        CPU: 5ms

okt. 12 20:37:13 blade systemd[1900]: Started Razer laptop control daemon.
okt. 12 20:37:14 blade daemon[1909]: suported devices found: 27
okt. 12 20:37:14 blade daemon[1909]: Error: hidapi error: Permission denied
okt. 12 20:37:14 blade daemon[1909]: no supported device found
okt. 12 20:37:14 blade systemd[1900]: razerdaemon.service: Main process exited, code=exited, status=1/FAILURE
okt. 12 20:37:14 blade systemd[1900]: razerdaemon.service: Failed with result 'exit-code'.

Running Ubuntu 22.10 with kernel 6.0

phush0 commented 2 years ago

Add pid to 99-hidraw file too

christian-bendiksen commented 2 years ago

Ahhh! Nice!

It works now, thank you!