optimus-manager icon indicating copy to clipboard operation
optimus-manager copied to clipboard

Plasma hangs on first login, but works (excluding Vulkan) after --switch is called from another TTY

Open Nolij opened this issue 2 years ago • 0 comments

Describe the bug With the optimus-manager service enabled on boot, after a reboot once I log in from SDDM it either hangs indefinitely or cuts to a black screen with only my mouse. If I open a different TTY (where I have no internet for some reason - NetworkManager doesn't want to connect to my WiFi in this state) and do a switch with optimus-manager CLI (to any mode, I've tried integrated, nvidia, and hybrid) it will restart SDDM and log me in fine. This is likely an AMD issue, or at the very least not an issue with my setup, as I've successfully set up optimus-manager on similar software (notable hardware difference being an Intel CPU and iGPU) and it was relatively drag and drop. The only issue I experience at that point is lack of Vulkan if I'm on any mode other than integrated (although that's likely a separate bug, and I believe that has already been reported).

System info Distro: Arch Linux WM: KDE Plasma DM: SDDM Laptop: Asus TUF FX505DT CPU: Ryzen 7 3750H GPU: GTX 1650 Mobile Max-Q optimus-manager: optimus-manager-git Config:

[amd]
DRI=3
driver=amdgpu
tearfree=

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

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

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

NOTE 1: The above was generated with optimus-manager-qt-git NOTE 2: With the above file completely absent the issue still occurs

Logs Before switch via CLI: Latest daemon log:

[49] INFO: # Daemon pre-start hook
[49] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[52] INFO: Copying /etc/optimus-manager/optimus-manager.conf to /var/lib/optimus-manager/tmp/config_copy.conf
[60] INFO: Startup mode is: hybrid
[60] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': None}
[60] INFO: Daemon pre-start hook completed successfully.
[60] INFO: Calling Xorg pre-start hook.
[2] INFO: # Commands daemon
[3] INFO: Opening UNIX socket
[3] INFO: Awaiting commands

Latest switch log:

[14] INFO: # Xorg pre-start hook
[14] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': None}
[14] INFO: Requested mode is: hybrid
[43] INFO: Available modules: ['nouveau', 'bbswitch', 'acpi_call', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[43] INFO: Unloading modules ['nouveau'] (if loaded)
[47] INFO: switching=none, nothing to do
[66] INFO: Setting Nvidia PCI power state to auto
[82] INFO: Writing "auto" to /sys/bus/pci/devices/0000:01:00.0/power/control
[82] INFO: Writing "auto" to /sys/bus/pci/devices/0000:01:00.1/power/control
[86] INFO: Loading module nvidia
[1567] INFO: Loading module nvidia_drm
[2338] WARNING: The Xorg module amdgpu is not available. Defaulting to modesetting.
[2339] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[2339] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20220514T105822', 'requested_mode': 'hybrid'}
[2339] INFO: Xorg pre-start hook completed successfully.
[17] INFO: # Xorg post-start hook
[17] INFO: Running /etc/optimus-manager/xsetup-hybrid.sh
[31] INFO: Writing state {'type': 'done', 'switch_id': '20220514T105822', 'current_mode': 'hybrid'}
[31] INFO: Xorg post-start hook completed successfully.

After switch, before login: Daemon (same file):

[49] INFO: # Daemon pre-start hook
[49] INFO: Removing /etc/X11/xorg.conf.d/10-optimus-manager.conf (if present)
[52] INFO: Copying /etc/optimus-manager/optimus-manager.conf to /var/lib/optimus-manager/tmp/config_copy.conf
[60] INFO: Startup mode is: hybrid
[60] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': None}
[60] INFO: Daemon pre-start hook completed successfully.
[60] INFO: Calling Xorg pre-start hook.
[2] INFO: # Commands daemon
[3] INFO: Opening UNIX socket
[3] INFO: Awaiting commands
[8547692] INFO: Received command : {"type": "switch", "args": {"mode": "hybrid"}}
[8547693] INFO: Writing requested GPU mode hybrid
[8547693] INFO: Writing state {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': 'hybrid'}

Switch (different file, old one unchanged):

[8] INFO: # Xorg pre-start hook
[8] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'hybrid', 'current_mode': 'hybrid'}
[8] INFO: Requested mode is: hybrid
[33] WARNING: The Xorg module amdgpu is not available. Defaulting to modesetting.
[33] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[33] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20220514T132057', 'requested_mode': 'hybrid'}
[33] INFO: Xorg pre-start hook completed successfully.
[9] INFO: # Xorg post-start hook
[9] INFO: Running /etc/optimus-manager/xsetup-hybrid.sh
[18] INFO: Writing state {'type': 'done', 'switch_id': '20220514T132057', 'current_mode': 'hybrid'}
[19] INFO: Xorg post-start hook completed successfully.

After login neither log file changes and no new ones are created.

Nolij avatar May 14 '22 19:05 Nolij