Optimus-manager not creating confs and not switching to nvidia

I have a bumblebee nvidia non-free setup and it's working well but I wanted to give the optimus-manager a try. Unfortunately after using the command:

optimus-manager --switch nvidia

session correctly re-loads but I'm still on intel... I haven't rebooted the system yet but the guide never mentioned that is needed so...

EDIT: In /etc/optimus-manager/ there are confs for intel and nvidia but they are empty, so it looks like optimus manager isn't able to fill them correctly but I have no idea why. Journalctl isn't showing any error connected to optimus-manager.

Here is what I did:

  1. Installation

sudo pacman -S optimus-manager

  1. Cleaning driver configuration to backups

sudo mv /etc/X11/nvidia-xorg.conf /etc/X11/nvidia-xorg.conf.bak

sudo mv /etc/X11/xorg.conf.d/20-intel.conf /etc/X11/xorg.conf.d/20-intel.conf.bak
sudo mv /etc/X11/xorg.conf.d/90-mhwd.conf /etc/X11/xorg.conf.d/90-mhwd.conf.bak

sudo mv /etc/X11/mhwd.d/intel.conf /etc/X11/mhwd.d/intel.conf.bak

My xorg.conf was already disabled years so I didn't have to back it up (I already had some ancient xorg.conf.bak file) and skip that part.

  1. Turning Bumblebee off (now and on boot)

sudo systemctl stop bumblebeed
sudo systemctl disable bumblebeed

  1. Make sure the bbswitch module is not loaded at boot time

Check /etc/modules-load.d/
All my confs don't have bbswitch there so I'm fine.

Make backups of the files to be able restore original settings manually, just in case:

sudo cp /etc/modules-load.d/linux414-virtualbox-host-modules.conf /etc/modules-load.d/linux414-virtualbox-host-modules.conf.bak
sudo cp /etc/modules-load.d/linux419-virtualbox-host-modules.conf /etc/modules-load.d/linux419-virtualbox-host-modules.conf.bak
sudo cp /etc/modules-load.d/mhwd-gpu.conf /etc/modules-load.d/mhwd-gpu.conf.bak
sudo cp /etc/modules-load.d/modules.conf /etc/modules-load.d/modules.conf.bak

  1. Start optimus-manager (now and on boot):

sudo systemctl start optimus-manager.service
sudo systemctl enable optimus-manager.service

  1. Check if optimus-manager.service is running:

sudo systemctl status optimus-manager

  1. Use

optimus-manager --switch nvidia
optimus-manager --switch intel

The new intel session is a bit weird thou. Everything is super sharp to the point of being annoying. Even panel/dock background borders have very distinct, strong black edge, which wasn't visible before (as intended).

journalctl -u display-manager.service is not showing any entries

