Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor performance when using gui to snip while running GPU accelerated programs #1911

Closed
TheBeardOfTruth opened this issue Sep 19, 2021 · 5 comments
Labels
Unconfirmed Bug The bug is not confirmed by anyone else.

Comments

@TheBeardOfTruth
Copy link

Flameshot version

$ flameshot -v
Flameshot v0.10.1
Compiled with Qt 5.15.2

Bug Description

Probably related to #1901

When running hardware accelerated programs such as discord or some games (especially both simultaneously) it is sometimes virtually impossible to take screenshots as flameshot gui will perform at below single-digit framerates, taking several seconds to darken the screen and being entirely unresponsive when trying to drag out a selection.

Specifically it will either be impossible to make a selection (can't grow more than a few pixels per second), or it'll be impossible to make a precise selection (will overshoot by continuing to grow even after mouse input has stopped)

I don't really know if flameshot is gpu accelerated or not, but the issue is consistent with gpu accelerated programs so it seems probable. This doesn't feel like it should take a huge amount of GPU power either, dump the framebuffer, copy it, tint the copy black and do some alpha masking when selecting an area.

To Reproduce

Run some gpu accelerated programs (e.g discord, in a VC with a stream and a relatively intensive game, and try to screenshot said game; sometimes it'll work, sometimes it'll be unbearably slow but I haven't managed to pinpoint the precise conditions that cause it -- notably it happens quite frequently with discord (VC, w/ stream) + warframe (proton GE 6.13), settings as high as possible while maintaining framerates above 60)

Expected behavior

I'd expect it to have at least usable performance.

System Information

inxi output:

System:
  Host: nihil Kernel: 5.13.5-arch1-1 x86_64 bits: 64 Desktop: bspwm 0.9.10 
  Distro: Arch Linux 
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1070] driver: nvidia v: 470.57.02 
  Display: x11 server: X.Org 1.20.12 driver: loaded: nvidia resolution: 
  1: 3840x2160~60Hz 2: 3840x2160~60Hz 3: 3840x2160~60Hz 
  OpenGL: renderer: NVIDIA GeForce GTX 1070/PCIe/SSE2 
  v: 4.6.0 NVIDIA 470.57.02 

Relevant info regarding screens (3x 4K, hence similarity to #1901):

Monitors: 3
 0: +*DP-4 3840/620x2160/340+3840+0  DP-4
 1: +DP-0 3840/620x2160/340+0+0  DP-0
 2: +DP-2 3840/620x2160/340+7680+0  DP-2

And relevant lshw GPU info:

1c:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)

  *-display                 
       description: VGA compatible controller
       product: GP104 [GeForce GTX 1070]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:1c:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:44 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:c0000-dffff
@borgmanJeremy
Copy link
Contributor

Is this a recent change or has it always been an issue. Since we had two reports this week from arch users I wonder if there was an upstream change.

@TheBeardOfTruth
Copy link
Author

TheBeardOfTruth commented Sep 20, 2021

I want to say it's been an issue for a while, but I haven't used flameshot for more than a couple of months so I don't have a huge amount of confidence in that statement.

Definitely a couple of weeks at least, I intended to make this report last week but it completely slipped my mind.

@mmahmoudian mmahmoudian added the Unconfirmed Bug The bug is not confirmed by anyone else. label Sep 20, 2021
@mmahmoudian
Copy link
Member

@borgmanJeremy is this related to the other one which you could reproduce with xrandr hack?

@borgmanJeremy
Copy link
Contributor

Yes i think this is a duplicate. It seems to be completely related to the # of pixels and nothing to do with the GPU. In fact in investigating this I found we are completely software rendering the screen. There is a different QtOpenGLWidget type if we want to take advantage of CPU's.

@syeopite
Copy link

Is this a recent change or has it always been an issue. Since we had two reports this week from arch users I wonder if there was an upstream change.

I can say for certain that my issue has been a problem since #789 at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unconfirmed Bug The bug is not confirmed by anyone else.
Projects
None yet
Development

No branches or pull requests

4 participants