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

HiDPI Scaling #26155

Closed
nullptroma opened this issue Apr 10, 2023 · 20 comments
Closed

HiDPI Scaling #26155

nullptroma opened this issue Apr 10, 2023 · 20 comments
Labels

Comments

@nullptroma
Copy link

Steps to reproduce

  1. Install KDE Plasma with common monitor
    2)Launch tg
  2. Change monitor to HiDPI (27', 2K)
  3. Enable system scaling 125%
    5)Launch tg

Expected behaviour

Proportional enlargement of the window and all its elements without loss of quality

Actual behaviour

Window enlargement, as it should be. The text has not lost quality. All pictures, photos and icons are in very poor quality, pixelated and blurry.
Screenshot: https://i.imgur.com/n9IWjO9.png

It seems to work as it should sometimes when I experiment with environment variables (I never noticed a pattern). Now I deleted all references to Telegram in the system, ran the app from the official site and it worked. Then I restarted the pc and it blurred again.

Sources:
From snap works perfectly.
From all other sources (aur, pacman, official website) it does not work correctly.

Operating system

ArchLinux, KDE Plasma (more in logs)

Version of Telegram Desktop

4.7.1-1

Installation source

Static binary from official website

Crash ID

No response

Logs

Operating System: Arch Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.10-lqx1-2-lqx (64-bit)
Graphics Platform: X11
Processors: 16 × 11th Gen Intel® Core™ i7-11700F @ 2.50GHz
Memory: 15.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1070/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: B560M AORUS ELITE
@nullptroma nullptroma added the bug label Apr 10, 2023
@ilya-fedin
Copy link
Contributor

Static binary from official website

I'm highly doubt this is true, the bug on the screenshot is known to happen only on third-party builds. It's a KDE bug (sadly still no one reported it to them, see #25126 for details), but all official builds have a Qt patch applied to avoid this bug.

@nullptroma
Copy link
Author

Unfortunately right now I have tried all sources, and on Xorg this problem is everywhere. What could be wrong with my system that is not working for me?

@ilya-fedin
Copy link
Contributor

Try to reset experimental settings while using official binary

@nullptroma
Copy link
Author

How?

@ilya-fedin
Copy link
Contributor

By pressing the reset settings button in the experimental settings menu

@nullptroma
Copy link
Author

nullptroma commented Apr 10, 2023

I didn't notice the button)
Now I pressed it, the application restarted, nothing has changed. By the way, the experimental setting "Enable precise Hi-DPI Scaling" does not affect anything.

UDP: The reset button appears only after the settings have been changed. Since I didn't change anything, there was no button

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Apr 10, 2023

Are you sure you have done this using the official build, not the Arch Linux's build?

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Apr 10, 2023

The thing is KDE forces the precise scaling bypassing Telegram logic by using Qt's debugging API. That's why only Qt patching helps (by patching out the API).

@nullptroma
Copy link
Author

Are you sure you have done this using the official build, not the Arch Linux's build?

I downloaded the linux archive from this site https://desktop.telegram.org/, unzipped it and ran it through the console ./Telegram

@nullptroma
Copy link
Author

Miss click*

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Apr 10, 2023

and ran it through the console ./Telegram

Does it immediately return you to the shell prompt? If yes, it means the application haven't launched, only focused the window of already running instance (which is probably the Arch Linux build).

@nullptroma
Copy link
Author

and ran it through the console ./Telegram

Does it immediately return you to the shell prompt? If yes, it means the application haven't launched, only focused the window of already running instance (which is probably the Arch Linux build).

Before that, if I have another Telegram running from any source I right click on the tray icon and "Exit". When launching through the console, as I showed above, I do not get control back in the console, that is, everything works as it should, the application is launched from the console.

Another interesting fact: Everything works fine on Wayland

@ilya-fedin
Copy link
Contributor

Another interesting fact: Everything works fine on Wayland

Well yes, KDE doesn't force precise scaling on Wayland fortunately (but it still does weird thing with other Qt debug variables).

I'm not sure what really happens, would like to see the log.txt (issue template describes how to get it).

@nullptroma
Copy link
Author

log.txt

@ilya-fedin
Copy link
Contributor

QT_SCALE_FACTOR_ROUNDING_POLICY: PassThrough 😢

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Apr 10, 2023

Maybe you have set it manually? I've never seen this variable set on KDE.

@nullptroma
Copy link
Author

It's really about this variable! I removed it manually and checked, now Telegram looks right. Thanks so much, I'll try to find where I have it set!

@nullptroma
Copy link
Author

I still haven't found where I set this variable. I want to remove it completely, any idea where it might be?

@ilya-fedin
Copy link
Contributor

Maybe you're using a non-standard display manager and it sets the variable?

@nullptroma
Copy link
Author

I got deepin packages from somewhere that change QT's behavior. I had to remove the packages in the screenshot
2023-04-11_19-43

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants