Comment 175 for bug 95444

Revision history for this message
Bem Jones-Bey (ajani) wrote : Re: [Bug 95444] Re: No Screen Backlight Control; Notebooks (Vaio, Macbook, HP/Compaq, Samsung, Zepto et al.) with Nvidia Geforce8/Geforce9/Quadro series graphics

On 01/25/2009 05:13 AM, Shawe Ewahs wrote:
> Bem, I'm watching your changes and I want to know want thing: "nvidia8"
> detection on your files, works also with "nvidia9" and "quadro" series?
> It's also important for try to generalise the solution.
>
I just chose nvidia8 as a generic name for all cards that are affected
by this regardless if they are 8, 9, or quadro. It seemed to me that
since the solution was the same for all of them, we might as well have
one name. (Also, realize that Quadro is the name of an entire product
line, like GeForce, and thus just "Quadro" wouldn't be sufficient) If
you can come up with a better name, I'm perfectly fine with that.
> Or we need to add also similar to this?
>
> if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "nvidia8" ]; then
> value=$((`smartdimmer -g | awk '{print $3;}'`))
> value=$((($value /5)-1))
> exit ${value}
> fi
>
> if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "nvidia9" ]; then
> value=$((`smartdimmer -g | awk '{print $3;}'`))
> value=$((($value /5)-1))
> exit ${value}
> fi
>
> if [ "$HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD" = "quadro" ]; then
> value=$((`smartdimmer -g | awk '{print $3;}'`))
> value=$((($value /5)-1))
> exit ${value}
> fi
>
> I don't know if it is correct, but also similar to this must be added
> for a generalised solution.
>
If we do have different names that do the same thing, I'd suggest using
a shell case statement, like so:

case $HAL_PROP_LAPTOP_PANEL_ACCESS_METHOD in
nvidia8|nvidia9|quadro)
     value=$((`smartdimmer -g | awk '{print $3;}'`))
     value=$((($value /5)-1))
     exit ${value}
esac
> And for .fdi file, I think that we need change:
>
> <match
> key="/org/freedesktop/Hal/devices/computer:system.hardware.product"
> string="MODEL_NAME">
>
> for anything similar to:
>
> <match key=”pci.vendor_id” int=”0×8086″> <!– Intel Corporation –>
> <match key=”pci.product_id” int=”0×3582″> <!– 82852/855GM Integrated Graphics Device –>
> <match key=”pci.subsys_vendor_id” int=”0×1179″> <!– Toshiba America Info Systems –>
> <match key=”pci.subsys_product_id” int=”0×2″> <!– Unknown (0×0002) –>
>
> I found it on: http://blogs.gnome.org/hughsie/2006/06/
>
> In Device Manager, it must have any key that help to us to detect this
> information, no?
>
If I do the following on my laptop, I can dump all of the useful
information about my graphics card. Perhaps it would be useful to
collect this information from everyone that is affected by this so that
we can see what commonalities that we see. We may find that there are
only a couple of pci product ids that are affected, and that would be an
easy to maintain list.

[hup:Desktop]% hal-find-by-property --key info.linux.driver --string
'nvidia'
/org/freedesktop/Hal/devices/pci_10de_40c
[hup:Desktop]% hal-device /org/freedesktop/Hal/devices/pci_10de_40c
udi = '/org/freedesktop/Hal/devices/pci_10de_40c'
   pci.device_protocol = 0 (0x0) (int)
   info.linux.driver = 'nvidia' (string)
   pci.vendor = 'nVidia Corporation' (string)
   linux.sysfs_path =
'/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0' (string)
   info.vendor = 'nVidia Corporation' (string)
   info.subsystem = 'pci' (string)
   info.parent = '/org/freedesktop/Hal/devices/pci_8086_2a01' (string)
   pci.product = 'Quadro FX 570M' (string)
   info.product = 'Quadro FX 570M' (string)
   pci.linux.sysfs_path =
'/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0' (string)
   pci.subsys_vendor = 'Hewlett-Packard Company' (string)
   info.udi = '/org/freedesktop/Hal/devices/pci_10de_40c' (string)
   pci.product_id = 1036 (0x40c) (int)
   linux.hotplug_type = 2 (0x2) (int)
   pci.vendor_id = 4318 (0x10de) (int)
   linux.subsystem = 'pci' (string)
   pci.subsys_product_id = 12485 (0x30c5) (int)
   pci.subsys_vendor_id = 4156 (0x103c) (int)
   pci.device_class = 3 (0x3) (int)
   pci.device_subclass = 0 (0x0) (int)

--
Bem Jones-Bey (<email address hidden>)