Desktop icons move because Windows stores each icon's position in a fixed registry grid, and whenever that stored coordinate no longer matches the screen's resolution, DPI scaling, or display arrangement, Explorer re-snaps every icon to a default slot. The trigger is almost always a resolution change, a monitor reconnect, or the Auto Arrange and Align Icons settings. Nothing is random: each icon has a saved X/Y address, and the shell rewrites it the moment the layout math disagrees with the recorded data.

That single sentence explains most cases. The rest of this article explains the coordinate system underneath, the thresholds where Windows abandons saved positions, and how to lock icons so they stop relocating.

The Bags registry and shell coordinate engine

Windows does not save icon positions as pixels in the ordinary sense. It stores them inside the registry under a key called Shell\Bags, in a data structure known as the icon layout stream. Each entry records a slot index and a pair of signed integer coordinates mapped to the desktop's logical grid, not the raw pixel matrix. The shell reads that stream at every Explorer startup and rebuilds the desktop from it.

The grid itself is not one unit per pixel. It is a lattice defined by the icon spacing values, which by default sit near 75 pixels horizontally and 75 pixels vertically at 100 percent scaling. Windows rounds every saved coordinate to the nearest free lattice cell. If the cell count shrinks because the screen got smaller, the rounding collapses and icons pile onto the origin. The stored coordinates stay valid, but the grid they reference no longer has room for them.

DPI scaling compounds this. When you change display scaling from 100 to 125 percent, the effective logical resolution drops even though the physical panel did not change. Windows recalculates the lattice in device-independent units, then re-snaps icons to the new cell edges. That is why a scaling tweak alone can scatter a clean desktop without any hardware change.

A plain-language version: think of the desktop as graph paper. Windows writes each icon into a square, then redraws the paper at a different size. Squares that no longer exist get merged into whatever square is nearest.

How often and how far icons shift

The displacement is bounded by the grid, not by chance. Each icon can move at most one cell per re-snap event, but cascading re-snaps during a single resolution change can walk an icon several cells before it settles. In practice, a user who disconnects an external monitor at 2560×1440 and falls back to a laptop panel at 1920×1080 loses roughly 44 percent of horizontal cells and 25 percent of vertical cells. Every icon mapped into the lost region must be reassigned.

The registry stream is written on a delay. Explorer flushes icon positions to the Shell\Bags key on a timer rather than instantly, commonly cited as a multi-second to tens-of-seconds window. If the machine loses power or crashes inside that window, the saved layout is older than what you saw on screen. On the next boot, icons return to the last flushed state, which can look like a spontaneous shuffle.

Display topology changes are the most common trigger. Windows generates a display change event each time a monitor connects, disconnects, sleeps, or wakes. Each event can prompt the shell to recompute the desktop work area. Laptops that dock and undock daily can see several events per day, and each one is a chance for the layout to drift.

Timeline of a typical icon displacement

Stage What happens Typical timing
Display change Monitor connects, disconnects, or wakes; GPU driver reports new mode Immediate
Shell notification Windows broadcasts a work-area change to Explorer Within about 1 second
Grid recompute Logical resolution and DPI scaling recalculated Milliseconds after notification
Re-snap pass Icons rounded to available lattice cells; overflow icons relocated Same pass, sub-second
Registry flush Updated layout stream written to Shell\Bags Delayed, often seconds to tens of seconds
Boot restore Explorer reads last flushed layout on next sign-in At login

The takeaway from the timeline is that the move you see on screen and the position Windows remembers are not written at the same instant. That gap is where most "it moved again overnight" complaints originate.

Edge cases that defeat saved positions

Multi-monitor setups introduce a work-area problem. Windows assigns each monitor its own coordinate space, but the desktop icon layout is global. When a secondary monitor sits to the left of the primary, its coordinates are negative. Reconnecting monitors in a different order reassigns those negative coordinates, and icons from the left display can jump to the right one.

