FS#62594 - [telegram-desktop] GUI broken

Attached to Project: Community Packages
Opened by Rin Cat (RinCat) - Friday, 10 May 2019, 16:39 GMT
Last edited by Jiachen Yang (farseerfc) - Thursday, 13 June 2019, 00:07 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Jiachen Yang (farseerfc)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:

After updated form 1.6.7 to 1.7.0, the telegram-desktop shows a lot of freeze images. Icons and animation are also displayed incorrect.


Additional info:
package version: 1.7.0-1

Log:
> telegram-desktop
QApplication: invalid style override passed, ignoring it.
Available styles: Breeze, Windows, Fusion


[2019.05.10 12:13:46] Launched version: 1007000, install beta: [FALSE], alpha: 0, debug mode: [FALSE], test dc: [FALSE]
[2019.05.10 12:13:46] Executable dir: /usr/bin/, name: telegram-desktop
[2019.05.10 12:13:46] Initial working dir: XXX
[2019.05.10 12:13:46] Working dir: XXX
[2019.05.10 12:13:46] Command line: /usr/bin/telegram-desktop -startintray -noupdate -tosettings -workdir XXX
[2019.05.10 12:13:46] Executable path before check: /usr/bin/telegram-desktop
[2019.05.10 12:13:46] Logs started
[2019.05.10 12:13:46] Connecting local socket to /tmp/XXXXX
[2019.05.10 12:13:46] This is the only instance of Telegram, starting server and app...
[2019.05.10 12:13:46] Moved logging from '/home/XXXX/log_start0.txt' to '/home/XXXX/log.txt'!
[2019.05.10 12:13:46] Primary screen DPI: 112
[2019.05.10 12:13:46] Found non-trivial Device Pixel Ratio: 1.5
[2019.05.10 12:13:46] Environmental variables: QT_DEVICE_PIXEL_RATIO=''
[2019.05.10 12:13:46] Environmental variables: QT_SCALE_FACTOR=''
[2019.05.10 12:13:46] Environmental variables: QT_AUTO_SCREEN_SCALE_FACTOR='0'
[2019.05.10 12:13:46] Environmental variables: QT_SCREEN_SCALE_FACTORS='DVI-D-0=1.5;HDMI-0=1.5;DP-0=1.5;DP-1=1.5;DVI-D-1=1.5;DP-2=1.5;'
[2019.05.10 12:13:46] Font Error: could not resolve 'Open Sans' font, got 'Noto Sans'.
[2019.05.10 12:13:46] Font Error: could not resolve 'Open Sans' font, got 'Noto Sans'.
[2019.05.10 12:13:46] Font Error: could not resolve 'Open Sans Semibold' font, got 'Noto Sans'.
[2019.05.10 12:13:46] Could not load 'ayatana-appindicator3' with version 1 :(
[2019.05.10 12:13:46] Could not load 'appindicator3' with version 1 :(
[2019.05.10 12:13:46] Error: failed to load 'gdk_x11_drawable_get_xdisplay' function!
[2019.05.10 12:13:46] Getting DE, XDG_CURRENT_DESKTOP: 'KDE'
[2019.05.10 12:13:46] Getting DE, DESKTOP_SESSION: '/usr/share/xsessions/plasma'
[2019.05.10 12:13:46] Getting DE, KDE_SESSION_VERSION: '5'
[2019.05.10 12:13:46] DE: KDE5
[2019.05.10 12:13:46] Tray Icon: Try Qt = [TRUE], Prefer appindicator = [FALSE]
[2019.05.10 12:13:46] App Info: reading settings...
[2019.05.10 12:13:46] App Info: reading encrypted settings...
[2019.05.10 12:13:46] Lang Info: Loaded cached, keys: 2278
XXXX
[2019.05.10 12:13:46] Using Qt tray icon.
[2019.05.10 12:13:46] Tray Icon: Using Qt tray icon, available: [TRUE]
[2019.05.10 12:13:46] Found Unity Launcher entry telegramdesktop.desktop!


Steps to reproduce:
Open telegram-desktop



This seems related to Qt, but I don't have any Qt/xorg/driver need update when got 1.7.0.
This task depends upon

Closed by  Jiachen Yang (farseerfc)
Thursday, 13 June 2019, 00:07 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 1.7.7-2 as a patch to unset all QT scale environment variables. Now entered community repo.
Comment by Rober (rplanchuelo) - Saturday, 11 May 2019, 09:00 GMT
Same bug for me. I've just installed it with flatpak version and there isn't any bug
Comment by Sven-Hendrik Haase (Svenstaro) - Wednesday, 15 May 2019, 21:51 GMT
Can't reproduce. Are you using [kde-unstable] by any chance?
Comment by Rin Cat (RinCat) - Wednesday, 15 May 2019, 22:10 GMT
I am not using any unstable version kde/qt.
Comment by Rin Cat (RinCat) - Wednesday, 15 May 2019, 23:56 GMT
Enabled only [core] [extra] [community] [multilib].
Just did pacman -Syu and all packages up to date, and got the same result.
Comment by Rin Cat (RinCat) - Thursday, 16 May 2019, 00:09 GMT
The telegram-desktop-bin in AUR does not have this issue (not using Qt library).
Mayybe related to Qt High DPI.
Comment by Manuel Vögele (Stäbchenfisch) - Sunday, 19 May 2019, 16:55 GMT
Can confirm this is related to high dpi. I'm having this problem on my laptop (which has scaling enabled to 120%) but I'm not having that issue on my desktop (with no scaling enabled). Both machines have largely the same KDE based setup (no testing/unstable repos).
Comment by Sven Mauch (SvenMauch) - Tuesday, 21 May 2019, 15:13 GMT
I can confirm this bug. It happens when using fractional scaling set in KScreen and using Telegram Desktop with any of the available DPI settings. I only use stable repos.
Comment by dram (dram) - Thursday, 30 May 2019, 10:04 GMT
This patch of tdesktop.patch fixes the issue, although I'm not sure if it's the right way.

Telegram does UI scaling by itself (as can be seen from settings) and it seems that removing QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true); messes things up.
Comment by Jiachen Yang (farseerfc) - Tuesday, 11 June 2019, 02:37 GMT
Trying to apply the "0001-Fix-scaling.patch" made the rendering of telegram-desktop even worse on my machine.
Here is the package with PKGBUILD after applying the "0001-Fix-scaling.patch" patch on 1.7.7: https://build.archlinuxcn.org/~farseerfc/telegram-desktop/trunk/
Here is a screenshot of it with QT_SCALE_FACTOR=1.5: https://fars.ee/BKq7.png Notice there are lines for each rendered text.
These lines didn't appear on community/telegram-desktop 1.7.7 binary, although the rendered UI is still somewhat broken: https://fars.ee/6dhG.png

For now I suggest users with HiDPI display to manually unset the environment variables for telegram-desktop to disable HiDPI scaling.
Comment by Jiachen Yang (farseerfc) - Wednesday, 12 June 2019, 07:59 GMT
A followup from my previous comment. Can someone please test this build: https://build.archlinuxcn.org/~farseerfc/telegram-desktop/trunk/telegram-desktop-1.7.7-1.2-x86_64.pkg.tar.xz
This modified tdesktop.patch and tried to unset all QT screen scale related environment variables. The internal scale option in settings is still able to function properly.
I will try to reach some of my friends to test this before pushing this change to community-testing.
Comment by Manuel Vögele (Stäbchenfisch) - Wednesday, 12 June 2019, 08:04 GMT
@farseerfc I gave it a quick shot and this build fixes the problem for me.
Comment by Rober (rplanchuelo) - Wednesday, 12 June 2019, 09:56 GMT
@farseerf This build fixes the bug for me too
Comment by Jiachen Yang (farseerfc) - Wednesday, 12 June 2019, 11:56 GMT
@Stäbchenfisch and @rplanchuelo thanks for testing this. I have just released 1.7.7-2 into community-testing which incorporated exactly the same change. I will wait for some test results and move it to community later on.
Comment by Rin Cat (RinCat) - Wednesday, 12 June 2019, 12:10 GMT
Just tested the 1.7.7-2, and it fixed the issue.

Loading...