To avoid too much repetition, the basics are laid out here:
http://forum.mandriva.com/en/viewtopic.php?t=115485
here's a link to lphdisk:
http://www.procyon.com/~pda/lphdisk/
To make this work with Mageia, you also have to change some kernel settings:
- disable APIC
- disable ACPI
- edit /boot/menu/grub/menu.lst and add "nomodeset" and "apm=on" somewhere in the line describing your boot options. I put "nomodeset" before "noapic" and "apm=on" after "acpi=off"
- reboot. Make sure apmd is running. If it is, you're set; the Thinkpad keys for sleep, blank screen, and hibernate should all work now. Incidentally, this also fixes a problem where I was experiencing trippy rainbow screen corruption just before shutdown.