After few another tries where I checked and "un-baked" few of the configs (to see if I didn't overdo), all I see in journal is:

-- Logs begin at Sat 2018-08-11 22:16:00 CEST, end at Tue 2018-12-25 18:43:00 CET. --
gru 25 13:20:01 alienware-PC systemd[1]: Started Optimus Manager Commands Daemon.
gru 25 13:20:01 alienware-PC python[6133]: Optimus Manager (Daemon) version 0.5
gru 25 13:20:01 alienware-PC python[6133]: Awaiting commands
gru 25 13:23:45 alienware-PC python[6133]: Received command : nvidia
gru 25 13:23:45 alienware-PC python[6133]: Writing requested mode
gru 25 13:23:45 alienware-PC python[6133]: Restarting login manager
gru 25 13:26:38 alienware-PC python[6133]: Received command : nvidia
gru 25 13:26:38 alienware-PC python[6133]: Writing requested mode
gru 25 13:26:38 alienware-PC python[6133]: Restarting login manager
gru 25 16:19:24 alienware-PC python[6133]: Received command : nvidia
gru 25 16:19:24 alienware-PC python[6133]: Writing requested mode
gru 25 16:19:24 alienware-PC python[6133]: Restarting login manager
gru 25 16:35:06 alienware-PC python[6133]: Received command : nvidia
gru 25 16:35:06 alienware-PC python[6133]: Writing requested mode
gru 25 16:35:06 alienware-PC python[6133]: Restarting login manager
gru 25 17:48:08 alienware-PC python[6133]: Received command : nvidia
gru 25 17:48:08 alienware-PC python[6133]: Writing requested mode
gru 25 17:48:08 alienware-PC python[6133]: Restarting login manager
1 Like

Since there was no response from anyone I had to get back working configuration. So I stopped and disabled optimus-manager deamon, brought back confs and started/enabled bumblebee.
Seems straightforward, I had all backups, all steps what I did so I can just reverse it easily. Right?

Nope, bumblebee is not working after that. Here is the log of what went wrong. Any idea?

[    70.144] 
X.Org X Server 1.20.3
X Protocol Version 11, Revision 0
[    70.144] Build Operating System: Linux Arch Linux
[    70.144] Current Operating System: Linux alienware-PC 4.19.12-2-MANJARO #1 SMP PREEMPT Sun Dec 23 19:08:00 UTC 2018 x86_64
[    70.144] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.19-x86_64 root=UUID=05f58c13-0021-44f7-abc9-05a091c4535b rw quiet splash resume=/dev/sda4 resume_offset=1363968
[    70.144] Build Date: 25 October 2018  04:42:32PM
[    70.144]  
[    70.144] Current version of pixman: 0.36.0
[    70.144] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    70.144] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    70.144] (==) Log file: "/var/log/Xorg.8.log", Time: Wed Dec 26 00:10:52 2018
[    70.145] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"
[    70.145] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"
[    70.145] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    70.145] (==) ServerLayout "Layout0"
[    70.145] (==) No screen section available. Using defaults.
[    70.145] (**) |-->Screen "Default Screen Section" (0)
[    70.145] (**) |   |-->Monitor "<default monitor>"
[    70.145] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[    70.145] (**) |   |-->Device "Device1"
[    70.145] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[    70.145] (**) Option "AutoAddDevices" "true"
[    70.145] (**) Automatically adding devices
[    70.145] (==) Automatically enabling devices
[    70.145] (==) Automatically adding GPU devices
[    70.145] (==) Automatically binding GPU devices
[    70.145] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    70.145] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi".
[    70.145] 	Entry deleted from font path.
[    70.145] 	(Run 'mkfontdir' on "/usr/share/fonts/100dpi").
[    70.145] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi".
[    70.145] 	Entry deleted from font path.
[    70.145] 	(Run 'mkfontdir' on "/usr/share/fonts/75dpi").
[    70.145] (==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF,
	/usr/share/fonts/Type1
[    70.146] (++) ModulePath set to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules"
[    70.146] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    70.146] (II) Module ABI versions:
[    70.146] 	X.Org ANSI C Emulation: 0.4
[    70.146] 	X.Org Video Driver: 24.0
[    70.146] 	X.Org XInput driver : 24.1
[    70.146] 	X.Org Server Extension : 10.0
[    70.147] (--) using VT number 1

[    70.147] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[    70.148] (II) xfree86: Adding drm device (/dev/dri/card1)
[    70.148] (II) xfree86: Adding drm device (/dev/dri/card0)
[    70.148] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[    70.151] (--) PCI:*(1@0:0:0) 10de:13d8:1028:0708 rev 161, Mem @ 0xdc000000/16777216, 0xb0000000/268435456, 0xc0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[    70.151] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    70.151] (II) LoadModule: "glx"
[    70.151] (II) Loading /usr/lib/nvidia/xorg/libglx.so
[    70.155] (II) Module glx: vendor="NVIDIA Corporation"
[    70.155] 	compiled for 4.0.2, module version = 1.0.0
[    70.155] 	Module class: X.Org Server Extension
[    70.155] (II) NVIDIA GLX Module  415.25  Wed Dec 12 10:05:39 CST 2018
[    70.155] (II) LoadModule: "nvidia"
[    70.155] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    70.156] (II) Module nvidia: vendor="NVIDIA Corporation"
[    70.156] 	compiled for 4.0.2, module version = 1.0.0
[    70.156] 	Module class: X.Org Video Driver
[    70.156] (II) NVIDIA dlloader X Driver  415.25  Wed Dec 12 10:05:51 CST 2018
[    70.156] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    70.156] (II) Loading sub module "fb"
[    70.156] (II) LoadModule: "fb"
[    70.156] (II) Loading /usr/lib/xorg/modules/libfb.so
[    70.156] (II) Module fb: vendor="X.Org Foundation"
[    70.156] 	compiled for 1.20.3, module version = 1.0.0
[    70.156] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    70.156] (II) Loading sub module "wfb"
[    70.156] (II) LoadModule: "wfb"
[    70.156] (II) Loading /usr/lib/xorg/modules/libwfb.so
[    70.156] (II) Module wfb: vendor="X.Org Foundation"
[    70.156] 	compiled for 1.20.3, module version = 1.0.0
[    70.156] 	ABI class: X.Org ANSI C Emulation, version 0.4
[    70.156] (II) Loading sub module "ramdac"
[    70.156] (II) LoadModule: "ramdac"
[    70.156] (II) Module "ramdac" already built-in
[    70.157] (II) NVIDIA(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[    70.157] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[    70.157] (==) NVIDIA(0): RGB weight 888
[    70.157] (==) NVIDIA(0): Default visual is TrueColor
[    70.157] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[    70.157] (**) NVIDIA(0): Option "UseEDID" "false"
[    70.157] (**) NVIDIA(0): Option "ConnectedMonitor" "DFP"
[    70.157] (**) NVIDIA(0): Enabling 2D acceleration
[    70.157] (**) NVIDIA(0): ConnectedMonitor string: "DFP"
[    70.157] (**) NVIDIA(0): Ignoring EDIDs
[    70.158] (--) NVIDIA(0): Valid display device(s) on GPU-0 at PCI:1:0:0
[    70.158] (--) NVIDIA(0):     DFP-0
[    70.158] (**) NVIDIA(0): Using ConnectedMonitor string "DFP-0".
[    70.159] (II) NVIDIA(0): NVIDIA GPU GeForce GTX 970M (GM204-A) at PCI:1:0:0 (GPU-0)
[    70.159] (--) NVIDIA(0): Memory: 3145728 kBytes
[    70.159] (--) NVIDIA(0): VideoBIOS: 84.04.79.00.0a
[    70.159] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[    70.159] (EE) NVIDIA(GPU-0): Failed to acquire modesetting permission.
[    70.159] (EE) NVIDIA(0): Failing initialization of X screen 0
[    70.160] (II) UnloadModule: "nvidia"
[    70.160] (II) UnloadSubModule: "wfb"
[    70.160] (II) UnloadSubModule: "fb"
[    70.160] (EE) Screen(s) found, but none have a usable configuration.
[    70.160] (EE) 
Fatal server error:
[    70.160] (EE) no screens found(EE) 
[    70.160] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    70.160] (EE) Please also check the log file at "/var/log/Xorg.8.log" for additional information.
[    70.160] (EE) 
[    70.160] (EE) Server terminated with error (1). Closing log file.

