After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 339857 - Use HAL to get/set the brightness
Use HAL to get/set the brightness
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Keybinding
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-26 20:45 UTC by Bastien Nocera
Modified: 2006-09-11 15:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
g-c-c-remove-brightness-controls.patch (17.41 KB, patch)
2006-04-27 09:42 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2006-04-26 20:45:30 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.
Comment 1 Bastien Nocera 2006-04-26 20:46:31 UTC
Richard, would doing this break g-p-m in any way?
Comment 2 Richard Hughes 2006-04-26 21:28:28 UTC
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.
Comment 3 Bastien Nocera 2006-04-26 21:47:06 UTC
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.
Comment 4 Richard Hughes 2006-04-26 21:55:09 UTC
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.
Comment 5 Bastien Nocera 2006-04-27 09:42:52 UTC
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?
Comment 6 Bastien Nocera 2006-04-27 09:51:16 UTC
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)
Comment 7 Sertaç Ö. Yıldız 2006-09-11 15:11:55 UTC
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?
Comment 8 Bastien Nocera 2006-09-11 15:19:18 UTC
(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.
Comment 9 Sertaç Ö. Yıldız 2006-09-11 15:50:30 UTC
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).
Comment 10 Bastien Nocera 2006-09-11 15:56:10 UTC
(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.