# ThinkPad: problems with HAL



## w1k0 (Sep 27, 2009)

I installed on my ThinkPad T60 FreeBSD 7.2 with GENERIC kernel plus a few ALTQ options and I'm unable to force HAL to use FDI files. In result I can't use different devices. 

I followed that FAQ: Hardware Abstraction Layer (HAL) FAQ... 

I put in /etc/rc.conf file these lines:


```
dbus_enable="YES"
hald_enable="YES"
```

I put in /usr/local/share/hal/fdi/preprobe/20thirdparty/ these two FDI files:

disable-touchpad.fdi 

```
<match key="info.product" string="SynPS/2 Synaptics TouchPad">
    <merge key="input.x11_options.TouchpadOff" type="string">1</merge>
</match>
```

and

cat mouse-wheel.fdi 

```
<match key="info.product" string="TPPS/2 IBM TrackPoint">
    <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
    <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
    <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
    <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
    <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
    <merge key="input.x11_options.EmulateWheelTimeout" type="string">200</merge>
</match>
```

After each change I restarted HAL:

# /usr/local/etc/rc.d/hald restart

Without any result -- my FDI files don't work. I tried also some FDI files provided with FreeBSD:


10-x11-input.fdi 

```
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keyboard">
      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.x11_driver" type="string">kbd</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
        <merge key="input.xkb.layout" type="string">pl</merge>
      </match>
    </match>
  </device>
</deviceinfo>
```

and

10-x11-synaptics.fdi 

```
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.SHMConfig" type="string">true</merge>
        <merge key="input.x11_options.MaxTapMove" type="string">2000</merge>
        <merge key="input.x11_options.VertEdgeScroll" type="string">true</merge>
        <merge key="input.x11_options.VertTwoFingerScroll" type="string">true</merge>
        <merge key="input.x11_options.HorizTwoFingerScroll" type="string">true</merge>
        <merge key="input.x11_options.CircularScrolling" type="string">true</merge>
    </match>
  </device>
</deviceinfo>
```

Independently of the changes I made in the system the result of the command lshal -t is always the same:


```
computer
  acpi_acad_0
  acpi_button_0
  acpi_lid_0
  acpi_tz_0
  acpi_tz_1
  battery_0
  cpu_0
  cpu_1
  atkbdc_0
    atkbd_0
    psm_0
  sio_0
    sio_0_serial_platform_0
  pci_8086_27a0
  pci_8086_27a1
    pci_1002_7149
      drm_0
  pci_8086_27d8
  pci_8086_27d0
    pci_8086_109a
      net_00_15_58_c5_7f_22
  pci_8086_27d2
    pci_8086_4227
  pci_8086_27d4
  pci_8086_27d6
  pci_8086_27c8
    usb_device_0_0_noserial
      usb_device_0_0_noserial_if0
  pci_8086_27c9
    usb_device_0_0_noserial_0
      usb_device_0_0_noserial_0_if0
  pci_8086_27ca
    usb_device_0_0_noserial_1
      usb_device_0_0_noserial_1_if0
  pci_8086_27cb
    usb_device_0_0_noserial_2
      usb_device_0_0_noserial_2_if0
  pci_8086_27cc
    usb_device_0_0_noserial_3
      usb_device_0_0_noserial_3_if0
  pci_8086_2448
    pci_104c_ac56
      cardbus_0
      pccard_0
  pci_8086_27b9
  pci_8086_27df
    ide_host_0
      ide_0_0
        storage_serial_KZ08A293817
  pci_8086_27c5
    pci_8086_27c5_storage
      volume_part1_size_7937008128
        volume_size_402653184
        volume_size_1121110016
        volume_size_603979776
        volume_size_335544320
        volume_size_5473720832
      volume_uuid_c50f1350_2632_439c_b7b0_65711cbf7df7
      volume_uuid_9929fd29_654b_45ba_8459_9f67254fafa7
      volume_uuid_47fc9231_fce5_49f6_96ed_5a945f2611e1
  pci_8086_27da
```