this is from the arch wiki for bumblebee

/dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
This could be worked around by appending following lines in /etc/bumblebee/xorg.conf.nvidia (see here):

Section "Screen"
    Identifier "Default Screen"
    Device "DiscreteNvidia"
EndSection

but aside from all of that, have you stopped/disabled the optimus manager service, removed any optimus manager alterations (blacklists,various .conf's), uninstalled optimus-manager, video-nvidia, video-linux? you mentioned you already started the bumblebeed service, did you add your user to the bumblebee group? and have you tried just uninstalling all video drivers,mhwd configs, and doing a fresh install of bumblebee?

i tried getting optimus manager working myself, intel would work but not nvidia, but i also didnt give it more than a couple hours of effort so i cant say it's the fault of a optimus solution thats still being developed.

I think that order matters. I enabled optimus-manager and then went with

sudo optimus-manager --cleanup

It fixed my SDDM start config (previously it was pointing to optimus-manager module). Looks like disabling optimus-manager first made cleanup ineffective the first time.

However, bumblebee is still broken but in a different way. It looks like it loads halfway:

sudo systemctl status bumblebeed
[sudo] hasło użytkownika michaldybczak: 
● bumblebeed.service - Bumblebee C Daemon
   Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-12-26 07:44:50 CET; 6min ago
 Main PID: 724 (bumblebeed)
    Tasks: 1 (limit: 4915)
   Memory: 2.4M
   CGroup: /system.slice/bumblebeed.service
           └─724 /usr/bin/bumblebeed --use-syslog

gru 26 07:50:27 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:50:32 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:50:37 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:50:42 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:50:47 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:50:52 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:50:57 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:51:02 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:51:07 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
gru 26 07:51:12 alienware-PC bumblebeed[724]: Failed to unload module 'nouveau' (ref count: 1).
[ 1138.804214] [ERROR]Cannot access secondary GPU, secondary X is not active.

[ 1138.804283] [ERROR]Aborting because fallback start is disabled.

So somehow, somewhere it tries to use nouveau, although I don't have it on my system and never had. Now I have to figure out what part of configs is responsible for that.

I only did what I posted above according to the guide (on github page). I only installed optimus-manager (no other package was added), disabled bumblebee and made mentioned graphical confs into bak files so I could restore them. Unfortunately, optimus-manager does it changes in other locations that I didn't know and didn't back up and the cleanup made them reverse to some vanilla state that uses free drivers which isn't and wasn't true and that is messing it up.

The idea was to do only minimal changes and document everything but the optimus-manager failed to describe correctly what it is doing and where so I couldn't protect myself. I don't use timeshift and only backup /home so I need to figure this out.

In the worst case I'll use another guide and switch to PRIME setup but that requires more aggressive changes and I can loose really the original setup that worked so well for me.

EDIT: I believe this should be an easy fix for someone who understands how it works. For me there are too many parts having multiple configs in various places so it's hard to get grip on what is doing what and influencing what. Reading bumblebee wiki isn't helping. I'm looking through various confs but they didn't change recently so they must be fine.

Since I couldn't get anywhere with bumblebee on a short notice, I decided I try optimus-manager once again. So I re-did the changes that were described above, tried to switch to nvidia, I was still on intel. At this point I decided to risk it and rebooted the system... and I'm on nvidia now!

Looks like it's working. Steam sees nvidia, games needing vulkan are launching properly with good performance. Now it's time to test switching after reboot!

Yeap, switching works flawlessly now! So all the trouble and all it needed was a plain reboot.... ;D

so it's worked.

for my question? it's answer

sudo systemctl stop bumblebeed
sudo systemctl disable bumblebeed

Sure, this is a fairly simple thing. It only stops bumblebee deamon (process) now and disables it from starting with bootup. No need to uninstall bumblebee for optimus-manager. As you can see from the instructions above, it was a simple configration: install optimus-manager, stop/disable bumblebee, back up GPU related confs in mentioned locations, start/enable optimus-manager process, set your mode to nvidia and then reboot. Next time switching on sessions reload will be working.

Switching to full PRIME setup is more complex and you need to do more stuff. Optimus-manager makes it simple, providing you are successful in setting it up and disabling bumblebee.

1 Like

first installed bumblebeed but when search nvidia and click it NVIDIA X Server Settings won't up.


I have:
etc/X11/mhwd.d/intel.conf
etc/X11/xorg.conf.d/00-keyboard.conf
etc/X11/xorg.conf.d/90-mhwd.conf
no nvidia conf.
i need reboot the system?
[fla@fla-pc ~]$ mhwd -li
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
video-hybrid-intel-nvidia-bumblebee            2018.08.09               false            PCI


Warning: No installed USB configs!
[fla@fla-pc ~]$ inxi -G 
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics driver: i915 v: kernel 
  Device-2: NVIDIA GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] 
  driver: nouveau v: kernel 
  Display: x11 server: X.Org 1.20.3 driver: intel,nouveau unloaded: modesetting 
  resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa DRI Intel Haswell Mobile v: 4.5 Mesa 18.2.6 
