The crucial word is host: change settings on the computer you connect to, not merely the laptop or desktop from which you launch Remote Desktop Connection. If the host sleeps, hibernates, loses Wi‑Fi, or applies a Remote Desktop Services policy, no amount of mouse-jiggling on the client side will keep the session alive. The lights are out backstage.
First, identify what “disconnect” means
Before changing settings, note the pattern:
- It fails at a predictable interval — such as 15, 30, or 60 minutes — which strongly points to an RDP session-time-limit policy.
- The RDP window closes or reports the remote computer did not receive input — likely an idle-session limit.
- You see the remote lock screen but can sign back in to the same session — likely a local machine inactivity or screen-lock setting, not necessarily an RDP disconnect.
- It happens at random times, especially on VPN, Wi‑Fi, or mobile broadband — investigate the network path and keep-alive behavior rather than assuming an idle policy.
- You cannot reconnect until someone wakes the PC locally — the host has likely entered sleep or hibernation.
Microsoft’s RDS troubleshooting guidance makes an important distinction: a timed-out RDP connection can leave the session running on the remote PC, while a logoff ends it. That matters if you have unsaved work, running scripts, or a long file transfer in progress.
Step 1: Keep the RDP host awake
On the remote Windows 11 PC:
- Open Settings.
- Go to System > Power & battery.
- Expand Screen and sleep.
- Set Make my device sleep after to Never while plugged in if the machine must remain available for RDP.
On Windows 10:
- Open Settings.
- Select System > Power & sleep.
- Under Sleep, set the plugged-in sleep timer to Never or to a period that suits the machine’s operational role.
For a desktop that serves as a dependable remote workstation, “Never while plugged in” is often reasonable. For a battery-powered notebook, it may be a terrible idea: heat, battery wear, and an unattended system on a network are not exactly a productivity suite. Choose a policy that balances access with power and security.
Microsoft explicitly notes that a PC cannot accept Remote Desktop connections while asleep or hibernating. In the Remote Desktop settings area, Windows also provides a shortcut to relevant power settings for this reason.
Verify the result
Reconnect with RDP, leave the session untouched for longer than the former failure interval, and then try to resume work. If the host remained reachable and the session is still active, power management was the culprit.
If the PC is on Wi‑Fi, also consider whether its wireless adapter or network equipment is dropping idle connectivity. A PC that remains technically awake but falls off the network is just a more energetic kind of unavailable.
Step 2: Check the Remote Desktop idle-session policy
On Windows editions that include the Local Group Policy Editor, inspect the RDP session limits on the remote host:
- Press Windows + R, type
gpedit.msc, and press Enter. - Go to:
Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Session Time Limits
- Open Set time limit for active but idle Remote Desktop Services sessions.
- If it is enabled with a defined interval, choose one of the following:
- Set an appropriate longer interval, or
- Set the limit to Never, or
- Set the policy to Not Configured if no local limit is intended.
- Also review:
- Set time limit for active Remote Desktop Services sessions
- Set time limit for disconnected sessions
- End session when time limits are reached
The first policy is the usual suspect for an “I went to lunch and RDP kicked me out” complaint. Microsoft documents that this setting disconnects an active session after the selected period without keyboard or mouse input, and users normally receive a two-minute warning before the disconnect. If the setting is disabled or not configured, it does not impose an idle limit at that policy level.
Do not confuse an idle limit with an active-session limit
These settings sound like distant cousins at a family reunion, but they do different jobs:
| Policy | What triggers it |
|---|---|
| Active but idle session limit | No keyboard or mouse input for the configured period |
| Active session limit | Total session duration reaches the configured maximum, even if you are working |
| Disconnected session limit | How long Windows keeps a session available after its network connection has ended |
| End session when time limits are reached | Determines whether Windows logs the user off instead of merely disconnecting the session |
If RDP disconnects at exactly the same elapsed time even while you are actively using it, inspect the active session limit—not just the idle one.
On managed business PCs, do not assume a local adjustment will stick. Domain Group Policy or device-management policy can reapply the organization’s configuration. Microsoft notes that computer-level policies take precedence over user-level policies, and policy settings override default configuration.
Step 3: Refresh policy and reconnect
After changing a local policy, open an elevated Command Prompt on the host and run:
gpupdate /force
Then disconnect and reconnect your RDP session. Microsoft’s guidance notes that users may need to reconnect or sign out and back in before session-limit changes take effect.
For an organization-managed device, use this test as evidence for your IT team rather than as an invitation to wrestle with corporate policy. An idle timeout may exist for legitimate security or licensing reasons.
Step 4: Use keep-alive only for unstable network paths
If disconnects are irregular rather than clockwork, the RDP connection may be traversing a VPN, firewall, NAT device, or flaky Wi‑Fi network that expires quiet connections. In that case, the host’s Configure keep-alive connection interval policy can be relevant:
Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections
Microsoft describes this setting as a way for the host to periodically check session state, helping it recognize a client that has lost its connection rather than leaving an unusable session marked active. It is not a substitute for correcting sleep settings or an intentionally configured idle timeout.
Start by addressing power and session policies. Keep-alives belong in the toolbox when the connection itself is the weak link—not when Windows has been plainly instructed to send idle users packing.
A quick validation checklist
After making changes, test deliberately:
- Confirm the remote PC stays awake for longer than the old disconnect interval.
- Connect through the same RDP client and network path that previously failed.
- Leave the session idle beyond the prior cutoff.
- Resume with keyboard or mouse input.
- Verify whether the session remained active, disconnected but recoverable, locked, or fully logged off.
- If the behavior remains inconsistent, repeat once on a wired network or without the VPN, where practical.
That final comparison is surprisingly useful. A disconnect that vanishes on wired Ethernet is not a Group Policy mystery; it is a network story wearing a policy-shaped hat.
For related Windows troubleshooting, readers may also want to review Remote Desktop enablement, RDP network and firewall checks, Windows sleep behavior, and Group Policy precedence.