Linux Not able to shutdown with remote button
#1
Hi.
I moved my Kodi installation over to a new htpc yesterday, and since then I can't seem to shut down my htpc using remote key anymore. Using the "shut down system" in the power menu on the home screen works fine, everything turns off as it should, but when I press the key on my remote that I've designated for turning off I get the following in my log and nothing more happens:

Quote:19:57:12 T:140086271256512 DEBUG: OnKey: 6 (0x06) pressed, action is XBMC.ShutDown()

I interpret that line as Kodi (still having problems getting used to that name...) having understood that I want it to shut down, so why doesn't it?

I'm running latest nightly from ppa (2:14.0~git20141008.0200-e0db1d8-0) on Ubuntu Trusty. Hardware is a Zotac Zbox nano ID64.

/Daniel
Reply
#2
It's still the same in todays git (20141015).

I can't really identify this as anything but a bug, so I created a ticket for it, http://trac.xbmc.org/ticket/15484.

/Daniel
Reply
#3
do you know on which version this worked last for you?
Reply
#4
(2014-10-15, 21:13)wsnipex Wrote: do you know on which version this worked last for you?

Unfortunately not. All I know is that it worked on my old htpc also running git Kodi, but it might not have been updated for a couple of weeks.

/Daniel
Reply
#5
can you try "Powerdown" as action? also pastebin a full debug.log
Reply
#6
(2014-10-16, 07:58)wsnipex Wrote: can you try "Powerdown" as action? also pastebin a full debug.log

Yep, that works. I'll continue this in the Trac ticket...

/Daniel
Reply
#7
Hi Daniel,
Please have a look here.. it might help you. I assume you are using the internal ir. It seems to be picky.

http://forum.xbmc.org/showthread.php?tid...pid1759493

The power button powers off and it can power on, too, if the prior shutdown was done in OE/xbmc.
I don't suspend anyways. Boot time is so fast anyways.
Reply
#8
(2014-10-16, 12:42)gfisher Wrote: Hi Daniel,
Please have a look here.. it might help you. I assume you are using the internal ir. It seems to be picky.

http://forum.xbmc.org/showthread.php?tid...pid1759493

The power button powers off and it can power on, too, if the prior shutdown was done in OE/xbmc.
I don't suspend anyways. Boot time is so fast anyways.

Thanks, but the remote signal gets there, the problem is that xbmc doesn't do what it should with it Tongue

/Daniel
Reply
#9
Hello!

I do have similar problem, so I'll post here and hope it resolves for both of us.

I have LXDE on Ubuntu 14.04. I had XBMC (last version of it) until today, when I upgraded to Kodi.

On XBMC I had custom keyboard.xml with <F4 mod="alt">XBMC.ShutDown()</F4> defined and working perfectly with my remote.
After updating to Kodi I customized new keyboard.xml with <F4 mod="alt">XBMC.ShutDown()</F4>, so it should work. I also tried Powerdown etc.

BUT command EXITS program instead power down. After few tests with custom keypresses for my remote I realized, that problem is that alt+F4 (remote power button keypress) works faster than Kodi recognizes it as shut down command.

It worked fine before updating so I don't understand why the problem is now. What else could I try?

Thank you for your help.

p.s.: I want power button to shut down and power up my computer, so any suggestions about remaping remote are not a solution. Only alt+F4 powers up my IR. And will not use other button to shut down. If we don't find the problem I will just downgrade and use XBMC again.
Reply
#10
See Settings/System#Power_saving (wiki)

Makes sure Shutdown function Defined that "Shutdown" is set to actually shutdown, not suspend, minimize, or quit.
Reply
#11
It is.
Reply
#12
In that case make sure that your user running kodi is allowed to perform these actions.

Confirm that your user belongs t correct user groups and that customactions.pkla exist

On a terminal type

Code:
sudo apt-get install pastebinit -y
id <username> | pastebinit
pastebinit < /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla

You should get something like

http://paste.ubuntu.com/10800805/

and

http://paste.ubuntu.com/10800827/

If you dont then add the user to those groups and see https://gist.github.com/uNiversaI/4930c59beed92071f6c5

Else no idea as it works here just fine.
Reply
#13
My system does shutdown, if I map button PLAY on remote (or any other button) to do it. So there is no problem with my button configuration and these actions are alowed to perform.

Problem is POWER button on my remote, using keypress combination alt+F4. So command alt+F4 closes KODI before KODI realises, that alt+F4 means actually to shutdown computer.

It worked on previous XBMC version with no problem. Same remote, same key configuration. It shutdown system with alt+F4. IDK why is this problem with KODI. Nothing else is changed on system. I did run update and dist-upgrade though, but It should not be problem, I have done it many times before, when still using XBMC.

Is there any way to force alt+F4 to delay a bit, so KODI would read it's command?
Reply
#14
thats because your window manager/desktop intercepts the alt-f4 press. Either remove that keyboard shortcut or start kodi in standalone mode(kodi desktop session).
Reply
#15
(2015-04-11, 08:58)mattithyahu Wrote: BUT command EXITS program instead power down. After few tests with custom keypresses for my remote I realized, that problem is that alt+F4 (remote power button keypress) works faster than Kodi recognizes it as shut down command.

I'm sorry, but it doesn't feel like the same problem. The problem I had was that simply nothing happened after all. Also, I've never had any problem with it after it was solved in the linked trac ticket. So I don't think I can be of any help here Sad

/Daniel
Reply

Logout Mark Read Team Forum Stats Members Help
Not able to shutdown with remote button0