Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clightd not working #34630

Closed
danjenson opened this issue Dec 20, 2021 · 2 comments
Closed

Clightd not working #34630

danjenson opened this issue Dec 20, 2021 · 2 comments
Labels

Comments

@danjenson
Copy link

danjenson commented Dec 20, 2021

System

  • xuname:
Void 5.15.9_1 x86_64 GenuineIntel uptodate rFFFF
  • package:
Clight-4.7_1

Expected behavior

Clight daemon would respond to clight, without sudo.

Actual behavior

The daemon/service does not seem to respond to clight. Even running, dbus-run-session clight with the Clightd service running returns an Idle Error. It will only work with sudo dbus-run-session clight, which seems to circumvent using Clightd. (The point of Clightd is so clight can be run without sudo privileges). I have added my user to i2c, dbus, and dbus is running (so is polkitd). I also start bspwm with exec dbus-launch --exit-with-x11 bspwm. The author of clight is unfamiliar with void/bspwm, so is having a hard time debugging (FedeDP/Clight#240).

Steps to reproduce the behavior

  1. Install Clightd
  2. Enable dbus, polkitd, and Clightd
  3. Start a bspwm session with exec dbus-launch --exit-with-x11 (in ~/.xinitrc)
  4. Start clight with dbus-run-session clight
  5. Check the log at ~/.local/share/clight/clight.log. It will have the following lines:
(I)[10:02:12]{main.c:127}	Clightd found, version: 5.4.
(I)[10:02:12]{keyboard.c:158}	Keyboard backlight calibration supported.
(I)[10:02:12]{interface.c:180}	org.freedesktop.ScreenSaver dbus interface exposed.
(I)[10:02:12]{upower.c:54}	AC cable disconnected.
(I)[10:02:12]{upower.c:65}	Laptop lid opened.
(W)[10:02:12]{idler.c:22}	Clightd idle error.
(W)[10:02:12]{dimmer.c:55}	Failed to init. Killing module.
(W)[10:02:12]{idler.c:22}	Clightd idle error.
(W)[10:02:12]{dpms.c:48}	Failed to init. Killing module.
(W)[10:02:42]{location.c:89}	Timed out waiting on location provided by Geoclue2. Killing module.
(W)[10:02:42]{daytime.c:68}	No location provider found; fallback to DAY daytime.
(W)[10:02:42]{gamma.c:91}	Killing GAMMA as no location provider is available.
@danjenson
Copy link
Author

So, it turns out that this requires an active polkitd session, as well as this rule in /etc/polkit-1/rules.d/80-clightd.rules:

/* Allow any user to call clightd without authentication */
polkit.addRule(function(action, subject) {
    if (action.id.indexOf("org.clightd.clightd.") == 0) {
        return polkit.Result.YES;
    }
});

Not sure if this should be somehow incorporated into the install script. Welcome to add it, would just need some guidance, as I've only been running Void for < 1 week.

@github-actions
Copy link

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant