Skip to main content
MangoWCMangoWC
Configuration

Monitors

Manage display outputs, resolution, scaling, and tearing.

Monitor Rules

You can configure each display output individually using the monitorrule keyword.

Syntax:

monitorrule=name:Values,Parameter:Values,Parameter:Values

Parameters

ParameterTypeValuesDescription
namestringAnyMatch by monitor name
widthinteger0-9999Monitor width
heightinteger0-9999Monitor height
refreshfloat0.001-9999.0Monitor refresh rate
xinteger0-99999X position
yinteger0-99999Y position
scalefloat0.01-100.0Monitor scale
vrrinteger0,1Enable variable refresh rate
rrinteger0-7Monitor transform

Transform Values

ValueRotation
0No transform
190° counter-clockwise
2180° counter-clockwise
3270° counter-clockwise
4180° vertical flip
5Flip + 90° counter-clockwise
6Flip + 180° counter-clockwise
7Flip + 270° counter-clockwise

Critical: XWayland & Coordinates

If you use XWayland applications, never use negative coordinates for your monitor positions. This is a known XWayland bug that causes click events to malfunction. Always arrange your monitors starting from 0,0 and extending into positive coordinates.

Examples

# Laptop display: 1080p, 60Hz, positioned at origin
monitorrule=name:eDP-1,width:1920,height:1080,refresh:60,x:0,y:10

# Virtual monitor with pattern matching
monitorrule=name:HEADLESS-.*,width:1920,height:1080,refresh:60,x:1926,y:0,scale:1,rr:0,vrr:0

Tearing (Game Mode)

Tearing allows games to bypass the compositor's VSync for lower latency.

SettingDefaultDescription
allow_tearing0Global tearing control: 0 (Disable), 1 (Enable), 2 (Fullscreen only).

Configuration

Enable Globally:

allow_tearing=1

Enable per Window: Use a window rule to force tearing for specific games.

windowrule=force_tearing:1,title:vkcube

Tearing Behavior Matrix

force_tearing \ allow_tearingDISABLED (0)ENABLED (1)FULLSCREEN_ONLY (2)
UNSPECIFIED (0)Not AllowedFollows tearing_hintOnly fullscreen follows tearing_hint
ENABLED (1)Not AllowedAllowedOnly fullscreen allowed
DISABLED (2)Not AllowedNot AllowedNot Allowed

Graphics Card Compatibility

Important

Some graphics cards require setting the WLR_DRM_NO_ATOMIC environment variable before mango starts to successfully enable tearing.

Add this to /etc/environment and reboot:

WLR_DRM_NO_ATOMIC=1

Or run mango with the environment variable:

WLR_DRM_NO_ATOMIC=1 mango

Power Management

You can control monitor power using the mmsg IPC tool.

# Turn off
mmsg -d disable_monitor,eDP-1

# Turn on
mmsg -d enable_monitor,eDP-1

# Toggle
mmsg -d toggle_monitor,eDP-1

You can also use wlr-randr for monitor management:

# Turn off monitor
wlr-randr --output eDP-1 --off

# Turn on monitor
wlr-randr --output eDP-1 --on

# Show all monitors
wlr-randr

Screen Scale

  • If you do not use XWayland apps, you can just use monitor rules or wlr-randr to set a global monitor scale.

  • If you are using some XWayland apps, I don't suggest you to set monitor scale.

You can set scale like this, such as 1.4 factor.

Dependencies:

yay -S xorg-xrdb
yay -S xwayland-satellite

In config file:

env=QT_AUTO_SCREEN_SCALE_FACTOR,1
env=QT_WAYLAND_FORCE_DPI,140

In autostart:

echo "Xft.dpi: 140" | xrdb -merge
gsettings set org.gnome.desktop.interface text-scaling-factor 1.4

Edit autostart:

# start xwayland
/usr/sbin/xwayland-satellite :11 &
# scale 1.4 for xwayland
sleep 0.5s && echo "Xft.dpi: 140" | xrdb -merge

Using xwayland-satellite to Prevent Blurry XWayland Apps

If you use fractional scaling, you can use xwayland-satellite to automatically scale XWayland apps to prevent them from being blurry, for example with a scale of 1.4:

Dependencies:

yay -S xwayland-satellite

In config file:

env = DISPLAY,:2
exec = xwayland-satellite :2
monitorrule=name:eDP-1,width:1920,height:1080,refresh:60,x:0,y:0,scale:1.4,vrr:0,rr:0

Use a DISPLAY other than 1 to avoid conflicting with MangoWC.

Virtual Monitors

You can create and manage virtual displays through IPC commands:

# Create virtual output
mmsg -d create_virtual_output

# Destroy all virtual outputs
mmsg -d destroy_all_virtual_output

You can configure virtual monitors using wlr-randr:

# Show all monitors
wlr-randr

# Configure virtual monitor
wlr-randr --output HEADLESS-1 --pos 1921,0 --scale 1 --custom-mode 1920x1080@60Hz

Virtual monitors can be used for screen sharing with tools like Sunshine and Moonlight, allowing other devices to act as extended monitors.

On this page