Giter VIP home page Giter VIP logo

Comments (17)

staust avatar staust commented on June 16, 2024 9

I faced the same issue and was able to solve it by rebuilding the package with the new python version (3.11) following this:
#272 (comment)

yay -S $(pacman -Qoq /usr/lib/python3.10) --answerclean All

from optimus-manager.

staust avatar staust commented on June 16, 2024 4

Thank you @staust I rebuilt with Python version 3.10 (yay -S $(pacman -Qoq /usr/lib/python3.10) --answerclean All) but the same issue.

Just to make sure: This does not rebuild the optimus package with python 3.10. pacman -Qoq /usr/lib/python3.10 returns all packages which owned this specific python version. Maybe you used an other python version before.

Basicly what should help is: yay -S optimus-manager --answerclean All

from optimus-manager.

WouterSpekkink avatar WouterSpekkink commented on June 16, 2024 3

Yes, thank you @staust, but also for me this problem persists after following your suggestion, also when using /usr/lib/python3.11.

Update: Okay, I found out what the issue was in my case. I installed my system a long time ago using an installer from one of the arcolinux distributions. Even though I kinda stripped most of the arcolinux stuff away since then, I still have their repositories in my list, and optimus-manager was installed from one of their repos instead of the AUR. This apparently means that the package does not actually get rebuilt when using the suggested command.

I uninstalled the arcolinux version and reinstalled using the AUR and now it works fine again. Thanks again for the suggestion @staust!

from optimus-manager.

ffarps avatar ffarps commented on June 16, 2024 2

I've encountered the same issue.
in my system I resolve doing this:

sudo pacman -R optimus-manager optimus-manager-qt-git
sudo pacman -Sc
paru -Sc
yay -Sc
yay -S optimus-manager optimus-manager-qt-git

(yes I have both, but manly I use paru)

from optimus-manager.

username227 avatar username227 commented on June 16, 2024 1

Same issue here. Using arch/cinnamon. Couldn't even get graphical interface of lightdm with optimum-manager installed after python 3.11 upgrade.

from optimus-manager.

WouterSpekkink avatar WouterSpekkink commented on June 16, 2024 1

Same issue here. Using arch/cinnamon. Couldn't even get graphical interface of lightdm with optimum-manager installed after python 3.11 upgrade.

Have you tried @staust's suggested fix? I think the core of the issue is that your installed version of optimum-manager will be built against an earlier version of python, so the trick is to rebuild it against the updated version. If you cannot even get in the ligthdm or sddm login interface, you'll have to boot into command line mode (I am not sure that this is actually the correct terminology), as described here: https://www.baeldung.com/linux/boot-linux-command-line-mode.

from optimus-manager.

username227 avatar username227 commented on June 16, 2024 1

Same issue here. Using arch/cinnamon. Couldn't even get graphical interface of lightdm with optimum-manager installed after python 3.11 upgrade.

Have you tried @staust's suggested fix? I think the core of the issue is that your installed version of optimum-manager will be built against an earlier version of python, so the trick is to rebuild it against the updated version. If you cannot even get in the ligthdm or sddm login interface, you'll have to boot into command line mode (I am not sure that this is actually the correct terminology), as described here: https://www.baeldung.com/linux/boot-linux-command-line-mode.

