I got it working!!!

So, here is my investigation:

1) I have exactly the same 
/usr/share/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi as you 
attached, so renaming it has no effect.
2) I've carefully looked through the 10-laptop-panel-mgmt-policy.fdi file:

<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">

  <device>
    <match key="info.category" string="laptop_panel">
      <!-- only set if the laptop_panel.access_method is not custom -->
      <match key="laptop_panel.access_method" compare_ne="custom">
        <!-- for the generic sysfs interfaces -->
        <match key="linux.sysfs_path" exists="true">
          <append key="info.addons" 
type="strlist">hald-addon-generic-backlight</append>
        </match>
        <!-- for all the procfs related brightness interfaces -->
        <match key="linux.sysfs_path" exists="false">
          <append key="info.interfaces" 
type="strlist">org.freedesktop.Hal.Device.LaptopPanel</append>

          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" 
type="strlist">SetBrightness</append>
          <append 
key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" 
type="strlist">i</append>
          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" 
type="strlist">brightness_value</append>
          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" 
type="strlist">hal-system-lcd-set-brightness</append>

          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" 
type="strlist">GetBrightness</append>
          <append 
key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" 
type="strlist"></append>
          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" 
type="strlist"></append>
          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" 
type="strlist">hal-system-lcd-get-brightness</append>
        </match>
      </match>
    </match>
  </device>

</deviceinfo>

* and looked through my output of the following command:

de...@defue-laptop:~$ hal-find-by-property --key info.category --string 
laptop_panel | xargs lshal -u
udi = '/org/freedesktop/Hal/devices/computer_backlight'
  info.addons = {'hald-addon-generic-backlight'} (string list)
  info.capabilities = {'laptop_panel'} (string list)
  info.category = 'laptop_panel' (string)
  info.parent = '/org/freedesktop/Hal/devices/computer' (string)
  info.product = 'Generic Backlight Device' (string)
  info.subsystem = 'backlight' (string)
  info.udi = '/org/freedesktop/Hal/devices/computer_backlight' (string)
  laptop_panel.access_method = 'sony-nvidia' (string)
  laptop_panel.num_levels = 18 (0x12) (int)
  linux.hotplug_type = 2 (0x2) (int)
  linux.subsystem = 'backlight' (string)

*Obvously it maches the rule from 10-laptop-panel-mgmt-policy.fdi:

<!-- for the generic sysfs interfaces -->
<match key="linux.sysfs_path" exists="true">
          <append key="info.addons" 
type="strlist">hald-addon-generic-backlight</append>
</match>

* and doesn't match the opposite rule

<!-- for all the procfs related brightness interfaces -->
        <match key="linux.sysfs_path" exists="false">
          <append key="info.interfaces" 
type="strlist">org.freedesktop.Hal.Device.LaptopPanel</append>

          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" 
type="strlist">SetBrightness</append>
          <append 
key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" 
type="strlist">i</append>
          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" 
type="strlist">brightness_value</append>
          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" 
type="strlist">hal-system-lcd-set-brightness</append>

          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_names" 
type="strlist">GetBrightness</append>
          <append 
key="org.freedesktop.Hal.Device.LaptopPanel.method_signatures" 
type="strlist"></append>
          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_argnames" 
type="strlist"></append>
          <append key="org.freedesktop.Hal.Device.LaptopPanel.method_execpaths" 
type="strlist">hal-system-lcd-get-brightness</append>
        </match>

On my system this behaviour is due to "linux.sysfs_path" already exists.
Here is the appropriate lshal output:

udi = '/org/freedesktop/Hal/devices/pci_10de_1d8'
  info.linux.driver = 'nvidia'  (string)
  info.parent = '/org/freedesktop/Hal/devices/pci_8086_27a1'  (string)
  info.product = 'G72M [GeForce Go 7400]'  (string)
  info.subsystem = 'pci'  (string)
  info.udi = '/org/freedesktop/Hal/devices/pci_10de_1d8'  (string)
  info.vendor = 'nVidia Corporation'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'pci'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0'  
(string)
  pci.device_class = 3  (0x3)  (int)
  pci.device_protocol = 0  (0x0)  (int)
  pci.device_subclass = 0  (0x0)  (int)
  pci.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0'  
(string)
  pci.product = 'G72M [GeForce Go 7400]'  (string)
  pci.product_id = 472  (0x1d8)  (int)
  pci.subsys_product_id = 33263  (0x81ef)  (int)
  pci.subsys_vendor = 'Sony Corporation'  (string)
  pci.subsys_vendor_id = 4173  (0x104d)  (int)
  pci.vendor = 'nVidia Corporation'  (string)
  pci.vendor_id = 4318  (0x10de)  (int)

*As you can see "linux.sysfs_path = 
'/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0'  (string)" is definied.
So if you change rules matches to the opposite (see attached file) - IT WORKS!!!

So, the workaround might be the following:

1) Install sony-smartdimmer_0.4.deb from the #67 comment
2) Check if the brightness change works, if it does you are done :)
3) Otherwise replace your 
/usr/share/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi with the 
attached one or change 2 rules "<match key="linux.sysfs_path" 
exists="boolean">" to the opposite values (1: exists="true", 2: exists="false")

I AM NOT SURE THAT IT IS THE CORRECT WAY OF FIXING THE ISSUE, SO USE IT
ON YOUR OWN RISK.

** Attachment added: "10-laptop-panel-mgmt-policy.fdi"
   http://launchpadlibrarian.net/29770446/10-laptop-panel-mgmt-policy.fdi

-- 
sony brighness on a geforce series older than 8 (nvclock works fine)
https://bugs.launchpad.net/bugs/277589
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to