Chromium 79 Has Experimental Vulkan Support And You Should NOT Enable It

From LinuxReviews
Jump to navigationJump to search
Chromium-icon.png

The latest version of the Google-controlled free software browser Chromium is released and available in the testing repositories of the more up-to-date GNU/Linux distributions. It has a brand new Vulkan rendering mode available which can be enabled in the "Experiments" settings which can be accessed using the special chrome://flags page. Naturally, the first thing that came to mind was "Well, how does it perform?" so we enabled with the hopes of doing some basic benchmarks. That was huge mistake.

written by 윤채경 (Yoon Chae-kyung)  2019-12-21 - last edited 2020-07-22. © CC BY

Chrome-79-experiments.png
chrome://flags has a new experimental option for Vulkan rendering in Chromium 79.

The first thing which comes to mind when I see a new versions of Chromium and Firefox be installed during a system update is "Let's benchmark it and see how it performs". That did not go so well with Firefox 71 which can't even finish the Unity 2018 WebGL benchmark due to problems with WebAssembly. The latest Chromium versions and previous Firefox versions run that benchmark just fine.

I'll typically take a brief look at chrome://flags where experimental flags which can impact performance one way or the other can be altered before I run benchmarks on Chromium and Chromium-based browsers. It's always interesting to see how the stock settings compare to tuned settings.. This time there was something new on that page, something interesting: "Vulkan - Use vulkan as the graphics backend". That's clearly something worthy of a quick spin.

Disaster Ensued

Chromium-vulkan-enabled-01.png
The special chrome://gpu page will tell you if the fancy new Vulkan renderer is enabled or not.

At first blush the shiny new Vulkan renderer appeared to work just fine on a desktop machine with a Ryzen CPU and a AMD GPU. The Linux Kernel's website kernel.org loaded and looked perfectly normal. All was well:

Chrome-with-vulkan-03.jpg

However, re-sizing that window resulted in a .. minor problem:

Chrome-with-vulkan-04.jpg

Moving the window between monitors (after re-starting it) caused the same kind of problem.

The slight rendering glitch did not improve as a short amount of time passed:

Chrome-with-vulkan-02.jpg

Re-starting the browser and going to chrome://flags to disable Vulkan rendering did no longer provide a very user-friendly or intuitive interface for doing so:

Chrome-with-vulkan-01.jpg

Killing and restarting the browser a few times did make it start and render normally. Vulkan works fine until you either resize the window or move between screens most of the time.

Kernel Ring Buffer Story Regarding Chromium's Vulkan Rendering

It's always interesting to see what the Linux Kernel's ring buffer, which can be viewed by executing the dmesg command, has to say when graphical glitches, errors and other problems occur on a GNU/Linux machine.

dmesg had this very informative message explaining what was happening under the hood:

Amdgpu-error.jpg
The kernels ring buffer had a very mysterious message from AMD.

