Twitch causes system to almost freeze
Twitch causes system to almost freeze
Hey everyone,
i recently noticed that I am sometimes hardly able to watch any streams on twitch because the cpu goes up to like 150% whenever I watch a stream on twitch.
This does not happen on any other streaming site, YouTube works perfectly fine.
It also doesn't matter, what browser I am using. I have tried Vivaldi stable, Vivaldi snapshot and Firefox.
I tried it with hardware acceleration disabled and enabled, nothing seems to help and i am running out of ideas.
Does anyone else have that issue or knows where I can check what is causing that behaviour?
I am using MX Linux 19.2 on a Toshiba Satellite C850 with an Intel i5 3230M and 8GB RAM.
Thanks in advance for any help.
If you need any further info, please let me know.
Best regards,
cosmic
i recently noticed that I am sometimes hardly able to watch any streams on twitch because the cpu goes up to like 150% whenever I watch a stream on twitch.
This does not happen on any other streaming site, YouTube works perfectly fine.
It also doesn't matter, what browser I am using. I have tried Vivaldi stable, Vivaldi snapshot and Firefox.
I tried it with hardware acceleration disabled and enabled, nothing seems to help and i am running out of ideas.
Does anyone else have that issue or knows where I can check what is causing that behaviour?
I am using MX Linux 19.2 on a Toshiba Satellite C850 with an Intel i5 3230M and 8GB RAM.
Thanks in advance for any help.
If you need any further info, please let me know.
Best regards,
cosmic
-
- Posts: 3602
- Joined: Tue Jun 14, 2016 2:02 pm
Re: Twitch causes system to almost freeze
Can you please provide your Quick System Info (QSI)?
It sounds like both those browsers are struggling to render.
You can try Chromium from the MX Package Installer > Popular Applications > Browsers.
For sure this supports hardware acceleration, its been extensively tested too.
Outside of that, your QSI will let us know if something else needs changed or updated.
It sounds like both those browsers are struggling to render.
You can try Chromium from the MX Package Installer > Popular Applications > Browsers.
For sure this supports hardware acceleration, its been extensively tested too.
Outside of that, your QSI will let us know if something else needs changed or updated.
NEW USERS START HERE FAQS, MX Manual, and How to Break Your System - Don't use Ubuntu PPAs! Always post your Quick System Info (QSI) when asking for help.
Re: Twitch causes system to almost freeze
Hi SwampRabbit,
thanks for the quick reply.
I just installed chromium as suggested, but the CPU still jumps up to 120% as soon as i start watching streams on twitch.
Here is my QSI:
thanks for the quick reply.
I just installed chromium as suggested, but the CPU still jumps up to 120% as soon as i start watching streams on twitch.
Here is my QSI:
Code: Select all
System: Host: <filter>-mx Kernel: 4.19.0-6-amd64 x86_64 bits: 64 compiler: gcc v: 8.3.0
parameters: BOOT_IMAGE=/vmlinuz-4.19.0-6-amd64
root=UUID=809dc74b-ab91-4438-8cd1-079d7c16108c ro quiet splash
Desktop: Xfce 4.14.2 tk: Gtk 3.24.5 info: xfce4-panel wm: xfwm4 dm: LightDM 1.26.0
Distro: MX-19.2_x64 patito feo October 21 2019 base: Debian GNU/Linux 10 (buster)
Machine: Type: Laptop System: TOSHIBA product: SATELLITE PRO C850-1MX v: PSCBZE-00M009GR
serial: <filter>
Mobo: Intel model: PLCSF8 v: Type2 - Board Version serial: <filter>
UEFI [Legacy]: Insyde v: 6.50 date: 03/25/2013
Battery: ID-1: BAT0 charge: 39.1 Wh condition: 39.1/48.4 Wh (81%) volts: 12.4/10.8
model: TKBSS NS2P3SZMC4WR type: Li-ion serial: <filter> status: Full
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse serial: <filter>
charge: 55% (should be ignored) rechargeable: yes status: Discharging
CPU: Topology: Dual Core model: Intel Core i5-3230M bits: 64 type: MT MCP arch: Ivy Bridge
family: 6 model-id: 3A (58) stepping: 9 microcode: 21 L2 cache: 3072 KiB
flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 20752
Speed: 2499 MHz min/max: 1200/3200 MHz Core speeds (MHz): 1: 2994 2: 2993 3: 2993
4: 2993
Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages
Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW,
STIBP: conditional, RSB filling
Type: tsx_async_abort status: Not affected
Graphics: Device-1: AMD Whistler LE [Radeon HD 6610M/7610M]
vendor: Toshiba America Info Systems driver: radeon v: kernel bus ID: 01:00.0
chip ID: 1002:6742
Display: x11 server: X.Org 1.20.4 driver: ati,radeon unloaded: fbdev,modesetting,vesa
resolution: 1366x768~60Hz
OpenGL: renderer: AMD TURKS (DRM 2.50.0 / 4.19.0-6-amd64 LLVM 7.0.1)
v: 3.3 Mesa 18.3.6 compat-v: 3.1 direct render: Yes
Audio: Device-1: Intel 7 Series/C216 Family High Definition Audio
vendor: Toshiba America Info Systems driver: snd_hda_intel v: kernel bus ID: 00:1b.0
chip ID: 8086:1e20
Device-2: AMD Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series]
vendor: Toshiba America Info Systems driver: snd_hda_intel v: kernel bus ID: 01:00.1
chip ID: 1002:aa90
Sound Server: ALSA v: k4.19.0-6-amd64
Network: Device-1: Realtek RTL8723AE PCIe Wireless Network Adapter driver: rtl8723ae v: kernel
port: 3000 bus ID: 08:00.0 chip ID: 10ec:8723
IF: wlan0 state: down mac: <filter>
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Toshiba America Info Systems driver: r8169 v: kernel port: 2000
bus ID: 09:00.0 chip ID: 10ec:8168
IF: eth0 state: down mac: <filter>
Device-3: AVM FRITZ WLAN N v2 [RT5572/rt2870.bin] type: USB driver: rt2800usb
bus ID: 1-1.2:6 chip ID: 057c:8501 serial: <filter>
IF: wlan1 state: up mac: <filter>
IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A
Drives: Local Storage: total: 447.13 GiB used: 198.20 GiB (44.3%)
ID-1: /dev/sda vendor: SanDisk model: Ultra II 480GB size: 447.13 GiB block size:
physical: 512 B logical: 512 B speed: 6.0 Gb/s serial: <filter> rev: 00RL scheme: MBR
Partition: ID-1: / raw size: 444.58 GiB size: 436.61 GiB (98.21%) used: 111.93 GiB (25.6%)
fs: ext4 dev: /dev/dm-0
ID-2: /boot raw size: 512.0 MiB size: 487.9 MiB (95.30%) used: 83.0 MiB (17.0%)
fs: ext4 dev: /dev/sda1
ID-3: swap-1 size: 1.98 GiB used: 1024 KiB (0.0%) fs: swap
swappiness: 15 (default 60) cache pressure: 100 (default) dev: /dev/dm-1
Sensors: System Temperatures: cpu: 89.0 C mobo: N/A gpu: radeon temp: 76 C
Fan Speeds (RPM): N/A
Repos: No active apt repos in: /etc/apt/sources.list
Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
1: deb http://deb.debian.org/debian buster-updates main contrib non-free
Active apt repos in: /etc/apt/sources.list.d/debian.list
1: deb http://deb.debian.org/debian buster main contrib non-free
2: deb http://deb.debian.org/debian-security buster/updates main contrib non-free
Active apt repos in: /etc/apt/sources.list.d/mx.list
1: deb http://mxrepo.com/mx/repo/ buster main non-free
Active apt repos in: /etc/apt/sources.list.d/teamviewer.list
1: deb http://linux.teamviewer.com/deb stable main
Active apt repos in: /etc/apt/sources.list.d/various.list
1: deb http://download.virtualbox.org/virtualbox/debian buster contrib
Active apt repos in: /etc/apt/sources.list.d/vivaldi-snapshot.list
1: deb http://repo.vivaldi.com/snapshot/deb/ stable main
Active apt repos in: /etc/apt/sources.list.d/vivaldi.list
1: deb http://repo.vivaldi.com/stable/deb/ stable main
Info: Processes: 269 Uptime: 23h 17m Memory: 7.74 GiB used: 2.91 GiB (37.6%) Init: SysVinit
v: 2.93 runlevel: 5 default: 5 Compilers: gcc: 8.3.0 alt: 8 Shell: quick-system-in
running in: quick-system-in inxi: 3.0.36
- andyprough
- MX Packager
- Posts: 918
- Joined: Tue Jul 23, 2019 10:16 pm
Re: Twitch causes system to almost freeze
I tried twitch today on firefox to see, and I also got a very high cpu usage. There are a huge number of complaints on reddit and other places about high cpu usage with twitch. One thread stated that twitch is compressing a lot more video info into their streams than a normal video service in order to serve the largest possible number of viewers. A common suggestion is to watch videos on your computer through vlc or mpv. I tried it, and got lower cpu usage of about 10% with vlc, and cpu usage of about 20% (but better video quality) with mpv.cosmic303 wrote: Tue Aug 25, 2020 3:33 pm Hi SwampRabbit,
thanks for the quick reply.
I just installed chromium as suggested, but the CPU still jumps up to 120% as soon as i start watching streams on twitch.
To use vlc on a test video, I ran the following in a command line:
Code: Select all
vlc https://www.twitch.tv/tommyinnit
Code: Select all
mpv https://www.twitch.tv/tommyinnit
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg
Re: Twitch causes system to almost freeze
Now this is really weird:
This is what "top" says, when i try as you suggested ... usually vlc doesn't eat more than like 15-20%.
With twitch, its instant 154,8%
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27152 xxx 20 0 2308968 174852 90720 S 154,8 2,2 1:09.59 vlc
And this is mpv
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29387 xxx 20 0 1937036 211108 70100 S 104,3 2,6 0:19.39 mpv
Doesn't make any sense, does it?
This is what "top" says, when i try as you suggested ... usually vlc doesn't eat more than like 15-20%.
With twitch, its instant 154,8%
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27152 xxx 20 0 2308968 174852 90720 S 154,8 2,2 1:09.59 vlc
And this is mpv
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29387 xxx 20 0 1937036 211108 70100 S 104,3 2,6 0:19.39 mpv
Doesn't make any sense, does it?
- Michael-IDA
- Posts: 371
- Joined: Sat Jan 12, 2019 8:00 pm
Re: Twitch causes system to almost freeze
This won't help the cpu usage, but should keep the system from almost freezing. Add a nice to the command you watch twitch with (or the program you're using to browse with). Example(s):
If you have no other programs nice'd then 1 is fine, otherwise pick 1 above the most nice you already have.
Best,
Michael
Code: Select all
nice -n 1 mpv https://www.twitch.tv/tommyinnit
nice -n 3 palemoon %u {<< edit the menu item}
Best,
Michael
NIH Cancer Study: The group supplemented with both vitamins and fenbendazole exhibited significant (P = 0.009) inhibition of tumor growth.
The day Microsoft makes a product that doesn't suck...
... is the day they make a vacuum cleaner.
The day Microsoft makes a product that doesn't suck...
... is the day they make a vacuum cleaner.
- andyprough
- MX Packager
- Posts: 918
- Joined: Tue Jul 23, 2019 10:16 pm
Re: Twitch causes system to almost freeze
Is your machine relatively new? I noticed you are using AMD graphics. Regular MX may not be advanced enough for you in terms of the kernel and mesa and other graphics packages - you may want to try upgrading to MX AHS - advanced hardware support. I'm thinking you may be able to just add the AHS repo and then apt update and apt upgrade but I'm not certain. I'll look for an answer.cosmic303 wrote: Tue Aug 25, 2020 4:46 pm Now this is really weird:
This is what "top" says, when i try as you suggested ... usually vlc doesn't eat more than like 15-20%.
With twitch, its instant 154,8%
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27152 xxx 20 0 2308968 174852 90720 S 154,8 2,2 1:09.59 vlc
And this is mpv
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29387 xxx 20 0 1937036 211108 70100 S 104,3 2,6 0:19.39 mpv
Doesn't make any sense, does it?
UPDATE - according to this thread: viewtopic.php?f=104&t=59816&p=592147&hi ... hs#p592147
updating to AHS packages after adding the AHS repo should be possible. However, the first recommended actions would be:
1) upgrade to the 5.6.14 kernel from MX Package Installer, Popular Applications tab, 'Kernels' section. Try that newer kernel out and see if you get immediate improvement
2) try out MX AHS as a live usb environment with your hardware first, see how cpu usage looks with those videos there. If AHS makes it run like normal, you may want to consider re-installing with AHS or trying an upgrade to the rest of the AHS packages. Live ISO is here: https://mxlinux.org/torrent-files/
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg
Re: Twitch causes system to almost freeze
The machine is older than 2013, at least...
I'm not sure how much that AMD GPU will benefit from va-api acceleration, to be honest. You can can try "vainfo" in the terminal to see what codecs it supports. Twitch may be using a newer one like vp9 that wasn't even thought of back in 2013.
Our Chromium does support va-api, but not out of the box. It takes some setup and configuration, and you would have to force the provider to give you a stream with a supported codec, such as using h264ify to make youtube provide that codec instead of their default vp9 for older machines. Va-api also does not work for DRM'd streams like you might get with Netflix, as far as I know.
You can add the CPU Graph plugin to the XFCE panel to monitor CPU use in real time. Our KDE edition already has a similar widget on the panel.
I'm not sure how much that AMD GPU will benefit from va-api acceleration, to be honest. You can can try "vainfo" in the terminal to see what codecs it supports. Twitch may be using a newer one like vp9 that wasn't even thought of back in 2013.
Our Chromium does support va-api, but not out of the box. It takes some setup and configuration, and you would have to force the provider to give you a stream with a supported codec, such as using h264ify to make youtube provide that codec instead of their default vp9 for older machines. Va-api also does not work for DRM'd streams like you might get with Netflix, as far as I know.
You can add the CPU Graph plugin to the XFCE panel to monitor CPU use in real time. Our KDE edition already has a similar widget on the panel.
Re: Twitch causes system to almost freeze
Hey everyone,
yeah the machine is not really new, not sure when I exactly bought it, but 2013 sounds about right.
I just tried installing that new kernel via the MX Installer and got the following error messages:
E: Paket linux-image-5.6.0-2-amd64-unsigned kann nicht gefunden werden.
E: Mittels des Musters »linux-image-5.6.0-2-amd64-unsigned« konnte kein Paket gefunden werden.
E: Mittels regulärem Ausdruck »linux-image-5.6.0-2-amd64-unsigned« konnte kein Paket gefunden werden.
E: Paket linux-headers-5.6.0-2-amd64 kann nicht gefunden werden.
E: Mittels des Musters »linux-headers-5.6.0-2-amd64« konnte kein Paket gefunden werden.
E: Mittels regulärem Ausdruck »linux-headers-5.6.0-2-amd64« konnte kein Paket gefunden werden.
Basically it says, that the packages could not be found.
Also here is the output of vainfo:
Fun fact: Right now, i dont have any issues. I am watching a stream on twitch, and the cpu is at 25% usage with vivaldi stable.
I wasn't able to watch streams all night just yesterday when I started this thread :(
UPDATE: False alarm. I just switched to a different streamer and i am back to over 100% CPU usage.
I can't even reproduce the problem, its so annoying.
yeah the machine is not really new, not sure when I exactly bought it, but 2013 sounds about right.
I just tried installing that new kernel via the MX Installer and got the following error messages:
E: Paket linux-image-5.6.0-2-amd64-unsigned kann nicht gefunden werden.
E: Mittels des Musters »linux-image-5.6.0-2-amd64-unsigned« konnte kein Paket gefunden werden.
E: Mittels regulärem Ausdruck »linux-image-5.6.0-2-amd64-unsigned« konnte kein Paket gefunden werden.
E: Paket linux-headers-5.6.0-2-amd64 kann nicht gefunden werden.
E: Mittels des Musters »linux-headers-5.6.0-2-amd64« konnte kein Paket gefunden werden.
E: Mittels regulärem Ausdruck »linux-headers-5.6.0-2-amd64« konnte kein Paket gefunden werden.
Basically it says, that the packages could not be found.
Also here is the output of vainfo:
Code: Select all
$ vainfo
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Mesa Gallium driver 18.3.6 for AMD TURKS (DRM 2.50.0 / 4.19.0-6-amd64, LLVM 7.0.1)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
I wasn't able to watch streams all night just yesterday when I started this thread :(
UPDATE: False alarm. I just switched to a different streamer and i am back to over 100% CPU usage.
I can't even reproduce the problem, its so annoying.
- andyprough
- MX Packager
- Posts: 918
- Joined: Tue Jul 23, 2019 10:16 pm
Re: Twitch causes system to almost freeze
You need the header package. Go to MX Package Installer, MX Test Repo tab, and install the packages linux-headers-5.6.0-2-amd64 and linux-image-5.6.0-2-amd64-unsigned. That will pull in the kernel, the kernel header package, and the kernel common package and will update grub for you. Reboot, and you should then boot into the 5.6 kernel.cosmic303 wrote: Wed Aug 26, 2020 1:27 am Hey everyone,
yeah the machine is not really new, not sure when I exactly bought it, but 2013 sounds about right.
I just tried installing that new kernel via the MX Installer and got the following error messages:
E: Paket linux-image-5.6.0-2-amd64-unsigned kann nicht gefunden werden.
E: Mittels des Musters »linux-image-5.6.0-2-amd64-unsigned« konnte kein Paket gefunden werden.
E: Mittels regulärem Ausdruck »linux-image-5.6.0-2-amd64-unsigned« konnte kein Paket gefunden werden.
E: Paket linux-headers-5.6.0-2-amd64 kann nicht gefunden werden.
E: Mittels des Musters »linux-headers-5.6.0-2-amd64« konnte kein Paket gefunden werden.
E: Mittels regulärem Ausdruck »linux-headers-5.6.0-2-amd64« konnte kein Paket gefunden werden.
Basically it says, that the packages could not be found.
If it doesn't help, you can uninstall those packages and return to the regular 4.19 MX kernel by selecting the same two packages on the same MXPI tab and clicking 'Uninstall' at the bottom.
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg