hyprwm / contrib

Community scripts and utilities for Hypr projects
MIT License
284 stars 39 forks source link

grimblast crashes when trying to screenshot area #101

Closed happenslol closed 4 months ago

happenslol commented 5 months ago

Program

grimblast

Maintainers of the program

@fufexan @Misterio77

Bug or Regression?

Bug

Description

When using grimblast <mode> area, the screen flashes white for a second, and then I get the following output:

$ grimblast copy area
wl_pointer@22: error 0: Device already exists
selection cancelled

How to reproduce

screen and window work fine, it's only area that shows the behavior. The following produces the bug for me:

grimblast copy area

Hyprland crash reports, program logs, images, videos

Hyprland version, installed from the nix flake:

Hyprland, built from branch  at commit e400a288d0f8ef75672cb201203b857b65b782bb  ().
Date: 2024-04-27
Tag: , commits: @COMMITS@

flags: (if any)

Grimblast check output:

Checking if required tools are installed. If something is missing, install it to your system and make it available in PATH...
   grim: OK
   slurp: OK
   hyprctl: OK
   hyprpicker: OK
   wl-copy: OK
   jq: OK
   notify-send: OK

I've attached the relevant hyprland logs that occur when I use my screenshot shortcut, which invokes

#!/usr/bin/env bash
mkdir -p ~/screenshots

timestamp="$(date +"%Y%m%d-%H%M%S-%N")"
grimblast --notify copysave "$1" ~/screenshots/"$timestamp".png

hyprland-log-grimblast-error.txt

fufexan commented 5 months ago

Can you see whether slurp works? I suspect it's the problem.

Do you have a Nvidia card?

happenslol commented 5 months ago

Nope, I'm on AMD. It works on my Notebook (Framework) with Intel graphics though. I'll check slurp when I get home.

PONYMODZ commented 5 months ago

Can you see whether slurp works? I suspect it's the problem.

Do you have a Nvidia card?

Tried slurp and got the same error I am on Nvidia 535.xx

$ slurp
wl_pointer@22: error 0: Device already exists
selection cancelled
happenslol commented 5 months ago

Yup, it's definitely slurp.

mhiuuu commented 4 months ago

Hi, not experiencing crashes but grimblast tends to freeze my screen of I try to use the same command thru bindings but not when using terminal!!! (I still able to open/close windows, change workspace but nothing more than that, no typing, no cursor). Like I have to use grimblast 2 times in order for it to work properly. Slurp works fine too

This is my config for grimblast bind bind = $mainMod, S, exec, grimblast copy area

fufexan commented 4 months ago

@mhiuuu can you do bind = $mainMod, S, exec, grimblast check > $HOME/grimblast.log, press the keybind and check the log?

mhiuuu commented 4 months ago
   1   │ Checking if required tools are installed. If something is missing, install it to your system a
       │ nd make it available in PATH...
   2   │    grim: OK
   3   │    slurp: OK
   4   │    hyprctl: OK
   5   │    hyprpicker: OK
   6   │    wl-copy: OK
   7   │    jq: OK
   8   │    notify-send: OK

Here is the output. At first, the hyprpciker was NOT FOUND but I installed it. However, the issue stays the same

happenslol commented 4 months ago

@mhiuuu Hey, could you maybe open another issue for that, or ask in the discord? Your problem seems to be completely separate from the slurp issues we're experiencing, so I think it makes sense to keep discussion in this issue focused on the bug.

mhiuuu commented 4 months ago

@happenslol of course!

happenslol commented 4 months ago

Seems fixed, can anyone confirm?

PONYMODZ commented 4 months ago

Seems fixed, can anyone confirm?

yes, it seems fixed for me too with 8bit and 10bit color depth This issue can be closed if no one else has an issue anymore

happenslol commented 4 months ago

I'll just close for now, wasn't really an issue with grimblast itself anyways. 👍