# Wrong Monitor in Game (XWayland Multi-Monitor) Hyprland

## Problem

Overwatch (and other Proton/Wine games) opened on the correct monitor (Samsung) but reported the wrong display index (Dell) in the game menu. The assignment had to be corrected manually on every start.

## Root Cause

`hyprctl monitors` showed:

- **DP-2 (Dell) → ID 0**
- **DP-3 (Samsung) → ID 1**
- HDMI-A-1 (PEAQ) → further ID

Under XWayland all monitors are bundled into a single virtual root output. Games enumerate displays by connector ID from the kernel's DRM detection order — not by physical arrangement or Hyprland layout. The IDs cannot be reliably forced via Hyprland config.

## Solution: gamescope

`gamescope` wraps the game in a virtual single-display compositor. The game sees only **one** monitor — the display index problem simply does not exist anymore. `gamemoderun` is added for CPU governor tuning.

### Installation

```bash
sudo pacman -S gamescope lib32-gamemode
```

(`gamemode` was already installed; `lib32-gamemode` is needed for full Proton compatibility.)

### Steam Launch Options

Overwatch → Properties → Launch Options:

```
gamemoderun gamescope -W 3840 -H 2160 -r 240 -f -- %command%
```

### Flag Reference

<table id="bkmrk-flag-description-gam"><thead><tr><th>Flag</th><th>Description</th></tr></thead><tbody><tr><td>`gamemoderun`</td><td>Outside gamescope — applies GameMode to both gamescope and the game process</td></tr><tr><td>`-W 3840 -H 2160`</td><td>Output resolution (native Samsung 4K)</td></tr><tr><td>`-r 240`</td><td>Target refresh rate in Hz</td></tr><tr><td>`-f`</td><td>Fullscreen</td></tr><tr><td>`-- %command%`</td><td>Steam appends the Proton call here</td></tr></tbody></table>

### Performance Variant (FSR Upscaling)

If OW at 4K/240 is unstable — render internally at a lower resolution and upscale with FSR:

```
gamemoderun gamescope -W 3840 -H 2160 -w 2560 -h 1440 -r 240 -F fsr -f -- %command%
```

<table id="bkmrk-flag-description--w-"><thead><tr><th>Flag</th><th>Description</th></tr></thead><tbody><tr><td>`-w 2560 -h 1440`</td><td>Internal render resolution (1440p)</td></tr><tr><td>`-W 3840 -H 2160`</td><td>Output resolution on monitor (native 4K)</td></tr><tr><td>`-F fsr`</td><td>AMD FidelityFX Super Resolution upscaler</td></tr></tbody></table>

## Verification

While the game is running, in a terminal:

```bash
gamemoded -s
```

Should print `gamemode is active`.

## Portability

The same approach works for any Proton/Wine title on Steam — set launch options per game. For non-Steam launchers (Lutris, Heroic, Bottles) use the equivalent "pre-launch command" or wrapper field.