tuned
tuned copied to clipboard
tuned-gui package not working in Linux Mint
I have a relatively clean / fresh install of Linux Mint 20.3 Una. I installed the package tuned-gtk (Version: 2.10.0-1) when I try to run it I get this error:
me@my-machine$ tuned-gui
/usr/sbin/tuned-gui:152: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "name" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
action_group = Gtk.ActionGroup('my_actions')
Traceback (most recent call last):
File "/usr/sbin/tuned-gui", line 1034, in <module>
base = Base()
File "/usr/sbin/tuned-gui", line 281, in __init__
for plugin in sorted(self.plugin_loader.plugins):
TypeError: '<' not supported between instances of 'SysctlPlugin' and 'USBPlugin'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_sbin_tuned-gui.0.crash'
Original exception was:
Traceback (most recent call last):
File "/usr/sbin/tuned-gui", line 1034, in <module>
base = Base()
File "/usr/sbin/tuned-gui", line 281, in __init__
for plugin in sorted(self.plugin_loader.plugins):
TypeError: '<' not supported between instances of 'SysctlPlugin' and 'USBPlugin'
me@my-machine$
I added some code to the file /usr/lib/python3/dist-packages/tuned/plugins/base.py Specifically I added this snippet to the bottom
# converts this object's name to a number used in __lt__ and __eq__
# ultimately used in sorting
def __int__(self):
name_str = self.name
digits_str = ""
for letter in name_str:
ascii_val = ord(letter)
digits_str = str(ascii_val) + digits_str
return int(digits_str)
def __lt__(self, other):
return int(self) < int(other)
def __eq__(self, other):
return int(self) == int(other)
def __hash__(self):
# probably not a good hash function for this object, WHATEVER!
#print("hash(" + str(self.name) + ")")
return hash(self.name)
Program now works / runs correctly on mysystem.
@fmresearchnovak: Thank YOU Very Much. This was a solution to a similar problem on MxLinux 19. The GUI is now working.
Thanks, for the info. Is it worth fixing upstream? Because IMHO the current Linux Mint is 21.2 and the current version of TuneD is 2.21.0. I wonder whether it's still broken with the recent versions. If not, it's probably not worth fixing, because the fix would go out not sooner than in TuneD 2.21.1 or 2.22.0 and I think it would very probably not get into Mint < 21.
Seems like it's worth fixing upstream to me!
@yarda, @fmresearchnovak.. Yes, I concur.