GNOME Bugzilla – Bug 339857
Use HAL to get/set the brightness
Last modified: 2006-09-11 15:56:10 UTC
That gives us support for, Toshiba, ASUS, Panasonic, Sony and Omnibook laptops for free (in addition to the current Apple Mac support). An example of how to do that is at: http://cvs.gnome.org/viewcvs/gnome-power-manager/src/gpm-brightness.c?view=markup This would be a good way for someone to look at how to create GObjects, and use the HAL and D-Bus APIs.
Richard, would doing this break g-p-m in any way?
Umm, no in theory. I was going to suggest moving away from control-center for the lcd brightness stuff as we need to do clever stuff in g-p-m to keep the brightness in sync with the policy action brightnesses. Personally I'm in favour of keeping this in g-p-m, but I'll go with whatever is decided for where it properly belongs. Richard.
Well, there's already code to set the brightness in the control-center. If you have a Mac, check the brightness up/down keybindings in the keybindings capplet. That's what we would like to replace with "shared" code. We could even detect whether we can set the brightness in the capplet and do something about it. Or we could move the dialogue to g-p-m and only have it react to "brightness-up" "brightness-down" events from HAL.
Bastien, I think I've already done what you are suggesting -- have you seen CVS (picture here: http://www.hughsie.com/applications/Coppermine/thumbnails.php?album=9) Richard.
Created attachment 64381 [details] [review] g-c-c-remove-brightness-controls.patch Would also need to remove quite a few files by hand. OK to commit?
All hail to the better brightness support! 2006-04-27 Bastien Nocera <hadess@hadess.net> * configure.in: remove checks for fb-level support * schemas/apps_gnome_settings_daemon_keybindings.schemas.in: Remove the brightness keybindings (Closes: #339857) 2006-04-27 Bastien Nocera <hadess@hadess.net> * gnome-keybinding-properties.c: remove brightness keybindings, as they duplicate with gnome-power-manager's (greater) functionality (Closes: #339857) 2006-04-27 Bastien Nocera <hadess@hadess.net> * actions/Makefile.am: * actions/acme-brightness.png: * actions/acme-fb-level.c: * actions/acme-fb-level.h: * actions/acme.h: * gnome-settings-multimedia-keys.c: (do_action), (acme_filter_events), (gnome_settings_multimedia_keys_load): Remove references to the brightness controls, we have moved the functionality (and enhanced it!) to gnome-power-manager (Closes: #339857)
During the transition of brightness control to g-p-m, configurability of brightness hotkeys seems to be removed. If the kernel doesn't send KEY_BRIGHTNESSDOWN or KEY_BRIGHTNESSUP lcd brightness cannot be manually controlled. Can control-center or g-p-m re-add the /apps/gnome_settings_daemon/keybindings/brightness_{up,down} options?
(In reply to comment #7) > During the transition of brightness control to g-p-m, configurability of > brightness hotkeys seems to be removed. If the kernel doesn't send > KEY_BRIGHTNESSDOWN or KEY_BRIGHTNESSUP lcd brightness cannot be manually > controlled. > > Can control-center or g-p-m re-add the > /apps/gnome_settings_daemon/keybindings/brightness_{up,down} options? That's a bit of a problem, but at the same time, the old system only ever worked with Macs, so would probably only work with Apple keyboards (as on laptops). If you're using a non-Apple keyboard, then we'd need to fix that keyboard's driver to send the right events.
This is a toshiba satellite m100 using omnibook module. It uses Fn-F6 and Fn-F6 for adjusting the brightness (in hardware). I assigned 0xd4 to Fn-F7 with setkeycodes so the brightness adjustment widget pops up on brightnessup events, but Fn-F6 is already generating a 0xef keycode and not recognized. Btw, the brightness widget is always at 100% with a message "set outside range (8 of 7)" although the actual brightness changes (also does /proc/omnibook/lcd).
(In reply to comment #9) > This is a toshiba satellite m100 using omnibook module. Right, so re-adding the code I removed wouldn't change anything, as it only worked on Apple Macs. File a bug with gnome-power-manager, I'm sure Richard can try and work something out for your problem.