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

Blurry write and icons #6935

Closed
Timmy93 opened this issue Jun 9, 2017 · 38 comments
Closed

Blurry write and icons #6935

Timmy93 opened this issue Jun 9, 2017 · 38 comments

Comments

@Timmy93
Copy link

Timmy93 commented Jun 9, 2017

System: QBittorrent 3.3.13 - Linux Mint 18.1 - 64bit

If on linux, libtorrent and Qt version:

Libtorrent 1.0.11.0 - Qt: 5.5.1

What is the problem:

I cannot see properly the window of qbittorrent because all the images and section are super zoomed, I can imagine that's a problem related to the HiDPI infact I've an old 1920x1080 Samsung screen.
Until yesterday, before the update, I had no resolution problem.

What is the expected behavior:

I expect to see the write, the images and the icon not blurry as if everything is extra zoomed

Steps to reproduce:

  1. Get a 1080x1920 display
    2)Open QBittorrent 3.3.13
@Chocobo1
Copy link
Member

Chocobo1 commented Jun 9, 2017

Try setting environment variable QT_AUTO_SCREEN_SCALE_FACTOR=0 and then run qBittorrent.

@Timmy93
Copy link
Author

Timmy93 commented Jun 9, 2017

@Chocobo1 Can you please explain me where to find this parameter to change?
Is it in an external file or in the qbittorrent settings?

@Chocobo1
Copy link
Member

Chocobo1 commented Jun 10, 2017

open a terminal/console, and type:

export QT_AUTO_SCREEN_SCALE_FACTOR=0
qbittorrent

@Timmy93
Copy link
Author

Timmy93 commented Jun 10, 2017

@Chocobo1 No changes also setting this variable. Here is a pic of the problem:
a

@yate
Copy link

yate commented Jun 16, 2017

QT_AUTO_SCREEN_SCALE_FACTOR=0 worked for me, but is this the solution or just a temporary workaround?

@Chocobo1 Chocobo1 mentioned this issue Jun 18, 2017
@GildedHonour
Copy link

for me it didn't work

@zeule
Copy link
Contributor

zeule commented Jun 18, 2017

Blurred icons will disappear when we switch from PNG to SVG.

@Timmy93
Copy link
Author

Timmy93 commented Jun 19, 2017

In my case the UI too large present this problem only on the second monitor (1920x1080) while in my first one (1366x768) there are no problems.
NB. I use only one monitor per time.

@dgutov
Copy link

dgutov commented Jul 3, 2017

QT_AUTO_SCREEN_SCALE_FACTOR=0 worked here as well.

Without it, not only the buttons were too large, but the context menus as well (the items like 3x as tall as the text inside them).

@Timmy93
Copy link
Author

Timmy93 commented Jul 4, 2017

Still not working any of this methods.
The problem exists only when i use my second screen (1920x1080), while in my laptop screen (1366x768) I've absolutely no problem.

@Tahvok
Copy link

Tahvok commented Jul 15, 2017

Same problem here.
See screenshot as example:
screenshot_20170715_163331

QT_AUTO_SCREEN_SCALE_FACTOR=0 worked. It's the only qt applications that is behaving like this.

@nighto
Copy link

nighto commented Jul 21, 2017

This happens on Windows as well, although slightly different. Windows is set to 1920x1080 with 150% zoom, other apps react properly (like Chrome in background) and qBittorrent is blurry zoomed, including text.

image

On Windows 10 graphical settings, "Set scale and layout" is set to 150% (sorry for the portuguese screenshot):

image

@zeule
Copy link
Contributor

zeule commented Jul 21, 2017

Linux users: most likely you screen setup is misconfigured, in particular DPI is incorrect. Those, who need help with this and are running X session, please post outputs from:

  1. $ xrandr
  2. $ xdpyinfo | grep -B5 resolution
  3. $ env | grep Xft.dpi

@dgutov
Copy link

dgutov commented Jul 21, 2017

Here you go:

$ xrandr
Screen 0: minimum 8 x 8, current 5760 x 2160, maximum 32767 x 32767
eDP1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 350mm x 190mm
   3840x2160     60.00*+
   3200x1800     60.00  
   2880x1620     60.00  
   2560x1440     60.00  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     60.00  
   1920x1200     59.95  
   1920x1080     60.00    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      60.00  
   1280x1024     60.02  
   1440x900      59.89  
   1280x960      60.00  
   1368x768      60.00  
   1360x768      59.80    59.96  
   1152x864      60.00  
   1280x720      60.00  
   1024x768      60.00  
   1024x576      60.00  
   960x540       60.00  
   800x600       60.32    56.25  
   864x486       60.00  
   640x480       59.94  
   720x405       60.00  
   640x360       60.00  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1200+3840+346 (normal left inverted right x axis y axis) 520mm x 320mm
   1920x1200     59.95*+
   1920x1080     60.00  
   1600x1200     60.00  
   1680x1050     59.88  
   1280x1024     60.02  
   1280x960      60.00  
   1024x768      60.00  
   800x600       60.32  
   640x480       59.94  
   720x400       70.08  
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
$ xdpyinfo | grep -B5 resolution
default screen number:    0
number of screens:    1

