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:
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):
@Steve,
You are absolutely right on all your points.
I have 2 related to the bug udi:
1) Nvidia card pci op/Hal/ devices/ pci_10de_ 1d8' op/Hal/ devices/ pci_8086_ 27a1' (string) op/Hal/ devices/ pci_10de_ 1d8' (string) hotplug_ type = 2 (0x2) (int) pci0000: 00/0000: 00:01.0/ 0000:01: 00.0' (string) protocol = 0 (0x0) (int) subclass = 0 (0x0) (int) sysfs_path = '/sys/devices/ pci0000: 00/0000: 00:01.0/ 0000:01: 00.0' (string) product_ id = 33263 (0x81ef) (int) vendor_ id = 4173 (0x104d) (int)
udi = '/org/freedeskt
info.linux.driver = 'nvidia' (string)
info.parent = '/org/freedeskt
info.product = 'G72M [GeForce Go 7400]' (string)
info.subsystem = 'pci' (string)
info.udi = '/org/freedeskt
info.vendor = 'nVidia Corporation' (string)
linux.
linux.subsystem = 'pci' (string)
linux.sysfs_path = '/sys/devices/
pci.device_class = 3 (0x3) (int)
pci.device_
pci.device_
pci.linux.
pci.product = 'G72M [GeForce Go 7400]' (string)
pci.product_id = 472 (0x1d8) (int)
pci.subsys_
pci.subsys_vendor = 'Sony Corporation' (string)
pci.subsys_
pci.vendor = 'nVidia Corporation' (string)
pci.vendor_id = 4318 (0x10de) (int)
2) the backlight op/Hal/ devices/ computer_ backlight' op.Hal. Device. LaptopPanel' } (string list) op/Hal/ devices/ computer' (string) op/Hal/ devices/ computer_ backlight' (string) panel.access_ method = 'sony-nvidia' (string) panel.num_ levels = 18 (0x12) (int) hotplug_ type = 2 (0x2) (int) op.Hal. Device. LaptopPanel. method_ argnames = {'brightness_ value', ''} (string list) op.Hal. Device. LaptopPanel. method_ execpaths = {'hal-system- lcd-set- brightness' , 'hal-system- lcd-get- brightness' } (string list) op.Hal. Device. LaptopPanel. method_ names = {'SetBrightness', 'GetBrightness'} (string list) op.Hal. Device. LaptopPanel. method_ signatures = {'i', ''} (string list)
udi = '/org/freedeskt
info.capabilities = {'laptop_panel'} (string list)
info.category = 'laptop_panel' (string)
info.interfaces = {'org.freedeskt
info.parent = '/org/freedeskt
info.product = 'Generic Backlight Device' (string)
info.subsystem = 'backlight' (string)
info.udi = '/org/freedeskt
laptop_
laptop_
linux.
linux.subsystem = 'backlight' (string)
org.freedeskt
org.freedeskt
org.freedeskt
org.freedeskt
The first one (nvidia pci) is used in 10-sony- laptop- brightness. fdi to match the video card by its primary_ video.product. panel-mgmt- policy. fdi to add necessary config.
The second one (the backlight) is used in 10-laptop-
In the latter fdi the following matching rules are used:
<match key="info.category" string= "laptop_ panel"> panel.access_ method" compare_ ne="custom" > sysfs_path" exists="false">
<match key="laptop_
<match key="linux.
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. panel.access_ method" exists="true">
I've just checked the above rule. It does not work. But the following
<match key="laptop_
works!