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

btop: Update to 1.3.2 #48113

Merged
merged 1 commit into from
Jun 17, 2024
Merged

btop: Update to 1.3.2 #48113

merged 1 commit into from
Jun 17, 2024

Conversation

zen0bit
Copy link
Contributor

@zen0bit zen0bit commented Jan 8, 2024

Testing the changes

  • I tested the changes in this PR: briefly

Local build testing

  • I built this PR locally for my native architecture, (x64 glibc)

@Calandracas606
Copy link

Calandracas606 commented Jan 8, 2024

Tested and is not working for me on x86-64-musl. CPU bar are missing.

Also, we could add ROCm-SMI-LIB as a dependency for AMD GPU support. I have a template for it, but it is trivial, and has no other dependencies

@mdkcore0
Copy link
Contributor

btop 1.3.2 available

@zen0bit zen0bit changed the title btop: Update to 1.3.0 btop: Update to 1.3.2 Feb 15, 2024
@Calandracas606
Copy link

I just tested, and 1.3.2 looks like its working for me on musl

Also I created a PR to add ROCm-SMI-LIB for GPU support: #48744

@zen0bit
Copy link
Contributor Author

zen0bit commented Feb 15, 2024

I just tested, and 1.3.2 looks like its working for me on musl

Also I created a PR to add ROCm-SMI-LIB for GPU support: #48744

Definetly will try..

Since btop must be compiled with ROCm support, I think we will need second package for that...

am I right?

@Calandracas606
Copy link

Since btop must be compiled with ROCm support, I think we will need second package for that...

ROCm-SMI is a standalone library which doesn't require any additional ROCm components. It pretty much just is an interface to get GPU load, power usage, temps, fan speeds, etc.

@zen0bit
Copy link
Contributor Author

zen0bit commented Feb 15, 2024

Since btop must be compiled with ROCm support, I think we will need second package for that...

ROCm-SMI is a standalone library which doesn't require any additional ROCm components. It pretty much just is an interface to get GPU load, power usage, temps, fan speeds, etc.

I am speaking about btop and btop-rocm

@Calandracas606
Copy link

I am speaking about btop and btop-rocm

I don't think that there is a need for a second package.

How is it different from other packages we build which have optional dependencies for extended functionality?

@Calandracas606
Copy link

Calandracas606 commented Feb 15, 2024

I just checked the code and it should dlopen librocm_smi64.so

@zen0bit
Copy link
Contributor Author

zen0bit commented Feb 15, 2024

But as I study btop instructions before. ROCm must be presented at build time. If isn't btop should be builded without ROCm support. So provide library for usuall btop shouldn't be enough. Must be builded again with ROCm, as far as I understand...

So only difference will be ROCM_devel in makedepends

repektive somethink like this?:

# Template file for 'btop-ROCm'
pkgname=btop-ROCm
version=1.3.2
revision=1
build_style=gnu-makefile
makedepends="ROCm-SMI-devel"
short_desc="Monitor of resources"
maintainer="RunningDroid <runningdroid@zoho.com>"
license="Apache-2.0"
homepage="https://github.com/aristocratos/btop"
changelog="https://raw.githubusercontent.com/aristocratos/btop/main/CHANGELOG.md"
distfiles="https://github.com/aristocratos/btop/archive/refs/tags/v${version}.tar.gz"
checksum=331d18488b1dc7f06cfa12cff909230816a24c57790ba3e8224b117e3f0ae03e
conflicts=btop

@cinerea0
Copy link
Contributor

I believe what @Calandracas606 is saying is that there is no need to create a new btop-ROCm package, you can simply add ROCm-SMI-devel to btop's makdepends if/when it gets merged.

That said, xbps does not support "optional" dependencies, only build options. Did you mean adding a non-default build option for ROCm-SMI support?

@Calandracas606
Copy link

you can simply add ROCm-SMI-devel to btop's makdepends if/when it gets merged.

@cinerea0 what I mean is that btop tries to dlopen librocm_smi, it's not even needed as a makedepends.

//? Try possible library paths and names for librocm_smi64.so
  const array libRocAlts = {"/opt/rocm/lib/librocm_smi64.so",
                            "librocm_smi64.so",
                            "librocm_smi64.so.5",   // fedora
                            "librocm_smi64.so.1.0", // debian
                            "librocm_smi64.so.6"};

  for (const auto &l : libRocAlts) {
    rsmi_dl_handle = dlopen(l, RTLD_LAZY);
    if (rsmi_dl_handle != nullptr) {
      break;
    }
  }

  if (!rsmi_dl_handle) {
    Logger::info(
        "Failed to load librocm_smi64.so, AMD GPUs will not be detected: "s +
        dlerror());
    return false;
  }

All that being said, there appears to be a bug in the gpu code, but I've been able to patch it to get it working

@Calandracas606
Copy link

made a bug report upstream, but it shouldn't block this PR

aristocratos/btop#774

@dm17
Copy link

dm17 commented Mar 28, 2024

image

I'm not seeing how to get the GPU to display. I've AMDGPUs

@Calandracas606
Copy link

@dm17

I'm not seeing how to get the GPU to display. I've AMDGPUs

btop needs rocm-smi-lib #48744 to display amdgpu details

however, btop also appears bugged, and fails to display without a patch: aristocratos/btop#774

only with patched btop, and rocm-smi-lib will the gpu show:
image

@classabbyamp classabbyamp merged commit 8bc52fe into void-linux:master Jun 17, 2024
8 checks passed
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

Successfully merging this pull request may close these issues.

None yet

6 participants