[fla@fla-pc ~]$ mhwd
> 0000:01:00.0 (0302:10de:1140) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-bumblebee            2018.08.09               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2018.08.09               false            PCI
video-hybrid-intel-nvidia-340xx-bumblebee            2018.08.09               false            PCI
          video-nvidia            2018.08.09               false            PCI
    video-nvidia-390xx            2018.08.09               false            PCI
    video-nvidia-340xx            2018.08.09               false            PCI
           video-linux            2018.05.04                true            PCI


> 0000:00:02.0 (0300:8086:0416) Display controller Intel Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-bumblebee            2018.08.09               false            PCI
video-hybrid-intel-nvidia-390xx-bumblebee            2018.08.09               false            PCI
video-hybrid-intel-nvidia-340xx-bumblebee            2018.08.09               false            PCI
           video-linux            2018.05.04                true            PCI
            video-vesa            2017.03.12                true            PCI

I'm not sure what are you trying to accomplish. My setup was already working on Bumblebee before and my goal was to switch to optimus-manager with the least tweaks possible.

First: You can't open nvidia settings directly when you're on bumbleebee, you have to open it with for example:

optirun -b none nvidia-settings -c :8

You can create a Bumblebee-Nvidia-settings.desktop file (or name it whatever suits you most):

[Desktop Entry]
Comment=Configure NVIDIA X Server Settings
Encoding=UTF-8
Exec=optirun -b none nvidia-settings -c :8
Icon=/usr/share/pixmaps/nvidia-settings.png
Name=Bumblebee-NVIDIA X Server Settings
NoDisplay=false
Path[$e]=
StartupNotify=true
Terminal=0
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=

Save it in: ~/.local/share/applications/ and make the .desktop file executable.

Then you will be able to open such settings from Bumblebee-Nvidia settings.

Second: if you switch to optimus-manager you are NOT ALLOWED to use this center settings, because you will add configs conflicting with optimus-manager. Just look at Configuration section of the optimus-manager guide and create manually a config in appropiate place for the settings you want.

Third: yes, you need to reboot the system to be able to use bumblebee, but the system will boot up if everything is set correctly, so there is a risk... Just in case, have Manjaro live USB nearby (to chroot into existing installation if you won't get access to tty) or be ready to fix your problems in tty (so have another computer where you can check guides, wiki sites with commands).

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by