Askannz / optimus-manager

A Linux program to handle GPU switching on Optimus laptops.
MIT License
2.27k stars 165 forks source link

Unable to run `optimus-manager`, `optimus-manager --status` or `optimus-manager --cleanup` #516

Closed dainbrump closed 2 months ago

dainbrump commented 1 year ago

Describe the bug

Can't run optimus-manager or optimus-manager --cleanup. I figured I would try the old tried and true Etch-a-Sketch (tm) method of troubleshooting... a.k.a., completely remove and try again. No dice.

# optimus-manager --cleanup
ERROR: a GPU setup was initiated but Xorg post-start hook did not run.
Log at /var/log/optimus-manager/switch/switch-20220920T133616.log
If your login manager is GDM, make sure to follow those instructions:
https://github.com/Askannz/optimus-manager#important--gnome-and-gdm-users
If your display manager is neither GDM, SDDM nor LightDM, or if you don't use one, read the wiki:
https://github.com/Askannz/optimus-manager/wiki/FAQ,-common-issues,-troubleshooting
# cat /var/log/optimus-manager/switch/switch-20220920T133616.log
[8] INFO: # Xorg pre-start hook
[9] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': None}
[9] INFO: Requested mode is: nvidia
[732] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[732] INFO: Unloading modules ['nouveau'] (if loaded)
[735] INFO: switching=none, nothing to do
[815] INFO: Loading module nvidia
[1663] INFO: Loading module nvidia_drm
[2957] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[2957] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20220920T133616', 'requested_mode': 'nvidia'}
[2957] INFO: Xorg pre-start hook completed successfully.

Running nvidia-smi shows the NVidia GPU as active. Running glxspheres64 renders with the Nvidia GPU.

System info

I use Arch, btw. :-)

# uname -a
Linux chimera 5.15.68-1-lts #1 SMP Thu, 15 Sep 2022 09:53:50 +0000 x86_64 GNU/Linux

Relevant packages

# pacman -Q nvidia-lts bspwm lightdm optimus-manager
nvidia-lts 1:515.65.01-12
bspwm 0.9.10-2
lightdm 1:1.32.0-4
optimus-manager 1.4-4

/etc/optimus-manager/optimus-manager.conf

[amd]
DRI=3
driver=modesetting
tearfree=

[intel]
DRI=3
accel=
driver=modesetting
modeset=yes
tearfree=

[nvidia]
DPI=96
PAT=yes
allow_external_gpus=no
dynamic_power_management=no
ignore_abi=no
modeset=yes
options=overclocking

[optimus]
auto_logout=yes
pci_power_control=no
pci_remove=no
pci_reset=no
startup_auto_battery_mode=integrated
startup_auto_extpower_mode=nvidia
startup_mode=nvidia
switching=none

Output of optimus-manager --status

Ouptut of switch log

Output of daemon log

# cat /var/log/optimus-manager/daemon/daemon-20220920T133616.log
[17] INFO: # Daemon pre-start hook
[17] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[17] INFO: Copying /etc/optimus-manager/optimus-manager.conf to /var/lib/optimus-manager/tmp/config_copy.conf
[19] INFO: Startup mode is: nvidia
[19] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': None}
[19] INFO: Daemon pre-start hook completed successfully.
[19] INFO: Calling Xorg pre-start hook.
[1] INFO: # Commands daemon
[1] INFO: Opening UNIX socket
[1] INFO: Awaiting commands
0x42697262 commented 1 year ago

Hey, I am facing this issue as well. Have you fixed it?

dainbrump commented 1 year ago

@KrulYuno I still have no idea what was causing the issue. I uninstalled everything optimus / envy / nvidia and made sure they were gone. I scoured /etc and my home dir for any lingering configuration files. Then I rebooted to the good old Intel profile, reinstalled nvidia - rebooted, installed optimus-manager - rebooted, set the mode to nvidia with optimus-manager and rebooted for a final time. Everything seems to be working again. Very odd. Hopefully you have better luck digging it out.

AYehia0 commented 4 months ago

facing the same issue too

nwildner commented 2 months ago

Sup @AYehia0 Could you please provide more details on this since the original reporter had this issue solved after reinstalling stuff around?

What's your distribution, kernel version, nvidia driver version, optimus-manager version running, GPU, etc?

Any extra logs and service output is welcome to help to investigate this.