MaxVerevkin / wl-gammarelay-rs

A simple program that provides DBus interface to control display temperature and brightness under wayland without flickering
GNU General Public License v3.0
119 stars 2 forks source link

v0.4.0 fails to run on FreeBSD #21

Closed jbeich closed 7 months ago

jbeich commented 7 months ago

Regressed by a95ad70dd264. Maybe related to SCM_CREDS.

Before:

$ wl-gammarelay-rs
New output: 51
Output 51: ramp_size = 1024
^C

After:

$ wl-gammarelay-rs
Error: Authentication failed

Note, cargo test passes in rustbus but dbus-monitor is silent.

MaxVerevkin commented 7 months ago

Can you test with this patch?

diff --git a/Cargo.toml b/Cargo.toml
index 36332bc..db2e750 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -19,7 +19,8 @@ shmemfdrs2 = "1.0"
 wayrs-client = "1.0"
 wayrs-protocols = { version = "0.13", features = ["wlr-gamma-control-unstable-v1"] }

-# [patch.'https://github.com/KillingSpark/rustbus']
+[patch.'https://github.com/KillingSpark/rustbus']
+rustbus = { git = "https://github.com/MaxVerevkin/rustbus", branch = "freebsd" }
 # rustbus = { path = "../rustbus/rustbus" }
 # [patch.'https://github.com/MaxVerevkin/rustbus-service']
 # rustbus-service = { path = "../rustbus-service" }
jbeich commented 7 months ago

I confirm, with the patch it works fine (tested on sway-git) except for NameAcquired warning that didn't exist with v0.3.2:

$ wl-gammarelay-rs &
New output: 51
Output 51: name = "DP-1"
Output 51: ramp_size = 1024

$ pkg install basu
$ alias busctl=basuctl

$ busctl --user call rs.wl-gammarelay / rs.wl.gammarelay ToggleInverted
todo: handle signal: Some("NameAcquired")
todo: handle signal: Some("NameAcquired")

$ busctl --user introspect rs.wl-gammarelay / rs.wl.gammarelay
NAME               TYPE      SIGNATURE RESULT/VALUE FLAGS
.ToggleInverted    method    -         -            -
.UpdateBrightness  method    d         -            -
.UpdateGamma       method    d         -            -
.UpdateTemperature method    n         -            -
.Brightness        property  d         1            emits-change writable
.Gamma             property  d         1            emits-change writable
.Inverted          property  b         false        emits-change writable
.Temperature       property  q         6500         emits-change writable
MaxVerevkin commented 7 months ago

Fixed in ce5cb27dcd0a5b9eef054c92816088e2b62df928