HAL

Comment 94 for bug 277589

Revision history for this message
yleetiny (yleetiny) wrote : Re: [Bug 277589] Re: sony brighness on a geforce series older than 8 (nvclock works fine)

I was hoping that I've done the trick. The issue is that the
"10-laptop-panel-mgmt-policy.fdi" is loaded before
"10-sony-laptop-brightness.fdi" (which delete the wrong sysfspath").
Thus There is two solutions :
1- force the evaluation of "10-sony-laptop-brightness.fdi" before the other
by changing its order. But it may become non-standard.
2- Second approach is to copy&paste the appropriate part of
"10-laptop-panel-mgmt-policy.fdi" into "10-sony-laptop-brightness.fdi".
I will search throught the specifications if solution 1 can be done without
becoming non-standard. The thing to understand here is that the module
"sony-laptop" (which give you keys, etc. on VAIOs) also create a backlight
device with "linux.sys_fspath". This "sys_fspath" only work on old graphic
cards. "10-sony-laptop-brightness.fdi" remove this "linux.sys_fspath" since
it is the wrong one for our models.
2009/8/2 Alex <email address hidden>

> @Steve,
> You are absolutely right on all your points.
> I have 2 related to the bug udi:
>
> 1) Nvidia card pci
> 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)
>
> 2) the backlight
> udi = '/org/freedesktop/Hal/devices/computer_backlight'
> info.capabilities = {'laptop_panel'} (string list)
> info.category = 'laptop_panel' (string)
> info.interfaces = {'org.freedesktop.Hal.Device.LaptopPanel'} (string
> list)
> 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)
> org.freedesktop.Hal.Device.LaptopPanel.method_argnames =
> {'brightness_value', ''} (string list)
> org.freedesktop.Hal.Device.LaptopPanel.method_execpaths =
> {'hal-system-lcd-set-brightness', 'hal-system-lcd-get-brightness'} (string
> list)
> org.freedesktop.Hal.Device.LaptopPanel.method_names = {'SetBrightness',
> 'GetBrightness'} (string list)
> org.freedesktop.Hal.Device.LaptopPanel.method_signatures = {'i', ''}
> (string list)
>
> The first one (nvidia pci) is used in 10-sony-laptop-brightness.fdi to
> match the video card by its primary_video.product.
> The second one (the backlight) is used in 10-laptop-panel-mgmt-policy.fdi
> to add necessary config.
> In the latter fdi the following matching rules are used:
>
> <match key="info.category" string="laptop_panel">
> <match key="laptop_panel.access_method" compare_ne="custom">
> <match key="linux.sysfs_path" exists="false">
>
> According to the rules it should match the second udi (the
> backlight),and as the udi does not contain "linux.sysfs_path" then
> necessary attributes should be added. But on my (and most likely
> benste's) config it does not. May be there is a bug in the process of
> rules being applied? But if I change the last matching rule to
>
> <match key="linux.sysfs_path" exists="true">
>
> it works!
>
> Why do we need to check if "linux.sysfs_path" exists to apply the
> config? Can we check for "laptop_panel.access_method"=sony-nvidia, as we
> make this assingment in 10-sony-laptop-brightness.fdi?
>
> I guess the rule should look like this (I am not an expert, but the
> complete beginner):
>
> <match key="laptop_panel.access_method" string="sony-nvidia">
>
> Your thoughts?
>
> P.S.
> I've just checked the above rule. It does not work. But the following
> <match key="laptop_panel.access_method" exists="true">
> works!
>
> --
> 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 direct subscriber
> of the bug.
>