Problems with youtube videos loading and sound

I noticed that sometomes when I boot my OS youtube videos don’t work. Browsers become unresponsive or all videos load very slowly. Also when it loads doesn’t start and if I try to rewind it to later time just one frame loads and then is loading forever… Often browser crashes (I use firefox). I though that is a problem with Firefox but same happens in Opera.

The second problem I have is with sound. When I play something I can’t hear nothing. In systry I can see sound devices and I even see that progressbar that sound is playing on speciffic line but when I click it no sound came out.

Both problems occur occasionally when I start my PC and restart usually helps to fix it but is annoying. What can I do about it? How I can debug this?

Please provide some more information for anyone to be able to help you, according to this post in EnOS Wiki.

Sorry for lack of info.
Here is HW info: https://0x0.st/HXH3.txt
And here is boot log when I had problems with videos: https://pastebin.com/FgvFw3U9

Thanks!

I have to say, I can’t find any faults (fails or errors) in the logs you posted. The system you have should by itself be very capable of playing YT videos, etc. without any hastle.

Perhaps you can open a terminal-window with htop, glances, or ksysguard, or similar running next to your browser window, when running YT videos, in order to find out which running process is likely carrying much CPU-load for further debugging…

:v:

Did you check out your pavucontrol configuration-tab (uppper roght corner>>)?

There you can configure your audio-sinks…

Problems with videos happens only sometimes when I turn on my PC, all other times are working perfectly. CPU + GPU are more than capable to run them but it seems like sometimes something goes wrong on boot.

How I can debug it next time it happens? …is there any specific command to run to check if all video drivers are loaded correctly or something similar?

Not a very probable cause, at all. Why would drivers be loaded only sometimes, not always!?

I told you further upwards, how I would go about trouble-shooting:

Also:
Since you’re using KDE, are you running your system on Wayland, or on Xorg (X11)? Xorg is likely much more trouble-free.

Your configuration ::

API: ALSA v: k6.1.22-1-lts status: kernel-api
Server-1: PipeWire v: 0.3.67 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin

---------- quote
Since Firefox version >=52, the browser has dropped support for ALSA and depends solely on PulseAudio for sound requirements, hence rendering all sites playing audio broken on an ALSA-only system (such as Lubuntu, an official Ubuntu Flavor).

Mozilla has cited ongoing problems and maintenance issues for dropping ALSA support, as explained in the original bug report. This gives the options of either downgrading to an earlier version of Firefox (not really) or switching to a different browser.
---------- quote

If PulseAudio is not installed, Firefox uses ALSA instead.

Your system configuration shows you have pipewire server installed rather than pulseaudio. And pipewire-alsa has replaced the functions of ALSA.
Therefore, to satisfy firefox’s default configuration for pulseAudio, a emulation for ALSA may meet the requirement, e.g. ‘apule’.
yay -S apulse (emulation for ALSA)
To run firefox, just use apulse to initiate firefox:
$ /usr/bin/apulse /usr/lib/firefox/firefox %u

I am not sure if this will work for your hardware.

No, I just checked volume control where I can see all devices. I will check it next time when I will have same problem

Yea it’s weird but I have problems with youtube only sometimes and I don’t have a clue what it happens only sometimes. I will check htop/ glances / ksysguard next time. Today all works fine.

And it happened again… “glances” command showed me this:

After that I tried to start play YT video in opera browser and results were the same … CPU rise to above 80% usage … but in general in opera & FF that CPU usage varies between 20% to 95% when I triy to play YT videos sometimes after reboot.

Is not just YT videos but videos on websites in general.

Mine keeps spawning between > 80% and > 90%, so what i can guess is maybe nothing wrong with yours.

how good is your internet connection?

Try installing:

yay -S —needed mpv pipe-viewer-git

…and watch YT Videos fron there.
https://aur.archlinux.org/packages/pipe-viewer-git

Another way to go without the heavy JS load YT is putting on your machine would be using invidious instead:
https://api.invidious.io/

Let us know if it makes any difference.