Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Add a card selection dropdown #4

Open
urbenlegend opened this issue Nov 3, 2018 · 8 comments
Open

Add a card selection dropdown #4

urbenlegend opened this issue Nov 3, 2018 · 8 comments
Labels
enhancement New feature or request need feedback Waiting on feedback

Comments

@urbenlegend
Copy link

Users can have multiple GPUs in their system.

  1. Add a dropdown in the GUI so that users can choose which card they want to view and modify.
  2. We should do validation on each card* device we find in /sys/class/drm. Perhaps check whether pp_od_clk_voltage file exists in /sys/class/drm/card*/device.
  3. If no cards are found, display message in GUI about no AMD gpus found or feature mask not enabled.
@BoukeHaarsma23 BoukeHaarsma23 added the enhancement New feature or request label Nov 3, 2018
@moritz31
Copy link

moritz31 commented Nov 6, 2018

Any idea where to place such a dropdown?

@BoukeHaarsma23
Copy link
Owner

BoukeHaarsma23 commented Nov 8, 2018

The multi-gpu branch should make clock switching between GPU's possible. Assuming you don't suffer from issue #27.

No multi-gpu plotting yet, I'm not sure how I want to tackle that, options I see:

  • Overwrite complete plot when changing GPU
  • Add lines with other lines (like dotted lines), which can be toggled from plotting sidebar
  • Let user toggle only between GPU1/GPU2/GPU... between all signals from the plotting sidebar

To not let the GUI be a confusing mess, I am leaning towards option 1. Let me know what you think

@BoukeHaarsma23 BoukeHaarsma23 added the need feedback Waiting on feedback label Nov 8, 2018
@BoukeHaarsma23
Copy link
Owner

For now, I have implemented the first option in the wattmangtk-next branch. See a6ea1a5

@axipher
Copy link

axipher commented Nov 14, 2018

Can you just convert all the saved values to arrays with a number of elements equal to the number of GPU's.

Then just read all available GPU's constantly, but only update the GUI (chart, graph, and selection area) with the array values for the current selected GPU from the drop-down.

That way you only show one GPU at a time, but don't lose the history between graphs, and you can then write your output file with values for all GPU's form your array values that have changed.

@Ragebone
Copy link

after switching once:
image

after switching thrice
image

@BoukeHaarsma23
Copy link
Owner

Oh that is nasty, will look into this.

@BoukeHaarsma23
Copy link
Owner

@Ragebone Let me know if the current dev branch fixes this for you.

@Marco-GG
Copy link

@BoukeHaarsma23 works great to avoid data duplication but the Plot & Scale toggles gets broken (affecting the graphic behavior).

I made this patch:

@@ -164,13 +164,15 @@ class Plot:
         self.normaliserenderer = Gtk.CellRendererToggle()
         self.normaliserenderer.connect("toggled", self.on_normalise_toggled)
         self.tree = self.builder.get_object("Signal Selection")
+        for column in self.tree.get_columns(): #Avoids columns duplication on init_treeview new call
+            self.tree.remove_column(column)
         self.tree.append_column(Gtk.TreeViewColumn("Plot", self.plotrenderer, active=0))
         self.tree.append_column(Gtk.TreeViewColumn("Scale", self.normaliserenderer, active=1, activatable=2))
         columnnames=["Name","Unit","min","mean","max","current"]
         for i,column in enumerate(columnnames):
             tcolumn = Gtk.TreeViewColumn(column,textrenderer,text=i+3,foreground=9)
             self.tree.append_column(tcolumn)
-
+        self.signalstore.clear() # Avoids rows duplication on init_treeview new call
         for plotsignal in self.Plotsignals:
             self.signalstore.append([plotsignal.plotenable, plotsignal.plotnormalise, True, plotsignal.name, convert_to_si(plotsignal.unit)[0], '0', '0', '0', '0', plotsignal.plotcolor])
         self.tree.set_model(self.signalstore)

And seems to do the trick. But I think that you can get the same behavior if you add some re-initialization on the toggles on your current fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request need feedback Waiting on feedback
Projects
None yet
Development

No branches or pull requests

6 participants