Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Standby & hibernate activate in use but not when minimsed XP

Any features you would like to see in UltraVNC? Propose it here
Post Reply
pol098
8
8
Posts: 26
Joined: 2004-06-16 09:40

Standby & hibernate activate in use but not when minimse

Post by pol098 »

The setup: I'm using UltraVNC 1.0.5.6 on a couple of computers connected either by LAn or VPN (can connect from anywhere in the world!). The server machine is set to standby after a few minutes, and later to hibernate. By and large this works beautifully; the machine uses almost no power, and I can wake it by running a simple wake on LAN (WoL) program remotely. (It is essential to set the machine to restart in "on" mode after a power failure; it's often not possible to wake a machine that's got switched off.)

Basically this works fine. Unfortunately I can't let the machine be woken by LAN activity as there is always some traffic from the router which wakes the machine constantly. But I just have to click on a QuickLaunch icon which wakes the machine instantly from standby, or slowly from hibernation.

The problem. There is a niggling problem: if I establish a VNC connection and minimise it to the taskbar, the session stays alive indefinitely even without running any application, which is what I want. (If I close the connection, the server machine stands by correctly after the specified delay.) However, if I am using the VNC connection to do various tasks, the host machine goes into standby (even as I'm busy typing into a program) at the specified time after the connection is established. It's not a major issue (I can wake it again, and it resumes where it left off with no loss of information or RAM drive), but a nuisance. This is the opposite of what I'd expect (i.e., it doesn't: stay alive when doing work remotely, and stand by while minimised to task bar doing nothing).

Does anybody have any explanation or workaround?

BTW, it's a nuisance that XP doesn't allow a hibernate time greater than 6 hours. When I'm away it would be convenient to hibernate after, say 24 hours, so I could work freely on and off, then leave it for a couple of weeks without power waste even if I forget to hibernate it manually (I used to leave it on 24/7/365.25, at a cost of about 130 GBP/year and associated CO2 production).

Best wishes, pol098
pol098
8
8
Posts: 26
Joined: 2004-06-16 09:40

Re: Standby & hibernate activate in use but not when min

Post by pol098 »

To recapitulate, I find that when I am actively working (keying, mousing) via UltraVNC on a WinXP machine set to stand by or hibernate after a time, it goes into standby/hibernation although not inactive. Strangely, if there is an UltraVNC connection, not in active use, in the taskbar, the machine doesn't go into standby.

Obviously the UltraVNC server doesn't "recognise" keystrokes or mouse movements over the VNC link. Is there a uVNC server or viewer setting to remedy this (I can't see an obvious one)? Should this be considered a bug in uVNC server? Is there any fudge that can be implemented; for example, a WinXP daemon program which somehow checks every so often whether a viewer (VNC or browser on 5800) is connected and, if so, sends a signal to the hibernation system to reset the inactivity timer?

Best wishes, pol098
pol098
8
8
Posts: 26
Joined: 2004-06-16 09:40

Re: Standby & hibernate activate in use but not when min

Post by pol098 »

I am now of the opinion that this is a bug in uVNC 1.0.5.6 running under Windows XP (I believe Vista has different methods of resetting the inactivity timer). If a uVNC server detects that a viewer is connected it should periodically tell XP (if that is the operating system) to reset the timer (it could also disable timed standby/hibernate and re-enable it on the viewer disconnecting, but this sounds less failsafe). The SetThreadExecutionState Function is relevant:
http://msdn.microsoft.com/en-us/library ... S.85).aspx

See also:
http://www.rejetto.com/forum/index.php? ... pic=5694.0
http://msdn2.microsoft.com/en-us/librar ... S.85).aspx

Best wishes, pol098
pol098
8
8
Posts: 26
Joined: 2004-06-16 09:40

Re: Standby & hibernate activate in use but not when min

Post by pol098 »

This is apparently a known issue with various remote access programs. I have enough information for a workaround. Armed with the knowledge that the Windows command
netstat -n -a -p tcp
will apparently display a line referencing port 5900 (if that is the one used) and the word "ESTABLISHED", I can write a script or small program that will run this command every so often, examine the output, and reset the inactivity timer.

Definitely a workaround, not a solution; I hope that somebody will come up with a solution.

By the way, the reason for standing by the host machine: it was running 24/7/365.2425, though used intermittently. Using Wake on LAN and hibernate saves a significant amount of carbon dioxide emission and money.

Best wishes, pol098
Post Reply