Problem with Telegram media caching  [Solved]

Help with the version of MX KDE officially released by the Development Team.
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
paul1149
Posts: 526
Joined: Fri Dec 29, 2017 11:39 am

Problem with Telegram media caching

#1 Post by paul1149 »

I use Telegram a lot, and there is much media shared there, both still pics and videos. Very frequently the media will hang trying to load, or in the case of videos it might start playing but have many freezes along the way, apparently as it tries to cache as it goes.

I am on an older i3 laptop with an SSD, which plays online videos within the browser and local videos within SMP or VLC with no such problem.

I have noticed in Telegram that often when I clear its cache the problem is better for a while. I have its cache set to 2GB, and the failure to load problem typically surfaces when it's reaches about 1100MB. My Telegram is fully updated, and I have had this problem for many months. I have mentioned it at Telegram Github, with no response.

I don't have this problem anywhere near as bad in Telegram on my Android phone, so I'm wondering if there is something I can adjust in Linux to resolve the problem there. Thanks.

Code: Select all

Snapshot created on: 20221121_1855
System:    Kernel: 6.0.0-3mx-amd64 [6.0.5-1~mx21+1] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-6.0.0-3mx-amd64 root=UUID=<filter> ro quiet splash 
           Desktop: KDE Plasma 5.20.5 wm: kwin_x11 vt: 7 dm: SDDM 
           Distro: MX-21.3_x64 Wildflower November 21  2022 base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: ASUSTeK product: Q302LA v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: Q302LA v: 1.0 serial: <filter> UEFI: American Megatrends 
           v: Q302LA.203 date: 05/15/2014 
Battery:   ID-1: BAT0 charge: 43.6 Wh (97.3%) condition: 44.8/50.1 Wh (89.4%) volts: 11.3 
           min: 11.3 model: ASUSTeK UX3-44 type: Li-ion serial: N/A status: Not charging 
           cycles: 31 
