Repository: Askannz/optimus-manager

Issue #452: Wayland support
Created: 2021-12-10T20:42:39Z
I would like to make a suggestion to build optimus-manager with wayland support now that Nvidia 495 includes enhanced support for wayland.

Duplicate issue #446: Nvidia & Wayland not working with Optiums-Manager
Created: 2021-11-02T03:29:26Z
Describe the bug
Unable to use Nvidia & Wayland with Optimus Manager
System info

Arch Linux
GNOME
GDM
TM1701 Mi Notebook
latest stable release (optimus-manager)

Graphics:  Device-1: Intel UHD Graphics 620 driver: i915 v: kernel
           Device-2: NVIDIA GP108M [GeForce MX150] driver: nvidia v: 495.44
           Device-3: Cheng Uei Precision Industry (Foxlink) XiaoMi USB 2.0 Webcam type: USB driver: uvcvideo
           Display: wayland server: X.Org 1.21.1.2 driver: loaded: modesetting,nvidia resolution: 1920x1080~60Hz
           OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.2.4

Logs

ERROR: the active card is "integrated" but it should be "nvidia".
Something went wrong during the last GPU setup...
Log at /var/log/optimus-manager/switch/switch-20211101T144924.log
Cannot execute command because of previous errors.

[18] INFO: # Xorg pre-start hook
[18] INFO: Previous state was: {'type': 'pending_pre_xorg_start', 'requested_mode': 'nvidia', 'current_mode': None}
[19] INFO: Requested mode is: nvidia
[1000] INFO: Available modules: ['nouveau', 'nvidia', 'nvidia_drm', 'nvidia_modeset', 'nvidia_uvm']
[1000] INFO: Unloading modules ['nouveau'] (if loaded)
[1004] INFO: switching=none, nothing to do
[1027] INFO: Loading module nvidia
[1893] INFO: Loading module nvidia_drm
[2589] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[2589] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20211101T144924', 'requested_mode': 'nvidia'}
[2590] INFO: Xorg pre-start hook completed successfully.
[15] INFO: # Xorg post-start hook
[15] INFO: Running xrandr commands
[24] ERROR: Cannot setup PRIME (xrandr error):
None
[24] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh
[42] INFO: Writing state {'type': 'done', 'switch_id': '20211101T144924', 'current_mode': 'nvidia'}
[43] INFO: Xorg post-start hook completed successfully.
[8] INFO: # Pre-suspend hook
[8] INFO: Previous state was: {'type': 'done', 'switch_id': '20211101T144924', 'current_mode': 'nvidia'}
[10] INFO: Switching option: none
[10] INFO: Nothing to do
[10] INFO: Writing state {'type': 'pending_post_resume', 'switch_id': '20211101T144924', 'current_mode': 'nvidia'}
[10] INFO: Pre-suspend hook completed successfully.
[9] INFO: # Post-resume hook
[9] INFO: Previous state was: {'type': 'pending_post_resume', 'switch_id': '20211101T144924', 'current_mode': 'nvidia'}
[11] INFO: Nothing to do
[11] INFO: Writing state {'type': 'done', 'switch_id': '20211101T144924', 'current_mode': 'nvidia'}
[12] INFO: Post-resume hook completed successfully.
[8] INFO: # Xorg pre-start hook
[24] INFO: Previous state was: {'type': 'done', 'switch_id': '20211101T144924', 'current_mode': 'nvidia'}
[24] INFO: Requested mode is: nvidia
[42] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
[42] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20211101T144924', 'requested_mode': 'nvidia'}
[42] INFO: Xorg pre-start hook completed successfully.
[7] INFO: # Xorg post-start hook
[7] INFO: Running xrandr commands
[12] ERROR: Cannot setup PRIME (xrandr error):
None
[13] INFO: Running /etc/optimus-manager/xsetup-nvidia.sh
[22] INFO: Writing state {'type': 'done', 'switch_id': '20211101T144924', 'current_mode': 'nvidia'}
[23] INFO: Xorg post-start hook completed successfully.

Closing comment (2022-04-17T02:36:55Z): closing as a duplicate of #452