screen #0:
  dimensions:    5760x2160 pixels (1524x572 millimeters)
  resolution:    96x96 dots per inch
$ env | grep Xft.dpi
$ <nothing>

@zeule
Copy link
Contributor

zeule commented Jul 21, 2017

@dgutov: which one of your screens (internal with 279 DPI or external with 94 DPI) do you want to sacrifice? You joined them into a single virtual screen, but due to the too different resolutions, one of them will show font rendering problems.
You can try to launch qBittorrent as follows: $ Xft.dpi=279 qbittorrent on your internal screen to see whether it makes fonts correct.

@dgutov
Copy link

dgutov commented Jul 21, 2017

The secondary one (it has lower resolution). Which is the usual choice for most applications, AFAICT.

You can try to launch qBittorrent as follows: $ Xft.dpi=279 qbittorrent on your internal screen to see whether it makes fonts correct.

No change. To be clear, the internal screen is the 4K one.

@dgutov
Copy link

dgutov commented Jul 21, 2017

By the way, qBittorent doesn't look too hot on the secondary screen either. Both buttons and fonts are too small for it.

@zeule
Copy link
Contributor

zeule commented Jul 21, 2017

It does not react on any value of Xft.dpi?

@dgutov
Copy link

dgutov commented Jul 21, 2017

Indeed, it doesn't. Certainly not how it reacts to QT_AUTO_SCREEN_SCALE_FACTOR=0.

@zeule
Copy link
Contributor

zeule commented Jul 21, 2017

Does it react on:

$ XFT_SETTINGS="
Xft.dpi:        279
"
$ export XFT_SETTINGS
$ qbittorrent

?

@dgutov
Copy link

dgutov commented Jul 22, 2017

No reaction either.

@zeule
Copy link
Contributor

zeule commented Jul 22, 2017

$ echo "Xft.dpi:279" | xrdb -merge
$ qbittorrent

@dgutov
Copy link

dgutov commented Jul 22, 2017

That elicited a reaction. But that makes the fonts too big. The value of 192 makes them good size, but without QT_AUTO_SCREEN_SCALE_FACTOR=0, the images are still weirdly positioned on the buttons and the scroll bar controls are still pixelated.

Also note that with QT_AUTO_SCREEN_SCALE_FACTOR=0 the line spacings, buttons and scroll bars are smaller, but the text size is still affected by whatever value of DPI I've set using xrdb -merge.

IOW, there are other settings in play as well.

@Timmy93
Copy link
Author

Timmy93 commented Jul 22, 2017

I tried also to follow your suggestion, but it modify only the font size, the images are still too zoomed and big.
immagine

@zeule
Copy link
Contributor

zeule commented Jul 23, 2017

IOW, there are other settings in play as well.

Obviously. What DE do you run? Do you mind showing complete output of env (with your private data removed, if you want)?

@dgutov
Copy link

dgutov commented Jul 23, 2017

Unity 7 :)

Not too much private there:

CLUTTER_IM_MODULE=xim
COLORTERM=truecolor
COMPIZ_BIN_PATH=/usr/bin/
COMPIZ_CONFIG_PROFILE=ubuntu
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
DESKTOP_SESSION=ubuntu
DISPLAY=:0
EDITOR=zile
GDMSESSION=ubuntu
GDM_LANG=en_US
GIO_LAUNCHED_DESKTOP_FILE=/home/dgutov/.local/share/applications/terminator.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=3354
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GNOME_SESSION_XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
GPG_AGENT_INFO=/home/dgutov/.gnupg/S.gpg-agent:0:1
GTK2_MODULES=overlay-scrollbar
GTK_IM_MODULE=ibus
GTK_MODULES=gail:atk-bridge:unity-gtk-module
HOME=/home/dgutov
IM_CONFIG_PHASE=1
JOURNAL_STREAM=8:29942
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_ADDRESS=ru_RU.UTF-8
LC_IDENTIFICATION=ru_RU.UTF-8
LC_MEASUREMENT=ru_RU.UTF-8
LC_MONETARY=ru_RU.UTF-8
LC_NAME=ru_RU.UTF-8
LC_NUMERIC=ru_RU.UTF-8
LC_PAPER=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_TIME=ru_RU.UTF-8
LIBVIRT_DEFAULT_URI=qemu:///system
LOGNAME=dgutov
MANAGERPID=1963
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
PATH=/home/dgutov/bin:/home/dgutov/.rbenv/bin:/home/dgutov/.rbenv/shims:/home/dgutov/.cargo/bin:/home/dgutov/bin:/home/dgutov/.rbenv/shims:/home/dgutov/.rbenv/bin:/home/dgutov/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/gutov/.cask/bin:/usr/lib/dart/bin:/home/gutov/.cask/bin
PWD=/home/dgutov
QT4_IM_MODULE=xim
QT_ACCESSIBILITY=1
QT_IM_MODULE=ibus
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
QT_QPA_PLATFORMTHEME=appmenu-qt5
RBENV_SHELL=bash
SHELL=/bin/bash
SHLVL=3
SSH_AGENT_LAUNCHER=gnome-keyring
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
TERM=xterm-256color
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/2058
USER=dgutov
VTE_VERSION=4402
WINEPREFIX=/media/minauros/.wine
XAUTHORITY=/home/dgutov/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/systemd-session:/usr/share/upstart/xdg:/etc/xdg
XDG_CURRENT_DESKTOP=Unity
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/dgutov
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP=ubuntu
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XMODIFIERS=@im=ibus

