Closed takase1121 closed 6 months ago
you should figure out which of these flags are necessary for it to work and open a pr that adds them to the source code. this way it can benefit everyone
In my testing, all the flags I placed there is necessary, but it will have to know if the driver is amdgpu (because the whole ANGLE Vulkan dance is only needed (probably for now) for AMD only). Besides, this is using mesa-git and not generally available which is why I'm not comfortable with adding it to Vesktop yet.
I'm suggesting a way to passthrough enable-feature
flags to Vesktop. I believe that Vesktop is doing great with the flags, but if the user tries to pass something to Electron, Vesktop should not override it. Maybe detecting if enable-features
is present will be a better solution (assuming that Chromium actually only take the last enable-feature
flags).
Yep, confirmed that the last switch will override all previous switches: https://source.chromium.org/chromium/chromium/src/+/main:base/command_line.h;l=9;drc=515737a1eff38ecfffef07d7dbf5717742cab958
As for your proposal to add that long list of flags to Vesktop, on my machine, it prints that the settings for angle/vulkan are not an allowed combination. AMD Arch KDE Wayland electron29. Just my 2c of unsolicited feedback.
As for your proposal to add that long list of flags to Vesktop, on my machine, it prints that the settings for angle/vulkan are not an allowed combination. AMD Arch KDE Wayland electron29. Just my 2c of unsolicited feedback.
Now you get the idea why these flags must not be added to Vesktop for now. They're highly experienmental and one wrong move will disable GPU acceleration completely.
Describe the bug
I am trying to get VAAPI Video Decoding to work on amdgpu, which needs a bunch of flags and some amount of prayers. Since Vesktop tries to append it's own
enable-features
flags this caused it to override the previous (user added) flags. I have no proof of this happening, but in my testing removing this line made it work:https://github.com/Vencord/Vesktop/blob/8eaa5206b98ce7029b6879cc2ce361c2ae5f6239/src/main/index.ts#L33
Those flags has good intentions, but it will take more flags (to force Electron to use ANGLE and ANGLE to use Vulkan) to make it work, and it's not possible to set them if it got overridden by the flags above.
To Reproduce
Not working
vesktop-git
from AUR.vesktop --use-gl=angle --use-angle=vulkan --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy --enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo
Making it work
pnpm i && pnpm build
electron29 --use-gl=angle --use-angle=vulkan --ignore-gpu-blocklist --enable-gpu-rasterization --enable-zero-copy --enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo .
Expected behavior
Vesktop can detect if
--enable-features
is set, get all the flags and append its own flags. After that, Vesktop will append it back toapp.cmdLine
.Screenshots
Working
Not Working
Desktop (please complete the following information):
Command line output
Not working:
Working:
Additional context
At this point I am not even sure if Electron is using GPU acceleration. It's barely using any VRAM and all the stuff is stored in GTT (RAM). Testing with powertop does give me a 2W decrease in power consumption, so I'll take it.
For reference: