Skip to content

@Askannz Askannz released this May 12, 2019 · 4 commits to master since this release

Changelog :

This update brings some massive changes to the internal structure of optimus-manager. In particular, the method by which the X server is restarted and the GPU setup/teardown functions are called has changed greatly :

  • Before : the display manager service was entirely restarted on a GPU switch, and the setup scripts were called using the ExecStart and ExecStop fields in its Systemd unit. This method has a lot of staibility issues because, as it turns out, display managers on Linux are not supposed to be brutally restarted, and would often leave X sessions hanging around, which it turn would refuse to let go of the current GPU. My attempts at circumventing this problem by killing leftover X servers or the entire logind service fixed issues for some people but created new ones for others.

  • Now : the new method was copy-pasted from Ubuntu's own Nvidia-Prime solution. The display manager is not restarted anymore ; instead, the GPU setup script is called at boot before the login manager starts, and also whenever the X server shuts down thanks to a hook into the login manager itself. Therefore, to apply the GPU switch, the user only needs to log out (which optimus-manager can do automatically) and log back in. As far as I can tell, this method is much more stable and only requires a minimum of ugly workarounds. It has two drawbacks though :

    1. GDM users need to download a custom-patched versions of the gdm package, which I put on the AUR (link in the README). This version is identical to the normal one, except for a patch from Ubuntu that adds the script hooks required for Prime switching.

    2. Because the login manager isn't completely restarted anymore, auto-login will not kick in on a GPU switch in even if you have it enabled. In other words, you need to type your password in the login screen every time you switch GPUs. I realize this can be an annoyance, but this is the proper method and the stability gains are worth it.

Other improvements :

  • Easier installation on Manjaro. Now Manjaro users only need to disable the bumblebee daemon, optimus-manager will take care of the MHWD-generated Xorg config file.
  • Some client-side checks to spot the most common problems (Wayland session still running, bumblebee not disabled, etc). They will trigger a warning and a confirmation message before a GPU switch.
  • DPI for Nvidia now defaults to 96
  • Better README + created some Wiki pages because the README was becoming too bloated
  • Better logging with all the log files in one place and their entries timestamped, to facilitate bug reporting
  • Improvements to packaging, added pre/post install hooks so that generated Xorg files are automatically cleaned up
  • Some config keys were removed because they became obsolete with the new switching method, or never worked to begin with. They will trigger warnings in this new version.
  • Minor bug fixes
Assets 2

@Askannz Askannz released this Mar 26, 2019 · 115 commits to master since this release

Changelog :

  • Important : The built-in tray app has been deprecated in favor of optimus-manager-qt. The old tray is still there but will be removed in the future.
  • For the X setup script, write into the proper config file for SDDM instead of overwriting /usr/share/sddm/scripts/Xsetup
  • Adjusted polling and timeout delays to avoid premature termination of the DM setup script
  • More aggressive termination methods if the previous desktop session hangs during a switch. Can be disabled in the config file.
  • New feature : you can specify custom display setup scripts.
  • Bugfixes
Assets 2

@Askannz Askannz released this Feb 15, 2019 · 137 commits to master since this release

Changelog :

  • Hotfix for #49
Assets 2

@Askannz Askannz released this Feb 12, 2019 · 142 commits to master since this release

Changelog :

  • New feature : we now have a tray icon for easy switching ! Thanks a lot @jsmnbom for the implementation.
  • bbswitch is now an optional dependency. A warning message will pop up if you try to use the bbswitch option without that module installed.
  • optimus-manager now warns you if the nvidia modules are not installed for the current kernel.
  • Various bugfixes and stability improvements.

Unfortunately optimus-manager seems to be still quite broken on Gnome. From my own testing on Manjaro Gnome Edition, restarting the display manager causes a number of random issue ranging from the X server being duplicated to the session not starting at all. This is definitely something that needs to be addressed.

Assets 2

@Askannz Askannz released this Jan 1, 2019 · 165 commits to master since this release

Happy new year !

Changelog :

  • New feature : DPI setting (see #26)
  • New feature : config option to enable PCI power management in the kernel for the Nvidia GPU
  • The PCI device corresponding to the Nvidia GPU is now reset when switching. This should prevent issues when swapping drivers (particularly when switching from Nvidia to Intel).
  • Merged another PR (#34) from @kuroni to add proper session termination. This should prevent issues with some hardware devices not re-attaching after switching.
  • Worked around a known Systemd bug causing the systemd-logind process to hold onto the GPU and preventing module unloading. See #36 and #37.
Assets 2

@Askannz Askannz released this Dec 2, 2018 · 200 commits to master since this release

Changelog :

  • Merged more PRs from @kuroni (#21, #24) for some code refactoring and (hopefully) a more robust switching process
  • New feature : there is now a modeset option for [intel] which allows to disable modesetting for the nouveau driver
  • New feature : there is now proper sanitizing of the configuration file. Syntax errors will be explicitely printed to the standard output, instead of causing an exception at some random point in the program.
  • README updates
  • AUR : nvidia and mesa-demos are added as dependencies
Assets 2

@Askannz Askannz released this Nov 25, 2018 · 219 commits to master since this release

Changelog :

  • Merged PR #6 to fix broken GDM support (thanks @kuroni)
  • New feature : it is now possible to pass extra options to the Xorg configuration
  • Various bugfixes

Important

The configuration file has changed location. It is not in /etc/optimus-manager.conf anymore, but in /etc/optimus-manager/optimus-manager.conf (one subfolder down). The old location will still work for compatibility, but consider moving your file.

Assets 2

@Askannz Askannz released this Nov 22, 2018 · 245 commits to master since this release

Even though it does not look like much has changed on the surface, this is a massive release.

Due to the problem highlighted in #11, I had to completely change the way GPU switching work. Now instead of being taken care of by a daemon, the configuration of Xorg and the module loading is done through a setup script in the ExecStartPre field of display-manager.service. This method has the following advantages :

  • No stupid race condition between the daemon and the display manager anymore.
  • No need to immediately restart the display manager (although the tool still does it by default)
  • Much cleaner and much more compliant with the design philosophy of SystemD
  • Cleanup can be done immediately after the display manager exits (thanks to the ExecStopPost field)

There is technically no need for a daemon anymore (you can just write the mode you want to /var/lib/optimus-manager/requested_mode and then restart the display manager) but I'm keeping it because it provides a user-friendly interface.

If you do not use a display-manager, there are now extra steps. Please read the updated README.
Also, I had to remove the option in the config file to specify the name of the display manager service. But I am pretty sure it was useless anyway, the default name is the same on Arch and Manjaro and there is no reason for the user to change it.

Other changes :

  • Added the option to use the "intel" driver instead of "modesetting"
  • Added "acceleration method" option to Intel ("sna", "xna", or default)
  • Added "TearFree" option to Intel
  • Merged PR #10 to allow the client to print the current GPU mode and auto-switch to the other mode (thanks @kuroni)

The reception to this project has been pretty positive so far. Thanks for your interest !

Assets 2

@Askannz Askannz released this Nov 18, 2018 · 280 commits to master since this release

Changelog :

  • Added a more helpful error message to the client if the socket cannot be opened
  • Improved the config file with more comments
  • Fixed two bugs breaking PRIME setup (958abb2, 3779bf8)
  • README improvements and minor fixes
  • Not directly related to this repository but there were a tons of problems with the AUR packaging. Should be fixed now.
Assets 2

@Askannz Askannz released this Nov 17, 2018 · 291 commits to master since this release

v0.1

[Meta] README : "why"
Assets 2
You can’t perform that action at this time.