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

Issues with min/max/limits on the different gpu types #24

Open
trabant-asb opened this issue Jan 28, 2022 · 1 comment · May be fixed by #25
Open

Issues with min/max/limits on the different gpu types #24

trabant-asb opened this issue Jan 28, 2022 · 1 comment · May be fixed by #25

Comments

@trabant-asb
Copy link

On my Pi 4B I have set custom speed values for ARM and GPU. Setting gpu_freq sets core and v3d among others. While bcmstat reflects these settings correctly for the ARM, the CORE min freq is displayed in the header incorrectly (but uses correct colors in terms of limits). V3D however shows up in amber for min_freq:

alex@aws:~:(29)> bcm
  Config: v0.5.5, args "-o+V3D,-CPUuser,-CPUnice,-CPUsys,+MEMaccum -gri", priority lowest (+19)
   Board: 4 x  cores available, schedutil governor (Pi4 Model B rev 1.2, BCM2838 SoC with 4GB RAM by Sony UK)
  Memory: 1024MB (split 896MB ARM, 128MB GPU) plus 1024MB Swap
HW Block: |   ARM   |  Core  |  H264  |    SDRAM    |
Min Freq: | 1300MHz | 250MHz |   0MHz |   3180MHz   |
Max Freq: | 1700MHz | 600MHz | 600MHz |   3180MHz   |
Voltages: |         0, 0.9223V        | +0, 1.2000V |
   Other: temp_limit=75, initial_turbo=60
Firmware: Jan 24 2022 18:00:30, version 94562b1518ca82ece28042cca1e5cdbbb43c8bda (clean) (release) (start)
  Codecs: H264 MJPG PCM
  Booted: Fri Jan 28 10:07:14 2022

Time         ARM    Core    H264     V3D Core Temp (Max)  IRQ/s %total GPUMem Free MemFreeKB / %used(SwUse)
======== ======= ======= ======= ======= =============== ====== ====== =========== ========================
21:37:18 1300Mhz  400Mhz    0Mhz  400Mhz  50.6C (50.63C)  4,422  33.45 102M ( 94%) 4,390,460 / 10.1%( 0.0%)
21:37:20 1300Mhz  600Mhz    0Mhz  600Mhz  48.7C (50.63C)    307   0.87 102M ( 94%) 4,390,860 / 10.0%( 0.0%)
21:37:22 1300Mhz  400Mhz    0Mhz  600Mhz  48.7C (50.63C)    304   0.79 102M ( 94%) 4,390,756 / 10.0%( 0.0%)
21:37:24 1300Mhz  400Mhz    0Mhz  400Mhz  49.7C (50.63C)    279   0.90 102M ( 94%) 4,390,860 / 10.0%( 0.0%)
21:37:26 1300Mhz  400Mhz    0Mhz  400Mhz  48.7C (50.63C)    273   0.78 102M ( 94%) 4,390,816 / 10.0%( 0.0%)
21:37:28 1300Mhz  400Mhz    0Mhz  400Mhz  48.7C (50.63C)    305   1.39 102M ( 94%) 4,390,668 / 10.1%( 0.0%)
21:37:30 1300Mhz  400Mhz    0Mhz  400Mhz  48.7C (50.63C)    294   0.75 102M ( 94%) 4,390,460 / 10.1%( 0.0%)^C
Peak Values: IRQ: 4422
alex@aws:~:(30)> vcgencmd get_config int | grep -e freq
arm_freq=1700
arm_freq_min=1300
gpu_freq=600
gpu_freq_min=400

In color, the v3d shows up in red for the 600Mhz max but in amber for the 400Mhz min freq... let me know if you have some idea.

@trabant-asb
Copy link
Author

Addon: The V3D coloring problem seems can be solved by changing:

@@ -1100,7 +1100,7 @@
   LINE = addDetailValue(filter, "ARM",  colourise(bcm2385[0]/1000000, "%4dMhz", arm_min,     None,  arm_max, False), LINE)
   LINE = addDetailValue(filter, "Core", colourise(bcm2385[1]/1000000, "%4dMhz",core_min,     None, core_max, False), LINE)
   LINE = addDetailValue(filter, "H264", colourise(bcm2385[2]/1000000, "%4dMhz",       0, h264_min, h264_max, False), LINE)
-  LINE = addDetailValue(filter, "V3D",  colourise(bcm2385[3]/1000000, "%4dMhz", v3d_min,     None,  v3d_max, False), LINE)
+  LINE = addDetailValue(filter, "V3D",  colourise(bcm2385[3]/1000000, "%4dMhz",       0,  v3d_min,  v3d_max, False), LINE)
   LINE = addDetailValue(filter, "ISP",  colourise(bcm2385[4]/1000000, "%4dMhz",       0,  isp_min,  isp_max, False), LINE)

The core_min seems to be hard-coded, I have adapted it for my use case as follows:

@@ -771,10 +771,10 @@
 
   VCG_INT = vcgencmd_items("get_config int", isInt=True)
 
-  CORE_DEFAULT_IDLE = CORE_DEFAULT_BUSY = 400
-  H264_DEFAULT_IDLE = H264_DEFAULT_BUSY = 400
-  V3D_DEFAULT_IDLE = V3D_DEFAULT_BUSY = 400
-  ISP_DEFAULT_IDLE = ISP_DEFAULT_BUSY = 400
+  CORE_DEFAULT_IDLE = CORE_DEFAULT_BUSY = 250
+  H264_DEFAULT_IDLE = H264_DEFAULT_BUSY = 250
+  V3D_DEFAULT_IDLE = V3D_DEFAULT_BUSY = 250
+  ISP_DEFAULT_IDLE = ISP_DEFAULT_BUSY = 250
 
   if VCG_INT.get("disable_auto_turbo", 0) == 0:
     CORE_DEFAULT_BUSY += 50

... I wonder how bcmstat could find out the minimum values dynamically. Reading out gpu_freq_min would not fit for all cases...

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 a pull request may close this issue.

1 participant