Adding a sleep button to Dell XPS 12 convertable ultrabook

I’m really happy with the Dell XPS 12 convertable ultrabook I’m now using as my workhorse machine, even after seeing the lighter Lenovo Yoga at the recent Presperity4All project kick-off meeting. One thing has been annoying me,though, and that is the lack of flexibility in sleep modes.

XPS 12

Specifically the problem is wanting slightly different power behaviour between laptop and tablet modes, something the stock Windows 8 options do not allow for. When in Laptop mode I want the power button to instigate hibernate as shutting the lid will put it into sleep mode. However that means when in tablet mode there is no way to enter sleep mode, something you really need when transporting the device to avoid accidental touch events causing mayhem.

It’s easy to add a shortcut to enter sleep mode and put it on the Start Screen and Desktop taskbar. However, as I found a few “gotchas” I’ve outlined the steps here. The main problem is that if you have enabled hibernate as I have the usual sleep method hibernates rather than sleeps. The usual method is to use “rundll32.exe powrprof.dll,SetSuspendState 0,1,0”. The solution is to use Mark Russinovich’s venerable PsShutdown.exe from his SysInternals collection.

The steps are:

  1. Install PsShutdown.exe, available from Microsoft as part of the PSTools or SysInternals suites.
  2. Create a shortcut in %ProgramData%\Microsoft\Windows\Start Menu\Programs named Sleep. This location allows it to be added to the start screen and desktop task bar.
  3. Set Target: to “<Somewhere>\psshutdown.exe” -d -t 0 (ie suspend in 0 seconds) and Run: to minimised.
  4. Set the icon to something you like. I used the red power icon in %SystemRoot%\system32\SHELL32.dll.
  5. Search for Sleep eg press Windows key and type “Sleep”.
  6. Right click on your Sleep icon in the results list and select “Pin to Start” and “Pin to Taskbar.

That’s it. I found you need to press the Windows button on the screen bezel to exit sleep.

 

This entry was posted in Windows. Bookmark the permalink.
Skip to top

Comments

2 Responses to Adding a sleep button to Dell XPS 12 convertable ultrabook

  1. Frank says:

    Great contribution, congratulations.

    After 1 year using the DELL XPS 12 found you article and has helped me in my presentations.

    Thank you for sharing your knowledge!

Leave a Reply

Your email address will not be published. Required fields are marked *