Slimbook-Team / slimbookamdcontroller

GNU General Public License v3.0
35 stars 8 forks source link

Unclear error message about missing TDP values for unsupported CPUs #20

Closed utrack closed 1 year ago

utrack commented 1 year ago

Hey there! Thanks for the open-sourcing the slimbookbattery - this is an awesome util :)

I'm trying to use slimbookamdcontroller on ThinkPad T14s Gen3 AMD, but when the app starts it gives me an error about TDP values missing for my CPU: image

It's unclear what should I do next -- how do I add the TDPs to the database? The interface closes right after I press OK.

MarSlimbook commented 1 year ago

Hello, Wow your processor is quite new, the 'PRO' label might have something to do with the problem. Can you provide terminal output of command 'slimbookamdcontroller'? Besides, which screen resolution do you have?

lindeMAX commented 1 year ago

Hi, I'am facing a similar problem with a Ryzen 5500U.

This is the terminal output of slimbookamdcontroller:


/usr/share/slimbookamdcontroller/src
Loading configuration:

- Autostart enabled
- Indicator disabled
- Low
Thermal_zone 404
en
Setting cpu TDP values
Could not find your proc in .conf
/home/max/.config/slimbookamdcontroller/slimbookamdcontroller.conf
Ryzen-5-5500U
Traceback (most recent call last):
  File "/usr/bin/slimbookamdcontroller", line 35, in <module>
    from slimbookamdcontroller import SlimbookAMD
  File "/usr/share/slimbookamdcontroller/src/slimbookamdcontroller.py", line 741, in <module>
    win = SlimbookAMD()
  File "/usr/share/slimbookamdcontroller/src/slimbookamdcontroller.py", line 412, in __init__
    self.set_cpu()
  File "/usr/share/slimbookamdcontroller/src/slimbookamdcontroller.py", line 687, in set_cpu
    self.settings()
  File "/usr/share/slimbookamdcontroller/src/slimbookamdcontroller.py", line 424, in settings
    dialog = settings.Dialog()
  File "/usr/share/slimbookamdcontroller/src/settings.py", line 232, in __init__
    dialog = Settings_dialog(self)
  File "/usr/share/slimbookamdcontroller/src/settings.py", line 75, in __init__
    self.lowmode = (values[0].split('-'))
UnboundLocalError: local variable 'values' referenced before assignment
`
lindeMAX commented 1 year ago

Update: As the 5500U seems to be a rebranded 4600U, I just copy-pasted the parameters for the 4600U in slimbookamdcontroller.conf and renamed it. This seems to work for now.

utrack commented 1 year ago

Hey @MarSlimbook - haha yep, just got the laptop :) Here's the console output:

/usr/share/slimbookamdcontroller/src
Loading configuration:

- Autostart enabled
- Indicator disabled
- Medium
Found thermal zone!
en
Setting cpu TDP values
Could not find your proc in .conf
/home/u/.config/slimbookamdcontroller/slimbookamdcontroller.conf
Ryzen-7-6850U
Traceback (most recent call last):
  File "/usr/bin/slimbookamdcontroller", line 35, in <module>
    from slimbookamdcontroller import SlimbookAMD
  File "/usr/share/slimbookamdcontroller/src/slimbookamdcontroller.py", line 741, in <module>
    win = SlimbookAMD()
  File "/usr/share/slimbookamdcontroller/src/slimbookamdcontroller.py", line 412, in __init__
    self.set_cpu()
  File "/usr/share/slimbookamdcontroller/src/slimbookamdcontroller.py", line 687, in set_cpu
    self.settings()
  File "/usr/share/slimbookamdcontroller/src/slimbookamdcontroller.py", line 424, in settings
    dialog = settings.Dialog()
  File "/usr/share/slimbookamdcontroller/src/settings.py", line 232, in __init__
    dialog = Settings_dialog(self)
  File "/usr/share/slimbookamdcontroller/src/settings.py", line 75, in __init__
    self.lowmode = (values[0].split('-'))
UnboundLocalError: local variable 'values' referenced before assignment

The resolution is 1920x1200 (2560x1440 on the screenshot). I'm okay with modifying the config myself however it's unclear what's the first three sets of numbers.

MarSlimbook commented 1 year ago

Hi, here is an example:

Ryzen-7-5800U = 8000-8000-8000/11000-11000-15000/25000-30000-35000/ 10/25 w

The modes are separated by '/' , and each mode has a three values for low, medium and high TDP settings. In this example, high mode would set low TDP to 25, medium to 30 and high to 35. This values are customizable in the settings window. I will fix the avobe error as soon as I can.

utrack commented 1 year ago

Ah got it! Thank you :pray: