Sign up Log in
n/baipiao · 17d ago · 958 views
u/Yang-iyuSilver
n/baipiaou/Yang-iyu · 17d ago

Tianyi Cloud AI PC 4h8g: auto-shutdown policy analysis

Resources in these threads:

Thread 1: https://www.nodeloc.com/t/topic/117482
Thread 2: https://www.nodeloc.com/t/topic/117536

This post is mainly about analyzing this cloud PC's auto-shutdown policy.
What happens: If you deploy some agent or automation tool on it, you'll notice that after a while all the processes on the machine get killed; and if there's no remote desktop connection, the machine goes to sleep.

I had Opencode analyze it, and here's the result:

Investigation summary

Core conclusion

There are no PowerShell scheduled tasks, services, or automation scripts on this machine that "periodically close all programs or reset." The decision to repeatedly shut down is made on the remote cloud platform, and the action is executed by the local cloud desktop agent (clink).

Scope and results (all negative)

Check Result
All scheduled tasks (schtasks /fo csv /v) Only 2 invoke PowerShell: TeleAgentWatchdog (keeps TeleAgent alive) and WinVMDataDiskAutoInitialize (Azure disk initialization), both harmless
Services No services with PowerShell/scripts as their entry point
Run / RunOnce registry Only SecurityHealth, AzureArcSetup, TeleAgent
Startup folder Empty
Scheduled task XML No Hidden=true, no shutdown/taskkill
WMI permanent event subscriptions Only the default SCM log consumers
Group Policy startup/shutdown scripts Registry path does not exist
IFEO Debugger, Winlogon Shell/Userinit All original
Full-disk script keyword scan Only ctyun\clink\...\kill-cloudupdatejar.bat (used by cloud update itself)

The real trigger

Evidence chain for the Tianyi Cloud Desktop client (clink):

  1. Smoking gun in the registry HKLM\SOFTWARE\ecloudsoft\Mirror\ClinkAgent:
    • SessionEndTime = 1794500599 → converted to 2026-11-13 00:23:19
    • Actual shutdown event: 00:23:20 — only 1 second off
    • SessionEndManual = 0, desktopOid = D0026110624642120
  2. Policy pushed by the platform meta_data: reboot_wait=300, stop_wait=50
  3. Session duration pattern (extracted from clink_service.log): during 11/12–11/13, 8 sessions lasted 30.4 / 30.5 / 30.7 / 30.4 / 30.5 / 30.4 / 30.4 / 30.2 minutes, highly consistent → session quota expiry reclamation allocated by the platform
  4. Executing components: clink_service (LocalSystem service, contains GetShutdownFlag, Global\CtyunShutdownMappingObject), ctyunshutdownplug64.dll (exports MyExitWindowsEx, PDB is ShutdownDetect), RebootConfirm.exe (contains API path /api/cdserv/desktop/rebootDesktop and management-side key)
  5. Log confirmation: in clink_service.log, the line right before each shutdown is Session change to 1 LOGOFF, followed by Shutdown clink_service

Full chain:

Cloud platform management side → pushes SessionEndTime
  → clink_agent (WebSocket long connection 100.64.3.249:27149) writes to registry
  → clink_service (LocalSystem) detects session expiry
  → winlogon.exe calls ExitWindowsEx → power off

In the event log, the 1074 record's initiator is winlogon.exe / NT AUTHORITY\SYSTEM (not shutdown.exe), which is exactly the typical signature of a service calling ExitWindowsEx in the SYSTEM context, ruling out local scripts and manual shutdown.

Can it be refused?

You can't directly refuse it locally, but there are three actionable paths:

  • No solution at the Windows level: ExitWindowsEx is a kernel API, SeShutdownPrivilege is granted by default, admins can also call it directly, and the system does not provide a "deny shutdown" policy.
  • SessionEndTime is ineffective: it is re-pushed and overwritten by the platform on every boot, and local registry changes get reset immediately.
  • Feasible local hard blocks (with trade-offs):
    1. Disable clink_service — this will also cut off your remote desktop connection
    2. Remove ctyunshutdownplug64.dll — requires admin rights, and cloud update will restore it; it's recommended to also disable CloudUpdate
    3. Turn off AutoEndTasks and increase WaitToKillAppTimeout — this only gives you more time to save before shutdown, it cannot prevent shutdown (the platform currently pushes a "fast shutdown config": AutoEndTasks=1 + WaitToKillAppTimeout=5000, which is exactly why tasks get killed "quickly" and don't have time to save)

Recommendation

Don't fight it locally; solve it from the platform side. Submit desktopOid = D0026110624642120 and tenant_oid = Ctyun37d5c336487645511792477754 to the cloud platform admin and ask them to check:

  1. This desktop's session expiry reclamation policy (extend SessionEndTime or disable auto-reclamation)
  2. Operation audit logs for who called rebootDesktop and when
  3. Whether your session duration can be extended or "fast shutdown" can be disabled

At the same time, to reduce actual losses, it's recommended to configure auto-resume after boot for critical long-running tasks (refer to the existing TeleAgentWatchdog RestartCount approach), or move time-consuming tasks to an independent background container on the cloud platform so they don't depend on the interactive desktop session staying alive.

If needed, I can continue helping you: check which critical processes/tasks are currently running, assess the specific impact of disabling clink_service on your remote connection, or configure auto-resume after restart for a specified task.

Translated by AI from 简体中文

11
21
Log into join the discussion.

21 replies

Sort order
  1. WenjieChou Gold Never leave, never forsake 16d ago

    Bookmarked, I'll dig into it later

    Translated by AI from 简体中文

    1
  2. deleted 16d ago
    This reply was deleted by a moderator
  3. blue202 Silver 17d ago

    Can this thing be connected to over 3389?

    Translated by AI from 简体中文

    0
  4. Yang-iyu Silver OP 16d ago

    Probably not gonna work. Their web-based remote access is handled by a helper service, and the sleep thing is handled by that same helper too — kill the helper and the web remote goes with it. So I doubt they'll open up 3389 either.

    Translated by AI from 简体中文

    0
  5. wm2029 Diamond 3 YEARS 16d ago

    3389 after networking

    Translated by AI from 简体中文

    0
  6. icetang Silver 16d ago

    Learned something new.

    Translated by AI from 简体中文

    0
  7. seeq Silver 3 YEARS 16d ago

    Learning

    Translated by AI from 简体中文

    0
  8. only Silver 3 YEARS 16d ago

    How do I keep it alive 24/7?

    Translated by AI from 简体中文

    0
  9. Yang-iyu Silver OP 16d ago

    The answer is no.

    Translated by AI from 简体中文

    0
  10. only Silver 3 YEARS 16d ago

    Would that keep-alive method someone open-sourced for Tianyi Cloud Computer work? The one where you just keep sending heartbeats over the protocol.

    Translated by AI from 简体中文

    0
  11. Yang-iyu Silver OP 16d ago

    It'll shut down and then instantly power back on. The shutdown isn't done by the machine itself — it's triggered by an admin upstream.

    Translated by AI from 简体中文

    0
  12. Continue this thread →
  13. yuwuyanwu Silver 16d ago

    Anyone using Mobile Cloud Desktop?

    Translated by AI from 简体中文

    0
  14. Yang-iyu Silver OP 16d ago

    Nope, I didn't get one.

    Translated by AI from 简体中文

    0
  15. poin Silver 15d ago

    So good

    Translated by AI from 简体中文

    0
  16. Zercher Silver 15d ago

    They must have some new countermeasure now.

    Translated by AI from 简体中文

    0
  17. Cavalier Silver 14d ago

    Learning

    Translated by AI from 简体中文

    0
  18. p52qdi111 Bronze 13d ago

    Learned something, thanks — the troubleshooting write-up was really detailed.

    Translated by AI from 简体中文

    0
  19. cheems Bronze 10d ago

    Good to know.

    Translated by AI from 简体中文

    0
  20. 2629914845 9d ago

    TIL, thanks

    Translated by AI from 简体中文

    0
  21. myhao Silver 3 YEARS 9d ago

    Learning

    Translated by AI from 简体中文

    0