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
High CPU usage out of nowhere #23899
Comments
I'm experiencing the same issue on Manjaro KDE using Telegram Desktop 3.6.1 |
Started happening randomly on Killing Arch, i3, X11 |
I have this issue too, 20% usage even when in background and with no audio/video/gif playing. My version is the 3.6 from nix (package telegram-desktop) on wayland (sway) with the following env variables:
My only suspect is this line |
I enabled use system window frame in settings and looks like the issue is fixed. on default setting I was getting the application launch bouncing feedback (which KDE shows next to the pointer when an application is launching) on every click. Edit: nope. it just took longer to reach that level. still high cpu usage. |
same issue, it's annoying |
If you're using Fedora, switch to the official binary provided by https://desktop.telegram.org. Third-party builds frequently use wrong library versions that lead to instability and various bugs. This is especially known to happen on a regular basis with the package provided by the Fedora community. |
@ilya-fedin switched to flatpak version and haven't seen the issue for a long time. Thanks. |
Can you share which are the correct libraries to build upon? |
The correct library version to avoid this bug is ffmpeg 4.4. |
Is there anyone who can confirm high CPU usage with official binary? If not, this is going to be closed as a 3rd party builds bug. |
I see that Fedora uses ffmpeg 5.0.1, which is official stable release: https://ffmpeg.org/download.html#releases |
No one ported tdesktop to ffmpeg 5.x. There was a big API break, so apparently tdesktop's usage of ffmpeg APIs is no longer valid (even though it compiles with ffmpeg 5.x). They should either build with the supported version or put the effort to port tdesktop to ffmpeg 5.x. |
The same with OpenSSL 3.x. tdesktop builds, but e.g. voice/video chats don't work. |
If you don't want to fix bugs, close issue, but stop blaming innocent people. |
Innocent? Fedora and Arch are the leaders by amount of various packaging issues reported here. With the only difference that Arch usually applies the recommended fix while Fedora problems continue happen as they like to patch the build and over-engineering problems due to the church. Then they complain about problems they created on their own that could be avoided just by doing what's recommended by upstream. Even Gentoo package got a good maintainer when the previous one stepped down due to having little free time. Still, Fedora package seem to continue getting into troubles. |
Fuck it, time to move on to Whatsapp and get away from the bullshit excuses. |
Folks, it's called 'technical details', not 'excuses'. If you don't want to hear 'excuses', use the support, not GitHub. |
Do you have proof of your words? I see that both Arch and Gentoo uses packaged Qt 6 and all other libraries, just like Fedora. Once they get ffmpeg 5 they will have the same issues. Arch uses compatibility version of ffmpeg4.4.
Btw, Fedora build has 0 downstream patches.
Fedora is a bleeding edge distribution. That's why we always have the latest versions of compilers and libraries. |
The most long-standing issue with Fedora package is it's built with non-recommended build flags, e.g. GTK integration was disabled right until its deletion what was causing issues with clipboard and etc.
Nice to see
Yeah. As you can see, Arch already fixed this problem. I don't know what Gentoo will do when they get ffmpeg 5, but I believe they will do something instead of complaining.
Fedora shouldn't remove old version of packages if some packages still depend on them. Even Arch still has ffmpeg 4.4. |
This issue was resolved over a year ago. Also an option for building without GTK integration was an integral part of Telegram Desktop build scenario. We just used build-in build flag. Now Fedora build uses standard build flags and standard configuration (even for static tg_owt).
This is a temporary workaround, not a fix. Such compatible packages are not permanent. More and more distributions get ffmpeg 5.x:
There is only one version of each package in Fedora repositories. This is a part of the development process. We test builds against new versions and then report issues to upstreams. |
@xvitaly also I should note that the Persian font used in the fedora repos for telegram is not the one used for the official version Which is vazir matn font. |
That's true. We can't use bundled fonts for legal reasons. We use build-in option to prefer packaged version. I think if you install Vazir fonts system-wide, Telegram Desktop will start using them. |
Nice to hear. You asked for proofs, I provided them.
Yeah, at some point someone would port tdesktop to ffmpeg 5 guess. Right now this doesn't seem to be a priority for anyone, so compatibility package is a must for you if you don't have the power to make the port on your own.
Well, your development process should include either compatibility packages for transition time or some team that would help upstreams porting to newer libraries. Not all upstreams have manpower to follow your speed. tdesktop is one of them, there's only one person working full-time (just like with any other official Telegram client). |
Oh, so they still differ in build options. What a shame. |
I've already tried that but doesn't seem to detect the font. Looks like telegram uses an XML config file for storing font metadata. That needs to change too. |
Choosing the default for some writing system is not trivial with fontconfig, unfortunately. One needs to dig into the fontconfig's XML configuration world. The result won't be identical anyway though as the bundled fonts are patched to workaround some Qt bugs about bold variants. That's why the default is to use bundled fonts. |
OK. I'll ask for an exception for using bundled fonts. |
@ilya-fedin @pmoieni Fonts should be fixed now: rpmfusion/telegram-desktop@ebe700f |
@ilya-fedin Fixed in telegram-desktop-4.1.0-1.fc36 by building against openssl 1.1 and ffmpeg 4.4. |
so, i can close this? |
I guess so. |
@xvitaly sorry for late response, but I installed telegram using dnf and the previous Font was still there. Even though I have vazir matn font installed system-wide. |
New build is still in testing. Use this command to get it:
|
Steps to reproduce
Expected behaviour
It should work with normal usage (1-2% in background will be expected).
Actual behaviour
Randomly starts using tons of CPU.
Operating system
EndeavourOS KDE, also happened in Manjaro KDE
Version of Telegram Desktop
3.4.3-2
Installation source
Other (unofficial) source
Logs
No response
Screenshot
The text was updated successfully, but these errors were encountered: