flameshot
flameshot copied to clipboard
overlay displaced on multiple displays with different resolutions
Okay, so it might be an issue regarding both ultrawide monitors (speaking of 2.35:1) and multiple displays.
When taking a screenshot on such setups it basically creates a misplaced overlay across the screen which contains the correct content but is offset by some value.
On the left used to be another chrome window (right edge still visible) but instead the overlay which is supposed to be centered is offset to the left. Again I don't know if it is a bug related to multiple monitors or to ultrawides since I don't have another monitor hooked up currently but it might still mess things up since my xorg config includes some variables regarding it.
I'm unable to test with multiple monitors right now but I'll try to do it as soon as I can. I'll create a new branch of experimental support for hidpi and multi-monitor configurations. This requires a lot of investigation/testing because this kind of changes could break actual working configurations.
https://github.com/lupoDharkael/flameshot/issues/2#issuecomment-314707988
it should be fixed if you test it from the master branch. Please tell me if it works with your hardware.
I just tested the master branch (specifically commit 07e1df1c50ef796b8c7a67519fd0212d74445c9a ) and the result still matches the above image. Some more context:
- i3wm
- ArchLinux
- 21:9 Monitor (3440x1440)
One thing I just noticed in arandr
:
There is some padding to the left of my screen (basically its position is at X = 1920) due to the (currently not connected) second monitor. That might be causing the issue since the shift of the screenshot roughly matches the padding.
Edit: XRandr says the following DP-2 connected primary 3440x1440+1920+0
The screen grab seems to work ok now. The problem seems that your system has some kind of virtual screen and it's being grabbed within the physical screen. The problem is that Flameshot sets the grabbed screen starting from the first physical monitor in the the coord (0, 0). This can be fixed analysing the offsets of the screens. I need to find hot to recreate something like this in order to start testing a solution.
This is why I started to get involved in Flameshot. The oldest issue btw. :)
Will definitely look into this!
My Setup from left to right: 1920x1080 external monitor - 1920x1080 external monitor - 1280x720 laptop screen
(sorry for the bad quality - a little bit unprofessional but the best method to get the real thing I see across)
No ARandR padding for me.
EDIT1: Does not always happen. For some reason right now its not happening with 0.6.0 - but with current master - but the offset direction is reversed.
EDIT2: Unplugged my external screens (one VGA, one DP) for other stuff - replugged them - error not reproducible anymore neither with master nor with 0.6.0 :)
I am fairly sure this is related to fractional scaling. I have been digging into it.
我也遇到了,截屏时整个屏幕往左平移了
我也遇到了,截屏时整个屏幕往左平移了
找到原因了,屏幕缩放之前是1.25,就有问题。还原到1.0就正常了
I have a 1920x1200 monitor (left of main, portrait mode) and a 2560x1600 monitor (main display). Both are not scaled. Flameshot only shows overlay on the leftmost display. The issue doesn't seem to have anything to do with fractional scaling.
This system is running Fedora 33 Wayland session.
@skewty can you try building from source on the master branch? I recently merged something to help with wayland.
@skewty can you try building from source on the master branch? I recently merged something to help with wayland.
@borgmanJeremy Done. The current code in master does not have the overlay issue I reported above / fixes my issue. Thanks!
This is big enough to warrant a new tagged release, is it not?
Yeah im looking to release 0.9 soon-ish. I was really pushing to have upload plugins done for 0.9 but its going to juit have to push out I think.
I'd like to suggest a small improvement to overlay "help boxes" positioning. They should position themselves on the "primary" display (in Gnome) (I am assuming KDE has similar), not the leftmost display.
I have a similar issue, it seems like a QT HiDPI problem. I’m not sure if it’s the same problem, but the following command worked great for me.
QT_AUTO_SCREEN_SCALE_FACTOR=0 flameshot
I can finally take a screenshot, lol
flameshot 0.9.0-1
Still have the issue on Arch Linux, on KDE, with Nvidia driver.
https://user-images.githubusercontent.com/1641362/115972434-9160bb80-a54e-11eb-8a54-7df43a470c9e.mp4
I can confirm this issue.
It is only reproducible under 2 conditions:
- multiple displays
- Global scale factor in KDE's kscreen is > 100%
I dumped environment of flameshot from 2 runs (with 100% and 150% scaling), and this is the diff
[~]$ diff flameshot.envbad.txt flameshot.envok.txt
4c4
< SESSION_MANAGER=local/****:@/tmp/.ICE-unix/2252667,unix/****:/tmp/.ICE-unix/2252667
---
> SESSION_MANAGER=local/****:@/tmp/.ICE-unix/2249766,unix/****:/tmp/.ICE-unix/2249766
19c19
< QT_SCREEN_SCALE_FACTORS=eDP1=1.5;DP1=1.5;DP2=1.5;HDMI1=1.5;HDMI2=1.5;VIRTUAL1=1.5;
---
> QT_SCREEN_SCALE_FACTORS=eDP1=1;DP1=1;DP2=1;HDMI1=1;HDMI2=1;VIRTUAL1=1;
34c34
< XDG_SESSION_ID=7
---
> XDG_SESSION_ID=5
45c45
< XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session2
---
> XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
Based on this I made an assumption, that flameshot incorrecty handles the QT_SCREEN_SCALE_FACTORS
variables.
Observed case 1
- Set global scale to 100%
- Log out and Log in
- flameshot works ok
Observed case 2
- Repeat steps from case 1
- Set global scale to 150%
- Restart plasma and window manager (
kquitapp5 plasmashell && kstart5 plasmashell &
) and all the necessary apps to pick up new settings - flameshot works ok
Observed case 3
- Repeat steps form case 2
- Restart flameshot
- flameshot works ok (I'm confused at this point)
Observed case 4
- Set global scale to 150%
- Log out and Log in
- flameshot does not work
Observed case 5
- Repeat steps from case 4
- Restart flameshot with
export QT_SCREEN_SCALE_FACTORS="eDP1=1;DP1=1;DP2=1;HDMI1=1;HDMI2=1;VIRTUAL1=1;"
flameshot gui
- flameshot does not work (I'm confused again)
I hope this helps. If any additional info/experiments are needed, please let me know, I'm willing to help with whatever to make this fixed.
I'm affected by this bug too. Hopes it could be fixed.
This issue still exists in Kubuntu 23.10. I have two monitors, one with the laptop running 2880 x 1800 and another external monitor running 3840 x 2160, both are scaled at 150%. The whole screen displaced to the left when taking screen capture. Any solution?
Update:
This has been solved by adding the following parameter to start flameshot
/bin/sh -c 'env QT_SCREEN_SCALE_FACTORS="1" /usr/bin/flameshot gui -p ~/Pictures'
Still having this issue. QT_SCREEN_SCALE_FACTORS=1
doesn't help
Ah, setting QT_SCALE_FACTOR=1
works for me.