Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues on gnome2 with metacity #13

Closed
sid-the-sloth opened this issue May 9, 2012 · 10 comments
Closed

issues on gnome2 with metacity #13

sid-the-sloth opened this issue May 9, 2012 · 10 comments

Comments

@sid-the-sloth
Copy link

MacBook Pro 2007 (ver 3,1)
o/s: CentOS 6.2, 64 bit
desktop manager: gnome2
window manager: metacity

i was able to successfully compile lightum from source (thanks pof).

when i run it in non-daemon, verbose mode, i get this in the console:


[sid@gamma ~]$ lightum -f -v
CONFIG:
manualmode: 0
ignoreuser: 1
workmode: 3
queryscreensaver: 0
maxbrightness: 255
minbrightness: 0
maxbacklight: 15
minbacklight: 1
polltime: 300
idleoff: 5
screenidle: 30

lightum v2.0.4 running in auto mode
Error org.freedesktop.DBus.Error.UnknownMethod: Method “GetPercentage” with signature “” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “GetPercentage” with signature “” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.UnknownMethod: Method “GetPercentage” with signature “” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

light_sensor: 42 idle_time: 0.020000 auto mode brightness: 3 backlight: 9
light_sensor: 44 idle_time: 0.411000 auto mode brightness: 2 backlight: 9 -> Ignoring user brightness change, wants to set maxbrightness to 0
Error org.freedesktop.DBus.Error.UnknownMethod: Method “GetPercentage” with signature “” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “GetPercentage” with signature “” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.UnknownMethod: Method “GetPercentage” with signature “” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

light_sensor: 67 idle_time: 1.147000 auto mode brightness: 1 backlight: 13 -> Ignoring user brightness change, wants to set maxbrightness to 0
Error org.freedesktop.DBus.Error.UnknownMethod: Method “GetPercentage” with signature “” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system
Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.kde.Solid.PowerManagement was not provided by any .service files
Can’t manage screen backlight on this system

the result of calling dbus-send:


[sid@gamma ~]$ dbus-send –session –print-reply –dest=”org.gnome.SettingsDaemon” /org/gnome/SettingsDaemon/Power org.gnome.SettingsDaemon.Power.Screen.SetPercentage uint32:100

Error org.freedesktop.DBus.Error.UnknownMethod: Method “SetPercentage” with signature “u” on interface “org.gnome.SettingsDaemon.Power.Screen” doesn’t exist

result of calling qbus:


[root@gamma sid]# qdbus org.gnome.SettingsDaemon /org/gnome/SettingsDaemon/Power
Could not connect to D-Bus server: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

further, on my 64-bit system, this folder doesn't exist:


/usr/lib/gnome-settings-daemon/gsd-backlight-helper

i have instead this folder, with contents listed:


[root@gamma sid]# /usr/lib/gnome-settings-daemon/gsd-backlight-helper--get-max-brightness
bash: /usr/lib/gnome-settings-daemon/gsd-backlight-helper: No such file or directory
[root@gamma sid]# /usr/lib
lib/     lib64/   libexec/ 
[root@gamma sid]# ls -l /usr/lib64/gnome-settings-daemon-2.0/
total 676
-rw-r--r--. 1 root root   6906 Nov 11  2010 a11y-keyboard.gnome-settings-plugin
-rw-r--r--. 1 root root   4479 Nov 11  2010 background.gnome-settings-plugin
-rw-r--r--. 1 root root   4991 Nov 11  2010 clipboard.gnome-settings-plugin
-rw-r--r--. 1 root root   4521 Nov 11  2010 font.gnome-settings-plugin
-rw-r--r--. 1 root root    264 Nov 11  2010 housekeeping.gnome-settings-plugin
-rw-r--r--. 1 root root   5235 Nov 11  2010 keybindings.gnome-settings-plugin
-rw-r--r--. 1 root root   4969 Nov 11  2010 keyboard.gnome-settings-plugin
-rwxr-xr-x. 1 root root  40872 Nov 11  2010 liba11y-keyboard.so
-rwxr-xr-x. 1 root root  17232 Nov 11  2010 libbackground.so
-rwxr-xr-x. 1 root root  24160 Nov 11  2010 libclipboard.so
-rwxr-xr-x. 1 root root  19952 Nov 11  2010 libfont.so
-rwxr-xr-x. 1 root root  49832 Nov 11  2010 libhousekeeping.so
-rwxr-xr-x. 1 root root  32592 Nov 11  2010 libkeybindings.so
-rwxr-xr-x. 1 root root  37096 Nov 11  2010 libkeyboard.so
-rwxr-xr-x. 1 root root 133848 Nov 11  2010 libmedia-keys.so
-rwxr-xr-x. 1 root root  26184 Nov 11  2010 libmouse.so
-rwxr-xr-x. 1 root root  37520 Nov 11  2010 libsmartcard.so
-rwxr-xr-x. 1 root root  17072 Nov 11  2010 libsound.so
-rwxr-xr-x. 1 root root  13632 Nov 11  2010 libtyping-break.so
-rwxr-xr-x. 1 root root  41472 Nov 11  2010 libxrandr.so
-rwxr-xr-x. 1 root root  19808 Nov 11  2010 libxrdb.so
-rwxr-xr-x. 1 root root  41832 Nov 11  2010 libxsettings.so
-rw-r--r--. 1 root root   5329 Nov 11  2010 media-keys.gnome-settings-plugin
-rw-r--r--. 1 root root   4061 Nov 11  2010 mouse.gnome-settings-plugin
-rw-r--r--. 1 root root    162 Nov 11  2010 smartcard.gnome-settings-plugin
-rw-r--r--. 1 root root    760 Nov 11  2010 sound.gnome-settings-plugin
-rw-r--r--. 1 root root   6231 Nov 11  2010 typing-break.gnome-settings-plugin
-rw-r--r--. 1 root root   6043 Nov 11  2010 xrandr.gnome-settings-plugin
-rw-r--r--. 1 root root   6562 Nov 11  2010 xrdb.gnome-settings-plugin
-rw-r--r--. 1 root root   5158 Nov 11  2010 xsettings.gnome-settings-plugin

@poliva
Copy link
Owner

poliva commented May 9, 2012

please launch 'dbus-monitor' to capture all dbus messages, then manually increase and decrease the screen backlight using the Function keys on the keyboard. When done, please paste the relevant output from dbus-monitor (if you don't know which is the relevant output, paste everything but have a quick read to make sure you're not publicly posting any sensitive/personal information on dbus messages).

@sid-the-sloth
Copy link
Author

should i launch lightum before i run dbus-monitor?

@poliva
Copy link
Owner

poliva commented May 9, 2012

no, do it without lightum running

sid reply@reply.github.com wrote:

should i launch lightum before i run dbus-monitor?


Reply to this email directly or view it on GitHub:
#13 (comment)

Sent from my Android phone. Please excuse my brevity.

@sid-the-sloth
Copy link
Author

i started dbus-monitor for system, then i pressed F9 (keyboard lights down), F10 (keyboard lights up), and F8 (keyboard lights toggle):


[root@gamma sid] # dbus-monitor --system
signal sender=org.freedesktop.DBus -> dest=:1.82 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.82"
signal sender=:1.1 -> dest=(null destination) serial=631 path=/org/freedesktop/NetworkManager/AccessPoint/10; interface=org.freedesktop.NetworkManager.AccessPoint; member=PropertiesChanged
   array [
      dict entry(
         string "Strength"
         variant             byte 61
      )
   ]
signal sender=:1.19 -> dest=(null destination) serial=282 path=/org/freedesktop/DeviceKit/Power/devices/battery_BAT0; interface=org.freedesktop.DeviceKit.Power.Device; member=Changed
signal sender=:1.19 -> dest=(null destination) serial=283 path=/org/freedesktop/DeviceKit/Power; interface=org.freedesktop.DeviceKit.Power; member=DeviceChanged
   string "/org/freedesktop/DeviceKit/Power/devices/battery_BAT0"
signal sender=:1.6 -> dest=(null destination) serial=880 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-down"
signal sender=:1.6 -> dest=(null destination) serial=881 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-down"
signal sender=:1.1 -> dest=(null destination) serial=632 path=/org/freedesktop/NetworkManager/AccessPoint/10; interface=org.freedesktop.NetworkManager.AccessPoint; member=PropertiesChanged
   array [
      dict entry(
         string "Strength"
         variant             byte 57
      )
   ]