CPU:       Info: Dual Core model: Intel Core i3-4030U bits: 64 type: MT MCP arch: Haswell 
           family: 6 model-id: 45 (69) stepping: 1 microcode: 26 cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 15164 
           Speed: 1276 MHz min/max: 800/1800 MHz Core speeds (MHz): 1: 1696 2: 1587 3: 1696 
           4: 1696 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: mmio_stale_data status: Unknown: No mitigations 
           Type: retbleed status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: 
           conditional, RSB filling, PBRSB-eIBRS: Not affected 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel Haswell-ULT Integrated Graphics vendor: ASUSTeK driver: i915 v: kernel 
           bus-ID: 00:02.0 chip-ID: 8086:0a16 class-ID: 0300 
           Device-2: Suyin Asus Integrated Webcam type: USB driver: uvcvideo bus-ID: 1-1.5:5 
           chip-ID: 064e:9700 class-ID: 0e02 serial: <filter> 
           Display: x11 server: X.Org 1.20.14 compositor: kwin_x11 driver: loaded: modesetting 
           unloaded: fbdev,vesa display-ID: :0 screens: 1 
           Screen-1: 0 s-res: 2806x900 s-dpi: 96 s-size: 742x238mm (29.2x9.4") 
           s-diag: 779mm (30.7") 
           Monitor-1: eDP-1 res: 1366x768 hz: 60 dpi: 118 size: 293x165mm (11.5x6.5") 
           diag: 336mm (13.2") 
           Monitor-2: HDMI-1 res: 1440x900 hz: 60 dpi: 90 size: 408x255mm (16.1x10.0") 
           diag: 481mm (18.9") 
           OpenGL: renderer: Mesa Intel HD Graphics 4400 (HSW GT2) v: 4.6 Mesa 22.0.5 
           compat-v: 3.1 direct render: Yes 
Audio:     Device-1: Intel Haswell-ULT HD Audio driver: snd_hda_intel v: kernel bus-ID: 00:03.0 
           chip-ID: 8086:0a0c class-ID: 0403 
           Device-2: Intel 8 Series HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus-ID: 00:1b.0 chip-ID: 8086:9c20 class-ID: 0403 
           Sound Server-1: ALSA v: k6.0.0-3mx-amd64 running: yes 
           Sound Server-2: PulseAudio v: 15.0 running: yes 
Network:   Device-1: MEDIATEK MT7630e 802.11bgn Wireless Network Adapter vendor: Foxconn 
           driver: mt76x0e v: kernel modules: wl port: f040 bus-ID: 02:00.0 chip-ID: 14c3:7630 
           class-ID: 0280 
           IF: wlan0 state: down mac: <filter> 
           Device-2: Ralink RT5370 Wireless Adapter type: USB driver: rt2800usb bus-ID: 2-2.1:4 
           chip-ID: 148f:5370 class-ID: 0000 serial: <filter> 
           IF: wlan1 state: up mac: <filter> 
Drives:    Local Storage: total: 1.15 TiB used: 451.66 GiB (38.4%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Silicon Power model: SPCC Solid State Disk 
           size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD 
           serial: <filter> rev: 3B0 scheme: GPT 
           ID-2: /dev/sdb maj-min: 8:16 type: USB vendor: Toshiba model: MQ01ABD075 
           size: 698.64 GiB block-size: physical: 512 B logical: 512 B type: HDD rpm: 5400 
           serial: <filter> rev: 1003 scheme: GPT 
Partition: ID-1: / raw-size: 289.83 GiB size: 284.22 GiB (98.06%) used: 55.6 GiB (19.6%) fs: ext4 
           dev: /dev/sda2 maj-min: 8:2 
           ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat 
           dev: /dev/sda1 maj-min: 8:1 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 8 GiB used: 2.5 MiB (0.0%) priority: -2 
           dev: /dev/sda3 maj-min: 8:3 
Sensors:   System Temperatures: cpu: 52.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 3200 
Repos:     Packages: 3114 note: see --pkg apt: 3108 lib: 1879 flatpak: 6 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
           1: deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian/ bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/megasync.list 
           1: deb [signed-by=/usr/share/keyrings/meganz-archive-keyring.gpg] https://mega.nz/linux/repo/Debian_11/ ./
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mirror.math.princeton.edu/pub/mxlinux/mx/repo/ bullseye main non-free
           2: deb http://mirror.math.princeton.edu/pub/mxlinux/mx/repo/ bullseye ahs
           Active apt repos in: /etc/apt/sources.list.d/nextdns.list 
           1: deb [signed-by=/usr/share/keyrings/nextdns.gpg] https://repo.nextdns.io/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/vivaldi-snapshot.list 
           1: deb [arch=amd64] https://repo.vivaldi.com/snapshot/deb/ stable main
           No active apt repos in: /etc/apt/sources.list.d/vscode.list 
Info:      Processes: 266 Uptime: 1h 53m wakeups: 1 Memory: 7.66 GiB used: 5.52 GiB (72.2%) 
           Init: systemd v: 247 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: UEFI
MX-19-KDE x64, on Ryzen 5, 16GB RAM, SSD. Nvidia graphics.

User avatar
CharlesV
Administrator
Posts: 7924
Joined: Sun Jul 07, 2019 5:11 pm

Re: Problem with Telegram media caching  [Solved]

#2 Post by CharlesV »

Two things I can suggest.

First, The 6.0 kernel you are running has a few issues and it would be smart to upgrade to a later kernel. I would suggest moving to the 6.2.14 Liquorix kernel, which I have found to be exceptional, as well as resolve some issues.

You can easily install it in MX Package Installer, go to the Enabled Repos tab, then search for 6.2.14. Check both the header for 6.2.14 and the image for 6.2.14, then at the bottom of the dialog, check "Also install Recommended Packages", and then click Install.


Second, cache is important in how that application works, and its paging in cache is another critical item. Any cache you set - try to make sure it is on a 256 boundary or increment. Personally, I have found with many applications that slogging through a large cache is a bad thing. The fact that you have set a high cache size, and its getting into trouble at far lower, leads me to believe its struggling finding things in that cache - or struggling with setting indexing or storage. Try DECREASING that cache to something like 1024mb or even 512mb and see what happens.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
paul1149
Posts: 526
Joined: Fri Dec 29, 2017 11:39 am

Re: Problem with Telegram media caching

#3 Post by paul1149 »

Ok, that sounds like great advice. I will start with the cache and then proceed to the kernel if necessary.

Very much appreciated!
MX-19-KDE x64, on Ryzen 5, 16GB RAM, SSD. Nvidia graphics.

User avatar
paul1149
Posts: 526
Joined: Fri Dec 29, 2017 11:39 am

Re: Problem with Telegram media caching

#4 Post by paul1149 »

The cache doesn't have fine tuning, it's a sliding scale of even increments - 500mb, 1G, 2G, etc. But I did raise the media cache from 500mb to 1G. When I did that the total cache slider automatically went back to 2G. So I'll see how the new 1G/2G combo does.
MX-19-KDE x64, on Ryzen 5, 16GB RAM, SSD. Nvidia graphics.

User avatar
paul1149
Posts: 526
Joined: Fri Dec 29, 2017 11:39 am

Re: Problem with Telegram media caching

#5 Post by paul1149 »

@CharlesV,

Ok, I've tried a few things now. I reduced the cache settings as you suggested. That seemed to help a little.

Then I upgraded to the 6.2.14 Liquorix kernel. On reboot the problem was much worse. I tried it for a while, then reverted to 6.0, and it is much better. I think this dated machine can't handle the newer kernel.

As it stands right now, the problem has been negligible. A little initial delay as it buffers, then it's off to the races. I'll live with this for a while and see if it holds. I think adjusting the Telegram cache downward was a good move.

Thanks much again for the suggestions!
MX-19-KDE x64, on Ryzen 5, 16GB RAM, SSD. Nvidia graphics.

User avatar
CharlesV
Administrator
Posts: 7924
Joined: Sun Jul 07, 2019 5:11 pm

Re: Problem with Telegram media caching

#6 Post by CharlesV »

Very good to hear! Thank you for the update. Once you think this is solved, please mark as such. ( Fingers crossed :-) )
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
paul1149
Posts: 526
Joined: Fri Dec 29, 2017 11:39 am

Re: Problem with Telegram media caching

#7 Post by paul1149 »

I already did. It's been pretty good. Not perfect, but it's the weekend and on cable there are network issues typically.
MX-19-KDE x64, on Ryzen 5, 16GB RAM, SSD. Nvidia graphics.

Post Reply

Return to “MX KDE Official Release”