Yeah, so I tried that command above, but it didn't work. It must've been automatically installing the package from the cache (which I cleared but it didn't make a difference) or the chaotic repository even though I specified AUR.

I solved by downloading the pkgbuild from the aur websites manually, building, and installing with pacman -U. But I would rather not have to do it this way if you have any ideas.

from optimus-manager.

serranomorante avatar serranomorante commented on June 16, 2024 1

I've encountered the same issue. in my system I resolve doing this:

sudo pacman -R optimus-manager optimus-manager-qt-git
sudo pacman -Sc
paru -Sc
yay -Sc
yay -S optimus-manager optimus-manager-qt-git

(yes I have both, but manly I use paru)

For those like me that are using pyenv

None of the previous options worked until I changed my global python version first.

# Running this
pyenv which python

# has to give you this result
/usr/bin/python

# if it doens't, then run this command
pyenv global system

# and check again...

from optimus-manager.

pixelsnbits avatar pixelsnbits commented on June 16, 2024 1

I've encountered the same issue. in my system I resolve doing this:

sudo pacman -R optimus-manager optimus-manager-qt-git
sudo pacman -Sc
paru -Sc
yay -Sc
yay -S optimus-manager optimus-manager-qt-git

(yes I have both, but manly I use paru)

For those like me that are using pyenv

None of the previous options worked until I changed my global python version first.

# Running this
pyenv which python

# has to give you this result
/usr/bin/python

# if it doens't, then run this command
pyenv global system

# and check again...

Setting pyenv global system was the key as I use pyenv for development environments. Running all the cache clearing and re-install commands worked successfully after setting this!

from optimus-manager.

WouterSpekkink avatar WouterSpekkink commented on June 16, 2024

I think I have a similar issue. I just updated, with a lot of python updates. I am actually able to boot normally, but when I try to switch to my Nvidia card with optimus-manager, I get the following Traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 563, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/optimus-manager", line 33, in <module>
    sys.exit(load_entry_point('optimus-manager==1.4', 'console_scripts', 'optimus-manager')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/optimus-manager", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
                       ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 981, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 565, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for
optimus-manager

from optimus-manager.

pnedyalkov91 avatar pnedyalkov91 commented on June 16, 2024

Thank you @staust
I rebuilt with Python version 3.10 (yay -S $(pacman -Qoq /usr/lib/python3.10) --answerclean All) but the same issue.

from optimus-manager.

pnedyalkov91 avatar pnedyalkov91 commented on June 16, 2024

@staust , @WouterSpekkink
Thank you very much for the suggested fix! My problem was the package comes from chaotic-aur by default. I deleted it and did a clean build from AUR and install optimus-manager from there. It is working!
Thank you guys a lot!

from optimus-manager.

WouterSpekkink avatar WouterSpekkink commented on June 16, 2024

You've probably done the following already, but just to be sure, I think the following should work:

  • Uninstall optimus-manager and remove it from the pacman cache.
  • Use yay to install optimus-manager from AUR.

I actually think that this should probably be enough? I am not 100% sure about any of this, but I think this works because yay not only downloads the package but also (re)builds it. I assume the problem with optimus-manager is caused by it being built against Python, which has been updated to 3.11. The version you currently have running was built against 3.10 (or even an earlier version of Python?). I tried reinstalling optimus-manager from another repository (an arcolinux one in my case), but apparently this does not actually rebuild the package, while installing it from the AUR, using yay, does? Again, I am not 100% that this is actually the case.

from optimus-manager.

aidasbui avatar aidasbui commented on June 16, 2024

yay -S optimus-manager --answerclean All

Fixed! Thank you very much @staust, saved me quite some time.

I noticed the huge amount of python package updates today, but the issue appeared only when I made a few changes to my Arch system many hours later and rebooted. Took me a while to get to the culprit, which was the same as #541 (comment)

from optimus-manager.

HydroCarbon avatar HydroCarbon commented on June 16, 2024

470xx and older drivers may not function correctly on Linux 5.18 (or later) on systems with Intel CPUs 11th Gen and newer due an incompatibility with Indirect Branch Tracking. You can disable it by setting the ibt=off kernel parameter from the boot loader. Be aware, this security feature is responsible for mitigating a class of exploit techniques.

from optimus-manager.

PunkUnity avatar PunkUnity commented on June 16, 2024

I am still having this issue even after running all these steps. Uninstalled optimus-manager-git and optimus-manager-git-qt. Cleaned pacman, trizen, yay cache. Reinstalled both applications. Ran yay -S optimus-manager --answerclean All. I still get this error...
optimus-manager --print
Traceback (most recent call last):
File "/usr/lib/python3.11/importlib/metadata/init.py", line 563, in from_name
return next(cls.discover(name=name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/optimus-manager", line 33, in
sys.exit(load_entry_point('optimus-manager==1.4', 'console_scripts', 'optimus-manager')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/optimus-manager", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/init.py", line 981, in distribution
return Distribution.from_name(distribution_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/metadata/init.py", line 565, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for optimus-manager
Quick edit. I have tried installing just optimus-manager and not optimus-manager-git but it does not exist for me. I usually use trizen.

from optimus-manager.

codemaker4 avatar codemaker4 commented on June 16, 2024

Same issue, black screen on boot after paru/pacman update with the above errors.
ffarps' solution worked for me:

paru -R optimus-manager optimus-manager-qt
paru -Sc
paru -S optimus-manager optimus-manager-qt

After the last command it does indeed rebuild it, and simply rebooting afterwards fully recovered my system. Thanks ffarps!

from optimus-manager.

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.