You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: detect running on desktop, disable power/lid events for it (#80)
## What does this PR do?
Disables power events on desktops by default (still enabled on laptops).
## Why is this change important?
User requested in #79
## How to test this PR locally?
`make pre-push`
## Related issues
Closes#79
Copy file name to clipboardExpand all lines: docs/docs/configuration/power-events.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,15 @@ When disabled:
21
21
- No power events will be delivered
22
22
- No D-Bus connection will be made
23
23
24
+
## Enabling Power Events
25
+
26
+
Power events are enabled by default on laptops. They are disabled on desktops (the current chassis type is pulled from `/sys/class/dmi/id/chassis_type`).
27
+
If you want to enable them anyway, run, e.g.:
28
+
29
+
```bash
30
+
hyprdynamicmonitors run --disable-power-events=false
31
+
```
32
+
24
33
## Default Configuration
25
34
26
35
By default, the service listens for D-Bus signals:
Copy file name to clipboardExpand all lines: docs/docs/faq.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,6 +214,16 @@ Yes! HyprDynamicMonitors can work alongside `nwg-displays`:
214
214
215
215
This combines the visual configuration of `nwg-displays` with the automatic profile management of `hyprdynamicmonitors`.
216
216
217
+
## Is UPower Running? UPower misconfigured or not running: failed to get property from UPower: Object does not exist at path “/org/freedesktop/UPower/devices/line_power_ACAD”
218
+
219
+
If you got this error, you either want to:
220
+
1. If you do not want to use power events (e.g., on a desktop), pass the `--disable-power-events` CLI argument
221
+
2. Tweak your [Power Events configuration](./configuration/power-events.md) to use the proper device path (`upower -e` to find your `line_power` device; additionally, it would be helpful if you added it [here](https://github.com/fiffeek/hyprdynamicmonitors/blob/main/internal/utils/power.go#L14) so that others do not encounter this issue going forward)
222
+
223
+
If you are running on a desktop with a version of `hyprdynamicmonitors` that includes [this patch](https://github.com/fiffeek/hyprdynamicmonitors/pull/80) (`v1.3.5+`),
224
+
this error should not occur unless `--disable-power-events=false` is explicitly passed, since power events are disabled
225
+
for desktops by default. Please [open an issue](https://github.com/fiffeek/hyprdynamicmonitors/issues) and include the output of `cat /sys/class/dmi/id/chassis_type`.
Copy file name to clipboardExpand all lines: docs/docs/usage/commands.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ Usage:
55
55
Flags:
56
56
--connect-to-session-bus Connect to session bus instead of system bus for power events: https://wiki.archlinux.org/title/D-Bus. You can switch as long as you expose power line events in your user session bus.
57
57
--disable-auto-hot-reload Disable automatic hot reload (no file watchers)
58
-
--disable-power-events Disable power events (dbus)
58
+
--disable-power-events Disable power events (dbus). Defaults to true if running on desktop, to false otherwise
59
59
--dry-run Show what would be done without making changes
60
60
--enable-lid-events Enable listening to dbus lid events
61
61
-h, --help help for run
@@ -221,7 +221,7 @@ Usage:
221
221
222
222
Flags:
223
223
--connect-to-session-bus Connect to session bus instead of system bus for power events: https://wiki.archlinux.org/title/D-Bus. You can switch as long as you expose power line events in your user session bus.
224
-
--disable-power-events Disable power events (dbus)
224
+
--disable-power-events Disable power events (dbus). Defaults to true if running on desktop, to false otherwise
225
225
--enable-lid-events Enable listening to dbus lid events
226
226
-h, --help help for tui
227
227
--hypr-monitors-override string When used it fill parse the given file as hyprland monitors spec, used for testing.
0 commit comments