Zend certified PHP/Magento developer

After Linux resumes from sleep, the screen only turn on when I move the mouse (or when a visual component changes)

I bought a recent notebook with the settings mentioned below and I couldn’t make any Linux work on it, they all have the same behavior after returning from the suspension of only turning on the screen when a visual component changes, e.g. a new character entered by the keyboard; cursor position by mouse/touchpad movement; new log lines appearing in terminal; progress bar loading (this one keeps the screen lit without blinking); when the browser page is loading or a video is playing (also keeps the screen lit without blinking).

Avell A57 HYB Notebook Technical Specifications:

  • Processor: i7-12700H
  • Video Card: GTX 1650 Black 144 Hz
  • Memory: 32 GB (2×16)
  • Storage: NVMe 500GB

I have already tried the following:

  • Different distributions: openSUSE, Ubuntu, Pop!_OS
  • Different Desktop Environments: Gnome and KDE
  • Different Display Server Protocols: X11 and Wayland
  • Different video drivers: generic and official from Nvidia

Besides these isolated changes I tried to follow the openSUSE documentation to use only NVIDIA or only Intel.

As prerequisites, I installed some packages and disabled Wayland.

# zypper install x11-video-nvidiaG06 nvidia-glG06 suse-prime bbswitch bbswitch-kmp-default
# sed -ri 's/#?WaylandEnable=.*/WaylandEnable=false/' /etc/gdm/custom.conf

Then I tried using intel, intel2 and offload modes. Both modes made that when trying to get out of sleep the screen was just black and it was necessary to restart the system. After using prime-select unset to remove the configuration the behavior was still black screen.

The log of these tests follows (generated with prime-select log-view):

##SUSEPrime logfile##
[ 11:15:01 ] Boot: setting-up  card
[ 11:15:01 ] HotSwitch: completed!
[ 11:26:39 ] user_logout_waiter: started
[ 11:30:13 ] user_logout_waiter: X restart detected, preparing switch to intel
[ 11:30:14 ] NVIDIA card will be switched off, NVIDIA offloading will not be available
[ 11:30:14 ] trying switch OFF nvidia: [bbswitch] NVIDIA card is OFF
[ 11:30:14 ] Intel card correctly set
[ 11:30:14 ] HotSwitch: starting Display Manager
[ 11:30:15 ] HotSwitch: completed!
[ 11:41:07 ] Boot: setting-up intel card
[ 11:41:07 ] NVIDIA card will be switched off, NVIDIA offloading will not be available
[ 11:41:07 ] trying switch OFF nvidia: [bbswitch] NVIDIA card is OFF
[ 11:41:07 ] Intel card correctly set
[ 11:41:07 ] HotSwitch: completed!
[ 11:47:05 ] Boot: setting-up intel card
[ 11:47:05 ] NVIDIA card will be switched off, NVIDIA offloading will not be available
[ 11:47:05 ] trying switch OFF nvidia: [bbswitch] NVIDIA card is OFF
[ 11:47:05 ] Intel card correctly set
[ 11:47:05 ] HotSwitch: completed!
[ 11:49:10 ] user_logout_waiter: started
[ 11:49:19 ] user_logout_waiter: X restart detected, preparing switch to intel2
[ 11:49:19 ] NVIDIA card will be switched off, NVIDIA offloading will not be available
[ 11:49:20 ] trying switch OFF nvidia: [bbswitch] NVIDIA card is OFF
[ 11:49:20 ] Intel card correctly set
[ 11:49:20 ] HotSwitch: starting Display Manager
[ 11:49:20 ] HotSwitch: completed!
[ 11:53:20 ] Boot: setting-up intel2 card
[ 11:53:20 ] NVIDIA card will be switched off, NVIDIA offloading will not be available
[ 11:53:20 ] trying switch OFF nvidia: [bbswitch] NVIDIA card is OFF
[ 11:53:20 ] Intel card correctly set
[ 11:53:20 ] HotSwitch: completed!
[ 11:58:49 ] user_logout_waiter: started
[ 11:58:57 ] user_logout_waiter: X restart detected, preparing switch to offload
[ 11:58:58 ] Using default intel modesetting driver for offloading.
[ 11:58:58 ] Unloading bbswitch and switching nvidia ON...
[ 11:58:58 ] Loading nvidia_modules
[ 11:58:59 ] Adding support for NVIDIA Prime Render Offload
[ 11:58:59 ] Intel card correctly set
[ 11:58:59 ] HotSwitch: starting Display Manager
[ 11:59:00 ] HotSwitch: completed!
[ 12:04:38 ] Boot: setting-up offload card
[ 12:04:38 ] Loading nvidia_modules
[ 12:04:39 ] Adding support for NVIDIA Prime Render Offload
[ 12:04:39 ] Intel card correctly set
[ 12:04:39 ] HotSwitch: completed!

Finally I tried to use nvidia mode and the result of this test was the notebook does not come back from sleep and does not start the graphical interface anymore after restart (it doesn’t even show the login screen). Strangely the log says that bbswitch was not loaded despite being installed.

localhost:~ # prime-select nvidia
nvidia catched
Preparing first configuration
bbswitch not loaded

If you want energy saving bbswitch should be loaded in intel mode.
For this package 'bbswitch' needs to be installed on your system.
Or make use of DynamicPowerManagement on Turing GPUs or later by
switching to suse-prime's 'offload' or 'nvidia' mode.
Logout to switch graphics

The other TTYs (e.g. ctrl-alt-F3) have a flashing underscore. Entering recovery mode got stuck in the boot process as in the code below.

[    3.071418][   T537] RIP: 0033:0x7f6d3354f70e
[    3.071424][   T537] Code: 48 8b 0d 05 f7 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d2 f6 0c 00 f7 d8 64 89 01 48
[    3.071431][   T537] RSP: 002b:00007fff7d36ac68 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[    3.071437][   T537] RAX: ffffffffffffffda RBX: 0000564aff52fcf0 RCX: 00007f6d3354f70e
[    3.071441][   T537] RDX: 00007f6d3368105d RSI: 000000000069cd6b RDI: 00007f6d31e79010
[    3.071446][   T537] RBP: 00007f6d3368105d R08: 0000000000261000 R09: 85ebca77c2b2ae63
[    3.071450][   T537] R10: 0000000000041631 R11: 0000000000000246 R12: 0000000000020000
[    3.071454][   T537] R13: 0000000000000000 R14: 0000564aff5697f0 R15: 0000000000000000
[    3.071460][   T537] </TASK>
[    3.071463][   T537] ---[ end trace 0000000000000000 ]---
[    3.970405][   T537] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 1
[    3.973620][   T537] ACPI: video: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[    3.974339][   T537] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDE0:00/input/input7
[    3.978723][   T139] fbcon: i915drmfb (fb0) is primary device
[    3.985978][   T139] Console: switching to colour frame buffer device 240x67
[    3.996316][   T139] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device