Code Monkey home page Code Monkey logo

Comments (8)

lah7 avatar lah7 commented on June 5, 2024

The tray applet fails to start as it is unable to initialise the daemon, which could happen if the tray applet starts before the daemon or DBus isn't ready on your system. I'm afraid I'm not the best to answer daemon related issues.

You could try killing the daemon (razerdaemon), launch it again (command: razer-service) and then try loading the tray applet when this happens too.

The tray applet lacks any checks if it fails to initialise at the moment. I have some things on the to-do list to check if it's running, present an error and retry automatically should this happen.

from polychromatic.

ganiserb avatar ganiserb commented on June 5, 2024

Killing the daemon and launching it again before the tray applet worked, but now it fails because it seems it cannot get the profile name:

> polychromatic-tray-applet          
Using "/usr/share/locale/" or falling back to "en_US" for translations.
Failed to load profile: gabriel (Exception: 'name')
Failed to load profile: gabriel (Exception: 'name')

(polychromatic-tray-applet:10978): Gtk-WARNING **: Can't set a parent on widget which has a parent

-- Applying start-up settings...
[Change Primary Colour] New: #00FF00
[Change Secondary Colour] New: #FF0000
Traceback (most recent call last):
  File "/usr/bin/polychromatic-tray-applet", line 625, in <module>
    indicator = AppIndicator()
  File "/usr/bin/polychromatic-tray-applet", line 304, in __init__
    self.apply_startup_settings()
  File "/usr/bin/polychromatic-tray-applet", line 548, in apply_startup_settings
    self.set_profile(None, start_profile)
  File "/usr/bin/polychromatic-tray-applet", line 314, in set_profile
    data = self.profiles.load_profile(uuid)
  File "/usr/lib/python3/dist-packages/polychromatic/profiles.py", line 72, in load_profile
    profile_path = os.path.join(path.profile_folder, uuid + ".json")
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

from polychromatic.

ganiserb avatar ganiserb commented on June 5, 2024

For now, I fixed it by going to ~/.config/polychromatic/preferences.json and putting my profile there manually. It seems my profile name got saved as null last time when I changed the preferences.

It still looks wrong, even after I changed the start_profile value in the json manually.

image

from polychromatic.

lah7 avatar lah7 commented on June 5, 2024

preferences.json doesn't store profiles, although I did just discover some weird entries in there in my own copy... so there might be a hidden bug. profiles.json doesn't store them either. Each profile is now its own JSON file.

What do you see when you run:

ls ~/.config/polychromatic/profiles

These should be numbered JSON files, like this:

1468678735670961.json  1468678735671091.json  1468678735671182.json
1468678735671009.json  1468678735671106.json  1468678735671198.json
1468678735671026.json  1468678735671121.json  1468678735671215.json
1468678735671042.json  1468678735671136.json  1469218524173063.json
1468678735671058.json  1468678735671151.json  1471897808606159.json
1468678735671074.json  1468678735671167.json

Before, they were in binary format, but this was changed in v0.3.0 and is converted automatically.

If it's just the case where they are in the wrong format, like when the tray applet crashed and the application didn't actually convert them, follow this:

  1. Close the tray applet and controller.
  2. Delete (backup) any JSON files already in ~/.config/polychromatic/profiles, place any binary versions back in there (they might be in backups).
  3. Open prefererences.json and change config_version to 3.
  4. Open the Controller from the terminal. It'll output some information about the conversion.

Profiles in the right format will appear in the profile list and rhat drop down menu. Worst case scenario is to re-create them again, but that shouldn't be necessary.

from polychromatic.

ganiserb avatar ganiserb commented on June 5, 2024

Yes, sorry. I meant to say that I edited the preferes.json value for the key start_profile.

Since all my config files were json and not binaries I didn't try to do the conversion you suggested.

The problem was that, initially, for some reason the following fields of the preferences.json file were: "start_effect": "profile", "start_profile": null. So, it tried to load the null profile at startup and failed. This is an issue.

So I changed start_effect to breath_r and it worked. The applet started.

Regarding this: sometimes it worked, sometimes it did not. Now that the startup profile issue is solved I'm back to the beginning. The DBUS issue happens at random every time I reboot the computer.

from polychromatic.

lah7 avatar lah7 commented on June 5, 2024

The problem was that, initially, for some reason the following fields of the preferences.json file were: "start_effect": "profile", "start_profile": null. So, it tried to load the null profile at startup and failed. This is an issue.

Ah, I see you provided the backtrace, and I can reproduce it here. Apologies for the delay, I'll get this fixed.

Regarding the start-up problems, I'll track this under issue #35, which will "try again" a few times if it doesn't load correctly the first time.

from polychromatic.

ganiserb avatar ganiserb commented on June 5, 2024

@lah7
Update here: I see the retry in action now. Thanks! But I'm linking this to a driver issue, since the Tray applet now stays in a retry-error cycle indefinitely since I boot my computer like I reported at the beginning. (This happens randomly. Sometimes I restart and it works. Sometimes it never does.)

This seems to be a workaround that worked for me: openrazer/openrazer#67 (comment)

from polychromatic.

terrycain avatar terrycain commented on June 5, 2024

Yeah I blame udev. Fixing it is on the todo list but there's a driver I want to fix first and then I'll make a new release.

from polychromatic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.