Open GXGOW opened 6 years ago
Workaround that Works For Me™:
unset the environment variables QT_SCREEN_SCALE_FACTORS
and QT_SCALE_FACTOR
, and set QT_AUTO_SCREEN_SCALE_FACTOR
to 0
before launching flameshot.
It may also help to unset GDK_SCALE
, GDK_DPI_SCALE
, and/or ELM_SCALE
.
Sadly, that did not change anything for me. Maybe the Wayland session has something to do with it too.
I have same problem in KDE on X.
I have the same problem. MS Surface Pro 3 4k display / scaling KDE NEON Developer
Workaround that Works For Me™:
unset the environment variables
QT_SCREEN_SCALE_FACTORS
andQT_SCALE_FACTOR
, and setQT_AUTO_SCREEN_SCALE_FACTOR
to0
before launching flameshot. It may also help to unsetGDK_SCALE
,GDK_DPI_SCALE
, and/orELM_SCALE
.
How do I implement this? Is there a way to put this in the .desktop file? If so, how?
I had this same problem, dual 4k displays on KDE in Ubuntu 18.04. Things wouldn't just look weird tho, the screen would get all super glitchy, like it "lost sync" or something. I would have to switch to another VT and kill the flameshot process to be able to see my desktop.
Right now I just have it wrapped in a simple shell script and that's how I start it.
I had this same problem, dual 4k displays on KDE in Ubuntu 18.04. Things wouldn't just look weird tho, the screen would get all super glitchy, like it "lost sync" or something. I would have to switch to another VT and kill the flameshot process to be able to see my desktop.
Right now I just have it wrapped in a simple shell script and that's how I start it.
I have 3 4k monitors running on KDE Plasma and this also did the trick for me. For those that come across this, you can do something like this in a script:
#!/bin/bash
QT_SCREEN_SCALE_FACTORS='' /usr/bin/flameshot &
MS Surface Pro 4 + Dell 4K P2415q Manjaro 18.0.4+ KDE The same problem, making scale by change system display settings.
Same here.
Model: Dell XPS 15 9560 OS: Ubuntu 19.04 4K display
Launching Flameshot with QT_SCREEN_SCALE_FACTORS works
QT_SCREEN_SCALE_FACTORS='' /usr/bin/flameshot &
The issue has been resolved for me. Thank you for an awesome app and for the bug fix.
I still have this problem when using a docking station (laptop connected to 4k display)
tried starting flameshot via command line; with suggestions posted here; did not work for me.
QT_SCREEN_SCALE_FACTORS='' QT_SCALE_FACTOR='' QT_AUTO_SCREEN_SCALE=0 GDK_SCALE='' GDK_DPI_SCALE='' ELM_SCALE='' /usr/bin/flameshot gui &
I still have this problem when using a docking station (laptop connected to 4k display)
tried starting flameshot via command line; with suggestions posted here; did not work for me.
QT_SCREEN_SCALE_FACTORS='' QT_SCALE_FACTOR='' QT_AUTO_SCREEN_SCALE=0 GDK_SCALE='' GDK_DPI_SCALE='' ELM_SCALE='' /usr/bin/flameshot gui &
You need to run flameshot with this and not flameshot gui. Then it should work
Thanks, tried it. but still does not work for me;
QT_SCREEN_SCALE_FACTORS='' QT_SCALE_FACTOR='' QT_AUTO_SCREEN_SCALE=0 GDK_SCALE='' GDK_DPI_SCALE='' ELM_SCALE='' /usr/bin/flameshot &
This is what I use to take screenshots on my 4k laptop. When docked, I have an external 4k display as well.
(EDIT: because posted with wrong github account)
Thanks for helping; Using this script is also not working for me. I think my use case is a bit different: my laptop is HD (1920x1080) and is connected to a dock that connects to a 4k display. I am also on Fedora 30.
Weirdly enough I changed from Wayland to Xorg and it is fixed for me :)
Seems launching Flameshot from the desktop entry doesn't source environment variables exported from .bashrc, .zshrc, etc..
If I launch Flameshot from my terminal using the flameshot
command, and check the process' environment variables (cat /proc/$(pidof flameshot)/environ | tr \\0 \\n
), QT_AUTO_SCREEN_SCALE_FACTOR=0
which is correct in my case, as I have that variable exported in my .zshrc.
However launching Flameshot from the desktop entry appears to not source my .zshrc and defaults QT_AUTO_SCREEN_SCALE_FACTOR=2
.
To resolve this I did the following:
cp /usr/share/applications/flameshot.desktop ~/.local/share/applications
vim ~/.local/share/applications/flameshot.desktop
Replace Exec=flameshot
with Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=0 flameshot
under the [Desktop Entry]
heading, then restart Flameshot from desktop entry.
Depending on your window manager/desktop environment you may need to play with the other environment variables mentioned in the previous comments. In my case I just had to force the one variable.
Hope this helps someone! :beers:
Hello, friends. I've made attempt to fix this, my pre-release are here https://github.com/Mart-Bogdan/flameshot/releases/tag/tmp-fix-scaling-2
Feedback welcome. If it works for you feel free to upwote my Pull Request #678
But I have no ability to test it in Wayland, only on X
The fixes with environment variables mentioned above did not work for me, however after investigating the QT environment variables the following appeared to have caused the issue QT_DEVICE_PIXEL_RATIO
. Unsetting it before launching flameshot resolved the issue for me.
Cinnamon 3.4.6 on Linux Mint 18.2
@Alberts00 does it draw icons correctly, etc? Could you try my FIX? I really would like the authors to merge it.
I believe setting QT_DEVICE_PIXEL_RATIO to 1 would make buttons ridiculously small.
@Mart-Bogdan, unsetting the variable ensures that it is drawn correctly, however since I'm on one screen - 1920x1080 14''' the fact that scaling is not taking place is not really noticable. Before doing the fix mentioned above I did also try your PR.
The results are as follows:
master (91ba28c) - with QT_DEVICE_PIXEL_RATIO=auto - 1/4 of the scrren is grayed out
master (91ba28c) - with QT_DEVICE_PIXEL_RATIO unset
Mart-Bogdan/tmp-fix-scaling-2 (c3d0377 - #678) - with QT_DEVICE_PIXEL_RATIO=auto - 1/4 of the screen is not covered by flameshot
Mart-Bogdan/tmp-fix-scaling-2 (c3d0377 - #678) - with QT_DEVICE_PIXEL_RATIO unset
It seems that at least in my case your fix does not resolve the issue of only 1/4 screen of being covered.
Strange thing.
Just gogoled for Qt documentation and it says
In Qt 5.4, there was an experimental implementation of high DPI scaling introduced via the QT_DEVICE_PIXEL_RATIO environment variable, that you could set to a numerical scale factor or auto. This variable was deprecated in Qt 5.6.
that QT_DEVICE_PIXEL_RATIO is deprecated in Qt.
Never thought that HighDPI support is so hard. Unfortunately, I'm not much fammiliar with QT.
Seems Cinamon handles scaling differently than Plasma.
AS I can see on your first example original image was cropped.
anyway in your case you could create wrapper script I belive:
mv /usr/bin/flameshot /usr/bin/flameshot-real
cat <<EOF >/usr/bin/flameshot
#!/bin/sh
unset QT_DEVICE_PIXEL_RATIO
exec flameshot-real "$@"
EOF
chmod 777 /usr/bin/flameshot
A dirty workaround, but It's hard without active maintainer :(
Is there any updates on this issue? QT_SCALE_FACTOR doesn't really solve it...
Did you read the comment right above yours? @styfrombrest
no workarounds mentioned in this issue work unfortunately if you have a mixed configuration (f.e. HiDPI notebook display + external full hd monitor).
@andersfylling yes of course, but it doesn't work for me(HiDPI monitor + full hd laptop) that's why I asked. Really liked this app, but looks like I need to find another that will work on my configuration.
I set export QT_AUTO_SCREEN_SCALE_FACTOR=1
on .xprofile
.
and use this script
#!/bin/bash
sleep 3s
QT_SCREEN_SCALE_FACTORS=1 /usr/bin/flameshot &
make it auto start.
I use desktop file /home/username/.config/autostart
[Desktop Entry]
Type=Application
Name=Flame
Exec=/home/username/.config/autostart/flameshot.sh
Model: Dell XPS 15 9570 OS: Manjaro Linux (Gnome Edition) 4K display xorg
I set
export QT_AUTO_SCREEN_SCALE_FACTOR=1
on.xprofile
.and use this script
#!/bin/bash sleep 3s QT_SCREEN_SCALE_FACTORS=1 /usr/bin/flameshot &
make it auto start.
I use desktop file
/home/username/.config/autostart
[Desktop Entry] Type=Application Name=Flame Exec=/home/username/.config/autostart/flameshot.sh
Hello,
This message is from [June, 2021 AD]
I am still experiencing the same issue. is it something our respectful and mighty Ubuntu developers cannot just hardcode the newer releases by default??
If we were gonna stay at the 1920x1080 resolution forever, I would understand; BUT monitor's quality is only getting better. I am sure they probably have 4K monitors as well.
1) I cannot seem to find the workaround 2) I sincerely hope some Ubuntu developer sees this message one day, and decided to add that feature directly to the system settings when one day we upgraded to the next release.
in the mean time, if someone has a solution, please share here.
I am using latest Ubuntu 21.04 (I usually upgrade to the latest version when they push it from the server side, so by the time when you see this, please check what's the current version of Ubuntu is, and if this has been added to the system config by default; otherwise me and at least hundreds of me may be looking for a solution in the ocean of internet.
Best Regards
Elysium
met the same problme on manjaro gnome 40 wayland.
Flameshot v0.9.0 Compiled with Qt 5.15.2
Hello, friends. I've made attempt to fix this, my pre-release are here https://github.com/Mart-Bogdan/flameshot/releases/tag/tmp-fix-scaling-2
Feedback welcome. If it works for you feel free to upwote my Pull Request #678
nice,it's useful in manjaro KDE,tks 😄
@NanOns Do you confirm that the form @Mart-Bogdan has actually works on KDE with 4K display? If so, please put a comment on #678
@NanOns Do you confirm that the form @Mart-Bogdan has actually works on KDE with 4K display? If so, please put a comment on #678
Already commented,but my montior is 3000x2000 and 1920x1080
Is there any update in this issue?
This problem happens on Mac as well.
Then what tools do you want to use except flameshot In ubuntu20
Describe the bug
Whenever I try to take a screenshot with Flameshot, it only shows a quarter of the screen. More specific, the top left quarter of the screen.
To Reproduce
Expected behavior
I should be able to take a screenshot of the full screen.
Desktop (please complete the following information):