Hyprland
Hyprland copied to clipboard
Sometimes Hyprland advertises mirrored external monitor. This makes grim sad.
I have an external monitor and this in my config file:
# MONITORS
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,preferred,auto,1
monitor=HDMI-A-1,preferred,auto,1,mirror,eDP-1
Normally Hyprland only advertise the laptop monitor (the mirrored one):
interface: 'zxdg_output_manager_v1', version: 3, name: 21
xdg_output_v1
output: 45
name: 'eDP-1'
description: 'AU Optronics 0xAF90 (eDP-1)'
logical_x: 0, logical_y: 0
logical_width: 1920, logical_height: 1080
But sometimes it decides it is proper to advertise both of them:
interface: 'zxdg_output_manager_v1', version: 3, name: 21
xdg_output_v1
output: 47
name: 'HDMI-A-1'
description: 'Samsung Electric Company C24F390 H4LT305839 (HDMI-A-1)'
logical_x: -1337420, logical_y: -1337420
logical_width: 1920, logical_height: 1080
xdg_output_v1
output: 45
name: 'eDP-1'
description: 'AU Optronics 0xAF90 (eDP-1)'
logical_x: 0, logical_y: 0
logical_width: 1920, logical_height: 1080
Since the external monitor has very low logical position, and since grim tries to capture both of them, grim computes an image size that far exceeds available memory and crashes.
When, in the future, it will not crash, it will error out smoothly without supporting this use case.
See grim issue 85.