XBMCBuntu 15.04 - Suspend Missing in options
#1
Hi,

I have this little mental disorder that commands me to upgrade everything to the latest version ... most of the times it works, but sometimes I get myself in a pickle and I need some help.

I have what was once an original XBMCBuntu 13 installation, which I have upgraded to Kodi 14.2. XBMCBuntu has also been upgraded from 14.04 to 14.10 and now 15.04. All was working well in 14.10 with kernel 4.0. Now, after upgrading to 15.04, the suspend option is missing in shutdown option (in system settings).
From ssh, I can sudo pm-suspend and the system goes to sleep and I can wake it with my remote.

The problem is, that I can't get it in sleep mode because suspend is missing from shutdown function. I can only choose quit, minimize and shutdown. These option all work, but are of no use to me. I can't turn on my htpc when it's completely turned off. I was thinking, that if the suspend option cannot be brought back somehow, I could make a post-quit script that does a pm-suspend or something, but I also use Steamlauncher (which also quits Kodi before launching Steam), so it would have to be aware of that. Any ideas or tips?
CoreElec on a tn95 (s905x). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
#2
Ubuntu 15.04 ships a systemd aware software by default.

You need to remove: pm-utils and upower

Afterwards this permission file is needed, matching your kodi user. If there is another pkla file, make sure to alter it correctly:
/etc/polkit-1/localauthority/50-local.d/custom-actions.pkla
Code:
[Actions for kodi user]
Identity=unix-user:xbmc
Action=org.freedesktop.udisks.*;org.freedesktop.login1.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes

[Untrusted Upgrade]
Identity=unix-user:xbmc
Action=org.debian.apt.upgrade-packages;org.debian.apt.update-cache
ResultAny=yes
ResultInactive=yes
ResultActive=yes

Make sure to correctly adjust the username you are running kodi (in the above example it's xbmc)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
@fritsch. Once again, you are a lifesaver. Everything's okay now.

Would you mind explaining what I just altered?

This is my old file:

Code:
[Actions for nuc user]
Identity=unix-user:nuc
Action=org.freedesktop.upower.*;org.freedesktop.consolekit.system.*;org.freedes$
ResultAny=yes
ResultInactive=yes
ResultActive=yes

I just used your file and replaced the user, but I have no idea what I just did (but that goes for at least 75% of what I do in Linux).
CoreElec on a tn95 (s905x). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
#4
The old file was wrong anyways - see the end of the third line.

You removed upower -> the upower Action needs to go and then we will basically use login1 for all that
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
(2015-04-25, 09:12)fritsch Wrote: You need to remove: pm-utils and upower

Just be aware that removing upower WILL render unity inoperative, so if you use it, be careful here.
Livingroom: 65" Panasonic Plasma, Denon AVR-x3300w, Parasound A31, Fronts: RBH SX-6300 Towers, Center: RBH 441-se, Surrounds: RBH 41-se Sub: Dual SVS PC13-Ultra, Source: Custom Kodi Box
Desk: DAC: Schiit Modi Multibit,Headphones: Schiit Jotunheim -> Sennheiser HD650 & Beyerdynamic DT770 Pro, Speakers: Parasound 275v2-> RBH 41-se & SVS SB12-NSD
Reply
#6
This thread is about xbmcbuntu, no Unity crap at all.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
Now I have another small question Big Grin

removing pm-utils and upower seems to have broken my restart script. I have this file /etc/pm/sleep.d/restart.power with the following content:

Code:
#!/bin/sh

. /etc/profile

case "$1" in
   post|thaw|resume)
     export DISPLAY=:0
     xrandr --output HDMI1 --brightness 1.15 --gamma 1.15:1.15:1.15
     #service lightdm restart &
     #xdotool mousemove 1920 1080
     killall -HUP kodi.bin
     sudo -u nuc -H bash -c /home/nuc/.kodi/userdata/xbmc.sh
     ;;
   *) exit $NA
     ;;
esac

Any tips how to get this working again? I have had some issues with my network not really working after a resume (plus, restarting Kodi makes it start nice and neat at the movies screen, instead of wherever I was when I suspended).
CoreElec on a tn95 (s905x). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply
#8
Have a look here: https://wiki.archlinux.org/index.php/Pow...vice_files
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
(2015-04-26, 16:50)fritsch Wrote: Have a look here: https://wiki.archlinux.org/index.php/Pow...vice_files

I'm getting there, but I'm not quite there yet.

I have this [email protected]:

Code:
[Unit]
Description=User resume actions
After=suspend.target

[Service]
User=%I
Type=forking
RemainAfterExit=no
Environment=DISPLAY=:0
ExecStart=/home/nuc/.kodi/userdata/kodi.sh

[Install]
WantedBy=suspend.target

Edit:

It's fixed. Not in the prettiest of ways, but still ... it does what I want it to do. I have second (simple) [email protected] that restarts the first service, killing and restarting kodi in the process.

Code:
[Unit]
Description=Restart kodi-resume service after resume
After=suspend.target

[Service]
Type=simple
ExecStart=/bin/systemctl restart kodi-resume@%i.service

[Install]
WantedBy=suspend.target
CoreElec on a tn95 (s905x). Onkyo NR-656. Canton Movie CD-1000. LG 55B6V.

If it ain't broke: break it, fix it, repeat
Reply

Logout Mark Read Team Forum Stats Members Help
XBMCBuntu 15.04 - Suspend Missing in options0