What can I do to force HAL to read FDI files?


----------



## w1k0 (Sep 28, 2009)

I just discovered an error in my 10-x11-synaptics.fdi file. I put the line defining keyboard layout inside the Linux section. In result FreeBSD ignored that switch. This is the correct keyboard definition:

10-x11-synaptics.fdi

```
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keyboard">
      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.x11_driver" type="string">kbd</merge>
      <merge key="input.xkb.layout" type="string">pl</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.x11_driver" type="string">evdev</merge>
      </match>
    </match>
  </device>
</deviceinfo>
```

HAL reads the above file and allows to write Polish-language texts. So HAL in my system works properly but there are some problems with my FDI files. As yet I repaired one FDI file.


----------



## w1k0 (Sep 28, 2009)

I tried FDI file disabling TouchPad. It uses only one merge key so it's relatively simple. I put it in that directory: 

/usr/local/share/hal/fdi/preprobe/20thirdparty/

I tested it with ten different match keys: 


```
<match key="info.product" string="SynPS/2 Synaptics TouchPad">
    <match key="info.product" string="Synaptics TouchPad">
    <match key="info.product" string="TouchPad">
    <match key="info.product" string="Synaptics">
    <match key="info.product" string="SynPS/2">
    <match key="info.product" string="SynPS">
    <match key="info.capabilities" contains="input.touchpad">
    <match key="info.capabilities" contains="input.synaptics">
    <match key="info.capabilities" contains="input.synps/2"-->
    <match key="info.capabilities" contains="input.synps">
```

After each change I reloaded HAL with that command:

# /usr/local/etc/rc.d/hald restart

and I restarted X Window. 

Here's my 10-disable-touchpad.fdi:


```
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
  <device>
    <!-- match key="info.product" string="SynPS/2 Synaptics TouchPad" -->
    <!-- match key="info.product" string="Synaptics TouchPad" -->
    <!-- match key="info.product" string="TouchPad" -->
    <!-- match key="info.product" string="Synaptics" -->
    <!-- match key="info.product" string="SynPS/2" -->
    <!-- match key="info.product" string="SynPS" -->
    <match key="info.capabilities" contains="input.touchpad">
    <!-- match key="info.capabilities" contains="input.synaptics" -->
    <!-- match key="info.capabilities" contains="input.synps/2"-->
    <!-- match key="info.capabilities" contains="input.synps" -->
        <merge key="input.x11_options.TouchpadOff" type="string">1</merge>
    </match>
  </device>
</deviceinfo>
```

In any case I managed to disable TouchPad. Assuming that I can't disable it with that simple FDI file I don't wonder I'm unable to implement more sophisticated TouchPad configuration with other FDI files. There's something wrong with my FDI files or HAL and I don't know how can I repair it.


----------



## Beastie (Sep 28, 2009)

Are you sure hald is restarting? Try *forcerestart*ing it, instead of just restarting it.

I have many problems with HAL myself. Some things work and other simple ones (like assigning a compose key) don't.
Since it has become a dependency for Xorg, all I've been witnessing is its odd behavior, and I wonder how much time I'll be able to bare with it before I discard it for good.


----------



## w1k0 (Sep 28, 2009)

Hi Beastie! Nice nick...

I tried all the above variants once again restarting HAL with the command:

# /usr/local/etc/rc.d/hald forcerestart

I did it twice. First time with empty /boot/loader.conf and second time with /boot/loader.conf including these lines:


```
hw.psm.synaptics_support="1"
debug.psm.loglevel="4"
```

All these attempts failed. 

Your experience with HAL is a bad prognostics. In Linux my FDI files simply work. In FreeBSD it's a matter of some esoteric knowledge that I didn't possess yet. 

I'm new to FreeBSD. I'm testing it for less than ten days. The most of that time I spent trying to force to work HAL. The only device I managed to configure using HAL is Polish-language keyboard. The main device I'd like to configure with HAL is TrackPoint on my ThinkPad.


