Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#74427 - [telegram-desktop] High CPU usage when seeing an animated sticker

Attached to Project: Community Packages
Opened by Dan (Cornul11) - Saturday, 09 April 2022, 22:13 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 20 April 2022, 00:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description: Opening a chat in which an animated sticker has been sent, will raise the CPU usage of a CPU to its maximum.

This happened after the last update which changed the ffmpeg dependency.


Additional info:
* package version: 3.6.1-2

Steps to reproduce: See above.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Wednesday, 20 April 2022, 00:09 GMT
Reason for closing:  Fixed
Comment by Dan (Cornul11) - Sunday, 10 April 2022, 03:16 GMT
Small edit: I meant that the CPU usage of only one CPU core will raise to the maximum.
Comment by Sven-Hendrik Haase (Svenstaro) - Sunday, 10 April 2022, 03:16 GMT
Well, this sucks. Either we get crashes on ffmpeg 4 or we get this on ffmpeg 5. Can't win. Not sure what's worse.
Comment by Dan (Cornul11) - Sunday, 10 April 2022, 03:18 GMT
I did not have this issue up until this update. Moreover, I am not sure how to reproduce this, but sometimes the animated sticker completely stops being animated; in other words, it freezes.
Comment by q rty (q234rty) - Sunday, 10 April 2022, 05:38 GMT
It only happens on webm stickers, and it also happens on webm videos. MP4 videos and animated stickers using the lottie format seem to be unaffected.
Comment by q rty (q234rty) - Sunday, 10 April 2022, 05:42 GMT
Also this is unrelated to the patch applied by arch: that part only affects calls as far as I understand it.
The other part of the patch is already merged upstream in https://github.com/telegramdesktop/tdesktop/commit/436622ad7c41d45b8b56873c086d37d2eff4d493
Comment by q rty (q234rty) - Sunday, 10 April 2022, 08:13 GMT Comment by q rty (q234rty) - Sunday, 10 April 2022, 12:45 GMT
Attached PKGBUILD for rebuilding libtg_owt against ffmpeg4.4 so that we can revert to using ffmpeg4.4 for both packages. This should also make it so that joining a video chat doesn't cause a crash.
   PKGBUILD (2.5 KiB)
Comment by Xiufeng Guo (Showfom) - Monday, 11 April 2022, 04:15 GMT
Same problem when there are GIFs in chat, CPU usage to 100%
Comment by Lukas (DrLuke) - Monday, 11 April 2022, 15:38 GMT
Same for me. After some time it uses 100% of all of my cores, not just one.
Comment by Dan (Cornul11) - Monday, 11 April 2022, 18:58 GMT
@DrLuke, I can confirm the same behaviour on my machine.
Comment by q rty (q234rty) - Monday, 11 April 2022, 19:11 GMT
Should be resolved by community-testing/telegram-desktop 3.6.1-3
Comment by Lukas (DrLuke) - Tuesday, 12 April 2022, 08:41 GMT
3.6.1-3 resolved the issue for me, I can now continue to enjoy my video stickers of cats. Many thanks!
Comment by Marcell Meszaros (MarsSeed) - Tuesday, 12 April 2022, 09:48 GMT
The high CPU usage of stickers has been recently reported, then closed without action here:

https://github.com/telegramdesktop/tdesktop/issues/24307

TGDesktop's maintainers seem unconcerned that third-party builds using ffmpeg 5.0 have issues.

They just say if it's not broken in their official binary build, it's not broken. :(

But does that mean TGDesktop supports building successfully against ffmpeg 5.0 but
all third party builds must stick to ffmpeg 4.4 because of unknown upstream issues
that they are unwilling to investigate? (/rant end/).

FWIW, I've only experienced the reported issue with stickers on v3.6.1-2
as a 1-2 second long jump to 100% saturation of one core.

Now on v3.6.1-3, I no longer experience that elevation, so this version
eliminates the issue at hand.

Loading...