From 55b3da7e97f6dc1e99724782253c35fe4c8b7c5a Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 7 Nov 2015 16:25:44 +0200
Subject: [PATCH] [wetek] perform suspend instead of powerdown

---
 system/keymaps/keyboard.xml                        | 2 +-
 xbmc/powermanagement/linux/LogindUPowerSyscall.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/system/keymaps/keyboard.xml b/system/keymaps/keyboard.xml
index 9833cff..0ce105e 100644
--- a/system/keymaps/keyboard.xml
+++ b/system/keymaps/keyboard.xml
@@ -91,7 +91,7 @@
       <backslash>ToggleFullScreen</backslash>
       <home>FirstPage</home>
       <end>LastPage</end>
-      <power>ActivateWindow(shutdownmenu)</power>
+      <power>XBMC.Powerdown()</power>
       <sleep>ActivateWindow(shutdownmenu)</sleep>
       <!-- PVR windows -->
       <e>ActivateWindow(TVGuide)</e>
diff --git a/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp b/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
index 4e5bcc6..ad5847d 100644
--- a/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
+++ b/xbmc/powermanagement/linux/LogindUPowerSyscall.cpp
@@ -53,7 +53,7 @@ CLogindUPowerSyscall::CLogindUPowerSyscall()
   m_canPowerdown = LogindCheckCapability("CanPowerOff");
   m_canReboot    = LogindCheckCapability("CanReboot");
   m_canHibernate = LogindCheckCapability("CanHibernate");
-  m_canSuspend   = LogindCheckCapability("CanSuspend");
+  m_canSuspend   = false;
 
   InhibitDelayLock();
 
@@ -98,7 +98,7 @@ CLogindUPowerSyscall::~CLogindUPowerSyscall()
 
 bool CLogindUPowerSyscall::Powerdown()
 {
-  return LogindSetPowerState("PowerOff");
+  return Suspend();
 }
 
 bool CLogindUPowerSyscall::Reboot()
