Call for testing: optimus-switch

for lightdm you would

sudo mkdir /etc/lightdm/lightdm.conf.d

and create something like this (from optimus-switch)



so when lightdm starts it will run a script (name as you see fit) located at /usr/local/bin/ which you would also create.

if you want to see what commands are used to create that file and chmod it just look at the install script for optimus-switch

Hi everyone , how to install , whats the problem, just step by step doing actions from GitHub manual but here something wrong (encrypted??) 15856257055908889268133932127718

Cannot reproduce:

$ git clone
Cloning into 'optimus-switch-sddm'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 151 (delta 22), reused 0 (delta 0), pack-reused 111
Receiving objects: 100% (151/151), 44.01 KiB | 518.00 KiB/s, done.
Resolving deltas: 100% (63/63), done.

As a sidenote: you don't want to clone that repo as root into your home - all the files will belong to root and wantedrbk won't be able to rm them or git pull in that repo.


as @freggel.doe pointed out, do this from your home directory and not as root as the instructions tell you.

the first command being cd ~ which takes you to the home directory of your current user and not just /home like you seem to be in.

#is not the same as
#which is where " cd ~ " would bring you (the correct way)

Screenshot from 2020-04-13 18-45-19
Can someone explain why do i see both intel and nvidia for switches?
When i reboot with intel selected it goes into manjaro optimus
is there a difference between manjaro optimus and intel?
It works well just wanted to know
before i used to be able to see intel only too

@linesma actually made that manjaro optimus indicator so he would know more. i also have this setup but i only see "switch to intel" when im on nvidia mode and only see "switch to nvidia" when im on intel mode.

@warpMACHINE @dglt

My GUI is changing the GPU properly. It is not picking up that the GPU in use is Intel. So it is going to the default of showing both options. I am looking into why this is. I will update both here and on my post once I figure out a solution.

Thanks for letting me know!


guhhnome specific? :smirk:

@dglt It is only specific to Intel. It changed how it reports the vendor string. Nope, it is not Gnome specific. It is doing it as well on my Plasma install.

I didn't lose myself, and I tried to work with optimus-switch-sddm, but I have an error.

● optimus-manager.service - Optimus Manager Commands Daemon
     Loaded: loaded (/usr/lib/systemd/system/optimus-manager.service; enabled; vendor preset: disabled)
     Active: active (running) since Mon 2020-04-13 18:03:17 EEST; 1h 4min ago
   Main PID: 845 (python3)
      Tasks: 1 (limit: 18934)
     Memory: 44.3M
     CGroup: /system.slice/optimus-manager.service
             └─845 /usr/bin/python3 -u /usr/bin/optimus-manager-daemon

apr 13 18:03:17  prime-switch-boot[523]: Running /etc/optimus-manager/
apr 13 18:03:17  prime-switch-boot[523]: ****ERROR** : cannot run /etc/optimus-manager/ Continuing anyways. Error is : Failed to execute '>**
apr 13 18:03:17  prime-switch-boot[523]: Loaded extra Intel Xorg options (0 lines)
apr 13 18:03:17  prime-switch-boot[523]: Loaded extra Nvidia Xorg options (0 lines)
apr 13 18:03:17  prime-switch-boot[523]: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
apr 13 18:03:17  systemd[1]: Started Optimus Manager Commands Daemon.
apr 13 18:03:17  python3[845]: Optimus Manager (Daemon) version 1.2.2
apr 13 18:03:17  python3[845]: Automatic log cropping
apr 13 18:03:17  python3[845]: Opening UNIX socket
apr 13 18:03:17  python3[845]: Awaiting commands

I apologize for insisting, but I don't like to leave things un-done

opening time is a bit big, I say ...

systemd-analyze blame --no-pager 
1.006s optimus-manager.service

optimus-switch os not the same thing as optimus-manager. go here if you need help with that

as i said before @sami when i tried helping you, i cant understand your wording and you fail to follow directions even when laid out in line by line commands. i think you should find someone in your native language that can understand you because i tried and got absolutely nowhere.

1 Like

I didn't read the whole thread (it's too big), but I noticed the last two posts and on one side you are saying that you work with optimus-switch but show optimus-manager status. Those are two DIFFERENT things and you shouldn't have both solutions at the same time, just as you can't have two antiviruses on the same time on Windows.

Also, when copying the output from terminal, maximize window so you could copy THE WHOLE part. Your output above is just partial:

Error is : Failed to execute '>**

Execute what? We can't help if we get incomplete data.

Alternativnelly, when you still have fragmented lines even in maximized mode, simply output them to text file with > text, so for example

