I recently got a new laptop with newish hardware. It runs damn good out of the box with vanilla Fedora. I can't think of anything that doesn't work after using it for a few weeks. Pretty happy with it overall.
Except that I noticed playing videos in any web browser increases my CPU usage significantly. It also spins the fan up, and obviously that increases the heat of the laptop in my lap. I have a work laptop that I run similar videos on regularly, but it's running Windows. So, I start digging.
Turns out that hardware acceleration for browsers is non-existent in Linux. It's possible in Chromium by using a couple of hacks, and installing the unsupported/unstable version from a 3rd party dev. And, you must run X11. Can't use Wayland (default for Gnome 3) and expect hardware acceleration to work in the Chromium version that supports it.
Not satisfied with running an unofficial/unstable version of Chromium, limited to X11, and additional hacking, I went searching for a different solution. Initially, I landed on VLC. Installing the right Intel libraries and enabling hardware acceleration in VLC, I can stream any video I've tried so far. It takes my CPU usage from ~200% using the browser to somewhere between 10-30% in VLC.
I'm also testing gnome-mpv with youtube-dl installed and vaapi hardware acceleration enabled. It looks promising so far. Comparing VLC to gnome-mpv, I can't seem to determine much of a noticeable difference. They both appear to be very low CPU intensive when using hardware acceleration. This keeps my laptop nice and cool.
I have read that gnome-mpv is not optimized in Wayland, and it's recommended to just use mpv directly. I'm planning to test mpv (no GUI) tonight and see if I get even better results.
I'm a little sour that software rendering is the standard in Linux. Considering how much we are reliant on web browsers nowadays, I think an official solution is necessary. Even if it's an official solution that works in gnome with X11 with specific drivers... That would give us a better chance at utilizing the available resources of our hardware. Instead we're chugging along with software rendering...
Except that I noticed playing videos in any web browser increases my CPU usage significantly. It also spins the fan up, and obviously that increases the heat of the laptop in my lap. I have a work laptop that I run similar videos on regularly, but it's running Windows. So, I start digging.
Turns out that hardware acceleration for browsers is non-existent in Linux. It's possible in Chromium by using a couple of hacks, and installing the unsupported/unstable version from a 3rd party dev. And, you must run X11. Can't use Wayland (default for Gnome 3) and expect hardware acceleration to work in the Chromium version that supports it.
Not satisfied with running an unofficial/unstable version of Chromium, limited to X11, and additional hacking, I went searching for a different solution. Initially, I landed on VLC. Installing the right Intel libraries and enabling hardware acceleration in VLC, I can stream any video I've tried so far. It takes my CPU usage from ~200% using the browser to somewhere between 10-30% in VLC.
I'm also testing gnome-mpv with youtube-dl installed and vaapi hardware acceleration enabled. It looks promising so far. Comparing VLC to gnome-mpv, I can't seem to determine much of a noticeable difference. They both appear to be very low CPU intensive when using hardware acceleration. This keeps my laptop nice and cool.
I have read that gnome-mpv is not optimized in Wayland, and it's recommended to just use mpv directly. I'm planning to test mpv (no GUI) tonight and see if I get even better results.
I'm a little sour that software rendering is the standard in Linux. Considering how much we are reliant on web browsers nowadays, I think an official solution is necessary. Even if it's an official solution that works in gnome with X11 with specific drivers... That would give us a better chance at utilizing the available resources of our hardware. Instead we're chugging along with software rendering...