Comments (6)
What do you mean by "slow", how do you use brightnessctl
?
Since changing the brightness is inherently a privileged operation, we need an escalation mechanism and most distributions should be using the logind's DBus interface witch is slow-ish.
You can try to run brightnessctl
as root
to see if its "fast"
from brightnessctl.
I am not implying that it takes seconds to run, just that it takes more time compared to other solutions I have experienced.
Simple timings via time
took around 10-20ms (poor benchmark, yes) on my system on Arch Linux with Skylake. In comparison to the very simple light
, it does feel a lot slower. I haven't benchmarked the latter.
It is understandable that it relies on other stuff that may be bottlenecks, but my question is more if anything actually can be sped up, or that if the current solution does not allow for significant speedups.
from brightnessctl.
@albinahlback when not specifying a device, brightnessctl
still reads all devices even though it then takes only one.
We also have a uname call to make sure we're on linux which probably doesn't make sense in runtime.
Additionally, you should install udev rules for better performance (and not go through the dbus stuff).
When reading the device, iterating readdir output instead of directly trying to access necessary dirs may be inefficient too.
from brightnessctl.
@albinahlback
Check out #103
How does it feel?
From a cursory glance with hyperfine, it should be a little faster than light (haha) now.
from brightnessctl.
Yes, that does feel a lot faster! Thanks!
from brightnessctl.
Fixed
from brightnessctl.
Related Issues (20)
- set brightness on AMD APU pip vs apt HOT 1
- Brightness goes from 1 to 2 when asking for 10% dimmer. HOT 1
- Installing on gentoo HOT 1
- --min-value prevents all value changes HOT 5
- Need Help: max brighness at 10% HOT 1
- Current brightness % reported is wrong when using exponant HOT 1
- Working vs not working(?!)
- It doesn't work for Ubuntu 23.04 now!
- not working in a shell script in a crontab
- wildcard doesn't work HOT 2
- Prevent brightnessctl from auto saving brightness value? HOT 1
- please update new version , is long times HOT 3
- Dell backlit :: Is it possible to keep the light always on HOT 1
- wish ;) control leds color HOT 1
- Basu support is broken
- Inconsequential error in loop control logic
- How to restore last set brightness after reboot? HOT 1
- DDCI HOT 2
- --class only selects one device HOT 2
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 brightnessctl.