Sleep Quirk Debugger

Back to the main suspend page

Trying quirks

Using pm-suspend manually

While debeugging a machine, you may want to try quirks to see if the machine with survive a suspend-resume sequence. The pm-suspend and pm-hibernate scripts accept command line options that allow you to test new options.

[root@localhost ~]# pm-suspend --help
pm-action [options]

Options can change how the supend or hibernate is done.

Possible actions are:


Multiple quirks are specified on the command line (in no particular order), e.g.:

pm-suspend --quirk-vbestate-restore --quirk-s3-bios --quirk-s3-mode

The options specified here will only be used if added manually.

Trying quirks by editing FDI files

If the quirks are added to a local fdi file, then the quirks get used when invoking a suspend as a user using gnome-power-manager. The quirks have to be added this way to form a database of machine types to quirks.

HAL quirk names correspond to the pm-suspend quirk properties in the following way:

HAL quirk namepm-suspend option

Editing a local fdi file to test

Now we can edit an fdi file for a fictional IBM laptop.

[root@localhost ~]# cd /usr/share/hal/fdi/information/10freedesktop
[root@localhost 10freedesktop]# ls 20-video-quirk-pm-*
20-video-quirk-pm-acer.fdi     20-video-quirk-pm-ibm.fdi
20-video-quirk-pm-apple.fdi    20-video-quirk-pm-lenovo.fdi
20-video-quirk-pm-asus.fdi     20-video-quirk-pm-misc.fdi
20-video-quirk-pm-dell.fdi     20-video-quirk-pm-sony.fdi
20-video-quirk-pm-fujitsu.fdi  20-video-quirk-pm-toshiba.fdi
[root@localhost 10freedesktop]# gedit 20-video-quirk-pm-ibm.fdi

Now the following XML is displayed:

      <!-- X40 -->
      <match key="system.hardware.product" prefix="2371">
        <match key="system.hardware.version" string="ThinkPad X40">
          <merge key="power_management.quirk.s3_bios" type="bool">true</merge>
          <merge key="power_management.quirk.s3_mode" type="bool">true</merge>

Now, hypothetically, we want to add a Lenovo ThinkPad X41. We can find the values of system.hardware.* using:

[root@localhost 10freedesktop]# lshal | grep system.hardware
  system.hardware.product = '1807Y8J'  (string)
  system.hardware.serial = 'xxxxxxx'  (string)
  system.hardware.uuid = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'  (string)
  system.hardware.vendor = 'LENOVO'  (string)
  system.hardware.version = 'ThinkPad X41'  (string)

We can then add the following fdi segment:

      <!-- X40 -->
      <match key="system.hardware.product" string="1807Y8J">
        <match key="system.hardware.version" string="ThinkPad X41">
          <merge key="power_management.quirk.s3_bios" type="bool">true</merge>
          <merge key="power_management.quirk.s3_mode" type="bool">true</merge>

Then restart HAL using either:

[root@localhost ~]# /sbin/service haldaemon restart
Stopping HAL daemon:                                       [  OK  ]
Starting HAL daemon:                                       [  OK  ]


sudo /etc/init.d/hal restart

To check the quirk has been detected and is present you can do:

lshal | grep quirk

Hopefully then clicking on GNOME Power Manager 'suspend' buttons (or just pressing the keyboard shortcuts) should initiate a successful suspend. Please take the few extra steps to submit this data so that suspend just works for less technical users.


If you issue a pm-suspend command without any options then the fdi quirks will not be used. You still have to use the --quirk-dpms-on type arguments. There is discussion to add a new argument --auto to use the hal quirks, but this has not yet been included upstream.

Back to the main suspend page