[  759.172208] amdgpu 0000:07:00.0: GPU fault detected: 146 0x0d721014 for process chromium-freewo pid 128207 thread chromium-f:cs0 pid 128264
[  759.172210] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x00102DAE
[  759.172211] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x05010014
[  759.172213] amdgpu 0000:07:00.0: VM fault (0x14, vmid 2, pasid 32771) at page 1060270, write from 'CB3' (0x43423300) (16)
[  759.172217] amdgpu 0000:07:00.0: GPU fault detected: 146 0x0d726014 for process chromium-freewo pid 128207 thread chromium-f:cs0 pid 128264
[  759.172217] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x00102DAE
[  759.172218] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0401000C
[  759.172219] amdgpu 0000:07:00.0: VM fault (0x0c, vmid 2, pasid 32771) at page 1060270, read from 'CB3' (0x43423300) (16)
[  759.182788] amdgpu 0000:07:00.0: GPU fault detected: 146 0x0d70880c for process chromium-freewo pid 128207 thread chromium-f:cs0 pid 128264
[  759.182790] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x00102DAE
[  759.182791] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0608800C
[  759.182793] amdgpu 0000:07:00.0: VM fault (0x0c, vmid 3, pasid 32771) at page 1060270, read from 'TC6' (0x54433600) (136)
[  759.183583] amdgpu 0000:07:00.0: GPU fault detected: 146 0x0d70840c for process chromium-freewo pid 128207 thread chromium-f:cs0 pid 128264
[  759.183584] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x00102DAE
[  759.183584] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0608400C
[  759.183586] amdgpu 0000:07:00.0: VM fault (0x0c, vmid 3, pasid 32771) at page 1060270, read from 'TC7' (0x54433700) (132)
[  759.186366] amdgpu 0000:07:00.0: GPU fault detected: 146 0x0d72d014 for process chromium-freewo pid 128207 thread chromium-f:cs0 pid 128264
[  759.186367] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x001085AE
[  759.186368] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x090D0014
[  759.186369] amdgpu 0000:07:00.0: VM fault (0x14, vmid 4, pasid 32771) at page 1082798, write from 'CB7' (0x43423700) (208)
[  759.186374] amdgpu 0000:07:00.0: GPU fault detected: 146 0x0d721014 for process chromium-freewo pid 128207 thread chromium-f:cs0 pid 128264
[  759.186374] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x001085AE
[  759.186375] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0801000C
[  759.186376] amdgpu 0000:07:00.0: VM fault (0x0c, vmid 4, pasid 32771) at page 1082798, read from 'CB3' (0x43423300) (16)
[  759.186485] amdgpu 0000:07:00.0: GPU fault detected: 146 0x0d70880c for process chromium-freewo pid 128207 thread chromium-f:cs0 pid 128264
[  759.186486] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x001085AE
[  759.186487] amdgpu 0000:07:00.0:   VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x0808800C
[  759.186488] amdgpu 0000:07:00.0: VM fault (0x0c, vmid 4, pasid 32771) at page 1082798, read from 'TC6' (0x54433600) (136)
[  759.187201] amdgpu 0000:07:00.0: GPU fault detected: 146 0x0d70c80c for process chromium-freewo pid 128207 thread chromium-f:cs0 pid 128264

The entire ring buffer was filled with pages upon pages with these very mysterious messages.

Versions And Hardware In Question

Testing the Chromium 79.0.3945.79 "freeworld" bulid on two different machines running kernels 5.4.2 and 5.4.5 and newly released Mesa 19.2.8 produced the same result. One has a Ryzen 1600X and a RX470 GPU and the other has a Ryzen 2600 and a RX570. That rules out any hardware problem. amdgpu driver story is that it's "GPU fault detected"; it says that a lot when it's not. Two different perfectly fine graphics cards don't magically break in the same way at the same time and magically revert to a working state when one particular program is closed; that's a software problem.

The issue is not window manager dependant. A sneaking suspicion that the best desktop environment Xfce's window manager xfwm4 was responsible made me try KDE Plasma and it's very fancy effect-filled kwin window manager. The result was hardly an improvement:

Chrome-with-vulkan-kwin.jpg
Chromium 79.0.3945.79 with Vulkan rendering running in kwin.

This issue could have been amdgpu specific. It's not. We tested the same Chromium version and enabled Vulkan on a Intel N4200 powered notebook running kernel 5.3.18. The result was a not at all interesting failure. Chromium would launch and work fine until it's window was moved or re-sized. Doing so resulted in this sad black square:

Chromium-79-intel-gpu.png
Chromium 79.0.3945.79 on a Intel N4200 machine using it's iGPU for Vulkan rendering.

The kernel ring buffer on the N4200 had zero errors. The i915 kernel module for Intel graphics cards does tend to be less vocal than the amdgpu counterpart. A black square where the interface and a web page should be is a clear indication that something is very wrong.

Not Exactly Ready For Prime-Time

Chromium's new Vulkan rendering mechanism appears to have some minor issues. You should not enable it, you will likely have a bad day if you do.

You should probably stick with Chromium's default settings. They are mostly fine and it's performance is actually worse if you enable things like GPU rasterization, that particular option will more than double GPU memory use and reduce performance.

Some of you will want to go to chrome://flags and enable the Vulkan flag and test it. Remember this when disaster occurs: We tried to warn you and you didn't listen.

We tried to ask AMD developers about the mysterious messages from their amdgpu kernel module. None were available for comment. We did get this comment from Dolphin Emulator developer Ryan Houdek who happened to be present in the secret graphics developer hangout:

"Fun times, good thing it is experimental :D"

Dolphin Emulator developer Ryan Houdek
December 21st, 2019
0.00
(0 votes)


Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.