[PATCH] fix broken logic for system.formfactor=laptop

Danny Kukawka danny.kukawka at web.de
Tue Aug 14 07:26:16 PDT 2007


Hi,

there are problems on laptops if the smbios.chassis.type is not directly 
mapped from the smbios to 'laptop' (e.g. smbios tell it's 'Unknown').

In this case HAL currently call as next coldplug_synthesize_events() after the 
smbios probing and first then start to synthesizing the ACPI events/devices. 
But in the ACPI code HAL set system.formfactor=laptop, if it isn't already 
detected as Laptop (e.g. if the machine has a battery).

The problem is: all other devices as e.g. the WLAN device get synthesized 
before the ACPI devices. Hence all fdi-file checks for laptop can fail with 
the result: 
 * the properties get not set 
 * e.g. the IPW killswitch device get not spawned 
 * the ACPI input devices as e.g. lid/power/suspend button are not setup

The attached patch fixes this problem by synthesize the ACPI events before 
call coldplug_synthesize_events(). It worked for me and I could not find any 
problems in lshal.

Danny

 osspec.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-fix-computer_probing.diff
Type: text/x-diff
Size: 1089 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20070814/341f4e74/attachment.diff 


More information about the hal mailing list