Skip to content

Conversation

@azeam
Copy link
Owner

@azeam azeam commented Oct 18, 2024

No description provided.

}
pclose(fupppath);
void set_upp_path(app_widgets *widgets) {
snprintf(upppath, sizeof(upppath), "%s/.local/bin/venv/bin/upp", getenv("HOME"));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks my setup by not finding the executable.

@Pipshag
Copy link

Pipshag commented Oct 18, 2024

By using a work-around for the actual filepath for UPP, everything loads as expected and my options are not greyed out after selecting the card in the dropdow.

@EnragedN3wb
Copy link

I used git clone https://github.com/azeam/powerupp.git & just ran powerupp.desktop from the generated folder & it's now working for me again. Thanks! :)

@metalsp0rk
Copy link

This patch fixed the application, on my 6900xt system. I did, however, need to revert the hunk Pipshag mentioned above. I've attached the diff below for anyone else who runs into this issue.

diff --git a/src/main.c b/src/main.c
index f720885..d0f141f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -661,8 +661,21 @@ void get_home_path(app_widgets *widgets) {
 }

 void set_upp_path(app_widgets *widgets) {
-  snprintf(upppath, sizeof(upppath), "%s/.local/bin/venv/bin/upp", getenv("HOME"));
-  printf("UPP path is %s\n", upppath);
+  FILE *fupppath = popen("which upp", "r");
+    if (fupppath) {
+      if (fgets(upppath, sizeof(upppath), fupppath)){
+        size_t len = strlen(upppath);
+        if (len > 0 && upppath[len-1] == '\n') {
+          upppath[--len] = '\0';
+        }
+        printf("UPP path is %s\n", upppath);
+      }
+      else {
+        gtk_text_buffer_set_text(GTK_TEXT_BUFFER(g_text_revealer), "UPP module not found, install with pip", -1);
+        gtk_revealer_set_reveal_child (GTK_REVEALER(widgets->g_revealer), TRUE);
+      }
+    }
+    pclose(fupppath);
 }

 void unsupported_amd(int num) {

@prismm121 prismm121 mentioned this pull request May 7, 2025
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.

5 participants