Hi,
This is because it’s not the settings daemon that sends a request to show the OSD, it’s GNOME Shell itself when it notices a brightness up/down key press. If you open dbus-monitor --session
then press the brightness key, it’ll give you something like this:
dbus-monitor output log
signal time=1645539568.611688 sender=:1.16 -> destination=:1.58 serial=1740 path=/org/gnome/Shell; interface=org.gnome.Shell; member=AcceleratorActivated
uint32 126
array [
dict entry(
string "timestamp"
variant uint32 13992990
)
dict entry(
string "action-mode"
variant uint32 1
)
dict entry(
string "device-node"
variant string "/dev/input/event11"
)
]
method call time=1645539568.612719 sender=:1.58 -> destination=:1.61 serial=88 path=/org/gnome/SettingsDaemon/Power; interface=org.gnome.SettingsDaemon.Power.Screen; member=StepUp
method return time=1645539568.613831 sender=:1.61 -> destination=:1.58 serial=96 reply_serial=88
int32 77
string "eDP-1"
method call time=1645539568.614846 sender=:1.58 -> destination=:1.16 serial=89 path=/org/gnome/Shell; interface=org.gnome.Shell; member=ShowOSD
array [
dict entry(
string "icon"
variant string "display-brightness-symbolic"
)
dict entry(
string "level"
variant double 0.77
)
dict entry(
string "connector"
variant string "eDP-1"
)
]
At the beginning a dbus signal is sent to destination 1.58 here (to the media keys daemon, as checked in d-feet) from GNOME Shell (1.16), and in the later two method calls you can see it’s the media keys daemon (1.58) which asks to the settings daemon to change the brightness, and which also asks GNOME Shell (1.16) to show the correct OSD. Hence it is not your call to org.gnome.SettingsDaemon.Power.Screen.StepUp which triggers the OSD, but it’s the media keys daemon itself, so that’s why you’re not seeing the OSD.
In any case, even if changing the brightness key is not available in the keyboard shortcuts settings, they are still accessible by changing the gsettings key (which are all listed with gsettings list-keys org.gnome.settings-daemon.plugins.media-keys
), and here the gsettings keys you’ll need to change are screen-brightness-up
and screen-brightness-down
. For example, gsettings set org.gnome.settings-daemon.plugins.media-keys screen-brightness-up "['equal']"
will make the =
key toggle the brightness up.
Since the settings app already allow changing the keyboard shortcuts for volume up/down, I don’t see a reason why it could not include brightness up/down too. Now, there probably needs to be some limit to the amount of shortcuts that should be included in the UI, some kind of rule, but this particular one seems sensible enough. There is already an issue opened for your particular issue of not having those shortcuts included in the Settings, so maybe you can give your use-case there and some informations on e.g. your hardware.
I do think it would be nice that when one installs GNOME it asks whether you want to assign some particular keys to such action when no dedicated key with the proper marking on it is detected (i.e. screen brightness drawing on one of the Fn keys), and hence not available as a “screen brightness” key from the kernel. But that’s a separate issue anyway.