Virtual desktops do not move icons, but switching them can reveal stale positions if the shell redraws. Remote Desktop sessions are worse: connecting over RDP often changes the session resolution to match the client, which triggers a full re-snap on disconnect. A user who leaves a session at 1280×720 and returns to a 4K monitor will find the desktop reorganized.

Driver updates and GPU control panels can reset display modes without an obvious user action. A driver install that briefly drops to a low resolution for a few seconds is enough to fire a display change event and rewrite the layout. Sleep and hibernate behave similarly when the panel wakes at a slightly different mode than it slept in.

Group Policy and roaming profiles add a professional caveat. In managed environments, the shell layout can be redirected or reset by policy, and the registry stream may be overwritten at every login. If your icons move only on a work machine, the cause may be policy refresh rather than any hardware event.

Misconceptions about moving icons

The most common myth is that malware or a virus is rearranging the desktop. Icon movement is a normal shell behavior, and while malware can tamper with the desktop, it rarely bothers to reshuffle icon coordinates. The registry stream is a mundane target, not a useful one.

A second misconception is that the Auto Arrange checkbox is permanent. Turning it on forces icons into the top-left order and disables free placement, but some updates and profile migrations re-enable default settings. Checking the setting once does not guarantee it stays checked.

Another error is assuming a third-party icon tool will fix the root cause. Tools that save and restore layouts treat the symptom, not the grid mismatch. They help, but they do not prevent the shell from re-snapping during a display event.

Watch for these red flags before blaming hardware:

Icons move only after sleep, wake, or a monitor reconnect, which points to display events, not corruption. Icons rearrange after every reboot, which suggests the registry layout is not being flushed before shutdown. Only icons in one corner move, which points to a resolution or DPI change rather than a full reset. Icons on a secondary monitor jump to the primary, which indicates a monitor-order or coordinate reassignment. Layout resets only on a managed work machine, which points to Group Policy or profile redirection.

Practical actions to stop the shifting

Lock the layout at the shell level first. Right-click the desktop, open View, and confirm Align Icons to Grid is on and Auto Arrange is off, or set both to your preference. These two checkboxes control whether Windows is allowed to relocate icons without your input.

Reduce the number of display change events. Set a fixed resolution and refresh rate for each monitor in the GPU control panel rather than leaving it on automatic. Docked laptops benefit from keeping the external display mode identical before and after undocking where the hardware allows it.

For persistent cases, rebuild the layout stream cleanly. Sign out, rename or export the Shell\Bags key as a backup, then sign back in and arrange icons once. Windows writes a fresh stream, which often resolves corruption from years of partial flushes.

Use a layout-save tool as a safety net. Several free utilities snapshot icon coordinates and restore them on demand. They do not prevent re-snapping, but they convert a five-minute rearrangement into a one-click fix.

Check these thresholds before assuming a deeper fault:

If icons move fewer than one grid cell, the cause is a DPI or spacing change, not a corrupted registry. If icons move only after a monitor hot-plug, treat it as expected shell behavior. If layout resets survive a clean profile rebuild, inspect Group Policy and roaming profile settings. If positions revert to a much older arrangement, suspect an unflushed registry stream from an abrupt shutdown.

Limits of what can be fixed

Some movement is designed behavior, not a bug. Windows must re-snap when the grid shrinks, and no setting removes that requirement. The registry format, the flush delay, and the display-change handshake are all closed components, so users cannot fully control when the shell rewrites positions.

Results vary by Windows build, GPU driver version, and whether the machine is domain-managed. The default spacing values and the flush timer have shifted across releases, and quoted numbers should be treated as ranges rather than fixed constants. If your environment enforces layout policy, local settings may be overridden regardless of what you change.

The practical ceiling is this: you can reduce the frequency of accidental moves and restore layouts quickly, but you cannot make the coordinate engine perfectly static. Treat a saved layout as a backup, not a guarantee, and verify your settings after any display or driver change.