signal sender=:1.6 -> dest=(null destination) serial=882 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-down"
signal sender=:1.6 -> dest=(null destination) serial=883 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-down"
signal sender=:1.6 -> dest=(null destination) serial=884 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-down"
signal sender=:1.6 -> dest=(null destination) serial=885 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-down"
signal sender=:1.6 -> dest=(null destination) serial=886 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-up"
signal sender=:1.6 -> dest=(null destination) serial=887 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-up"
signal sender=:1.6 -> dest=(null destination) serial=888 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-up"
signal sender=:1.6 -> dest=(null destination) serial=889 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-up"
signal sender=:1.6 -> dest=(null destination) serial=890 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-up"
signal sender=:1.6 -> dest=(null destination) serial=891 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-up"
signal sender=:1.6 -> dest=(null destination) serial=892 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-toggle"
signal sender=:1.6 -> dest=(null destination) serial=893 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-toggle"
signal sender=:1.6 -> dest=(null destination) serial=894 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-toggle"
signal sender=:1.6 -> dest=(null destination) serial=895 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-toggle"
signal sender=:1.6 -> dest=(null destination) serial=896 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-toggle"
signal sender=:1.6 -> dest=(null destination) serial=897 path=/org/freedesktop/Hal/devices/usb_device_5ac_21a_noserial_if0_logicaldev_input; interface=org.freedesktop.Hal.Device; member=Condition
   string "ButtonPressed"
   string "kbd-illum-toggle"
^C

@poliva
Copy link
Owner

poliva commented May 9, 2012

is your problem with keyboard brightness, or with video backlight? or both?
if with video, can you repeat the same, but this time increase and decrease the screen backlight? thanks.

@sid-the-sloth
Copy link
Author

nope, all other hardware buttons function properly (LCD brightness, sound, eject).

@poliva
Copy link
Owner

poliva commented May 9, 2012

ok, lightum is able to do adjust two things, depending on the value reported by the ambient light sensor (located on your MacBook's iSight camera):

(1) increase and decrease the keyboard brightness
(2) increase and decrease the video (screen) backlight

For (1) to work, it needs the proper applesmc module loaded in the kernel, access to '/sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness', and UPower installed: http://upower.freedesktop.org/

For (2) to work, it needs to access either one of the following:

  • gnome-settings-daemon dbus interface on gnome-based desktops (gnome, unity, mint...)
    or
  • KDE solid dbus interface on KDE4 http://solid.kde.org/

Having said that, please test both features separatedly, you can specify the '-w [num]' command switch to lightum. If the [num] given as a parameter is 1, lightum will only control keyboard brightness (and ignore screen backlight completely), if the [num] given as a parameter is 2, lightum will only control the screen backlight (and ignore the keyboard brightness completely). When debugging or tunning things, remember to specify also '-v -f -d 3' command line switches, so you'll get verbose output.

Now, if your hardware buttons to control the keyboard brightness are not able to control it, most probably lightum will not be able either, because your system is missing the UPower package (and it also needs integration with your desktop).

Hope this makes things clear, and help you troubleshoot the issues.

@sid-the-sloth
Copy link
Author

i will try to install upower package as you suggest.

in the mean time, i have to tell you that i am able to turn on/off/up/down the brightness if i do this (found a script on the web) -- the basic command is this:

to find current keyboard brightness value:


cat /sys/class/leds/smc::kbd_backlight/brightness

to set desired value (SETVAL is 0...255):


echo $SETVAL > /sys/class/leds/smc::kbd_backlight/brightness

so, my conclusion is that the applesmc works. my problem is that i have to run the above command with sudo.

for my own case, i don't need lightum to control the screen brightness, i would only need it to work in manual mode to hookup my keyboard buttons [F8, F9, F10] respectively as [toggle, down, up] keyboard brightness functions.

@poliva
Copy link
Owner

poliva commented May 9, 2012

upower should take care of that without the need for root access, that's why lightum uses its provided dbus interface.
Let me know how it goes when you have upower installed.

@sid-the-sloth
Copy link
Author

i can't install upower, it has deps on newer libimobiledevice (v.2 while in CentOS repos it is 0.9.7).

well, thanks for all your help. i guess for now i will manage with a modified sudoers file, custom keyboard shortcuts and this script:


http://pastebin.com/31caG7Wv

thanks :)

@poliva poliva closed this as completed May 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants