Skip to main content

Suspend and boot problems - X220 and Oneiric 11.10

My brand new Lenovo X220 on Ubuntu Oneiric 11.10 had this weird problem where it would boot occasionally into Ubuntu, but other times it would start booting, but reboot before it hit grub or Xorg. Upon reboot, it would go to grub, but hang there waiting for me to hit enter (i.e. didn't auto boot).

Suspend didn't work either. It would always suspend, but upon opening the lid, it would reboot, and hang at grub (just like the booting problem).

I initially thought it was due to the Active Protection System that stops the hard drive from being damaged -  and wanted to turn it off (due to having an SSD). I also played with CPU and PCI power management settings in the BIOS. Nothing worked.

I then researched kernel options that could work. I found the kernel option for disabling extended C-States. This worked great! 5 days so far without a single reboot either booting or coming out of suspend.

To do it:

  • Edit /etc/default/grub (as root)

  • sudo update-grub
  • reboot


Popular posts from this blog

Compiling tun.ko for Android - OpenVPN

I have a Xoom, and a Galaxy S, and need to be able to compile my own tun.ko for the kernel version I have. As you all know, if the kernel version of the module you are trying to insert isn't the same, it won't insert, and will give you errors like:

<3>[95175.874872] tun: version magic ' SMP preempt mod_unload ARMv7 ' should be ' SMP preempt mod_unload ARMv7 '

in dmesg. We need to compile the module for the right version of the kernel

Download the Kernel source - normally from The Xoom can be found at, and the Galaxy S can be found at Use

$ pwd
$ git clone to clone the Xoom kernel sourceCopy your old kernel config from your device

$ pwd
$ adb pull /proc/config.gz
$ gunzip config.gz
$ mv config.gz tegr…

Renewing Puppet CA and puppet master certificates

My two Puppet deployments are just about to turn 5 years old, and as such, the CA and puppet master certificates are just about to expire.

The documentation online seem to suggest the only way to renew these certs is by deleting the /var/lib/puppet/ssl directory and getting Puppet to renew them. This would mean renewing all the certificates of all the nodes at the same time. Even the official Puppet docs suggest this is the way too.(

The way I will describe renews the CA certificate and puppetmaster certificate in a way which is still trusted by every existing host.

First, copy the important files to a new directory# mkdir /root/puppet_renewal # cd /root/puppet_renewal # mkdir /root/puppet_renewal/ca # mkdir /root/puppet_renewal/puppetmaster # mkdir /root/puppet_renewal/puppetmaster/private_keys # mkdir /root/puppet_renewal/puppetmaster/certs # cp /var/lib/puppet/ssl/ca/ca_key.pem /root/puppet_renewal/ca # cp /var/lib/…

Preseeding Ubuntu Natty 11.04

I decided to start this blog because of the never ending battles I have with remembering what I have conquered before, and thinking that other people have the same problems.

The specific problem I was working on when I came to this conclusion was preseeding a Natty netboot install. EVERY version of Ubuntu brings more preseeding problems - something always changes, causing you to get prompted for something new, when the previous release worked without a hitch.
This time (going from Lucid to Natty) was the keyboard layout preseed. I got the dreaded keyboard layout screen.
Turns out the preseed file is only looked at once the locale is set (makes sense), so you have to pass the keyboard config in the kernel line of your PXE boot:
LABEL stuff_natty64kernel linux.natty64append vga=normal initrd=initrd.gz.natty64 locale=en_AU preseed/locale=en_AU keyboard-configuration/layoutcode=us console-setup/ask_detect=false netcfg/wireless_wep= netcfg/choose_interface=auto netcfg/get_hostname= netcfg/ge…