From 4c7393004af2de7216a84f6122638bd7214549da Mon Sep 17 00:00:00 2001 From: Keeqler <33733651+Keeqler@users.noreply.github.com> Date: Mon, 8 Jun 2026 16:06:40 -0300 Subject: [PATCH 1/2] XMRig: Add MSR instructions, conditionally enable volumes, fix namings --- ix-dev/community/xmrig/app.yaml | 2 +- ix-dev/community/xmrig/questions.yaml | 16 ++++++++++------ .../xmrig/templates/docker-compose.yaml | 12 +++++++++--- .../xmrig/templates/macros/entrypoint.sh | 3 ++- .../templates/test_values/basic-values.yaml | 2 +- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ix-dev/community/xmrig/app.yaml b/ix-dev/community/xmrig/app.yaml index c5509221e66..9f06aa48468 100644 --- a/ix-dev/community/xmrig/app.yaml +++ b/ix-dev/community/xmrig/app.yaml @@ -39,4 +39,4 @@ sources: - https://xmrig.com title: XMRig train: community -version: 1.0.5 +version: 1.0.6 diff --git a/ix-dev/community/xmrig/questions.yaml b/ix-dev/community/xmrig/questions.yaml index 2fd95792e61..a478524ef5a 100644 --- a/ix-dev/community/xmrig/questions.yaml +++ b/ix-dev/community/xmrig/questions.yaml @@ -30,8 +30,8 @@ questions: - variable: use_remote_pool label: Use Remote Pool description: | - Leaving this disabled will attempt to use your installed XMRig. - If you do not run the XMRig app, you need to specify a pool address. + Leaving this disabled will attempt to use your installed P2Pool app. + If you do not run the P2Pool app, you need to specify a pool address. schema: type: boolean default: false @@ -43,9 +43,9 @@ questions: type: uri required: true show_if: [["use_remote_pool", "=", true]] - - variable: local_xmrig_port - label: XMRig Port - description: The port your XMRig app is listening on. + - variable: local_p2pool_port + label: P2Pool Port + description: The port your P2Pool app is listening on. schema: type: int min: 1 @@ -58,12 +58,14 @@ questions: schema: type: string required: false + show_if: [["use_remote_pool", "=", true]] - variable: pool_password label: Pool Password schema: type: string required: false private: true + show_if: [["use_remote_pool", "=", true]] - variable: autodetect_algorithm label: Autodetect Algorithm description: | @@ -143,7 +145,9 @@ questions: description: | Only available for the RandomX algorithm.
Enabling this may increase the hashrate by 10-30%, but will grant XMRig privileged - access to the host. + access to the host.
+ IMPORTANT: For this to work, you need to load the MSR kernel module on the host every + time you boot your system: `sudo modprobe msr`. schema: type: boolean default: false diff --git a/ix-dev/community/xmrig/templates/docker-compose.yaml b/ix-dev/community/xmrig/templates/docker-compose.yaml index 784dda3aca8..ae8bbd4e692 100644 --- a/ix-dev/community/xmrig/templates/docker-compose.yaml +++ b/ix-dev/community/xmrig/templates/docker-compose.yaml @@ -5,15 +5,21 @@ {% do xmrig.add_extra_host("host.docker.internal", "host-gateway") %} {% do xmrig.healthcheck.disable() %} -{% do xmrig.set_privileged(values.xmrig.use_msr_mod) %} +{% do xmrig.set_privileged(values.xmrig.use_msr_mod or values.xmrig.use_1gb_huge_pages) %} {% do xmrig.configs.add("entrypoint.sh", entrypoint(values), "/entrypoint.sh", "0755") %} {% do xmrig.set_entrypoint(["/entrypoint.sh"]) %} -{% do xmrig.add_storage("/dev/hugepages", {"type": "host_path", "host_path_config": {"path": "/dev/hugepages"}}) %} -{% do xmrig.add_storage("/dev/cpu", {"type": "host_path", "host_path_config": {"path": "/dev/cpu"}}) %} {% do xmrig.add_storage("/root/.config", values.storage.config) %} +{% if values.xmrig.use_1gb_huge_pages %} + {% do xmrig.add_storage("/dev/hugepages", {"type": "host_path", "host_path_config": {"path": "/dev/hugepages"}}) %} +{% endif %} + +{% if values.xmrig.use_msr_mod %} + {% do xmrig.add_storage("/dev/cpu", {"type": "host_path", "host_path_config": {"path": "/dev/cpu"}}) %} +{% endif %} + {% for store in values.storage.additional_storage %} {% do xmrig.add_storage(store.mount_path, store) %} {% endfor %} diff --git a/ix-dev/community/xmrig/templates/macros/entrypoint.sh b/ix-dev/community/xmrig/templates/macros/entrypoint.sh index 1a236c444a2..5ca52259897 100755 --- a/ix-dev/community/xmrig/templates/macros/entrypoint.sh +++ b/ix-dev/community/xmrig/templates/macros/entrypoint.sh @@ -18,7 +18,7 @@ jq_write() { {%- set pool_addr = values.xmrig.remote_pool_address if values.xmrig.remote_pool_address - else "host.docker.internal:%s" | format(values.xmrig.local_xmrig_port) + else "host.docker.internal:%s" | format(values.xmrig.local_p2pool_port) %} jq_write '.pools[0].url = "{{ pool_addr }}"' @@ -43,6 +43,7 @@ jq_write '.cpu.enabled = true' jq_write '.cpu.priority = {{ values.xmrig.cpu_priority }}' jq_write '.cpu["*"].threads = {{ values.xmrig.cpu_threads }}' jq_write '.randomx["1gb-pages"] = {{ values.xmrig.use_1gb_huge_pages | lower }}' +jq_write '.randomx.wrmsr = {{ values.xmrig.use_msr_mod | lower }}' jq_write '.randomx.rdmsr = {{ values.xmrig.use_msr_mod | lower }}' {%- if values.xmrig.use_proxy %} diff --git a/ix-dev/community/xmrig/templates/test_values/basic-values.yaml b/ix-dev/community/xmrig/templates/test_values/basic-values.yaml index 06c8333fbbe..f0b9a96db6e 100644 --- a/ix-dev/community/xmrig/templates/test_values/basic-values.yaml +++ b/ix-dev/community/xmrig/templates/test_values/basic-values.yaml @@ -8,7 +8,7 @@ TZ: UTC xmrig: use_remote_pool: false remote_pool_address: "" - local_xmrig_port: 3333 + local_p2pool_port: 3333 pool_username: "" pool_password: "" autodetect_algorithm: true From 9b6a5ebc046ee8842355b8e47a1992f799639503 Mon Sep 17 00:00:00 2001 From: Keeqler <33733651+Keeqler@users.noreply.github.com> Date: Mon, 8 Jun 2026 16:08:54 -0300 Subject: [PATCH 2/2] Change use_msr_mod label --- ix-dev/community/xmrig/questions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ix-dev/community/xmrig/questions.yaml b/ix-dev/community/xmrig/questions.yaml index a478524ef5a..3bfd65fa821 100644 --- a/ix-dev/community/xmrig/questions.yaml +++ b/ix-dev/community/xmrig/questions.yaml @@ -141,7 +141,7 @@ questions: type: boolean default: false - variable: use_msr_mod - label: Use MSR Mod + label: Use MSR Mod (Requires MSR Kernel Module) description: | Only available for the RandomX algorithm.
Enabling this may increase the hashrate by 10-30%, but will grant XMRig privileged