Connected Standby win 8.1 nircmd
#1
Hi all,

I've got a minix z64 running windows 8.1 with a digitalnow tinytwin usb for pvr. But I have a problem.

The system does not support any standby modes other than connected standby. This in itself is ok, but the problem is that shutting down from kodi calls functions it cannot support and crashes the system. I've been playing around with nircmd, and editing the section of DialogButtonMenu in the default skin to try get things working.

I'm having mixed results though, and am hoping someone may be able to shed some light. On running something like:

Code:
-<control type="button" id="6">

<description>Suspend button</description>

<width>340</width>

<height>40</height>

<textcolor>grey2</textcolor>

<focusedcolor>white</focusedcolor>

<align>center</align>

<textwidth>290</textwidth>

<texturefocus border="25,5,25,5">ShutdownButtonFocus.png</texturefocus>

<texturenofocus border="25,5,25,5">ShutdownButtonNoFocus.png</texturenofocus>

<onclick>System.Exec("nircmd.exe cmdwait 2000 monitor off")</onclick>

<visible>System.CanSuspend</visible>

<pulseonselect>no</pulseonselect>

<font>font13</font>

<label>13011</label>

</control>

Unreliable bad things happen. Generally the system immediately switches to the desktop, and then shuts off the monitor and bounces back to the logon screen. Alternatively it will make kodi be open but crashed on resume or completely hang the system in sleep. It's quite annoying. I've been playing with PlayerControl(Stop) above the nircmd line, which is probably a good idea, but I'm not very good at this.

Hopefully someone can help here. This is probably going to be a pain for a few people, I'm guessing the nuc must have similar issues.

Thanks,

Mark.
Reply
#2
OK. That wasn't too hard.

Download nircmd and extract it to the windows directory.

Using the advanced launcher addon, Create a standalone launcher which calls "nircmd.exe monitor async_off". Make it a favourite.

Then navigate to favourites.xml in the userdata folder (here).

Copy the the command from favourites.xml for the favourite you've just created (in my case PlayMedia("plugin://plugin.program.advanced.launcher/?default/466435409c5665e9e11651138d5097fb")

I've set this up to just sleep when I push the power button in kodi. The principles the same if you want to change a menu option though.

Following this post (post #4)

Enable Power button to exit XBMC, rather than show shutdown menu.

Open Home.xml located at C:\Program Files (x86)\XBMC\addons\skin.confluence\720p

Edit approx line 1094. Replace <onclick>ActivateWindow(ShutdownMenu)</onclick> with onclick item to <onclick>XBMC.Quit()</onclick>


Code:
<control type="group" id="10">
            <left>20</left>
            <top>55r</top>
            <include>Window_OpenClose_Animation</include>
            <control type="button" id="20">
                <description>Power push button</description>
                <left>55</left>
                <top>0</top>
                <width>45</width>
                <height>45</height>
                <label>31003</label>
                <font>-</font>
                <onclick>XBMC.Quit()</onclick>
                <texturefocus border="5">floor_buttonFO.png</texturefocus>
                <texturenofocus border="5">floor_button.png</texturenofocus>
                <onleft>21</onleft>
                <onright>21</onright>
                <onup>9002</onup>
                <ondown>9003</ondown>
            </control>

But substitute "XBMC.Quit()" for the code you've just copied from the favourites.xml file.

Obviously any "XBMC" path referenced would most likely be "Kodi" now.

Save and restart Kodi.

Shutdown button should now send the system to CS. I did think about setting the screensaver to black and inserting a screensaver command above the line inserted so it goes black immediately. It's good being able to see Kodi call nircmd at the moment though.

Hope this stays stable and helps someone.
Reply

Logout Mark Read Team Forum Stats Members Help
Connected Standby win 8.1 nircmd0