Doing this as refactoring work before I start working on supporting Intel GPUs, which are expected to share the same collection code. This should have no functional change.
This PR makes it so that we should hopefully avoid waking up NVIDIA GPUs while gathering info (on Linux only). It mostly follows how we were doing it for AMD devices, which required a bit of refactoring to get it to work with the NVML library I was using.
Note that, as mentioned above, it does not change behaviour for Windows (or other OSes that work with NVIDIA GPUs) at the moment, as I need to use some fairly OS-specific logic to get it to work on each platform from the looks of it.
Unfortunately, I no longer have any Nvidia-based machines to test with, let alone laptops with Optimus... so this may be hard to verify whether it works on my end.
Pins curl and xz-utils versions for the netbsd pre-build script. This pins it to the most recent versions as of writing.
Note: may be worth exploring just making a custom image that has this rather than doing it each time beforehand.
I had made it so it only used stable, which was generally right but not always (e.g. I downgrade Rust version like right now).
Note this had no effect on actually building the binaries as those use cross.
Run zizmor again. Replaces action-gh-release with just `gh release` and pins the image version for almalinux. Also a driveby fix for docs regarding permissions.
This adds the ability to run with `--network_start_zeroed` or the `start_zeroed` config option, which will zero out the total network usage so that bottom starts with it at zero, rather than the total network usage reported by the OS since boot.
There was an if-condition that only ran if the sort state was false. But this would never be hit since `use_sort_table_value` always set it to false beforehand, so it would be stuck focusing on a hidden menu.
Adds back the audit workflow using [`audit-check`](https://github.com/rustsec/audit-check). This also adds a drive-by update for `anyhow` to `1.0.104` since it was hitting an unsound warning.
Wanted to prune Cargo.toml a tiny bit and noticed I could just use humantime to do this instead of time for logging purposes. Of course I still pull it in via Cargo.lock though.
At some point I accidentally changed the default to 24.04 when refactoring things. This means it won't work for some older Debian-based systems like bookworm, primarily for x86, since ARM was correctly using an override. This change just reverts the default back.
A looooong time ago, we had to manually hijack stdio for FreeBSD to suppress a bogus stderr warning (see
#798). I filed an upstream report at GuillaumeGomez/sysinfo#875, but the real issue was actually with FreeBSD itself. From the upstream upstream bug report at https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228432, it looks like this has been fixed since 2022 for FreeBSD 13, so I think it's safe to remove this hack at this point on our end, especially given that I don't build binaries for older than FreeBSD 13 anymore (oldest is 15 now).
This PR allows us to entirely remove the filedescriptor crate for FreeBSD since we no longer use it entirely.