Askannz / optimus-manager

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

Manjaro KDE: switch to nvidia and then see blacksreen #570

Closed codetang-2417 closed 4 hours ago

codetang-2417 commented 3 days ago

Describe the bug

I use the Manjaro system, which has always been working normally. However, after a recent update, when switching to the NVIDIA graphics card, the entire system goes black, but I can still switch to other TTYs.

I checked the switch log and found: ERROR: Cannot setup PRIME (xrandr error).

How should I troubleshoot this error? Thank you for any responses.

System info Please include :

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

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

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

**Logs**
Run `optimus-manager --status` in a console, and if an error message appears, post it here. The message should also point you to a log path, attach it here as well. If there is no error message but you are still experiencing issues, grab the most recent files in `/var/log/optimus-manager/switch/` and `/var/log/optimus-manager/daemon/`.

$ optimus-manager --status Optimus Manager (Client) version 1.5

Current GPU mode : hybrid GPU mode requested for next login : no change GPU at startup : hybrid Temporary config path: no

$ cat /var/log/optimus-manager/switch/switch-20240705T225535.log [9] INFO: # Xorg pre-start hook [9] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': 'hybrid'} [9] INFO: Requested mode is: nvidia [52] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf [52] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20240705T225535', 'requested_mode': 'nvidia'} [52] INFO: Xorg pre-start hook completed successfully. [8] INFO: # Xorg post-start hook [34] INFO: Running xrandr commands [71] ERROR: Cannot setup PRIME (xrandr error): None [71] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh [78] ERROR: Cannot set DPI (xrandr error): None [78] INFO: Writing state {'type': 'done', 'switch_id': '20240705T225535', 'current_mode': 'nvidia'} [78] INFO: Xorg post-start hook completed successfully. [9] INFO: # Xorg pre-start hook [9] INFO: Previous state was: {'type': 'done', 'switch_id': '20240705T225535', 'current_mode': 'nvidia'} [9] INFO: Requested mode is: nvidia [49] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf [49] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20240705T225535', 'requested_mode': 'nvidia'} [50] INFO: Xorg pre-start hook completed successfully.

nwildner commented 3 days ago

Could this be related to?

What happens if you follow the same procedure that is explained on that case? - : set switching=none and pci_power_control=yes. To switch GPUs, use--set-startup+ reboot instead of--switch`.

That is for testing to check out if switching=bbswitch isn't playing a role here. There is also some valuable information at the power management session of our wiki.

Also, keep using the optimus-manager-git since it bundles the last merged PRs from this repo :)

Edit: sorry, misclicked "Comment and Close" instead of just "Comment" here. My bad.

codetang-2417 commented 2 days ago

Thank you for your response. I tried your suggested solution, but it didn't improve the situation. Before this upgrade, everything was working fine. I will continue using optimus-manager-git in hopes that future updates will resolve the issue. Additionally, would you like me to provide any relevant logs or debugging information to help the team address these types of problems?

es20490446e commented 4 hours ago

What I do in these situations is to try different configurations till I know exactly which component or setting is failing.

For example, you can try:

  1. What happens if you use a different driver like nvidia-open or the nvidia proprietary one?

  2. And if you edit optimus-manager.conf to only have:

# This is the user configuration file for optimus-manager.
# The default configuration file is at /usr/share/optimus-manager.conf.
# Any option specified in this file will override the default configuration.
# When overriding an option, remember to include the corresponding section header.

[optimus]
startup_mode=nvidia

Then progressively add your original settings back.

Keep discarding options till you know which one specifically is causing the issue. Then come back, reopen this report, let us know what you have discovered, and we can look into the code.

If it helps I'm using also Manjaro KDE Plasma on GeForce 1650 and I'm not affected. I'm using nvidia-open with the conf above.