----------



## w1k0 (Sep 28, 2009)

I tested HAL with that command:

# lshal | grep info.product

I tried it with a few FDI files in /usr/local/share/hal/fdi/preprobe/20thirdparty/ directory and without any FDI file. The result was the same in both cases:


```
info.product = 'Computer'  (string)
  info.product = 'AC Adapter'  (string)
  info.product = 'Sleep Button'  (string)
  info.product = 'Ignored Device'  (string)
  info.product = 'Thermal Zone'  (string)
  info.product = 'Thermal Zone'  (string)
  info.product = 'ACPI Control Method Battery'  (string)
  info.product = 'ACPI CPU'  (string)
  info.product = 'ACPI CPU'  (string)
  info.product = 'Keyboard controller (i8042)'  (string)
  info.product = 'AT Keyboard'  (string)
  info.product = 'PS/2 Mouse'  (string)
  info.product = 'Generic IRDA-compatible device'  (string)
  info.product = 'Generic IRDA-compatible device'  (string)
  info.product = 'Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub'  (string)
  info.product = 'Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port'  (string)
  info.product = 'M52 [Mobility Radeon X1300]'  (string)
  info.product = 'Direct Rendering Manager Device'  (string)
  info.product = '82801G (ICH7 Family) High Definition Audio Controller'  (string)
  info.product = '82801G (ICH7 Family) PCI Express Port 1'  (string)
  info.product = '82573L Gigabit Ethernet Controller'  (string)
  info.product = 'Networking Interface'  (string)
  info.product = '82801G (ICH7 Family) PCI Express Port 2'  (string)
  info.product = 'PRO/Wireless 3945ABG [Golan] Network Connection'  (string)
  info.product = '82801G (ICH7 Family) PCI Express Port 3'  (string)
  info.product = '82801G (ICH7 Family) PCI Express Port 4'  (string)
  info.product = '82801G (ICH7 Family) USB UHCI Controller #1'  (string)
  info.product = 'UHCI root hub'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) USB UHCI Controller #2'  (string)
  info.product = 'UHCI root hub'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) USB UHCI Controller #3'  (string)
  info.product = 'UHCI root hub'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) USB UHCI Controller #4'  (string)
  info.product = 'UHCI root hub'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) USB2 EHCI Controller'  (string)
  info.product = 'EHCI root hub'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801 Mobile PCI Bridge'  (string)
  info.product = 'PCI1510 PC card Cardbus Controller'  (string)
  info.product = 'CardBus bus'  (string)
  info.product = '16-bit PCCard bus'  (string)
  info.product = '82801GBM (ICH7-M) LPC Interface Bridge'  (string)
  info.product = '82801G (ICH7 Family) IDE Controller'  (string)
  info.product = 'ATA channel 0'  (string)
  info.product = 'IDE Device (Master)'  (string)
  info.product = 'HL-DT-ST DVDRAM GSA-4083N'  (string)
  info.product = '82801GBM/GHM (ICH7 Family) SATA AHCI Controller'  (string)
  info.product = 'Storage Device'  (string)
  info.product = 'Volume'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = 'Volume'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = 'Volume (reiserfs)'  (string)
  info.product = 'Volume (reiserfs)'  (string)
  info.product = 'Volume (swap)'  (string)
  info.product = '82801G (ICH7 Family) SMBus Controller'  (string)
```

HAL accepts FDI file with keyboard configuration because it sees ``AT Keyboard'' product. It ignores TrackPoint and TouchPad related FDI files because it doesn't see these products.


----------



## w1k0 (Sep 28, 2009)

This is the result of the same command used with Slackware Linux:


