DEV Community

Cover image for Running Computer-Use Agents on Headless Machines
Ponnu
Ponnu

Posted on Edited on AI-assisted

Running Computer-Use Agents on Headless Machines

I came across this while looking at how computer-use agents and RPA robots behave on machines that don't have a monitor plugged in. It's a small hardware detail, but it decides whether the agent can see anything at all.

How an agent sees the screen

A computer-use agent works in a loop: capture the screen, send the image to the model, get back an action (click, type, scroll), and repeat. RPA robots do something similar using selectors, OCR and image matching.

Both assume the operating system is rendering a desktop at a known resolution.

What happens without a monitor

When a monitor is connected, the GPU reads its EDID (Extended Display Identification Data). That's a small block of data that describes the monitor and the resolutions it supports, and Windows uses it to set up the desktop.

With nothing connected, there's no EDID to read. Depending on the GPU and driver, you can end up with a desktop stuck at a fallback resolution like 1024x768, a display that's switched off, or screen captures that come back black. For an agent working from screenshots, that means it either can't see the UI or sees it at the wrong size.

RDP sessions vs the console

This is the part that's easy to get wrong. Not every headless machine has this problem.

UiPath unattended robots, for example, normally start their own RDP session. RDP creates a virtual display, and its resolution comes from the robot or system settings, not from a physical monitor. So for most unattended robots, a missing monitor isn't the issue. Resolution mismatches are a more common cause of failures there.

Virtual machines are also fine, since they have a virtual display adapter.

The problem shows up when the automation runs on the physical console of a real machine:

  • a computer-use agent running directly on a physical PC
  • a robot that has to log in to the console session, for example because it needs hardware input events
  • live streaming and remote control in UiPath Orchestrator, where the docs say a monitor must be connected on physical machines
  • VNC-style tools that mirror the physical display

Headless display emulators

The usual fix is a headless display emulator, something that makes the machine believe a monitor is connected. They're still common in server rooms, remote-access setups and GPU machines. There are a few kinds:

  • Fixed hardware plugs: A dummy plug for HDMI, DisplayPort or USB-C that reports a fixed set of resolutions to the machine.
  • Programmable EDID emulators: Plugs you can reprogram, or that copy a real monitor's EDID, so the headless machine sees the same display you developed on.
  • Software virtual display drivers: A driver that creates a virtual monitor with no hardware. It's easy to roll out across many machines, but it's one more driver to maintain.
  • Remote-access virtual monitors: A virtual display that a remote-support tool adds during a session. It's good for interactive work but not for unattended automation.

None of these know anything about what the agent is doing. Picking the right resolution is still up to the robot settings or the agent framework.

In part 2, I'll look at how an agent can check its own display before it starts working, and what to do when the check fails.

References


This article was written with AI assistance and reviewed by the author.

Top comments (0)