sddm is super tiny with external screen since 0.14 #692

Open
darkbasic opened this Issue Sep 5, 2016 · 27 comments

Comments

Projects
None yet
10 participants

darkbasic commented Sep 5, 2016

Hi, I just upgraded to 0.14 and HiDPI support worked as expected with my Dell XPS 13 QHD+ (3.200x1.800) out of the box. Unfortunately, when I boot with the LID closed and two 2560x1440 25" external monitors attached I get a super tiny sddm instead. I didn't have such a problem with 0.13 and earlier releases. I use my laptop mostly with the external monitors attached so this is quite annoying. Distro is Archlinux.

Contributor

ynsta commented Sep 15, 2016

Same behaviour with my laptop.

Contributor

ynsta commented Sep 15, 2016

I think it is related with this commit 1af96a0

It enables Qt::AA_EnableHighDpiScaling.

https://doc-snapshots.qt.io/qt5-5.6/qtlabscontrols-highdpi.html

Owner

plfiorini commented Sep 15, 2016

Yeah that's related to hidpi, apparently it's not always handled correctly on Xorg :-/
@ynsta 's patch will allow to disable it if it's broken with your setup.

@plfiorini plfiorini added this to the 0.15 milestone Sep 15, 2016

@plfiorini plfiorini self-assigned this Sep 15, 2016

@plfiorini plfiorini added the upstream label Sep 15, 2016

Contributor

ynsta commented Sep 15, 2016

@darkbasic if you want to build a patched version of sddm to disable hi-dpi in sddm.conf for archlinux.

Here is my abs tree with modified PKGBUILD abs.zip

darkbasic commented Sep 15, 2016

Thanks, I will also have to patch my systemd unit file because I want EnableHiDPI in sddm.conf to be set while my external monitors are not attached (my laptop's main screen is hidpi), while I want it disabled while the external screens are connected.

Running something like this just before sddm should do the trick:

xrandr -q | grep -v eDP1 | egrep "DP1 connected|DP1-1 connected|DP1-8 connected|HDMI1 connected|DP-1 connected"

if [ $? -eq 0 ]; then
sed -i 's/EnableHiDPI=true/EnableHiDPI=false/g' /etc/sddm.conf
else
sed -i 's/EnableHiDPI=false/EnableHiDPI=true/g' /etc/sddm.conf
fi

Contributor

ynsta commented Sep 16, 2016

@darkbasic it might be easier to not enable it in sddm and use the QT_AUTO_SCREEN_SCALE_FACTOR=1 environment variable when you want it.

Contributor

ynsta commented Sep 16, 2016

Yes but this environment flags set the same things as enabling the Qt::AA_EnableHighDpiScaling attribute.

It seams to work on some setups and not on other that is why I made a patch to disable the activation of this attribute.

Owner

davidedmundson commented Sep 16, 2016

A sizable amount of monitors have completely broken EDID information, which is what Qt uses as a base.

There's a whole line of Samsung monitors that mix up inches and cm, others mix up mm and cm - and some just blatantly lie.

In Plasma we turn off auto for this reason. I was a bit curious to see how SDDM would fare, where it's not as critical if this one screen is off.

Given we can't physically fix monitors ideally we need robust checking in Qt, but maybe we can do something in SDDM. Like on startup we check screen.height < 2000, turn off scaling. Will prevent the super tiny cases. Won't stop SDDM being super massive though.

Owner

plfiorini commented Sep 16, 2016

@davidedmundson scaling involves device pixel ratio, each screen has a different device pixel ratio thus we should rather force devicePixelRatio to 1.0 if resolution has height < 2000 but we can't do that from SDDM without help from QPA.

Owner

plfiorini commented Sep 16, 2016

We can also add an option to change DPI see #672 (or maybe physical size assuming it's possible)

Contributor

ynsta commented Sep 16, 2016

With Nvidia driver it is possible to dump the screen EDID, patch it and configure nvidia driver to use the one in the file instead of the one within the I2C eeprom of the screen.

I don't know if it is possible with other GPU.

For patching The EDID directly in the screen you have to write the value to I2C. You might also have to make a physical modification (write protect pin of the I2C EEPROM connected to GND instead of VCC) if the screen's manufacturer used WP.

I also used in the past a modified DVI cable where the I2C bus was connected to an external I2C EEPROM instead of the one in the screen, to fake the id of the screen.

The one million dollar question is: how does Windows correctly handle this?

I just noticed that Gnome on Fedora 25 beta correctly handles everything, on Wayland I even get per-output scaling when mixing standard and hidpi monitors. Why can't QT correctly handle this like GTK3 does?

darkbasic commented Oct 27, 2016

@ynsta @davidedmundson I dumped my monitors' EDID.

This is my laptop's 3200x1800 13" HiDPI monitor: https://bpaste.net/show/0e34f12832d9
This is my Dell's 2560x1440 25" external monitor: https://bpaste.net/show/e2f39fad5f5e

Both show Horizontal Display Size and Vertical Display Size in mm and the size information is correct. You can check it with http://www.edidreader.com/

So what's wrong with QT regarding EDID parsing? The EDID seems fine and it works in Gnome.

Contributor

ynsta commented Nov 2, 2016

Hello,

I think you should fill a bug repport to Qt project with your edid files.

On Thu, Oct 27, 2016 at 10:28 PM, Niccolò Belli notifications@github.com
wrote:

@ynsta https://github.com/ynsta @davidedmundson
https://github.com/davidedmundson I dumped my monitor's EDID.

This is my laptop's 3200x1800 13" HiDPI monitor: https://bpaste.net/show/
0e34f12832d9
This is my Dell's 2560x1440 25" external monitor: https://bpaste.net/show/
e2f39fad5f5e

Both show Horizontal Display Size and Vertical Display Size is mm and the
information is correct. You can check it with http://www.edidreader.com/

So what's wrong with QT regarding EDID parsing? The EDID seems fine and it
works in Gnome.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#692 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB26Cy9VQ7Ebbx2Ls77UwxEnjjg3nUOAks5q4QlUgaJpZM4J03VL
.

Contributor

MartinBriza commented Nov 2, 2016

Well, what Qt does on X11 is basically qRound(yourDpi/96) - which means you're getting 2x scaling even when you have just a DPI of 144. There's no centralized way how to set this except the QT_SCREEN_SCALE_FACTORS environment variable that applies only to Qt 5.6+ applications. It of course doesn't scale for coming and going monitors etc.

@darkbasic I think I win the million dollar question: they just guess the scaling but let you set whatever you want yourself, per-monitor, in steps of 0.25. Works pretty good if you ask me.

darkbasic commented Nov 3, 2016

Are they crazy? No one wants a real 96 dpi scaling, even a 1280x720 13.3" monitor is 110 dpi: 96 dpi is 1024x768 on 13.3", which nobody wants. Personally I would like to target 1600x900 on 13.3" which is 138 dpi. Also if you don't offer decimal scaling you should NEVER round up, on the contrary you should always round down (especially if you target such a nonsense like 96 dpi).
My monitor is 276 dpi (3200x1800 @13.3") so qRound(276/96) = qRound(2,875) = 3. Simply rounding down would do the trick.
Another option would be exporting a multiplier variable so that qRound(yourDpi/(96*multiplier)) allows you to target whichever (integer) scaling factor you want simply setting the multiplier to 1.25, 1.50, etc...

Setting X11 "ServerArgument=-nolisten tcp -dpi 333" in /etc/sddm.conf did the trick for me. (This DPI value is valid for my UHD 13.3in display)

Although convenient when using the integrated HiDPI display on my laptop, I don't think that this will solve issues with multiple monitors / multiple DPI setups. I guess results may vary next time I hook up this laptop to a HD projector or external display.

darkbasic commented Jul 19, 2017

By the way I noticed that using xf86-video-intel I get super tiny characters on my low-dpi external monitor, while it works flawlessly with modesetting.

mexico66 commented Aug 6, 2017

Will this error be corrected in next release? And when will be available? Thanks.

I have same issue in 0.15 version (openSUSE Tumbleweed): fonts and dialog are very small if nvidia proprietary driver selected and look ok with noveau.

raneon commented Oct 9, 2017

Try SDDM 0.16, you should be able now to activate HiDPI settings in the config file.

Try SDDM 0.16, you should be able now to activate HiDPI settings in the config file.

Will do when it appears in openSUSE.

Have just installed sddm-0.16, the problems is still there.
Tried to set EnableHiDPI=false inside [Wayland] and [X11] sections, has absolutely no effect, still get tiny login dialog on my HiDPI laptop screen.

I wonder why did it get broken in sddm-0.15 in the first place??

raneon commented Oct 21, 2017

I don't like the scaling as it usually looks blurry and unsharp on my 4k screens.

Reading your comment I would recommend to try to really enable scaling with EnableHiDPI=true. Maybe you intended to say this anyway, but if you force disable the scaling then sure it will not do anything.

@plfiorini plfiorini removed this from the 0.15 milestone Nov 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment