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

sddm is super tiny with external screen since 0.14 #692

Open
darkbasic opened this issue Sep 5, 2016 · 33 comments
Open

sddm is super tiny with external screen since 0.14 #692

darkbasic opened this issue Sep 5, 2016 · 33 comments

Comments

@darkbasic
Copy link

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.

@ynsta
Copy link
Contributor

ynsta commented Sep 15, 2016

Same behaviour with my laptop.

@ynsta
Copy link
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

@plfiorini
Copy link
Member

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
@ynsta
Copy link
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
Copy link
Author

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

@ynsta
Copy link
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.

@darkbasic
Copy link
Author

Badly broken too: https://bugreports.qt.io/browse/QTBUG-52202

@ynsta
Copy link
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.

@davidedmundson
Copy link
Member

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.

@plfiorini
Copy link
Member

@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.

@plfiorini
Copy link
Member

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

@ynsta
Copy link
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.

@darkbasic
Copy link
Author

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

@darkbasic
Copy link
Author

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
Copy link
Author

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.

@ynsta
Copy link
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
.

@darkbasic
Copy link
Author

Isn't this enough? https://bugreports.qt.io/browse/QTBUG-52202

@MartinBriza
Copy link
Contributor

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
Copy link
Author

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...

@exophoric
Copy link

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
Copy link
Author

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.

@fabiobulgarella
Copy link

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

@akontsevich
Copy link

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.

@ghost
Copy link

ghost commented Oct 9, 2017

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

@akontsevich
Copy link

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

Will do when it appears in openSUSE.

@bigunyak
Copy link

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??

@ghost
Copy link

ghost 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
@angristan
Copy link

EnableHiDPI=true has no effect for me with a 13.3" QHD+ display.

@fsimonis
Copy link

fsimonis commented Jul 5, 2020

I also encountered this issue and invested some time in debugging this.
In my case, the result of xdpyinfo is different before and after the login.

For whatever reason, the physical display size was not set before the login which resulted in the default dpi setting.
After the login this information was suddenly present and correct.

You can add xdpyinfo > /tmp/sddm-xdpyinfo.log to /usr/share/sddm/scripts/Xsetup to create a dump after sddm launches the X server.
Use diff /tmp/sddm-xdpyinfo.log <(xdpyinfo) to compare both states.

I was able to fix this by manually setting the display size via an xorg configuration file:

/etc/X11/xorg.conf.d/90-monitor.conf
---
Section "Monitor"
	Identifier "eDP1"
	DisplaySize 310 170
EndSection

Replace eDP1 with the monitor descriptor displayed in xrandr.

@Pointedstick
Copy link
Collaborator

The correct syntax is something like this:

ServerArguments=-dpi 192 (or whatever DPI would be appropriate).

Would be nice if if could auto-detect the DPI automatically so this wasn't necessarty.

@redno2
Copy link

redno2 commented Oct 24, 2021

After 4y of this report this is still doesn't work on fresh install on Kubuntu 21.10 :/ ?
with dell xps 13" 9310

@perroboc
Copy link

perroboc commented Feb 2, 2024

Sorry for the necro, but I hope this gets traction again. I've tried the ServerArguments=-dpi 192 and EnableHiDPI=true settings, neither do anything on my 2 monitor set. Using Fedora 39.

What did somewhat work for me is this (for some fedora specific reason, the SDDM theme they supply does not have good DPI scaling. Using the Breeze one and applying Plasma Settings DID show an SDDM login with the right PDI configuration):
image

Also, issue is close to be 8 years old 🎂

@msLinuxNinja
Copy link

Yay necro on a super old issue 🫠. Just switched to Fedora 39 with KDE and I see the same problem as described.

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

No branches or pull requests