Comments (5)
Just want to chime in and say I agree with @maximbaz , particularly with regards to describing graphical-session.target
as a contract
from wluma.
If you think it's valuable I'd be happy to accept a PR adding a short note about this caveat in README, but since it's not really specific to wluma, but to all GUI apps that you want to start with systemd (e.g. waybar), perhaps it would be more beneficial to document it on a place like arch wiki for your desktop or window manager.
from wluma.
Closing as answered and non-actionable, but any further comments, questions or PRs for README improvements are always welcome 🙂
from wluma.
Hello!
Thanks for bringing this topic up!
First of all, you are totally right in saying that not all display or window managers start graphical-session.target
. A typical reason for this that I've seen is that systemd is just one of many init systems, and it doesn't feel right to hardcode systemd-specific things into a display or window manager that does not depend on systemd specifically in any way. Heck, I couldn't even get sway
to put a 6-line file in the contrib directory, that would help people start the graphical-session.target
! Today I use Hyprland, and it is the same story. Believe me, I am very familiar with the problem 😁
Having said that, in my mind, not starting the graphical-session.target
on a system that does use systemd is a violation of a contract, established when you agreed to use systemd. It's a way to manage dependencies, and for any GUI app (not just wluma
) that wants to only start on a graphical system, depending on graphical-session.target
is the right thing to do.
That is to say, when you and I use systemd, and a display/window manager that doesn't start graphical-session.target
, it is our responsibility to do it. It's not actually that hard, you need to start the target when DM or WM launches (example) and stop it when it exits (example). This will help with all other GUI apps that you start with systemd (common example could be a bar like waybar
), and would bring all the same benefits you saw when you changed to default.target
(stop on crash, auto-restart, etc).
You will see in the links I provided, that we create <app>-session.target
(sway-session.target
/ hyprland-session.target
), that binds to graphical-session.target
- this is optional but recommended, in case you ever have a systemd dependency that can only run in your particular WM and not just any display session.
Now, does wluma
actually require a wlroots compositor to be up and running on launch? Yes, to take screen contents into consideration when picking the best brightness value to set. While this feature can be disabled in config, it is enabled by default, and I consider it a key differentiator of this particular app compared to anything else on the market, that can at most take ALS into account. And when you have the feature enabled, wluma
will actually crash on startup, as it fails to find a display session, so it will crash in the default config, and it will crash for the majority of people.
I don't disagree with the benefits of using wluma
on a TTY, or on a non-wlroots display manager for that matter - it was the whole reason to make the feature toggleable! It's just that the config is static today, and you can't switch to TTY mode without also adjusting the default config (and so the default systemd service unit).
So, would the default wluma.service
benefit from switching to base.target
? Not at the moment. If we can make the setting dynamic, such that wluma
can start on TTY and use only ALS, later detect that wlroots
-based display manager was started and begin to take screen contents into account, and similarly switch back and continue working when display session was closed, then it would totally make sense to define only the minimally necessary dependency in the systemd unit! Until then, I believe the default unit should continue to match the default config.
It was a wonderful question, thanks again for asking, I hope I managed to give you at least somewhat of an answer than it deserves! Don't hesitate to ask if you have further comments 😉
from wluma.
That makes total sense, thanks for your detailed response. And thanks for the reference to the dotfiles.
Unfortunately for wlroots compositors and display managers it's not very clear that this target must be handled by the user itself (creation and startup).
I even tested it with sddm thinking that it would automagically start up this target but also not. So this "issue" might something common for wluma users.
from wluma.
Related Issues (20)
- [Bug]: ALS data not parsed/calculated correctly HOT 2
- [Bug]: Can't find display, but shows up in ddcutil detect HOT 8
- [Bug]: Cargo failling to compile v4l-sys HOT 5
- [Bug]: Unable to start wluma from the command line HOT 3
- [Feature request]: gracefully disable capture when not wlroots HOT 2
- [Feature request]: be lenient with config file and assume defaults HOT 1
- [Feature request]: print more debug info HOT 3
- [Feature request]: Add timeout for keyboard backlight HOT 3
- [Bug]: Crash on PC with AMD GPU (capturer = wlroots) HOT 10
- [Bug]: Panicked when running both with sudo and not HOT 6
- 'predictor-eDP-1' panicked at 'Did not receive initial ALS value in time' on Microsoft Surface Pro 8 HOT 3
- [Feature request]: Support monitor disconnect HOT 6
- [Bug]: Unable to initialize Vulkan: ERROR_EXTENSION_NOT_PRESENT HOT 4
- [Bug]: wluma refuses to read my config file HOT 2
- configuration question HOT 6
- [Feature request]: Add gamma control HOT 9
- [Bug]: `Backlight::new` returns early instead of using dbus
- [Bug]: No binary in Github artifacts HOT 3
- [Feature request]: Support custom external sources for luminance value HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wluma.