xbmc/xbmc — pull request #4273 by yasij (2014-02-24 01:20:46+00:00)
Title: Suspend via logind over UPower if available.

From pull request #4168:
The suspend feature of UPower is deprecated. XBMC supports suspending using systemd-logind, however it defaults to a few other UPower methods first before trying Logind. This patch checks for logind first, and uses it if available.

I've updated the HasLogind() method to make sure systemd is at least version 183, or if the systemd version API is missing, that Upstart is at least version 1.11. This way, XBMC will default to suspending via logind if the version supports suspend. If it does not, it will skip logind and try UPower as before.