sudo systemctl status optimimus-manager > optimus-manager-status.txt

This will create optimus-manager-status.txt file with the output, so you can open it, copy relevant parts and post here.

Mine is even bigger:

1.469s optimus-manager.service

However, system boots as quick as before or maybe this 1,5s is so little I didn't notice any difference. Did you? As long as it works and didn't disturb me in any way, I wouldn't care about that result.

@warpMACHINE and @dglt

It is now fixed and should work properly. I have updated the github repository.

1 Like

try again and I think you will succeed :slight_smile:

1.006s optimus-manager.service                                                                  
 594ms dev-nvme0n1p2.device                                                                     
 574ms snapd.service                                                                            
 557ms systemd-logind.service                                                                   
 496ms upower.service                                                                           
 377ms systemd-udevd.service                                                                    
 367ms apparmor.service                                                                         
 332ms systemd-journald.service                                                                 
 225ms systemd-random-seed.service                                                              
 216ms polkit.service                                                                           
 131ms ldconfig.service                                                                         
  83ms systemd-fsck@dev-disk-by\x2duuid-DA07\x2dEF5F.service                                    
  82ms user@1000.service                                                                        
  82ms systemd-tmpfiles-clean.service                                                           
  74ms systemd-udev-trigger.service                                                             
  72ms avahi-daemon.service                                                                     
  67ms systemd-rfkill.service                                                                   
  64ms NetworkManager.service                                                                   
  62ms udisks2.service                                                                          
  55ms ModemManager.service                                                                     
  53ms systemd-journal-flush.service                                                            
  50ms org.cups.cupsd.service                                                                   
  36ms boot-efi.mount                                                                           
  34ms systemd-fsck@dev-disk-by\x2duuid-2ab3f535\x2daf65\x2d4a1b\x2db183\x2d9b7591fed513.service
  30ms dev-disk-by\x2duuid-78c5c6bb\x2d9fcf\x2d4d5c\x2dbab0\x2d2c63d0fae3ed.swap                
  21ms systemd-backlight@backlight:intel_backlight.service                                      
  19ms sys-fs-fuse-connections.mount                                                            
  19ms systemd-sysusers.service                                                                 
  18ms linux-module-cleanup.service                                                             
  18ms systemd-modules-load.service                                                             
  17ms systemd-journal-catalog-update.service                                                   
  17ms modprobe@drm.service                                                                     
  17ms user-runtime-dir@1000.service                                                            
  16ms systemd-user-sessions.service                                                            
  16ms systemd-tmpfiles-setup.service                                                           
  14ms systemd-tmpfiles-setup-dev.service                                                       
  12ms snapd.apparmor.service                                                                   
  11ms systemd-remount-fs.service                                                               
  10ms systemd-update-utmp.service                                                              
  10ms bluetooth.service                                                                        
   9ms wpa_supplicant.service                                                                   
   8ms systemd-sysctl.service                                                                   
   7ms systemd-update-done.service                                                              
   7ms dev-hugepages.mount                                                                      
   7ms home.mount                                                                               
   6ms dev-mqueue.mount                                                                         
   6ms sys-kernel-debug.mount                                                                   
   5ms kmod-static-nodes.service                                                                
   5ms rtkit-daemon.service                                                                     
   3ms tmp.mount                                                                                
   2ms sys-kernel-config.mount                                                                  
   1ms snapd.socket                          

I didn't mean that part. The optimus-manager status...

I deactivated it and masked it that I don't think it would help me, and I was left with only the optimus-switch

Thanks anyway for the support given

I'm not sure if masking is enough. Optimus-manager tweaks systemd somehow so if you have competing solutions, they are most likely broken and won't work. The only way is to follow-up instruction how to uninstall optimus-manager and clean up the install:

To uninstall the program, simply remove the optimus-manager package. The auto-generated Xorg config file will be automatically cleaned up.

You can also force cleanup by running optimus-manager --cleanup

Also, you need to restore other configurations manually like mhwd one. So simply look for the configs you disabled for optimus-manager and if they are not regenerated automatically, enable them back.

So unless you get optimus-manager out of the system correctly, you may get problems with alternative solutions.

1 Like

So I tried this again on XPS 9560. Was working fine on Intel mode. Tied sudo and my laptop fails to boot.

I get an error saying "Failed to Start Simple Desktop Display Manager. Here's a photo of the output for systemctl status sddm.service:20200420_210131

Managed to go back to Intel only mode and again everything is working fine. Any ideas on how to fix this?

Forum kindly sponsored by