telegramdesktop / tdesktop

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

95% CPU usage on Linux Mint 20.2 #26296

Closed anavision closed 1 year ago

anavision commented 1 year ago

Steps to reproduce

  1. Open TG desktop
  2. open broadcast
  3. 95% CPU Usage Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal

Expected behaviour

8-12% CPU Usage.

In Windows 11 ~8% CPU Usage

Actual behaviour

80-98% CPU Usage starts to slow down. normally nothing can be done on the computer. bug TG

Operating system

Distro: Linux Mint 20.2 Uma base: Ubuntu 20.04 focal

Version of Telegram Desktop

Telegram Desktop 4.8.1

Installation source

Static binary from official website

Crash ID

No response

Logs

No response

Aokromes commented 1 year ago

i sugest you to try updating to linux mint 21.1.

ilya-fedin commented 1 year ago

Do you have NVIDIA?

anavision commented 1 year ago

Yes Nvidia

NVIDIA-SMI 530.41.03 Driver Version: 530.41.03 CUDA Version: 12.1 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA GeForce GTX 1060 3GB Off| 00000000:01:00.0 On | N/A | | 24% 39C P0 26W / 120W| 487MiB / 3072MiB | 2% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 1048 G /usr/lib/xorg/Xorg 314MiB | | 0 N/A N/A 1582 G cinnamon 28MiB | | 0 N/A N/A 22337 G ...26405512,9879360674755158246,131072 57MiB | | 0 N/A N/A 23226 G ...4305873,12473027029856387027,262144 83MiB | +---------------------------------------------------------------------------------------+

ilya-fedin commented 1 year ago

The proprietary NVIDIA driver is blacklisted, so all the rendering is software-based and high CPU usage is expected. You have to either switch to open source drivers, replace your hardware or switch to another OS.

anavision commented 1 year ago

Was he recently added to this list? because before, maybe before the new year everything was fine.

ilya-fedin commented 1 year ago

No, it was added in October 2021. Maybe you just wasn't watching broadcasts in such quality (even if you were watching this exact broadcast previously, they still can change the format or quality of the stream I guess).

anavision commented 1 year ago

Open drivers have problems on my machine, pc won't turn off in sleep mode and I need CUDA kernels. It turns out, poor support for Linux users. It's a pity, please make normal support for Linux

ilya-fedin commented 1 year ago

It's sadly not possible as the underlying toolkit (QtWidgets) has problems with NVIDIA. The only way to get good NVIDIA support is to rewrite the app to another toolkit: QtQuick, Flutter or Electron. Either way it means entire app rewrite and that's likely too much for a part of 1.82% of the userbase.

Aokromes commented 1 year ago

Open drivers have problems on my machine, pc won't turn off in sleep mode and I need CUDA kernels. It turns out, poor support for Linux users. It's a pity, please make normal support for Linux

maybe you need to try a diferent linux distribution.

ilya-fedin commented 1 year ago

I don't think that would really help. Both open source (due to reverse engineering) and proprietary (due to NVIDIA's declining of Linux practices) drivers are of bad quality on Linux, unfortunately.