Gentoo Wiki ArchivesGentoo Wiki

Hal_quirks

Contents

Introduction

This is an example of how to configure hal quirks to fix suspend to ram problems with Dell Inspiron 600m laptops. The problem is caused by the graphics card, in this case an ATI radeon mobility 9000. This also may apply to other laptops with radeon graphics cards.

The Problem

The laptop is a Dell Inspiron 600m. The machine is routinely suspended to ram using the gnome-power-manager applet. Suspend to ram seems to work just fine running kernel 2.6.25-tuxonice-r1. However, the display would randomly freeze after resuming from suspend to ram. The mouse pointer would move as normal but neither the keyboard nor mouse clicks would do anything. The system would require a hard reboot (alt-SysRq B).

A very telling symptom that things weren't quite right is that while resuming, the contents of any firefox window would show up as very colorful gibberish for a second or two.

hal quirks

Hal allows for non-standard requirements for different machines, they're called hal quirks. A quirks database is distributed with hal but odds are it doesn't include your special case. To check if your machine is already in hal's database check directory:

 /usr/share/hal/fdi/information/10freedesktop/

Add new quirk

To fix the resuming problem with the Inspiron 600m we need to configure hal to use vbetool to save the state of the card. Add this file to /etc/hal/fdi/information/

File: /etc/hal/fdi/information/20-video-quirk-pm-inspiron600m.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> 
<deviceinfo version="0.2">
  <device>
    <match key="system.hardware.vendor" prefix="Dell">
      <match key="system.hardware.product" prefix="Inspiron">
	<match key="system.hardware.product" string="Inspiron 600m">
          <merge key="power_management.quirk.vbe_post" type="bool">true</merge>
          <merge key="power_management.quirk.vbestate_restore" type="bool">true</merge>
        </match>
      </match>
    </match>
  </device>
</deviceinfo>


You may need to enter different hardware vendor or product information. Check yours with:

Code: Check computer's information
# lshal | grep 'system.hardware'
  system.hardware.product = 'Inspiron 600m'  (string)
  system.hardware.serial = 'XXXXXXXX'  (string)
  system.hardware.uuid = 'XXXXXXXXXXXXXXXXXXX'  (string)
  system.hardware.vendor = 'Dell Computer Corporation'  (string)


After adding your new .fdi file restart hal.

Code: Restart hal
# /etc/init.d/hald restart


Now check if hal is aware of the new quirks:

Code: Check quirks
# lshal | grep 'quirk'
  power_management.quirk.vbe_post = true  (bool)
  power_management.quirk.vbestate_restore = true  (bool)

Links

Retrieved from "http://www.gentoo-wiki.info/Hal_quirks"

Last modified: Fri, 05 Sep 2008 19:44:00 +1000 Hits: 1,913

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.