```
info.product = 'Computer'  (string)
  info.product = 'Intel(R) Core(TM) Duo CPU      T2400  @ 1.83GHz'  (string)
  info.product = 'Intel(R) Core(TM) Duo CPU      T2400  @ 1.83GHz'  (string)
  info.product = 'ALSA Timer Device'  (string)
  info.product = 'OSS Sequencer Device'  (string)
  info.product = 'OSS Sequencer Device'  (string)
  info.product = 'ALSA Sequencer Device'  (string)
  info.product = 'ThinkPad Extra Buttons'  (string)
  info.product = 'Macintosh mouse button emulation'  (string)
  info.product = 'Generic Backlight Device'  (string)
  info.product = 'Sleep Button (CM)'  (string)
  info.product = 'Lid Switch'  (string)
  info.product = 'Video Bus'  (string)
  info.product = 'Generic AC Adapter Device'  (string)
  info.product = 'Power Button (FF)'  (string)
  info.product = 'PnP Device (ATM1200)'  (string)
  info.product = 'IBM infrared communications device'  (string)
  info.product = 'PnP Device (IBM0057)'  (string)
  info.product = 'IBM Enhanced (101/102-key, PS/2 mouse support)'  (string)
  info.product = 'AT Real-Time Clock'  (string)
  info.product = 'Math Coprocessor'  (string)
  info.product = 'AT-style speaker sound'  (string)
  info.product = 'AT DMA Controller'  (string)
  info.product = 'PnP Device (PNP0103)'  (string)
  info.product = 'General ID for reserving resources required by PnP motherboard registers. (Not device specific.)'  (string)
  info.product = 'PnP Device (PNP0a08)'  (string)
  info.product = 'System Board'  (string)
  info.product = 'Platform Device (vesafb.0)'  (string)
  info.product = 'Platform Device (thinkpad_hwmon)'  (string)
  info.product = 'Platform Device (thinkpad_acpi)'  (string)
  info.product = 'Platform Device (serial8250)'  (string)
  info.product = 'Platform Device (serial8250)'  (string)
  info.product = 'Platform Device (regulatory.0)'  (string)
  info.product = 'Platform Device (pcspkr)'  (string)
  info.product = 'Platform Device (i8042)'  (string)
  info.product = 'i8042 AUX port'  (string)
  info.product = 'SynPS/2 Synaptics TouchPad'  (string)
  info.product = 'Synaptics pass-through'  (string)
  info.product = 'TPPS/2 IBM TrackPoint'  (string)
  info.product = 'i8042 KBD port'  (string)
  info.product = 'AT Translated Set 2 keyboard'  (string)
  info.product = 'Platform Device (dock.2)'  (string)
  info.product = 'Platform Device (dock.1)'  (string)
  info.product = 'Platform Device (dock.0)'  (string)
  info.product = '82801G (ICH7 Family) SMBus Controller'  (string)
  info.product = '82801GBM/GHM (ICH7 Family) SATA AHCI Controller'  (string)
  info.product = 'SCSI Host Adapter'  (string)
  info.product = 'SCSI Host Adapter'  (string)
  info.product = 'SCSI Host Adapter'  (string)
  info.product = 'SCSI Host Adapter'  (string)
  info.product = 'SCSI Host Adapter'  (string)
  info.product = 'SCSI Device'  (string)
  info.product = 'SCSI Generic Interface'  (string)
  info.product = 'WDC WD1600BEVS-0'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = 'Volume'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = 'Volume (swap)'  (string)
  info.product = 'Volume (reiserfs)'  (string)
  info.product = 'Volume (reiserfs)'  (string)
  info.product = 'Volume (ufs)'  (string)
  info.product = '82801G (ICH7 Family) IDE Controller'  (string)
  info.product = 'IDE device (master)'  (string)
  info.product = 'HL-DT-ST DVDRAM GSA-4083N'  (string)
  info.product = '82801GBM (ICH7-M) LPC Interface Bridge'  (string)
  info.product = '82801 Mobile PCI Bridge'  (string)
  info.product = 'PCI1510 PC card Cardbus Controller'  (string)
  info.product = '82801G (ICH7 Family) USB2 EHCI Controller'  (string)
  info.product = '2.0 root hub'  (string)
  info.product = 'USB Raw Device Access'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) USB UHCI Controller #4'  (string)
  info.product = '1.1 root hub'  (string)
  info.product = 'USB Raw Device Access'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) USB UHCI Controller #3'  (string)
  info.product = '1.1 root hub'  (string)
  info.product = 'USB Raw Device Access'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) USB UHCI Controller #2'  (string)
  info.product = '1.1 root hub'  (string)
  info.product = 'USB Raw Device Access'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) USB UHCI Controller #1'  (string)
  info.product = '1.1 root hub'  (string)
  info.product = 'USB Raw Device Access'  (string)
  info.product = 'USB Hub Interface'  (string)
  info.product = '82801G (ICH7 Family) PCI Express Port 4'  (string)
  info.product = '82801G (ICH7 Family) PCI Express Port 3'  (string)
  info.product = '82801G (ICH7 Family) PCI Express Port 2'  (string)
  info.product = 'PRO/Wireless 3945ABG [Golan] Network Connection'  (string)
  info.product = 'Networking Wireless Control Interface'  (string)
  info.product = 'WLAN Interface'  (string)
  info.product = 'Intel PRO/Wireless WLAN Switch'  (string)
  info.product = '82801G (ICH7 Family) PCI Express Port 1'  (string)
  info.product = '82573L Gigabit Ethernet Controller'  (string)
  info.product = 'Networking Interface'  (string)
  info.product = '82801G (ICH7 Family) High Definition Audio Controller'  (string)
  info.product = 'HDA Intel Sound Card'  (string)
  info.product = 'AD198x Digital ALSA Playback Device'  (string)
  info.product = 'AD198x Analog ALSA Playback Device'  (string)
  info.product = 'AD198x Analog ALSA Capture Device'  (string)
  info.product = 'AD198x Analog OSS Control Device'  (string)
  info.product = 'HDA Intel ALSA hardware specific Device'  (string)
  info.product = 'AD198x Analog OSS PCM Device'  (string)
  info.product = 'HDA Intel ALSA Control Device'  (string)
  info.product = 'AD198x Analog OSS PCM Device'  (string)
  info.product = 'AD198x Analog OSS PCM Device'  (string)
  info.product = 'Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port'  (string)
  info.product = 'M52 [Mobility Radeon X1300]'  (string)
  info.product = 'Direct Rendering Manager Device'  (string)
  info.product = 'Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub'  (string)
```

FreeBSD's HAL sees 62 devices. Slackware's HAL sees 114 devices. 

Among devices lacking in FreeBSD and appearing in Slackware Linux there are:


```
info.product = 'SynPS/2 Synaptics TouchPad'  (string)
  info.product = 'TPPS/2 IBM TrackPoint'  (string)
```

So it seems it's impossible to configure IBM TrackPoint and Synaptics TouchPad with FreeBSD 7.2 and HAL.


----------



## AlexVader (Oct 15, 2009)

*Intel Pro Wireless 3945*

Hi w1k0

First of all I would like to apologize for introducing this issue here a bit off topicbut I seached in "mobile computing" for "Intel Pro Wireless" and found nothing about its configuration under FreeBSD 7.2...   :-(

Once more, please excuse me forum users...




			
				w1k0 said:
			
		

> I tested HAL with that command:
> 
> # lshal | grep info.product
> 
> ...




I Have noticed that your laptop has the same brand of wifi card that I have in my Asus F3jr...  an Intel Pro Wireless 3945 ABG

May you please detail what have you done to have it configured under FreeBSD 7.2...?

Thanks in advance

Best Regards


Alex


----------



## honk (Oct 15, 2009)

@AlexVader: I have the same wireless card in my Thinkpad X61. It is supported by the wpi driver. The manpage for wpi and the wireless chapter in the FreeBSD handbook should tell you everything about how to configure it.


----------



## w1k0 (Oct 30, 2009)

@AlexVader

Sorry for the late answer. I came back to my Slackware after one week of trying FreeBSD. Unfortunately I don't use WiFi. I use DSL cable modem. So I can't answer to your question.


----------

