Bug 423702 - bad scaling on external monitor if QT_SCREEN_SCALE_FACTORS is set.
Summary: bad scaling on external monitor if QT_SCREEN_SCALE_FACTORS is set.
Status: RESOLVED LATER
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.10.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-30 13:50 UTC by San
Modified: 2020-07-02 16:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
good/bad antialiasing (69.62 KB, image/png)
2020-06-30 13:50 UTC, San
Details

Note You need to log in before you can comment on or make changes to this bug.
Description San 2020-06-30 13:50:57 UTC
Created attachment 129796 [details]
good/bad antialiasing

SUMMARY
bad scaling on external monitor, almost impossible to read at normal size,
if QT_SCREEN_SCALE_FACTORS is set.

STEPS TO REPRODUCE
1. have a Hi-DPI laptop (here 3200x1800)
2. connect an external normal-dpi monitor (1920x1200) to extend the desktop
3. open a PDF document and move the window onto the external screen

OBSERVED RESULT

the PDF is scaled with very bad antialiasing.

EXPECTED RESULT

nice antialiasing


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Neon User
KDE Plasma Version:  5.19.2
KDE Frameworks Version: 5.71.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION

Workaround: 
export QT_SCREEN_SCALE_FACTORS=''
before using okular, then it works
Comment 1 Oliver Sander 2020-06-30 19:41:04 UTC
I experienced something similar, as described in

  https://bugs.kde.org/show_bug.cgi?id=421634

Can you please check whether that is related?
Comment 2 San 2020-07-01 18:11:30 UTC
@Oliver, I'm not sure but I don't think so, since in my case the problem is due to different scalings on the monitors.
Comment 3 Oliver Sander 2020-07-01 18:43:21 UTC
That's possible.  What do you set QT_SCREEN_SCALE_FACTORS to?
Comment 4 Nate Graham 2020-07-02 01:28:50 UTC
Yes, mixed values of QT_SCREEN_SCALE_FACTORS are not supported on X11 for this and many other reasons. There is a proposal to begin supporting this; see https://phabricator.kde.org/D12405.

However a lot of work will be required to get there. In the meantime, the Wayland session already supports this feature so I would recommend giving that a try.
Comment 5 San 2020-07-02 16:00:01 UTC
my QT_SCREEN_SCALE_FACTORS is

eDP-1=2;DP-1=1;HDMI-1=1;DP-2=1;HDMI-2=1;

(notice the "2" for the laptop screen eDP-1)
Comment 6 San 2020-07-02 16:08:02 UTC
@Nate, unfortunately I use displaylink driver for my external screen, and it won't work with Wayland. (not detected)
Comment 7 Nate Graham 2020-07-02 16:20:30 UTC
Yeah, I'm afraid mixed DPI on X11 is not supported for precisely this reason. It's a can of worms. We *might* be able to implement it eventually, but it will be very challenging. So at the moment, if you use it anyway, you're on your own. :)

Can you file a bug for the Wayland issue?