telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.23k stars 5.2k forks source link

Media Viewer now appears as a transparent window in Wayland session #27598

Closed NTMan closed 7 months ago

NTMan commented 7 months ago

Steps to reproduce

  1. Run desktop under Wayland session
  2. Open media in Telegram

Screenshot from 2024-03-15 03-19-18

Media Viewer now appears as a transparent window Bug was introduced in 4.15.3 beta version of Telegram desktop

Expected behaviour

Media Viewer appears as full screen window

Actual behaviour

Media Viewer now appears as a transparent window

Operating system

Linux Fedora Rawhide

Version of Telegram Desktop

4.15.4 beta

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

strelok1111 commented 7 months ago

Same here GNOME Shell 45.2 Telegram 4.15.4 beta Ubuntu 23.10

If I start X11 session all works correct

ilya-fedin commented 7 months ago

Sorry but I can't reproduce this. Perhaps some reproduction steps are missing. Please try to to make this reproduced in a VM to see how your steps look with a clean system.

harshil21 commented 7 months ago

same thing for me. Except for me it's the media viewer and sometime even Telegram itself. I can't "Open Telegram" from the status bar because the window is transparent and nothing happens (sometimes. With the media player, it's 100% of the time). This started happening from 4.15.1/4.15.2.

Ubuntu 23.10 Wayland

strelok1111 commented 7 months ago

Revert version to 4.15.0 and all works fine, I think maybe this is wayland+nvidia+mesa issue

ilya-fedin commented 7 months ago

There seem to be no changes between 4.15.0 and 4.15.1 in the viewer

strelok1111 commented 7 months ago

If there were no changes in this part between versions 4.15 ΠΈ 4.15.2, maybe it's a matter of settings. Because when I started 4.15 after 4.15.2, the settings were cleared. Is there any way to clear the application settings?

ilya-fedin commented 7 months ago

Yeah, it could be. Try Advanced -> Experimental settings -> Restore default values. This will clear experimental settings which are most likely to cause troubles.

strelok1111 commented 7 months ago

4.15.2 also works fine, but 4.15.3 has this issue

ilya-fedin commented 7 months ago

4.15.3 has updated Qt so I don't think something could be done about it, apparenlty it's no more compatible with your hardware. If this happens only with NVIDIA, please reset the experimental settings, OpenGL with NVIDIA hardware is not supported and as soon as you change experimental settings, you lose the warranty and support.

strelok1111 commented 7 months ago

4.15.3 has updated Qt so I don't think something could be done about it, apparenlty it's no more compatible with your hardware. If this happens only with NVIDIA, please reset the experimental settings, OpenGL with NVIDIA hardware is not supported and as soon as you change experimental settings, you lose the warranty and support.

:-( i see. will use 4.15.2 until wayland or Qt or NVIDIA or mesa fix this, thank you for answer

ilya-fedin commented 7 months ago

Assuming you're using proprietary driver, it's not mesa but the NVIDIA company.

TheWeirdDev commented 7 months ago

I have the same problem with Telegram 4.15.4 on Gnome (Wayland) and I am running everything on an intel iGPU. This bug is not just on NVIDIA.

ilya-fedin commented 7 months ago

That's sad... Almost every minor release, Qt breaks media viewer in some way and it takes from a half of a year to a year to find fix...

ilya-fedin commented 7 months ago

The first thing is for you folks to find some way for developers to reproduce. No developer can test on Intel or NVIDIA hardware (personally I have only AMD) so as long as it's intel and NVIDIA specific, no developer can confirm the issue and work on it.

TheWeirdDev commented 7 months ago

The first thing is for you folks to find some way for developers to reproduce. No developer can test on Intel or NVIDIA hardware (personally I have only AMD) so as long as it's intel and NVIDIA specific, no developer can confirm the issue and work on it.

I feel like it's a Wayland thing rather than the GPU brand.

ilya-fedin commented 7 months ago

@TheWeirdDev i would be able to reproduce then, right? But I can't

TheWeirdDev commented 7 months ago

When I run Telegram on XWayland the problem goes away:

QT_QPA_PLATFORM=xcb ./Telegram

ilya-fedin commented 7 months ago

Well, I run it natively on Wayland and the viewer works just fine for me.

ilya-fedin commented 7 months ago

I have a feel that this is an Intel-only problem, the people above have dual-GPU (PRIME) systems and saying NVIDIA due to marketing (that's what advertised as their GPU and they don't know it's mostly Intel in reality).

strelok1111 commented 7 months ago

When I run Telegram on XWayland the problem goes away:

QT_QPA_PLATFORM=xcb ./Telegram

Yes this works! Thanks!

strelok1111 commented 7 months ago

The first thing is for you folks to find some way for developers to reproduce. No developer can test on Intel or NVIDIA hardware (personally I have only AMD) so as long as it's intel and NVIDIA specific, no developer can confirm the issue and work on it.

I can run debug version and show any log/output.

ilya-fedin commented 7 months ago

I can run debug version and show any log/output.

I sadly have no idea what to ask. This looks like a GPU driver problem and I have no idea what could break in it.

NTMan commented 7 months ago

I have a feel that this is an Intel-only problem, the people above have dual-GPU (PRIME) systems and saying NVIDIA due to marketing (that's what advertised as their GPU and they don't know it's mostly Intel in reality).

I am on AMD GPU 7900XTX

ilya-fedin commented 7 months ago

Maybe it's a GNOME only problem? Qt has generally poor compatibility with GNOME and regular regressions. I test on KDE Plasma Wayland and it works just fine.

strelok1111 commented 7 months ago

Maybe it's a GNOME only problem? Qt has generally poor compatibility with GNOME and regular regressions. I test on KDE Plasma Wayland and it works just fine.

Gnome on X11 works fine

psgreco commented 7 months ago

I have a feel that this is an Intel-only problem, the people above have dual-GPU (PRIME) systems and saying NVIDIA due to marketing (that's what advertised as their GPU and they don't know it's mostly Intel in reality).

I can see this in my AMD CPU/GPU laptop, Fedora 40 beta, so not related to intel/nvidia

QT_QPA_PLATFORM=xcb ./Telegram makes it work too

inferrna commented 7 months ago

Output with WAYLAND_DEBUG=1 QT_DEBUG_PLUGINS=1 I'm on RadeonSI + Gnome + Wayland

tg_wayland.log.gz

ilya-fedin commented 7 months ago

tg_wayland.log.gz

Looks like WAYLAND_DEBUG sadly doesn't reveal the interesting part:

[1489412.155] xdg_toplevel@56.configure(1680, 1018, array[24])

It just displays the array size instead of its contents.

inferrna commented 7 months ago

Also look at screenshots of wlhax with and without viewer

ilya-fedin commented 7 months ago

Perhaps Qt has broke compatibility with GNOME again? I can't reproduce on Plasma and media viewer hasn't had changes in months.

ilya-fedin commented 7 months ago

What would be interesting to see is whether GNOME advertises suspended state to the viewer at any point of time since its creation as that sounds like a related feature supported in the new Qt

TheWeirdDev commented 7 months ago

Perhaps Qt has broke compatibility with GNOME again? I can't reproduce on Plasma and media viewer hasn't had changes in months.

Can you test it in a VM?

ilya-fedin commented 7 months ago

Can you test it in a VM?

No, I have a problem with spare space on my system drive... And I would rather avoid running GNOME.

strelok1111 commented 7 months ago

Update to version 4.15.6, and problem is gone.

harshil21 commented 7 months ago

Update to version 4.15.6, and problem is gone.

wow you're right. I looked at the release notes and didn't upgrade cuz i thought it wouldn't fix it

TheWeirdDev commented 7 months ago

Yep, it works.

NTMan commented 7 months ago

I confirm it fixed with today update (4.15.6)

Screenshot from 2024-03-26 02-18-31

karamanliev commented 6 months ago

This is still broken in 4.16.6 for me.

QT_QPA_PLATFORM=xcb telegram-desktop fixes it though

I'm using Gnome Wayland 46 with Nvidia GPU

ilya-fedin commented 6 months ago

@karamanliev make sure you're running an official build. It was fixed there by reverting Qt. Third party builds may still have it.

ken-kuro commented 6 months ago

I used the latest built binary at https://telegram.org/dl/desktop/linux, however, this is still broken for me. I'm using Gnome 46 + Wayland and an iGPU.

ken-kuro commented 6 months ago

Checked again with flatpak version, it works well, might be relates to dependencies on my arch machine

thagabe commented 6 months ago

After reading this, looks like this issue is driver agnostic. The issue stems from Qt changes as it doesn't affect my PopOS laptop Intel iGPU but does affect Arch Linux with Nvidia drivers. I guess if not downgrading Qt then the other fix would be running Telegram in xWayland but on Nvidia the reason I forced the wayland flags were input lag and weird re-drawing issues (I hear this is caused by either Nvidia driver itself using egl streams or another candidate would be xWayland's lack of sync functionality that should be coming to Arch soon as the patches were finally merged upstream not too long ago)

ilya-fedin commented 6 months ago

@thagabe you can use official binaries with bundled Qt that is verified to work correctly

thagabe commented 6 months ago

Indeed, the official binaries are working correctly.

ken-kuro commented 6 months ago

If you're using Wayland Gnome like me, the issue has been fixed in the newest release of mutter, so just update it and try again https://gitlab.gnome.org/GNOME/mutter/-/issues/3435 Edit: This hasn't been backported for Gnome 45 yet, so if you're using a combination of Gnome 45 and Qt 6.7, it might not work for you :<

thagabe commented 6 months ago

I noticed earlier this week that the media viewer worked fine on the pacman install so this is all good πŸ‘πŸ» Thanks @ken-kuro

karamanliev commented 6 months ago

I noticed earlier this week that the media viewer worked fine on the pacman install so this is all good πŸ‘πŸ» Thanks @ken-kuro

Can confirm that pacman version is all good now.

LindseyRenea commented 6 months ago

Thank you all soo much on my journey ❀️

On Mon, Apr 29, 2024, 8:42β€―AM Hristo Karamanliev @.***> wrote:

I noticed earlier this week that the media viewer worked fine on the pacman install so this is all good πŸ‘πŸ» Thanks @ken-kuro https://github.com/ken-kuro

Can confirm that pacman version is all good now.

β€” Reply to this email directly, view it on GitHub https://github.com/telegramdesktop/tdesktop/issues/27598#issuecomment-2082787736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4BQ7XAK7IBBZAXG7P4GSLY7ZE4RAVCNFSM6AAAAABEW6773KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBSG44DONZTGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>