Comments (3)
This seems like a bug in GNOME Settings Daemon, assuming the brightness only changes from within GNOME Settings Daemon.
To have this power daemon work outside of GNOME, it uses the /sys/class/backlight API to control backlights. GNOME Settings Daemon should probably watch this for changes.
Since the likelihood of changing GNOME Settings Daemon to do this is low, I will look into sending the new brightness information through the DBUS API if it is available, as a temporary workaround.
from system76-power.
Documentation on the DBUS API is scarce. Here's a dump from gdbus
.
node /org/gnome/SettingsDaemon/Power {
interface org.freedesktop.DBus.Properties {
methods:
Get(in s interface_name,
in s property_name,
out v value);
GetAll(in s interface_name,
out a{sv} properties);
Set(in s interface_name,
in s property_name,
in v value);
signals:
PropertiesChanged(s interface_name,
a{sv} changed_properties,
as invalidated_properties);
properties:
};
interface org.freedesktop.DBus.Introspectable {
methods:
Introspect(out s xml_data);
signals:
properties:
};
interface org.freedesktop.DBus.Peer {
methods:
Ping();
GetMachineId(out s machine_uuid);
signals:
properties:
};
interface org.gnome.SettingsDaemon.Power.Screen {
methods:
StepUp(out i new_percentage,
out i output_id);
StepDown(out i new_percentage,
out i output_id);
signals:
properties:
readwrite i Brightness = 50;
};
interface org.gnome.SettingsDaemon.Power.Keyboard {
methods:
StepUp(out i new_percentage);
StepDown(out i new_percentage);
Toggle(out i new_percentage);
signals:
BrightnessChanged(i brightness,
s source);
properties:
readwrite i Brightness = 0;
};
};
It seems that in order to control brightness, you have to use the Brightness
property.
Checking if it exists
gdbus introspect --session --dest org.gnome.SettingsDaemon.Power \
--object-path /org/gnome/SettingsDaemon/Power \
|| echo SettingsDaemon.Power does not exist
Getting Brightness
dbus-send --session --print-reply \
--dest="org.gnome.SettingsDaemon.Power" \
/org/gnome/SettingsDaemon/Power \
org.freedesktop.DBus.Properties.Get \
string:org.gnome.SettingsDaemon.Power.Screen \
string:Brightness
Setting Brightness
dbus-send --session --print-reply \
--dest="org.gnome.SettingsDaemon.Power" \
/org/gnome/SettingsDaemon/Power \
org.freedesktop.DBus.Properties.Set \
string:org.gnome.SettingsDaemon.Power.Screen \
string:Brightness \
variant:int32:${PERCENT}
from system76-power.
Thanks Michael, I think that is enough information to figure this out
from system76-power.
Related Issues (20)
- [Error] daemon returned error- "does not have switchable graphics" HOT 4
- Failing to set graphics mode changes the displayed mode
- oryp10: FanDaemon not starting, fan control seems to be not handled by system76-power daemon HOT 2
- PC fan is running all the time without load after updating to Linux Kernel 6.1 HOT 1
- `power_dpm_state` on AMDGPU not updated on battery or balance mode
- Choppy external monitor performance (<20 FPS) when using Wayland and the nvidia GPU mode HOT 1
- Error when changing power profile (no_turbo pstate value) HOT 1
- Unexpected PCIE Downgrades of the NVIDIA Gpu HOT 2
- Boot parameters are reset when switching graphics mode HOT 2
- system76-power daemon panic because missing file HOT 1
- Allow desktop computers to have switchable graphics HOT 4
- Arch doesn't boot when changing back to Nvidia mode
- Boost mode isn't affected by power profiles changes
- Block graphics card switch when there is inssuficient disk space
- NVME U.2 drive temperature not considered for fan duty cycle HOT 2
- Add mux switching support for new models HOT 3
- AMD P-State EPP doesn't change based on the selected power profile HOT 3
- SCSI/SATA link time power management breaks AHCI hotplugging on some motherboards HOT 2
- Cannot query or set charge thresholds on kernel 6.6 HOT 4
- unable to switch between dedicated nvidia and integrated amd gpu
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 system76-power.