@yate
Copy link

yate commented Jul 25, 2017

This issue keepassxreboot/keepassxc#323 may be related.

@Tahvok
Copy link

Tahvok commented Jul 25, 2017

I'm on archlinux running i3wm.
I must say this problem does not appear if I switch to plasma 5!
Provided 2 env from this different environments.

i3wm:

VIRTUALENVWRAPPER_WORKON_CD=1
ANDROID_HOME=/opt/android-sdk
VIRTUALENVWRAPPER_HOOK_DIR=/home/albert/.virtualenvs
LANG=en_US.utf8
GDM_LANG=en_US.utf8
DISPLAY=:0
WORKON_HOME=/home/albert/.virtualenvs
COLORTERM=truecolor
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
XDG_VTNR=7
SSH_AUTH_SOCK=/tmp/ssh-t5QU56dAYY1H/agent.1077
XDG_SESSION_ID=c2
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/albert
USER=albert
DESKTOP_SESSION=i3
QT_QPA_PLATFORMTHEME=qt5ct
PWD=/home/albert
HOME=/home/albert
SSH_AGENT_PID=1078
XDG_SESSION_TYPE=x11
XDG_SESSION_DESKTOP=i3
GTK_MODULES=canberra-gtk-module
MAIL=/var/spool/mail/albert
VIRTUALENVWRAPPER_SCRIPT=/usr/bin/virtualenvwrapper.sh
TERM=xterm-256color
SHELL=/bin/bash
VTE_VERSION=4803
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CURRENT_DESKTOP=i3
XDG_SEAT=seat0
SHLVL=2
WINDOWID=37748739
MAVEN_OPTS=-Xmx512m
GDMSESSION=i3
LOGNAME=albert
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
XDG_RUNTIME_DIR=/run/user/1000
XAUTHORITY=/home/albert/.Xauthority
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project
ANT_HOME=/usr/share/apache-ant
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
PATH=/usr/lib/hardening-wrapper/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/platform-tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/albert/bin
_=/usr/bin/env

plasma5 (no dpi problem here):

