You are not logged in.
Trying to configure optimus-manager. When I run optimus-manager --status I get
Current GPU mode : intel
GPU mode requested for next login : no change
GPU at startup : intel
Temporary config path: noI would like to configure it to switch to the nvidia gpu when needed, as per https://github.com/Askannz/optimus-mana … nt-options
But when I just try to switch to the nvidia gpu to test that it works using optimus-manager --switch nvidia I get the following error:
ERROR : cannot get current display manager name : No display-manager.service file found
You are about to switch GPUs. This will forcibly close all graphical sessions and all your applications WILL CLOSE.
(you can pass the --no-confirm option to disable this warning)
Continue ? (y/N)And I'm really not sure what to do.
Last edited by RichKat (2020-10-06 15:23:53)
Offline
Using optimus-manager switch requires special configuration.
If you're using sddm, lightdm or gdm it should work, For other display managers / methods to startx extra steps are needed.
Check https://github.com/Askannz/optimus-manager and the faq sections the first paragraph links to.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Yes, I'm using bspwm, but the FAQ sections just say to make sure it starts and cloases with X, nothing about configuring to make the switch command work, I don't think?
Offline
You need to log out , make the switch, then re-login .
https://github.com/Askannz/optimus-mana … logged-out states that this should be done automagickally by optimus-manager for bspwm .
If that doesn't work for you, you may have to create a new issue on github.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
How are you making sure it starts with X? Post your .xinitrc in doubt and make sure you've read: https://wiki.archlinux.org/index.php/Xinit#xinitrc and https://wiki.archlinux.org/index.php/Xinit#xserverrc
Offline
It does log me out and allow me to log back in, but when I run optimus-manager --status I get
A GPU switch from intel to nvidia is pending.
Log out and log back in to apply.
Optimus Manager (Client) version 1.3
Current GPU mode : intel
GPU mode requested for next login : nvidia
GPU at startup : intel
Temporary config path: noIf I su "username" nothing changes. If I restart my computer it goes back to
Current GPU mode : intel
GPU mode requested for next login : no change
GPU at startup : intel
Temporary config path: noAm I logging in and out wrong?
My xinitrc looks like this:
~/.fehbg &
/usr/bin/prime-offload &
picom &
sxhkd &
thunar --daemon &
polybar bar &
bluetoothctl power on &
devmon --info-on-mount &
exec bspwmThe github page says I need to make sure that /usr/bin/prime-switch is run after log out, which I'm still figuring out, so that's not in the xinitrc, if it's meant to be.
Offline
Okay, I am now able to switch GPU's, I added sudo /usr/bin/prime-switch to the end of my xinitrc and removed the exec before the bspwm, so now the switch can happen after log out,
Unfortunately,
When I try to switch to the nvidia GPU the result is many small versions of my desktop tiled around my screen, only the top left one of which I can use. Polybar also vanishes. When I switch desktops it's the top left desktop that changes, not any of the others. Why could this be happening? I'll try to post a screenshot.
Edit, I got a screenshot:
https://imgur.com/a/zzyj98I
Last edited by RichKat (2020-10-03 10:15:47)
Offline
Your xinitrc is a mess.
You didn't start with a copy of /etc/X11/xinit/xinitrc , see https://wiki.archlinux.org/index.php/Xinit
Some commands in it shouldn't even be in xinitrc at all.
example :
polybar wiki page makes clear that bspwn users should start polybar through an entry in bspwmrc.
https://wiki.archlinux.org/index.php/Polybar#bspwm
THe bspwm wiki page mentions the same thing.
example:
sxhkd comes with a systemd user service file, that should be enabled by systemctl.
https://wiki.archlinux.org/index.php/Sxhkd#Usage
Fix your xinitrc.
Last edited by Lone_Wolf (2020-10-03 11:45:33)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Ah, I was afraid that would be the case. I'll get on that directly. Still, I don't think that will fix the current issue, so I'm still looking for a solution to that
Offline
The reason optimus-manager --switch forces a logout is to stop all processes using the gpu before the switch is made.
Almost all lines in your xinitrc end with a & , which tells your shell to run those commands in the background forever.
When you are logging out user processes started with & aren't killed or stopped (on archlinux, other distros may behave differently) .
Some of the commands do need the & , most don't .
Fix your xinitrc , post it so forum users can verify if it is correct.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
First off, thank you very much for your help, I would never have thought that it was my xinitrc that was causing issues.
Here it is at present:
# Some important commands
/usr/bin/prime-offload
picom &
# Assorted commands
~/.fehbg &
thunar --daemon &
bluetoothctl power on &
devmon --info-on-mount &
# Start bspwm
bspwm
sudo /usr/bin/prime-switchI know there are still probably too many &'s, but it's better; most importantly, optimus-manager --switch now works without issue!
I'm currently trying to figure out which of these need &'s and which don't. Before I thought & just meant "go on to the next line" ![]()
Is there anything else I need to do to improve my xinitrc?
Offline
look at /etc/X11/xinit/xinitrc .
The if-fi block just above the twm line is necessary to ensure scripts in /etc/X11/xinit/xinitrc.d folder are executed .
one of them has to do with dbus activation.
fehbg does need the & .
If the bluetootctl command is there to ensure bluetooth is powered on, there's a simple method to enable it systemwide.
https://wiki.archlinux.org/index.php/Bl … after_boot
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline