On devices where power-down is actually possible, the “Custom Shutdown Timer” menu item makes sense to me. On the Raspberry Pi models though (which can’t actually power down), I’m not convinced of this item’s utility.
Halting the Pi immediately (via the “Power Off System” item) is useful in cases where one needs to disconnect power or eject the SD card. I can’t imagine any scenario where a delayed (and presumably unattended) halt of a Pi would be desired or useful though—particularly since it would render the device useless until manually attended to and power-cycled.
On this basis, I see the Custom Shutdown Timer as unnecessary clutter in my Power menu and would remove it altogether if I could.
I can think of situations where it would be useful, like for a sleep timer to turn off the TV if you plan on falling asleep watching something, for instance. Most TVs power off when they stop getting signal from HDMI.
There’s probably a Kodi .xml file that you can edit to remove it, but I don’t know which one.
I hadn’t considered that use case. A timed TV shutdown definitely sounds useful. On the other hand, if done via a shutdown of the device, what would happen when the TV is powered back up next time? I would guess that the halted OSMC device wouldn’t come back up again until manually power-cycled. I’d be annoyed by that myself.
I personally manage TV power by having Kodi power my TV off when the screensaver activates. This has the added benefit of not manually activating a timer—the TV always turns off after any period of inactivity.
Are there any other potential situations where this functionality would be used on a device that can’t power off?
I think the relevant file is /usr/share/kodi/addons/skin.osmc/16x9/DialogButtonMenu.xml.
This particular file is system-based though, so the change would either be lost during upgrades or inhibit them altogether. I’m not bothered enough by the menu entry to manually hack a system-based file on every upgrade.
No problem. Just throwing the idea out there!
A <skinsetting> could potentially by used to disable this item on a per-system basis. If I can learn how it’s done, would you be likely to accept a GitHub pull request for such a change?
None. Obviously no modern electronics totally switch off. Most have a “standby mode” whereby they continue to draw a tiny amount of power but can “boot” back into a full power mode on request without physical intervention.
I’m pretty sure that the Pi’s don’t have this ability though—once you ask it to shut down, that’s it until the power is removed and re-applied. At least one other source seems to agree.
So this reinforces my belief that once a Pi is halted, nothing further can be done without physically attending to and power-cycling the device—that is, no software action can reactivate a halted Pi.
On this basis, I’m still struggling to see a use for the Custom Shutdown Timer on the Pi. There’s at least one “useful” side effect (powering off an attached TV), but the inconvenience of rendering the Pi useless until power-cycled probably outweighs the benefit of any useful side effects. Powering off a TV can be done in other ways anyway.
@sam_nazarko, does any of this new conversation influence your opinion in either direction?
I keep all of my Pi’s powered up 24/7. They use such little power that I wouldn’t bother shutting them down if I could anyway.
I may have spoken too soon. When I was using XBian, I achieved this by:
going to Settings > System > Input devices > Peripherals > CEC Adaptor; and
Put devices in standby mode when activating screensaver, and
Wake devices when deactivating screensaver.
This hasn’t reliably worked for me since switching to OSMC, but I can’t imagine that there’s any difference under the hood as far as CEC monitoring and control goes. I’ll keep playing with the settings and update this thread if I get it working. Please let me know how you go with this in the meantime.
The HDMI can be turned off with texturecache.py after x amount of minutes running screensaver. It doesn’t turn the tv off directly but even older tvs usually shut themselves off after a bit with no HDMI input.