GS_LIB=/home/albert/.fonts
KDE_FULL_SESSION=true
VIRTUALENVWRAPPER_WORKON_CD=1
ANDROID_HOME=/opt/android-sdk
VIRTUALENVWRAPPER_HOOK_DIR=/home/albert/.virtualenvs
LANG=en_US.utf8
GDM_LANG=en_US.utf8
PROFILEHOME=
DISPLAY=:0
SHELL_SESSION_ID=8685f9f221c64b358a2645a08d524ea0
QSG_RENDER_LOOP=
WORKON_HOME=/home/albert/.virtualenvs
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
XDG_VTNR=7
QT_QUICK_CONTROLS_STYLE=org.kde.desktop
SSH_AUTH_SOCK=/tmp/ssh-8x67BmgrjnyS/agent.966
XDG_SESSION_ID=c2
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/albert
USER=albert
DESKTOP_SESSION=plasma
QT_QPA_PLATFORMTHEME=qt5ct
PWD=/home/albert
HOME=/home/albert
SSH_AGENT_PID=967
XCURSOR_SIZE=0
XDG_SESSION_TYPE=x11
XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
KONSOLE_DBUS_SESSION=/Sessions/1
XDG_SESSION_DESKTOP=plasma
KONSOLE_DBUS_WINDOW=/Windows/1
GTK_MODULES=canberra-gtk-module
MAIL=/var/spool/mail/albert
VIRTUALENVWRAPPER_SCRIPT=/usr/bin/virtualenvwrapper.sh
TERM=xterm-256color
SHELL=/bin/bash
KONSOLE_DBUS_SERVICE=:1.45
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XCURSOR_THEME=Adwaita
XDG_CURRENT_DESKTOP=KDE                                                                                     
KONSOLE_PROFILE_NAME=Dark                                                                                   
XDG_SEAT=seat0                                                                                              
SHLVL=2                                                                                                     
COLORFGBG=15;0                                                                                              
LANGUAGE=                                                                                                   
WINDOWID=4194310                                                                                            
MAVEN_OPTS=-Xmx512m                                                                                         
GDMSESSION=plasma                                                                                           
LOGNAME=albert                                                                                              
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus                                                       
XDG_RUNTIME_DIR=/run/user/1000                                                                              
XAUTHORITY=/home/albert/.Xauthority                                                                         
VIRTUALENVWRAPPER_PROJECT_FILENAME=.project                                                                 
ANT_HOME=/usr/share/apache-ant                                                                              
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0                                                   
QT_AUTO_SCREEN_SCALE_FACTOR=0
PATH=/usr/lib/hardening-wrapper/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/platform-tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/albert/bin
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
SESSION_MANAGER=local/albertm-dell:@/tmp/.ICE-unix/708,unix/albertm-dell:/tmp/.ICE-unix/708
_=/usr/bin/env

edit: I've noticed that plasma 5 comes with QT_AUTO_SCREEN_SCALE_FACTOR=0 so it's not a good example? Unsetting this variable made the same DPI issue appear on plasma as well.

@dgutov
Copy link

dgutov commented Sep 11, 2017

I'd like to report that after upgrading to Ubuntu 17.04, the icon positioning became much better. Some icons are stretched too much (i.e. don't have high enough resolution), like the ones on the status bar (connection status and others), but overall the scaled UI is quite usable.

@zeule
Copy link
Contributor

zeule commented Sep 11, 2017

@Tahvok: the difference is the presence of QT_AUTO_SCREEN_SCALE_FACTOR=0 in Plasma session, I guess.

@Tahvok
Copy link

Tahvok commented Sep 12, 2017

@evsh indeed it is, as I've said in an edit above.

@GildedHonour
Copy link

when will this be fixed/

@Timmy93
Copy link
Author

Timmy93 commented Oct 1, 2017

I temporarily moved to transmission (or deluge) both are working fine, are open-source as well and have no graphics problem.
Still waiting for a fix or a efficient and working workaround.

yate added a commit to yate/qBittorrent that referenced this issue Oct 2, 2017
If the environment variable QT_AUTO_SCREEN_SCALE_FACTOR is not set, default it to 0 to prevent scaling issues such as qbittorrent#6935.
@yate
Copy link

yate commented Oct 2, 2017

I added export QT_AUTO_SCREEN_SCALE_FACTOR=0 to /etc/profile for my workaround. As a plus it also fixed KeepassXC and Calibre, which both have/had the same issue. I also added a pull request to do the same in the code, we'll see what the consensus is around that change.

@mrturcot
Copy link

mrturcot commented Aug 11, 2018

I'm having this exact issue on Linux Mint 19. Only solution for me was the one provided by @Chocobo1 at the top. Issue persists on 4.1.1 & 4.2.0.

Edit - After downgrading to 4.1.1 (as no menu icon for 4.2.0). I added a line in /etc/environment with QT_AUTO_SCREEN_SCALE_FACTOR=0 Logged out of the session, logged back in, launched qbittorrent from the menu and scaling was fixed.

@fabgam
Copy link

fabgam commented Sep 5, 2018

Xubuntu 18.04 LTS, qBitorrent 4.1.2

Same issue reported above, fix adding this line QT_AUTO_SCREEN_SCALE_FACTOR=0 in /etc/environment. Followed by an insertion of the correct DPI value of my screen.

Chocobo1 added a commit to Chocobo1/qBittorrent that referenced this issue Sep 5, 2018
It seems `QT_AUTO_SCREEN_SCALE_FACTOR` doesn't work as expected.
Closes qbittorrent#6935.
@Chocobo1
Copy link
Member

Chocobo1 commented Sep 5, 2018

I've submitted PR #9444 to fix this.

@Chocobo1
Copy link
Member

Chocobo1 commented Sep 6, 2018

Will be fixed in next release (v4.1.3).

sledgehammer999 pushed a commit that referenced this issue Sep 18, 2018
It seems `QT_AUTO_SCREEN_SCALE_FACTOR` doesn't work as expected.
Closes #6935.
@qbittorrent qbittorrent locked and limited conversation to collaborators Feb 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants