Optimus manager on HP Pavillion gaming 15

Hi everyone,
This is my first post since i'm new in the manjaro world!
Currently i'm on KDE Manjaro 18.1.2. My laptop has a intel i7 6700hq with an integrated GPU (Intel HD 530) and a discrete GPU (nvidia gtx 950m).
i'm struggling installing optimus manager, i followed this guide: Guide: Install and configure optimus-manager for hybrid GPU setups (Intel/NVIDIA)
Everything is fine, i've installed the proprietary drivers (nvidia 440xx), optimus manager and optimus manager qt. When i try to switch from intel GPU to nvidia GPU i got the message about the session interruption and then only a black screen.
I tried to follow the troubleshooting section in this guide (https://wiki.manjaro.org/index.php?title=Optimus_Manager) without any luck.
Anyone could help me?

EDIT:
i tried to run systemctl status optimus-manager.service this is the output:

● optimus-manager.service - Optimus Manager Commands Daemon
   Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-11-05 15:50:41 CET; 1h 12min ago
 Main PID: 814 (python3)
    Tasks: 1 (limit: 4915)
   Memory: 27.5M
   CGroup: /system.slice/optimus-manager.service
           └─814 /usr/bin/python3 -u /usr/bin/optimus-manager-daemon

nov 05 15:50:41 itkk-manjaro prime-switch-boot[706]: Loading module bbswitch
nov 05 15:50:41 itkk-manjaro prime-switch-boot[706]: ERROR : cannot load bbswitch. Continuing anyways. Error is : module bbswitch is not available for current kernel. >
nov 05 15:50:41 itkk-manjaro prime-switch-boot[706]: Setting up Intel state
nov 05 15:50:41 itkk-manjaro prime-switch-boot[706]: Setting GPU power to OFF via bbswitch
nov 05 15:50:41 itkk-manjaro prime-switch-boot[706]: Cannot setup GPU : kernel setup error : Cannot open /proc/acpi/bbswitch
nov 05 15:50:41 itkk-manjaro systemd[1]: Started Optimus Manager Commands Daemon.
nov 05 15:50:41 itkk-manjaro python3[814]: Optimus Manager (Daemon) version 1.2.2
nov 05 15:50:41 itkk-manjaro python3[814]: Automatic log cropping
nov 05 15:50:41 itkk-manjaro python3[814]: Opening UNIX socket
nov 05 15:50:41 itkk-manjaro python3[814]: Awaiting commands

So i think i've a problem with bb-switch :man_facepalming: What can i do?

First, check if you have installed bb-switch. If not, install proper version and reboot. So if you are using kernel 5.3 install linux53-bbswitch, if you are on 4.19 install linux419-bbswitch, etc.
If bbswitch is installed, try to re-install it or install a new kernel, switch to it and try change the GPU.

It's very possible you are using some non standard RC or EOL kernel so show us the output of:

uname -a

Second, you may try to use nouveau for a switch method, although it rarely works from what I can see (however it works great for me).

I'm on kernel 5.3. I installed linux53-bbswitch and now this is the output of systemctl status optimus-manager.service:

● optimus-manager.service - Optimus Manager Commands Daemon
   Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2019-11-05 22:13:07 CET; 7min ago
  Process: 743 ExecStartPre=/usr/bin/prime-switch-boot (code=exited, status=0/SUCCESS)
 Main PID: 857 (python3)
    Tasks: 1 (limit: 4915)
   Memory: 44.0M
   CGroup: /system.slice/optimus-manager.service
           └─857 /usr/bin/python3 -u /usr/bin/optimus-manager-daemon

nov 05 22:13:07 itkk-manjaro prime-switch-boot[743]: Setting GPU power to OFF via bbswitch
nov 05 22:13:07 itkk-manjaro prime-switch-boot[743]: Loaded extra Intel Xorg options (0 lines)
nov 05 22:13:07 itkk-manjaro prime-switch-boot[743]: Loaded extra Nvidia Xorg options (0 lines)
nov 05 22:13:07 itkk-manjaro prime-switch-boot[743]: WARNING : The Xorg intel module is not available. Defaulting>
nov 05 22:13:07 itkk-manjaro prime-switch-boot[743]: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
nov 05 22:13:07 itkk-manjaro systemd[1]: Started Optimus Manager Commands Daemon.
nov 05 22:13:07 itkk-manjaro python3[857]: Optimus Manager (Daemon) version 1.2.2
nov 05 22:13:07 itkk-manjaro python3[857]: Automatic log cropping
nov 05 22:13:07 itkk-manjaro python3[857]: Opening UNIX socket
nov 05 22:13:07 itkk-manjaro python3[857]: Awaiting commands

so bbswitch is up and ruunig. After a system reboot, I tried to switch from intel to nvidia but it doesn't work... black screen.

I'm trying to use noveau, but same problem (black screen). Do i have to install something?

Are you on wayland by any chance? Optimus-manager won't work on wayland. You need to use Xorg,

This time bbswitch seems to be working so that issue is out of the way.

nope, i'm on Xorg :disappointed:

Show me output of:

ls /etc/X11/ -lav

ls /etc/X11/xorg.conf.d/ -lav

ls /etc/X11/xorg.conf.d/ -lav

drwxr-xr-x   5 root root 4096 15 ott 12.31 .
drwxr-xr-x 100 root root 4096  5 nov 22.13 ..
drwxr-xr-x   2 root root 4096 28 ott 23.45 mhwd.d
drwxr-xr-x   3 root root 4096 15 ott 12.32 xinit
drwxr-xr-x   2 root root 4096  5 nov 22.13 xorg.conf.d

ls /etc/X11/xorg.conf.d/ -lav

drwxr-xr-x 2 root root 4096  5 nov 22.13 .
drwxr-xr-x 5 root root 4096 15 ott 12.31 ..
-rw-r--r-- 1 root root  266 28 ott 15.53 00-keyboard.conf
-rw-r--r-- 1 root root  108  5 nov 22.13 10-optimus-manager.conf
lrwxrwxrwx 1 root root   27 28 ott 23.45 90-mhwd.conf.bak -> /etc/X11/mhwd.d/nvidia.conf

Hmm... All seems to be all right. In the last line I have:

90-mhwd.conf.bak -> /etc/X11/mhwd.d/intel.conf

However, since this is a .bak file and not active, it only shows your last setup, which was non standard one. You had to fiddle with drivers before it, because the automatic setup would point you to the intel.conf. Again, this should be of no consequence now, at least on this file. But maybe you have some other lefovers in other places that are standing in the way? Hmm...

Did you do this part?

Edit the file /etc/sddm.conf and simply put a # before the line starting with DisplayCommand and the one starting with DisplayStopCommand .

Also, show me log outputs of the last switch attempts:

journalctl -u optimus-manager.service

journalctl -u sddm.service

To skip to the end of the log, hit End key.

1 Like

This was the problem :man_facepalming: i only put the comment before DisplayStopCommand and not before DisplayCommand.

Now it's working.. Thank you michaldybczak!

I've another problem with the audio driver. My laptop uses bang and olufsen driver on windows (which naturally aren't available on linux), so the audio is really bad. Do you know how can I solve?

1 Like

I'm not an audio guy. Create a new topic and maybe someone skilled with that area will respond.

I also don't have specific drivers for my audio card but some generic intel audio driver is used and it works for the most part. It's not perfect and I have some sporadic audio issues but nothing major or frequent. However, I had to configure pulseaudio, because the default settings were very bad.

Open or create a file if it doesn't exist:

~/.config/pulse/daemon.conf

Put this configuration to it, save and reboot:

default-sample-format = float32le
default-sample-rate = 48000
alternate-sample-rate = 44100
default-sample-channels = 2
default-channel-map = front-left,front-right

default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq
enable-lfe-remixing = no
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
daemonize = no

It helped me to get decent sound quality. Not sure if it helps you thou.

1 Like

Thank you, i'll try!

The sound issues dimished with time (blocked sound, crazy volume spikes, etc.). There were very bad few years ago but now are super sporadic but they occur rarely. Maybe it will better with time for you too.

Sometimes all you can do is wait till some generic drivers and kernel support for your hardware improves if a closed source driver is not available (which is often the case). However, research your issue and maybe there is some solution for you.

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

Forum kindly sponsored by