Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Dumping romFS causes desktop lag and potentially crash #20

Open
PolyCatDev opened this issue Apr 30, 2024 · 5 comments
Open

[BUG] Dumping romFS causes desktop lag and potentially crash #20

PolyCatDev opened this issue Apr 30, 2024 · 5 comments
Milestone

Comments

@PolyCatDev
Copy link

The issue

When I dump a large game such as TOTK over nxDumpClient my desktop lags horribly and eventually crashes. I tried with BOTW in the past and that only lagged out my PC.

Steps to reproduce

  1. Connect switch to PC
  2. Dump the romFS of a game

What do I use

I use the flatpak from flathub and Fedora Linux Silverblue 40 with Gnome 46.1

@v1993
Copy link
Owner

v1993 commented Apr 30, 2024

Since I don't have TotK personally to test - can you observe memory usage increasing before crash? If so, can you confirm that it is nxdumpclient process that consumes memory?

@PolyCatDev
Copy link
Author

Ok. The problem seems to come form over-stressing the CPU. My memory is just fine but the CPU has a huge spike.
Screenshot from 2024-05-05 22-57-37
Also here's a video: https://files.catbox.moe/dsg9nz.webm

@PolyCatDev
Copy link
Author

I'm guessing this is happening because of the very rapid movement of the loading bar because the official py script works just fine.

@v1993
Copy link
Owner

v1993 commented Jun 11, 2024

I've been able to reproduce abnormally high CPU usage with dumping Fire Emblem Engage, which also has a lot of small files, although it's worth noting that only one CPU core is stressed and it's generally not that high of a load (15-20% in my test). Also, weirdly enough, the problem actually gets worse if nxdumpclient is ran in background: CPU usage increases and xdg desktop portal process starts eating CPU as well.

While I can't promise a concrete release date, this will definitely be much easier to fix with a reproduction on my end once I get to it.

@v1993
Copy link
Owner

v1993 commented Aug 27, 2024

I was pretty sure I've posted this before, but apparently I never got to it...

Either way - the problem is primarily caused by very rapidly creating and destroying session inhibitors (at the beginning and at the end of each file transfer), which involves communicating over D-Bus with desktop services. The proper fix is to implement mass transfer control commands added in ABI 1.2 (which will also incidentally make progress bar move more slowly), which will allow to only create/destroy inhibitors at the beginning/end of the whole mass dump process.

As such, this is mostly a duplicate of #18, but I'm keeping this open in case changes in question will turn out to be insufficient.

@v1993 v1993 added this to the v1.2.0 milestone Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants