Skip to content

Captured image is offset when using a single monitor not located at 0,0 (wlroots) #702

@arthomnix

Description

@arthomnix

What happened?

When using a single monitor not located at (0,0), the screenshot taken by NormCap is offset (as shown below). This can happen for example if you plug in a second monitor, set the second monitor to be located at (0,0) and the main monitor to be offset, and later unplug the second monitor.

Image

This image is the raw screenshot from /tmp/normcap, taken on a 2560x1600 display located at (0,1080).

Steps to reproduce:

  • Make sure you are using a wlroots-based Wayland compositor with wlr-randr installed
  • Run wlr-randr and note the ID of the display
  • Run wlr-randr --output <display ID> --pos 0,1080
  • Run normcap

How did you install NormCap?

AUR (Linux)

Operating System + Version?

Arch Linux (up to date as of 2024-04-11, kernel 6.14.1-zen1-1-zen)

[Linux only] Display Server (DS) + Desktop environment (DE)?

DS: Wayland, DE: river (wlroots)

Debug log output?*

18:26:56 - INFO    - normcap:50 - Start NormCap v0.5.9
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::systempalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::toolbuttonpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::buttonpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::checkboxpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::radiobuttonpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::headerpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::itemviewpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::messageboxlabelpelette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::tabbarpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::labelpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::groupboxpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::menupalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::menubarpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::texteditpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::texteditpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::textlineeditpalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::tooltippalette
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual qvariant qt6ctplatformtheme::themehint(qplatformtheme::themehint) const
18:26:56 - DEBUG   - normcap:183 - [QT] qtdebugmsg - virtual const qpalette* qt6ctplatformtheme::palette(qplatformtheme::palette) const qplatformtheme::systempalette
18:26:56 - DEBUG   - normcap.gui.tray:70 - System info:
{'normcap_version': '0.5.9', 'python_version': '3.13.2', 'cli_args': '/usr/bin/normcap -v debug', 'is_briefcase_package': False, 'is_flatpak_package': False, 'is_appimage_package': False, 'platform': 'linux', 'desktop_environment': <DesktopEnvironment.OTHER: 1>, 'display_manager_is_wayland': True, 'pyside6_version': '6.9.0', 'qt_version': '6.9.0', 'qt_library_path': '/usr/lib/qt6/plugins, /usr/bin', 'locale': 'DEFAULT', 'config_directory': PosixPath('/home/arthomnix/.config/normcap'), 'resources_path': PosixPath('/usr/lib/python3.13/site-packages/normcap/resources'), 'tesseract_path': PosixPath('/usr/bin/tesseract'), 'tessdata_path': None, 'envs': {'TESSDATA_PREFIX': None, 'LD_LIBRARY_PATH': None}, 'screens': [Screen(left=0, top=1080, right=2559, bottom=2679, device_pixel_ratio=1.0, index=0, screenshot=None)]}
18:26:56 - DEBUG   - normcap.gui.settings:167 - Skip update of non existing setting (show_introduction: None)
18:26:56 - DEBUG   - normcap.gui.settings:167 - Skip update of non existing setting (cli_mode: False)
18:26:56 - DEBUG   - normcap.gui.settings:167 - Skip update of non existing setting (background_mode: False)
18:26:56 - DEBUG   - normcap.gui.settings:167 - Skip update of non existing setting (clipboard_handler: None)
18:26:56 - DEBUG   - normcap.gui.tray:384 - Listen on local socket v0.5.9-normcap.
18:26:56 - DEBUG   - normcap.screengrab.main:21 - Compatible capture handlers: ['GRIM', 'DBUS_PORTAL', 'DBUS_SHELL']
18:26:56 - DEBUG   - normcap.screengrab.main:28 - Available capture handlers: ['GRIM', 'DBUS_PORTAL', 'DBUS_SHELL']
18:26:57 - DEBUG   - normcap.screengrab.post_processing:17 - Virtual geometry width: 2560
18:26:57 - DEBUG   - normcap.screengrab.post_processing:18 - Image width: 2560
18:26:57 - DEBUG   - normcap.screengrab.post_processing:19 - Resize ratio: 1.0
18:26:57 - INFO    - normcap.screengrab.main:67 - Screen captured using GRIM
18:26:57 - DEBUG   - normcap.gui.utils:22 - Save debug image as /tmp/normcap/2025-04-12_17-26-57_raw_screen0.png
18:26:57 - DEBUG   - normcap.gui.window:51 - Create window for screen 0
18:26:57 - DEBUG   - normcap.gui.window:141 - Set window of screen 0 to fullscreen
18:26:57 - DEBUG   - normcap:183 - [QT] qtwarningmsg - qsystemtrayicon::setvisible: no icon set
18:26:57 - DEBUG   - normcap.ocr.tesseract:24 - Executing '/usr/bin/tesseract --list-langs'
18:26:57 - DEBUG   - normcap.ocr.tesseract:37 - Tesseract command output: List of available languages in "/usr/share/tessdata/" (2): ¬ eng ¬ osd ¬
18:26:57 - WARNING - normcap.gui.window:129 - No window move method for 1
18:27:04 - DEBUG   - normcap.gui.tray:350 - Hide 1 window
18:27:04 - INFO    - normcap.gui.tray:606 - Exit normcap
18:27:04 - DEBUG   - normcap.gui.tray:607 - Debug images saved in /tmp/normcap

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeeds confirmation and priotization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions