Artix Linux Forum

Artix Linux => System => Topic started by: linuxer on 08 March 2021, 03:19:58

Title: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 08 March 2021, 03:19:58
Artix Nvidia Optimus packages, are available (https://gitea.artixlinux.org/linuxer/Artix-Optimus) in Universe Repository, for all DEs and init systems, for these video cards (https://www.nvidia.com/en-us/geforce/technologies/optimus/supported-gpus/).

Note: The PKGKBUILDs used for built, are also available at our newly createdUniverse repository (https://gitea.artixlinux.org/Universe?tab=&sort=recentupdate&q=optimus).

(https://i.imgur.com/rzrG12i.png)

Installation guide:

Add Universe repository to your /etc/pacman.conf, as below:

Code: [Select]
[universe]

Server = https://universe.artixlinux.org/$arch


Code: [Select]
sudo pacman -S optimus-manager-<init> <DM>-optimus-<init> optimus-manager-git

Installation of optimus for lightdm + openrc example:
Code: [Select]
sudo pacman -S optimus-manager-openrc lightdm-optimus-openrc optimus-manager-git

Depending on your init system, enable the relative services, as described at https://wiki.artixlinux.org/ and reboot.

Note: the service names are as below, so are the same with the non optimus ones, except the last one:

Commands for switching are:


This Wiki (https://wiki.archlinux.org/index.php/NVIDIA_Optimus), is also available and can be handy.

Some relevant troubleshooting (https://bbs.archlinux.org/viewtopic.php?pid=1907801#p1907801), if you drop into such case.

Optimus Manager site (https://github.com/Askannz/optimus-manager) and wiki (https://github.com/Askannz/optimus-manager/wiki) can assist too, and if you find any issues, please report them here.

Optimus Manager Qt, is also available, in Universe repo.

(https://gitea.artixlinux.org/Universe/optimus-manager-qt/raw/branch/master/screenshots/tray-menu.png)

We offer two packages:


Code: [Select]
sudo pacman -S optimus-manager-qt-git
or
Code: [Select]
sudo pacman -S optimus-manager-qt-plasma-git
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: francesco on 08 March 2021, 08:56:49
@linuxer, just to clarify, are these installation steps correct?

sudo pacman -S optimus-manager-git optimus-manager-openrc sddm-optimus-openrc

* the installation of sddm-optimus-openrc force the remove of sddm-openrc

sudo rc-update add optimus-manager default

sudo rc-update add sddm-optimus default

reboot of the system.

Thank you. Francesco

Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: linuxer on 08 March 2021, 10:20:53
@linuxer, just to clarify, are these installation steps correct?

sudo pacman -S optimus-manager-git optimus-manager-openrc sddm-optimus-openrc

* the installation of sddm-optimus-openrc force the remove of sddm-openrc

sudo rc-update add optimus-manager default

sudo rc-update add sddm-optimus default

reboot of the system.


Yes, the init script of the DE, is being replaced with the DE-optimus one, and one more, the optimus-manager init service, is added.

So, you have to enable both
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: francesco on 09 March 2021, 09:00:30
thank's for the answer, later in the afternoon I'll try and I'll post the feedback
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: linuxer on 16 March 2021, 21:39:59
[Added today to the above announcement]

Optimus Manager Qt, was added to Universe repo.

(https://gitea.artixlinux.org/Universe/optimus-manager-qt/raw/branch/master/screenshots/tray-menu.png)

We offer two packages:

Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: francesco on 19 March 2021, 15:12:47
@linuxer, forgive me for the delay, but I was traveling for work. Below the result of the installation.
Quote
$ sudo pacman -S optimus-manager-qt-plasma optimus-manager-openrc sddm-optimus-openrc  
risoluzione delle dipendenze in corso...
ricerca dei pacchetti in conflitto in corso...
:: sddm-optimus-openrc e sddm-openrc vanno in conflitto (init-displaymanager). Vuoi rimuovere sddm-openrc? [s/N] s
attenzione: è stato individuato un ciclo di dipendenza:
attenzione: sddm-optimus-openrc sarà installato prima della sua dipendenza optimus-manager-openrc

Pacchetti (5) optimus-manager-git-1.4.r1.gbb22f9c-1  sddm-openrc-20210207-1 [rimozione]
              optimus-manager-openrc-20210227-1  optimus-manager-qt-plasma-1.6.0-3
              sddm-optimus-openrc-20210207-1

Dimensione totale dei pacchetti da scaricare:   0,23 MiB
Dimensione totale dei pacchetti da installare:  1,02 MiB
Dimensione netta dell'aggiornamento:            1,02 MiB

:: Vuoi procedere con l'installazione? [S/n]
:: Download dei pacchetti in corso...
 optimus-manager-git-1.4.r1.gbb22...    64,5 KiB   322 KiB/s 00:00 [####################################] 100%
 optimus-manager-qt-plasma-1.6.0-...   170,9 KiB   589 KiB/s 00:00 [####################################] 100%
(4/4) verifica delle chiavi presenti nel portachiavi               [####################################] 100%
(4/4) verifica dell'integrità dei pacchetti                        [####################################] 100%
(4/4) caricamento dei file dei pacchetti                           [####################################] 100%
(4/4) controllo dei conflitti in corso                             [####################################] 100%
(5/5) controllo dello spazio disponibile sul disco                 [####################################] 100%
:: Elaborazione delle modifiche al pacchetto...
(1/1) rimozione in corso di sddm-openrc                            [####################################] 100%
(1/4) installazione in corso di optimus-manager-git                [####################################] 100%
Dipendenze opzionali di optimus-manager-git
    bbswitch: alternative power switching method
    acpi_call: alternative power switching method
    xf86-video-intel: provides the Xorg intel driver
(2/4) installazione in corso di optimus-manager-qt-plasma          [####################################] 100%
(3/4) installazione in corso di sddm-optimus-openrc                [####################################] 100%
(4/4) installazione in corso di optimus-manager-openrc             [####################################] 100%
:: Esecuzione degli hook di post-transazione...
(1/3) Updating icon theme caches...
(2/3) Displaying openrc service help ...
        ==> Add a service to runlevel:
        rc-update add <service> <runlevel>
        ==> Start/stop/restart a service:
        rc-service <service> <start/stop/restart>
(3/3) Updating the desktop file MIME type cache...
frank@supernova:~
$ sudo rc-update add optimus-manager default
 * service optimus-manager added to runlevel default
frank@supernova:~
$ sudo rc-update add sddm-optimus default
 * rc-update: service `sddm-optimus' does not exist

It look like if sddm-optimus don't exist but is simply redirected the command at sddm. Now I reboot...
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: francesco on 19 March 2021, 16:45:09
@linuxer: the final result is a disaster!

To try to recover the situation I had to chroot and remove the installed packages. Not sufficient!
The system no longer recognize the password. Another chroot and redefined the root password.
It seems all become normal but... not true: the GUI don't start, but I can login in the character environment.
I did a check and I discover that I forget to remove the optimus-manager-openrc, I did and... the password of my standard user is no longer recognized!

These packages are a drama! Now Plasma don't start and I cannot login with my standard user. I must find a way to redefine the password for my standard user. Any idea?

Were these packages tested before?

Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: linuxer on 20 March 2021, 00:14:09
@linuxer: the final result is a disaster!

To try to recover the situation I had to chroot and remove the installed packages. Not sufficient!
The system no longer recognize the password. Another chroot and redefined the root password.
It seems all become normal but... not true: the GUI don't start, but I can login in the character environment.
I did a check and I discover that I forget to remove the optimus-manager-openrc, I did and... the password of my standard user is no longer recognized!

These packages are a drama! Now Plasma don't start and I cannot login with my standard user. I must find a way to redefine the password for my standard user. Any idea?

Were these packages tested before?



Which cards do you have?

The packages are on Universe for testing.

Unfortunately, I have no h/w available to test optimus, so being gentle, would be nice

Up to now, your case, is the first one.

Plus "The system no longer recognize the password. Another chroot and redefined the root password" has nothing to do with optimus
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: francesco on 20 March 2021, 12:01:13
@linuxer: no problem, I've just reinstalled and reactivated all. I thought it was urgent to report the problem!

It appear VERY strange to me too, the modification of the password, but believe me: it happen after the installation.

The first time I redefine the root password (when in chroot) and all restarted, reappear also the pwd of my standard user.

The second time I logged in my system, the DE don't start, and I remember that I haven't removed from the default the optimus-manager-openrc. As I wrote you in the previous post, I did it (usual rc-update del...), reboot, and my user password was no longer available.

I know that its VERY strange, but this is exactly what happen and I didn't do anything else: no other commands of every kind, also a simple ls. Remove, reboot and password... pufff :-)

Below the info of the CPU and the GPU:
Quote
CPU:       Info: 10-Core model: Intel Core i9-10900K bits: 64 type: MT MCP arch: Comet Lake rev: 5
           L2 cache: 20 MiB bogomips: 148040
           Speed: 800 MHz min/max: 800/5300 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800
           6: 800 7: 800 8: 800 9: 800 10: 800 11: 1188 12: 828 13: 1938 14: 999 15: 800 16: 800 17: 800
           18: 800 19: 800 20: 800
           Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_capabilities arch_perfmon art
           avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de
           ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase
           fxsr ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ibrs_enhanced ida intel_pt invpcid
           invpcid_single lahf_lm lm mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx
           ospke pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pku pln pni popcnt pse pse36 pts rdrand
           rdseed rdtscp rep_good sdbg sep sgx sgx_lc smap smep smx ss ssbd sse sse2 sse4_1 sse4_2 ssse3
           stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx vnmi vpid x2apic
           xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
Graphics:  Device-1: NVIDIA TU106BM [GeForce RTX 2070 Mobile] vendor: CLEVO/KAPOK driver: nvidia v: 460.56
           bus ID: 01:00.0 chip ID: 10de:1f54 class ID: 0300
           Device-2: Chicony Chicony USB2.0 Camera type: USB driver: uvcvideo bus ID: 1-8:5
           chip ID: 04f2:b685 class ID: 0e02
           Display: server: X.org 1.20.10 compositor: kwin_x11 driver: loaded: nvidia
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: linuxer on 20 March 2021, 13:37:14

I see only nvidia card and no intel or amd, meaning that your h/w is not hybrid.

So why to use optimus?

There is no need, if you have only one graphics card.
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: alium on 20 March 2021, 14:13:34
@francesco use please
Code: [Select]
lspci
or
Code: [Select]
sudo lspci -v (for more details about HW and drivers)


if you really have only one graphic card, you really not need install optimus . ;-)
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: francesco on 20 March 2021, 22:14:01
@linuxer, alium, I know that I've only one card, no discrete situation, but I didn't imagine that installing and removing a software can crash user password and to be so dangerous. Maybe cause its thought for a 2-GPU system, but is anyway a dangerous situation, usable to crack system, just discovering what the optimus software do.

Anyway, no problem, I'll look around if I'll find a PC with a double CPU :-)

Ciao. Francesco
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: linuxer on 20 March 2021, 22:18:09
@linuxer, alium, I know that I've only one card, no discrete situation, but I didn't imagine that installing and removing a software can crash user password and to be so dangerous. Maybe cause its thought for a 2-GPU system, but is anyway a dangerous situation, usable to crack system, just discovering what the optimus software do.

Anyway, no problem, I'll look around if I'll find a PC with a double CPU :-)

Ciao. Francesco

No, it cannot crash  any user password.

Their must have been something else.

Optimus packages, have been reported, as working OK.

Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: alium on 20 March 2021, 22:20:53
@francesco, hard to say, what happened... anyway, it's very strange . I can not check it, because i have/has no nvidia card and i will never buy any nvidia card in future.
Title: Re: Artix Nvidia Optimus packages, available on Universe repo
Post by: linuxer on 20 March 2021, 22:54:57
Nothing happened.

What really happened, was that he got his system locked and stuck on boot, a normal situation, because his system hardware is not equipped with optimus (https://www.nvidia.com/en-us/geforce/technologies/optimus/supported-gpus/) GPU (is not hybrid).

The code is open, free and available to all.

Below, is one of the two confirmed cases, of optimus running.

(https://imgur.com/8Wtf2gM.png)
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 23 March 2021, 23:58:58
[Update]

both optimus-manager-qt and optimus-manager-plasma-qt, have the same issue, of missing icons, on release 1.6.0, as below

(https://user-images.githubusercontent.com/12883566/110232026-69c08000-7f1b-11eb-813d-6342009f0d1a.png)

The developer made corrections, but those have not released yet.

https://github.com/Shatur95/optimus-manager-qt/issues/88

Therefor, the new packages will be optimus-manager-qt-git and optimus-manager-plasma-qt-git, both from master branch.

Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 25 April 2021, 00:38:05
Can you tell me what the problem may be, everything is running, but when optimus-manager --switch nvidia
The optimus-manager service is not running. Please enable and start it as described at Artix Linux Wiki, and reboot
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 25 April 2021, 03:41:51
Can you tell me what the problem may be, everything is running, but when optimus-manager --switch nvidia
The optimus-manager service is not running. Please enable and start it as described at Artix Linux Wiki, and reboot

Can you try prime-switch command instead?
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 25 April 2021, 17:11:18
sudo prime-switch
[7] INFO: # Xorg pre-start hook
[7] INFO: Previous state was: {'type': 'done', 'switch_id': '20210425T175646', 'current_mode': 'integrated'}
[7] INFO: Requested mode is: integrated
[23] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[23] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20210425T175646', 'requested_mode': 'integrated'}
[24] INFO: Xorg pre-start hook completed successfully.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 25 April 2021, 19:02:08
If you select startup mode in optimus-manager-qt, it starts with the right video card when you turn it on or reboot. 
But when I try to switch in the terminal:
The optimus-manager service is not running. Please enable and start it as described at Artix Linux Wiki, and reboot
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 25 April 2021, 19:49:19
sudo prime-switch
[7] INFO: # Xorg pre-start hook
[7] INFO: Previous state was: {'type': 'done', 'switch_id': '20210425T175646', 'current_mode': 'integrated'}
[7] INFO: Requested mode is: integrated
[23] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[23] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20210425T175646', 'requested_mode': 'integrated'}
[24] INFO: Xorg pre-start hook completed successfully.


This is the correct result.

It further needs only Xorg restart.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 25 April 2021, 20:13:49
If you select startup mode in optimus-manager-qt, it starts with the right video card when you turn it on or reboot. 
This is correct.
Quote
But when I try to switch in the terminal:
The optimus-manager service is not running. Please enable and start it as described at Artix Linux Wiki, and reboot

Rather strange behavior, will check my patch there.

You will receive an update.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 25 April 2021, 20:56:51
OK, Thank you
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 26 April 2021, 20:20:21
New package release has been build in the repo https://gitea.artixlinux.org/Universe/optimus-manager-git/src/tag/1.4.r2.gcac22a1-2

Please provide me your feedback @Ant
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 27 April 2021, 04:32:23
After installed nothing has changed, displays the same message.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 27 April 2021, 09:57:39
But when I try to switch in the terminal:
The optimus-manager service is not running. Please enable and start it as described at Artix Linux Wiki, and reboot

How are you trying to switch it on the terminal?

Can you be more precise?
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 27 April 2021, 12:23:39
optimus-manager --switch nvidia
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 27 April 2021, 14:41:13
optimus-manager --switch nvidia
Thanks for your feedback, use prime-switch instead of that.

Regards

Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 27 April 2021, 15:29:22
sudo prime-switch
[7] INFO: # Xorg pre-start hook
[7] INFO: Previous state was: {'type': 'done', 'switch_id': '20210427T162408', 'current_mode': 'integrated'}
[7] INFO: Requested mode is: integrated
[1387] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[1388] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20210427T162408', 'requested_mode': 'integrated'}
[1388] INFO: Xorg pre-start hook completed successfully.

Tell me more about how to switch, I have this output and all?
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 27 April 2021, 15:31:32
I tried with AUR optimus-manager-openrc-git 1.3.1.r64.g28bdc14-1 it outputs some errors, but it works
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 27 April 2021, 18:26:21
I tried with AUR optimus-manager-openrc-git 1.3.1.r64.g28bdc14-1 it outputs some errors, but it works
Different forked release, behind ours and the original, does not cooperate with the rest (optimus-manager-qt needs optimus-manager>1.4)

(https://imgur.com/bPBJK9c.png)
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 27 April 2021, 18:27:51
sudo prime-switch
[7] INFO: # Xorg pre-start hook
[7] INFO: Previous state was: {'type': 'done', 'switch_id': '20210427T162408', 'current_mode': 'integrated'}
[7] INFO: Requested mode is: integrated
[1387] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[1388] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20210427T162408', 'requested_mode': 'integrated'}
[1388] INFO: Xorg pre-start hook completed successfully.

Tell me more about how to switch, I have this output and all?
Just restart your Xorg (logout/login) right after this message, must work for switching cards.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 27 April 2021, 19:25:08
Switch after entering
optimus-manager --switch nvidia
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 27 April 2021, 20:27:04
Switch after entering
optimus-manager --switch nvidia

Thanks for your feedback.

Did you logout/login, or not, before that?
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 27 April 2021, 21:09:08
Yes, I went out and then I went in.

Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 27 April 2021, 23:40:38
Yes, I went out and then I went in.

I considered so, thanks :)
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Ant on 28 April 2021, 00:11:18
How should it be?
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Zar Marco on 10 June 2021, 09:28:02
Hi all, I use runit, I've installed optimus-manager-(git, plasma-qt, runit) and sddm-optimus-runit.
I started optimus service but I have this problem:
Code: [Select]
artix-runit:[root]:/home/zar_marco# optimus-manager
ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
Log at /var/log/optimus-manager/switch/switch-20210610T091033.log
If your login manager is GDM, make sure to follow those instructions:
https://github.com/Askannz/optimus-manager#important--gnome-and-gdm-users
If your display manager is neither GDM, SDDM nor LightDM, or if you don't use one, read the wiki:
https://github.com/Askannz/optimus-manager/wiki/FAQ,-common-issues,-troubleshooting
Cannot execute command because of previous errors.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: v on 12 August 2021, 19:33:56
Hi all! I'm trying to switch from integrated mode to hybrid, but to no avail.

I use runit edition of Artix with no login system at all. That's why I manually edited my xinitrc according to the optimus-manager wiki and it looks like this:
Code: [Select]
/usr/bin/prime-offload
ssh-agent dwm
sudo /usr/bin/prime-switch # this script is in %wheels ALL=(ALL) PASSWORD: ... list in /etc/sudoers
Since I use no login manager (and optimus-manager-runit package requires some init-displaymanager-runit package), I manually copied from git run and finish scripts to /etc/runit/sv/optomus-manager/[run, finish] and enabled it (sv status optimus-manager says that it's ok). But optimus-manager --switch hybrid says that optimus-manager service is not enabled and prime-switch says that it's ok but it prints INFO: Requested mode is: integrated and after re-login optimus-manager --print-mode still saying Current GPU mode : integrated.

Any help would be very appreciated!
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Princess-Lana on 25 August 2021, 16:51:46
Hi there I am using Runit, KDE Plasma Artix.
I have installed Nvidia Ootimus packages acvording to this guide (and another guide)
Everything is 100%:

(https://images2.imgbox.com/53/b7/oHiD3YWZ_o.jpg)

except for when I want to change via the GUI App:

(https://images2.imgbox.com/7e/5d/spD1XxUf_o.jpg)

I know the runit uses sv command, I am new to runit (ex Mint user).

Also I had to add the conf file to /etc/optimus-manager/

I need to know what to do?
Do I add a script/link in the runit sv service?
Or how do I go about this?
Also, how does one check with sv which servixes are currently running?

Thank you.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Artist on 25 August 2021, 21:45:51
for info on runit check
https://wiki.artixlinux.org/Main/Runit
and
https://forum.artixlinux.org/index.php/topic,2169.msg15052.html#msg15052
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Kamey03 on 03 December 2021, 00:57:57
I've followed this guide to get optimus-manager so that I can switch between GPUs but it doesn't work

Code: [Select]
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

GUI also doesn't work
Code: [Select]
Please enable and start it as per Artix Linux Wiki:
'openrc init commands'
'runit init commands'
's6 init commands

I use OpenRC
Code: [Select]
rc-status default
 optimus-manager                                                                                                                        [  started  ]

Code: [Select]
kamey-x541nc:[kamey]:~$ glxinfo|egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 500 (APL 2)
kamey-x541nc:[kamey]:~$ lspci -vnnn | perl -lne 'print if /^\d+\:.+(\[\S+\:\S+\])/' | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 500 [8086:5a85] (rev 0b) (prog-if 00 [VGA controller])


Xrandr doesn't even show nvidia

Code: [Select]
kamey-x541nc:[kamey]:~$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x44 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 3 associated providers: 0 name:modesetting

I've installed nvidia like this, follow this thread for more info:
https://forum.artixlinux.org/index.php/topic,3361.new.html
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: gugamariz on 04 December 2021, 02:53:22
Hi all, I use runit, I've installed optimus-manager-(git, plasma-qt, runit) and sddm-optimus-runit.
I started optimus service but I have this problem:
Code: [Select]
artix-runit:[root]:/home/zar_marco# optimus-manager
ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
Log at /var/log/optimus-manager/switch/switch-20210610T091033.log
If your login manager is GDM, make sure to follow those instructions:
https://github.com/Askannz/optimus-manager#important--gnome-and-gdm-users
If your display manager is neither GDM, SDDM nor LightDM, or if you don't use one, read the wiki:
https://github.com/Askannz/optimus-manager/wiki/FAQ,-common-issues,-troubleshooting
Cannot execute command because of previous errors.
i also had the same exact problem while also using runit, almost giving up on artix as no solution has been shown to this problem. I hope the maintaner shows us a way or something.
I'm using dwm, nvidia gtx1650, intel 10500h, dell g15 laptop, SDDM.
I hope that someone can help me as i don't want to go back to systemd.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: nous on 05 December 2021, 21:06:00
Not getting xrandr to show nvidia is definitely the problem there. Post output of dmesg, lsmod and Xorg.0.log at https://paste.artixlinux.org.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: synt on 05 January 2022, 19:23:47
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 (https://www.reddit.com/r/archlinux/comments/rf6c84/psa_python_310_is_in_core_rebuild_your_aur/) did not help in this case.
I also found out that the Optimus Manager developer updated pkgrel (https://aur.archlinux.org/packages/optimus-manager/#comment-840901) 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.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 09 January 2022, 23:03:56
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 (https://www.reddit.com/r/archlinux/comments/rf6c84/psa_python_310_is_in_core_rebuild_your_aur/) did not help in this case.
I also found out that the Optimus Manager developer updated pkgrel (https://aur.archlinux.org/packages/optimus-manager/#comment-840901) 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 (https://forum.artixlinux.org/index.php/topic,2356.0.html)?
The optimus-manager-qt latest releases are not dealing with any such issue.

Awaiting your response
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: treebark on 13 January 2022, 19:17:22
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?
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: treebark on 14 January 2022, 17:26:56
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.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: treebark on 14 January 2022, 18:31:00
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.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Artist on 15 January 2022, 18:10:33
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
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: treebark on 19 January 2022, 18:21:46
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.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: synt on 04 February 2022, 09:48:13
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
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: Artist on 04 February 2022, 17:41:35
I'll try to have a look at this this weekend.
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: galaxy on 05 February 2022, 15:22:33
Would you also add dinit support ?
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 11 February 2022, 23:24:00
People having troubles with optimus, may also use switch-amd-nvidia which is available at the same repository (Universe)

Cheers :)
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: linuxer on 13 February 2022, 00:11:19

I may consider that too :)
Title: Re: Artix Nvidia Optimus packages, available at Universe repo
Post by: nwrain on 11 January 2024, 04:30:23
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.