I use Ubuntu 12.04. I have a Thinkpad X220 and use it together with a Mini Dock 3 Plus. There is an external monitor connected to the dock. When using the computer in the dock, the laptops lid is closed. When I undock the computer, I would expect that it goes to sleep as it does when I use it without the dock and close the lid. But it keeps running, and I need to open it up and close it again to get it to sleep.
this sounds like a user space problem. Kernel is not responsible for such strategy problems. Usually, acpid catches the Lid event and set the platform to sleep when the lid is closed. you can also write such a script to catch the dock event, and then suspend the system when lid is closed
Thanks Zhang, I'm with you.