Skip to main content
Topic: Artix Nvidia Optimus packages, available at Universe repo (Read 11238 times) previous topic - next topic
0 Members and 9 Guests are viewing this topic.

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #45
Hi all, I installed optimus manager today and after the command
Code: [Select]
$ sudo prime-switch
I got an error:
Spoiler (click to show/hide)

As I understand it, it is related to the Python 3.10 update. And the recommended command to rebuild the package did not help in this case.
I also found out that the Optimus Manager developer updated pkgrel on the 14th of last month.

I am inexperienced in Linux and wanted to know if there is something I need to do on my end or if this package needs to be updated in the Universe repository.

Hi @synt,

Thanks for your feedback.

Have you installed all relative packages, as per this?
The optimus-manager-qt latest releases are not dealing with any such issue.

Awaiting your response

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #46
I'm having some issues with this new optimus method, here's my output from running 'sudo prime-switch':
Code: [Select]
Traceback (most recent call last):
  File "/usr/bin/prime-switch", line 33, in <module>
    sys.exit(load_entry_point('optimus-manager==1.4', 'console_scripts', 'prime-switch')())
  File "/usr/bin/prime-switch", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 919, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 518, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for optimus-manager
Also the optimus-manager runit service fails to even start.
For context, i'm using runit and sddm, i have a hybrid GPU setup as follows:
Code: [Select]
[diego@artix ~]$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation CoffeeLake-H GT2 [UHD Graphics 630]
01:00.0 VGA compatible controller: NVIDIA Corporation GP107M [GeForce GTX 1050 Mobile] (rev a1)
I installed 'optimus-manager-runit', 'sddm-optimus-runit', 'optimus-manager-git' and 'optimus-manager-qt-git', symlinked the new optimus-manager service, but not the new sddm one since it's named just like the old one, and then rebooted my computer.
It boots up fine, and lspci lists the nvidia card, but there's no nvidia kernel modules loaded and xrandr doesn't list the card either (it looks like i'm on integrated mode). However, trying to switch to either dedicated or hybrid yields the above error.
It looks like a python related error, is this worth filing a bug report?

 

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #47
It looks like a python related error, is this worth filing a bug report?
So a little update on this, i built 'optimus-manager-git' myself from the PKGBUILD in the universe repository since that's said to fix the python related errors, and it did fix them, but then optimus-manager started complaining that there was no 'glxinfo' command, even though i thought i had it, so i installed mesa-utils (missing dependency?) and got through that error as well.
Then i hit this:
Code: [Select]
[diego@artix ~]$ sudo optimus-manager --switch nvidia
The optimus-manager service is not running. Please enable and start it as described at Artix Linux Wiki, and reboot
Even though on htop i can see that 'python3 -u -m optimus_manager.daemon' is indeed running and rsm also reports optimus-manager to be enabled and running, so i wonder what's holding it back now.

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #48
Even though on htop i can see that 'python3 -u -m optimus_manager.daemon' is indeed running and rsm also reports optimus-manager to be enabled and running, so i wonder what's holding it back now.
I'm forcefully telling optimus-manager to boot on 'nvidia' mode now, of course it fails, and this is what the logs say:
Code: [Select]
[384] INFO: # Xorg pre-start hook
[385] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': None}
[387] INFO: Requested mode is: nvidia
[1137] INFO: Available modules: ['nouveau']
[1138] INFO: Unloading modules ['nouveau'] (if loaded)
[4888] INFO: switching=none, nothing to do
[5251] INFO: Loading module nvidia
[5252] ERROR: Xorg pre-start setup error
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/optimus_manager/hooks/pre_xorg_start.py", line 51, in main
    setup_kernel_state(config, prev_state, requested_mode)
  File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 22, in setup_kernel_state
    _nvidia_up(config, hybrid=(requested_mode == "hybrid"))
  File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 95, in _nvidia_up
    _load_nvidia_modules(config, available_modules)
  File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 164, in _load_nvidia_modules
    _load_module(available_modules, "nvidia", options=nvidia_options)
  File "/usr/lib/python3.10/site-packages/optimus_manager/kernel.py", line 241, in _load_module
    raise KernelSetupError(
optimus_manager.kernel.KernelSetupError: module nvidia is not available for current kernel. Is the corresponding package installed ?
[5266] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[5268] INFO: Writing state {'type': 'pre_xorg_start_failed', 'switch_id': '20220114T135857', 'requested_mode': 'nvidia'}
It says there's no nvidia kernel modules to load? Prior to installing this optimus-manager stuff i've been using my nvidia card just fine with prime-run so i don't see why they would be missing now.

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #49
The packages have now been updated and rebuild with python 3.10.
I have no hardware to test this on, so feedback if this works now is welcome.
artist

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #50
The packages have now been updated and rebuild with python 3.10.
I have no hardware to test this on, so feedback if this works now is welcome.
artist
Hello, it seems the optimus-manager-git has some issues with its PGP signature:
Code: [Select]
error: optimus-manager-git: signature from "artist <[email protected]>" is invalid
:: File /var/cache/pacman/pkg/optimus-manager-git-1.4.r2.gcac22a1-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
EDIT: My bad, that was a random fluke from my system, it installed correctly now.

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #51
Then i hit this:
Code: [Select]
[diego@artix ~]$ sudo optimus-manager --switch nvidia
The optimus-manager service is not running. Please enable and start it as described at Artix Linux Wiki, and reboot
Even though on htop i can see that 'python3 -u -m optimus_manager.daemon' is indeed running and rsm also reports optimus-manager to be enabled and running, so i wonder what's holding it back now.
Same thing with my s6. Of the reasonable options for switching graphics cards to Artix, I only know: https://github.com/geminis3/EnvyControl

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #52
I'll try to have a look at this this weekend.

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #53
Would you also add dinit support ?

Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #54
People having troubles with optimus, may also use switch-amd-nvidia which is available at the same repository (Universe)

Cheers :)


Re: Artix Nvidia Optimus packages, available at Universe repo

Reply #56
Are these maintained somewhere else now that the Universe repository is sunset or are there alternatives? They don't seem to be in the Galaxy repository. This looked like the ideal setup to be able to at will change between cards.