mullvad / mullvadvpn-app

The Mullvad VPN client app for desktop and mobile
https://mullvad.net/
GNU General Public License v3.0
5.07k stars 336 forks source link

[Feature Request] - Toggle GPU Hardware Acceleration #3851

Open Mantas-2155X opened 2 years ago

Mantas-2155X commented 2 years ago

Issue report

Operating system: Linux (Ubuntu 22.04)

App version: 2022.2

Issue description

Ability to toggle GPU Hardware acceleration for the GUI application.

I have noticed that the mullvad gui app uses more than 200 MB of VRAM when sitting idle in the background. Since the GUI app is only interacted with quite rarely by the user to switch servers, I would suggest having an option to disable GPU acceleration (--disable-gpu) to save VRAM for lower end systems.

As a temporary workaround adding the above parameter to the .desktop file drops the VRAM usage to 4 MB and no slowdown is experienced (the animations are very simple after all).

faern commented 2 years ago

Disabling GPU acceleration definitely has performance impacts on some systems. But I agree that we should use way less VRAM on idle! We'll see what we can do.

DPTJKKVH commented 2 years ago

Hey @Mantas-2155X , can you please tell me on what position I should add the --disable-gpu to as shown in my picture? (Forget the 1, I realized that this is actually just a space in the path. Also I know that I have to add a space, don't worry.) unknown

raksooo commented 2 years ago

@DPTJKKVH It should go at 3. The resulting line should be

Exec="/opt/Mullvad VPN/mullvad-vpn" --disable-gpu %U
DPTJKKVH commented 2 years ago

Thanks @raksooo ! Much appreciated. Really does make no difference for performance but saves a lot of VRAM!

novacrazy commented 1 year ago

I'd like to bump this. It's silly that Mullvad would consume 50-200MB of VRAM on just a taskbar icon 99.9% of the time. I'm about to update to the latest version and am unsure if I'll have to search through the registry to modify things again.

I have never observed any performance decrease, though I do have a powerful CPU. If anything, it's faster. I use the same --disable-gpu trick on VS Code and other things with no noticeable change in performance, too. Though it is notable that Electron will create extra processes to do CPU rendering, and those will consume about the same amount of regular RAM as was previously consumed as VRAM.

EDIT: Finally restarted after a few weeks. The Mullvad VPN.exe that autostarts was indeed reset, so I had to edit that again to save that 50MB VRAM.