-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--set-startup won't work #11
Comments
Same bug: #3 |
What do you mean ? The log does mention If you are referring to Could you post the full log (with Thank you for your patience ; I can't dedicate too much time to the project this week but I'm definitely working on it. |
Good news : I'm 90% sure to have found the source of the problem. And the problem is that I am an idiot. I configured the optimus-manager systemd service to start before the login manager, so it can configure Xorg and kernel modules in advance. What I didn't realize is that it gives no guarantee that the daemon will have finished its job before the X has started. So this leads to this weird race condition where sometimes the X server will use the autogenerated config, sometimes not. It may depend on your hardware and that's why I couldn't reproduce it. I can reproduce it now by adding an artificial delay to the daemon. I have a fix in mind for that but it will have to wait for a bit. |
The log starting from |
The commit 812f3b9 was an attempt at fixing the problem, but it's not really functional yet (hence why it's in a separate branch). I got a better idea that's more in line with the philosophy of systemd, I'll try to implement it asap. |
@kuba1909 Could you please test this branch ? https://github.com/Askannz/optimus-manager/tree/pre_post_exec I made you a PKGBUILD : https://pastebin.com/XqtL7445 This fix works on my end and is a much much much better approach. EDIT : Sorry, I created the branch but forgot to push to it 🤦♂️ It's good now. |
I built the package with your PKGBUILD, it works perfectly now. 😄 |
Great ! Gonna merge it then. |
It's merged. Going to add a few more fixes and features and then publish a new version. |
The command
sudo optimus-manager --set-startup nvidia
does not work for me. Switching manually withoptimus-manager --switch nvidia
works, though. I am using Arch Linux with kernel 4.19.2-arch1-1, nvidia-410.73-3, lightdm-1:1.28.0-1, xfce4 4.12.1-8 and optimus-manager-0.2-2.As you can see, I switched the mode manually which shows up in the systemd status report. I also tried creating the configuration
/etc/optimus-manager.conf
with this content:I thought the script couldn't find out I am using lightdm, but this also didn't work. X11 config's are cleaned up,
bumblebeed.service
is disabled and thebbswitch
module isn't loaded.The text was updated successfully, but these errors were encountered: