Skip to content

vram memory leak with hardware acceleration #6715

Open

Description

@at46

Your system information

  • Steam client version (build number or date): Nov 20 2019 at 01:49:33
  • Distribution (e.g. Ubuntu): Debian testing
  • Opted into Steam client beta?: [Yes/No] No
  • Have you checked for system updates?: [Yes/No] Yes

amd radeon 570 4gb with mesa 19.2.4 on kernel 5.3.9

Steam system information:
https://gist.github.com/at46/51134de8e41a8aa24351b8a47a1344f4

Please describe your issue in as much detail as possible:

Steam seems to have a vram memory leak with hardware acceleration enabled. When resizing a chat window the vram usage goes up and up. I used GALLIUM_HUD="VRAM-usage" glxgears to watch vram usage. After starting steam the vram usage is 200 MB. With constantly resizing the chat window I can fill the vram up to 3.5 gb of 4 gb vram.

Steps for reproducing this issue:

  1. open steam
  2. make sure you have Enable GPU accelerated rendering in web views (requires restart) enabled
  3. open a chat window
  4. constantly resize the chat window
  5. see vram usage increase and never decrease as long as the chat window is open

Activity

  1. NoXPhasma commented on Nov 24, 2019

    @NoXPhasma

    This was also discovered a while a go in #6593, it still needs to be fixed.

  2. kisak-valve commented on Nov 24, 2019

    @kisak-valve
    Member

    Thanks for pointing out the existing issue report. Let's use this issue issue report to track the vram leak because the original issue described in #6593 has been resolved.

  3. Leopard1907 commented on Nov 24, 2019

    @Leopard1907

    This is hw , driver indepented btw. I have the same problem on Nvidia for a long time. Disabled gpu accel because it easily fills up more than half of my vram.

  4. xpander69 commented on Dec 11, 2019

    @xpander69

    Confirming this issue. Managed to fill all my 11GB that my 1080Ti has with just around 30-40 resizes of the Steam window.

  5. Myrddin-Wyllt commented on Jan 21, 2020

    @Myrddin-Wyllt

    I'll add that the chat window is an unnecessary specificity; this issue also affects the Steam Library. Restarting Steam empties the VRAM as expected. I'd avoid window resizing until this issue can be fixed.

    I'm tempted to turn GPU acceleration off again though...

  6. Shajirr commented on Mar 15, 2020

    @Shajirr

    Can confirm that this is still happening, just resizing Steam window adds several hundred MB of memory use, this memory does not get freed.

  7. at46 commented on Mar 23, 2021

    @at46
    Author

    I just tested the hardware acceleration again but the memory leak is still there. It's a little disappointing that after over a year nothing happens with such easily reproducible errors.

  8. xpander69 commented on Oct 24, 2021

    @xpander69

    Confirming that it still happens when resizing chat window: Steam window resizing will do that also, but with lower pace.

  9. alex4321 commented on Nov 5, 2021

    @alex4321

    Ubuntu 21.10

    nvidia-smi gives me the next output:

    NVIDIA-SMI 470.74       Driver Version: 470.74       CUDA Version: 11.4
    ...
    +-----------------------------------------------------------------------------+
    | Processes:                                                                  |
    |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
    |        ID   ID                                                   Usage      |
    |=============================================================================|
    |    0   N/A  N/A      1332      G   /usr/lib/xorg/Xorg                910MiB |
    |    0   N/A  N/A      1628      G   /usr/bin/gnome-shell              363MiB |
    |    0   N/A  N/A     52909      G   ...AAAAAAAAA= --shared-files       61MiB |
    |    0   N/A  N/A    128671      G   ...AAAAAAAAA= --shared-files      157MiB |
    |    0   N/A  N/A    960652      G   ...e/Steam/ubuntu12_32/steam       90MiB |
    |    0   N/A  N/A    960877      G   ./steamwebhelper                    3MiB |
    |    0   N/A  N/A    961129      G   ./steamwebhelper                 5433MiB |
    |    0   N/A  N/A   1160503      G   ...1/usr/lib/firefox/firefox      213MiB |
    |    0   N/A  N/A   1170627      G   ...AAAAAAAAA= --shared-files       28MiB |
    |    0   N/A  N/A   1911015      G   ...b/thunderbird/thunderbird       43MiB |
    |    0   N/A  N/A   3358357      G   telegram-desktop                    2MiB |
    +-----------------------------------------------------------------------------+
    

    So it consumed ~5.5 Gb memory.

    Steam package version 1634158817 (build from Oct 13 2021)

    Bug exists with enabled GPU-accelerated webviews (including resizing-related behaviour), going to check if it exists with disabled (btw, I was sure that I disabled it previously a few days ago, when I noticed this issue first time, but now I can see it enabled in settings)

  10. gardotd426 commented on Nov 10, 2021

    @gardotd426

    @alex4321 what's your hardware and driver version? (EDIT: I see now you're on 470.74)

    I can't get this issue to show up on Arch w/ 495 on my 3090. I've had Steam open on a store page for hours:

    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 495.44       Driver Version: 495.44       CUDA Version: 11.5     |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |                               |                      |               MIG M. |
    |===============================+======================+======================|
    |   0  NVIDIA GeForce ...  Off  | 00000000:0F:00.0  On |                  N/A |
    | 60%   44C    P0   116W / 366W |   1488MiB / 24260MiB |     16%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
                                                                                   
    +-----------------------------------------------------------------------------+
    | Processes:                                                                  |
    |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
    |        ID   ID                                                   Usage      |
    |=============================================================================|
    |    0   N/A  N/A    370674      G   /usr/lib/Xorg                     679MiB |
    |    0   N/A  N/A    371153      G   ...AAAAAAAAA= --shared-files       31MiB |
    |    0   N/A  N/A    371154      G   ...gAAAAAAAAA --shared-files        9MiB |
    |    0   N/A  N/A    372902      G   plasmashell                        45MiB |
    |    0   N/A  N/A    372956      G   kwin_x11                          157MiB |
    |    0   N/A  N/A    373107      G   /usr/bin/kitty                      8MiB |
    |    0   N/A  N/A    374332      G   ...gl=desktop --shared-files      249MiB |
    |    0   N/A  N/A    377091      G   latte-dock                         32MiB |
    |    0   N/A  N/A    379003      G   /usr/bin/kitty                      7MiB |
    |    0   N/A  N/A    379861      G   /usr/bin/kitty                      8MiB |
    |    0   N/A  N/A    397229      G   ...eamroot/ubuntu12_32/steam       32MiB |
    |    0   N/A  N/A    397242      G   ./steamwebhelper                    4MiB |
    |    0   N/A  N/A    397300      G   ...ef_log.txt --shared-files      147MiB |
    +-----------------------------------------------------------------------------+
    

    And it's only using 4MB of VRAM. And acceleration is definitely enabled.

  11. at46 commented on Mar 9, 2022

    @at46
    Author

    While I can still increase the used VRAM with resizing a window, it now empties itself after a few seconds (Steam Client from March 5 2022).

  12. at46 commented on Mar 15, 2022

    @at46
    Author

    Can anyone confirm that the VRAM empties itself now?

  13. NoXPhasma commented on Mar 15, 2022

    @NoXPhasma

    It does it for me, sometmes not every time. When I move the chat window it jumps from 21% up to 29% VRAM usage and then drops down to 28% when I let go and after a while it drops to 26%. And then it stays there.

    To free the ram every time entirely, I have to close the offending process and reopen it. Why is this still not fixed and yet Valve adds more and more stuff which needs HW acceleration?

  14. h1z1 commented on Apr 4, 2022

    @h1z1

    Curious.. does restarting your window manager free it too? ( kwin --replace , xfwm4 --replace etc). Just noticing a lot of memory is tied to X which for me is related to an old bug. xrestop can help determine what in X is eating it.

  15. DekosAnjo commented on Dec 26, 2023

    @DekosAnjo

    Three years and this bug still exists. Resizing the Steam window has become a big no-no for me, as I go to great lengths to never even maximize the window to avoid losing my precious VRAM. This is an issue for newcomers to Linux; they may not know how to identify the VRAM leakage from Steam and sometimes wrongly blame Linux when games don't run well.
    before resize:
    image
    After resize:
    image

  16. xpander69 commented on Dec 26, 2023

    @xpander69

    Yeah. Can confirm this still happens. Posted on other issue also:
    #9638

  17. kodatarule commented on Dec 26, 2023

    @kodatarule

    Indeed the issue hasn't been resolved yet, also posted in #9638

  18. Zi7ar21 commented on Dec 30, 2023

    @Zi7ar21

    I am having the same problem, this and #9638 are indeed the same problem (except it's not just the chat window, it is any Steam window).

    Fri Dec 29 21:55:52 2023       
    +---------------------------------------------------------------------------------------+
    | NVIDIA-SMI 545.29.06              Driver Version: 545.29.06    CUDA Version: 12.3     |
    |-----------------------------------------+----------------------+----------------------+
    | GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
    |                                         |                      |               MIG M. |
    |=========================================+======================+======================|
    |   0  NVIDIA GeForce GTX 1650        Off | 00000000:01:00.0  On |                  N/A |
    | 50%   29C    P5              10W /  75W |   3438MiB /  4096MiB |      8%      Default |
    |                                         |                      |                  N/A |
    +-----------------------------------------+----------------------+----------------------+
                                                                                             
    +---------------------------------------------------------------------------------------+
    | Processes:                                                                            |
    |  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
    |        ID   ID                                                             Usage      |
    |=======================================================================================|
    |    0   N/A  N/A      1007      G   /usr/lib/Xorg                              3033MiB |
    |    0   N/A  N/A      1334      G   xfwm4                                         2MiB |
    |    0   N/A  N/A      2827      G   ...,WinRetrieveSuggestionsOnlyOnDemand       72MiB |
    |    0   N/A  N/A      5958      G   ...seed-version=20231218-080113.411000      224MiB |
    |    0   N/A  N/A      6417      G   ...local/share/Steam/ubuntu12_32/steam        2MiB |
    |    0   N/A  N/A      6423      G   ...re/Steam/ubuntu12_64/steamwebhelper        3MiB |
    |    0   N/A  N/A      6464      G   ...eam/logs/cef_log.txt --shared-files       96MiB |
    +---------------------------------------------------------------------------------------+
    

    Steam also doesn't output anything to the console when I resize (<username> is a placeholder):

    steam.sh[8119]: Running Steam on arch rolling 64-bit
    steam.sh[8119]: STEAM_RUNTIME is enabled automatically
    setup.sh[8191]: Steam runtime environment up-to-date!
    steam.sh[8119]: Steam client's requirements are satisfied
    [2023-12-29 22:01:26] Startup - updater built Dec  8 2023 00:32:59
    [2023-12-29 22:01:26] Startup - Steam Client launched with: '/home/<username>/.local/share/Steam/ubuntu12_32/steam'
    12/29 22:01:26 Init: Installing breakpad exception handler for appid(steam)/version(1702079146)/tid(8243)
    [2023-12-29 22:01:26] Loading cached metrics from disk (/home/<username>/.local/share/Steam/package/steam_client_metrics.bin)
    [2023-12-29 22:01:26] Using the following download hosts for Public, Realm steamglobal
    [2023-12-29 22:01:26] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
    [2023-12-29 22:01:26] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
    [2023-12-29 22:01:26] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
    [2023-12-29 22:01:26] Verifying installation...
    [2023-12-29 22:01:26] Verification complete
    
    Steam logging initialized: directory: /home/<username>/.local/share/Steam/logs
    
    XRRGetOutputInfo Workaround: initialized with override: 0 real: 0xf0833dc0
    XRRGetCrtcInfo Workaround: initialized with override: 0 real: 0xf0832500
    /usr/share/themes/Adwaita-dark/gtk-2.0/main.rc:733: error: unexpected identifier 'direction', expected character '}'
    /usr/share/themes/Adwaita-dark/gtk-2.0/hacks.rc:28: error: invalid string constant "normal_entry", expected valid string constant
    steamwebhelper.sh[8249]: Runtime for steamwebhelper: defaulting to /home/<username>/.local/share/Steam/ubuntu12_64/steam-runtime-heavy
    steamwebhelper.sh[8249]: glibc >= 2.34, partially disabling sandbox until CEF supports clone3()
    CAppInfoCacheReadFromDiskThread took 63 milliseconds to initialize
    Steam Runtime Launch Service: starting steam-runtime-launcher-service
    Steam Runtime Launch Service: steam-runtime-launcher-service is running pid 8350
    bus_name=com.steampowered.PressureVessel.LaunchAlongsideSteam
    BRefreshApplicationsInLibrary 1: 1ms
    BuildCompleteAppOverviewChange: 222 apps
    RegisterForAppOverview 1: 16ms
    RegisterForAppOverview 2: 16ms
    

    Do you guys have a similar configuration (indicating it may be an issue with Steam's interactions with external components) or are we all using different distros, desktop environments, graphics, etc. (indicating it is an issue with Steam's internals)

  19. Zi7ar21 commented on Dec 30, 2023

    @Zi7ar21

    Disabling Hardware Acceleration fixes the VRAM leak

  20. kaarelen commented on Jan 5, 2024

    @kaarelen

    2024, bug is still here

    Your system information
    Steam client version (build number or date): Steam Version: 1702079146
    Distribution (e.g. Ubuntu): Arch
    Opted into Steam client beta?: [Yes/No] No
    Have you checked for system updates?: [Yes/No] Yes, everything is up-to-date

    Please describe your issue in as much detail as possible:
    Same issue as described before. Huge VRAM leaks after any interactions with Steam client windows. (it easily can consume all 8gb on my rtx1070). Turning off GPU acceleration fixes it, but without it, steam is slow and laggy & "Big Picture" mode is unusable at all.

    @kisak-valve issue making steam totally unusable, is there any chance to finish abandonment of this task?

  21. Zi7ar21 commented on Mar 3, 2024

    @Zi7ar21

    I haven't forgotten about this issue, as of 2024-03-03 it appears to be fixed, and I can now enable GPU acceleration once again and resize the Steam window like mad without the VRAM sky-rocketing :)

  22. DekosAnjo commented on Mar 4, 2024

    @DekosAnjo

    Nope, it still happens for me. What exactly did you change from back then to now?

  23. kodatarule commented on Aug 3, 2024

    @kodatarule

    Hello, are there any updates on this? I can still notice that it still leaks VRAM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions