Problema al dormir en memoria con batería

Hola, buenas.

Tengo un problema que me resulta bastante molesto, hay personas que han tenido el mismo problema o similar en la categoría inglesa del foro, la mayoría solucionadas de formas distintas, así que he decidido crear un tema para este caso en concreto:

Tengo el sistema instalado en mi portátil, cuando lo pongo a dormir en memoria (suspender), y lo “despierto”, no aparece una pantalla de bloqueo sino una pantalla en negro con un cursor de terminal. No puedo escribir nada, pero reconoce los atajos de teclado para cambiar de tty. Hice Ctrl+Alt+F1 y el cursor desapareció. Siempre tengo que forzar el apagado cada vez que esto pasa.
Sólo ocurre cuando no tengo el portátil conectado a la corriente.

Aquí la información del equipo:

$ inxi --admin --verbosity=7 --filter --no-host --width

System:
  Kernel: 5.14.10-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.14-x86_64
  root=UUID=54bc3c2d-2961-42cb-8e7f-0757f065ca6f rw nouveau.modset=0 quiet
  udev.log_priority=3
  Desktop: KDE Plasma 5.22.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
  Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 81FV v: Lenovo Legion Y530-15ICH
  serial: <filter> Chassis: type: 10 v: Lenovo Legion Y530-15ICH
  serial: <filter>
  Mobo: LENOVO model: LNVNB161216 v: SDK0R32862 WIN serial: <filter>
  UEFI: LENOVO v: 8JCN52WW date: 06/14/2019
Battery:
  ID-1: BAT0 charge: 25.4 Wh (59.1%) condition: 43.0/52.5 Wh (81.9%)
  volts: 12.4 min: 11.2 model: SMP L17M3PG1 type: Li-poly serial: <filter>
  status: Charging
Memory:
  RAM: total: 15.51 GiB used: 2.02 GiB (13.0%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: 6-Core model: Intel Core i7-8750H bits: 64 type: MT MCP
  arch: Kaby Lake note: check family: 6 model-id: 9E (158) stepping: A (10)
  microcode: EA cache: L2: 9 MiB bogomips: 52815
  Speed: 899 MHz min/max: 800/4100 MHz Core speeds (MHz): 1: 899 2: 900 3: 900
  4: 900 5: 900 6: 900 7: 900 8: 900 9: 900 10: 900 11: 900 12: 900
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon art
  avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid
  cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est
  f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window
  hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm lm
  mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat
  pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts
  rdrand rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1
  sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust
  tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt
  xsaves xtopology xtpr
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
  mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
  mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
  IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: Lenovo
  driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:3e9b class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: Lenovo
  driver: nvidia v: 470.63.01 alternate: nouveau,nvidia_drm bus-ID: 01:00.0
  chip-ID: 10de:1c8d class-ID: 0300
  Device-3: IMC Networks Integrated Camera type: USB driver: uvcvideo
  bus-ID: 1-6:2 chip-ID: 13d3:56a6 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver:
  loaded: modesetting,nvidia alternate: fbdev,nouveau,nv,vesa display-ID: :0
  screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
  s-diag: 582mm (22.9")
  Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 142 size: 344x194mm (13.5x7.6")
  diag: 395mm (15.5")
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 21.2.3
  direct render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Lenovo driver: snd_hda_intel
  v: kernel alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
  chip-ID: 8086:a348 class-ID: 0403
  Sound Server-1: ALSA v: k5.14.10-1-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.19 running: no
  Sound Server-4: PulseAudio v: 15.0 running: yes
  Sound Server-5: PipeWire v: 0.3.38 running: yes
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
  bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
  broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
  vendor: Lenovo driver: r8169 v: kernel port: 3000 bus-ID: 07:00.0
  chip-ID: 10ec:8168 class-ID: 0200
  IF: enp7s0 state: down mac: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
  driver: btusb v: 0.8 bus-ID: 1-14:3 chip-ID: 8087:0aaa class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 3 state: down bt-service: enabled,running
  rfk-block: hardware: no software: yes address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 1.33 TiB used: 39.47 GiB (2.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston model: SA2000M8500G
  size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
  lanes: 4 type: SSD serial: <filter> rev: S5Z42105 temp: 26.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Kingston model: SA400S37960G
  size: 894.25 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
  type: SSD serial: <filter> rev: K1C3 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 80 GiB size: 78.19 GiB (97.74%) used: 39.44 GiB (50.4%)
  fs: ext4 dev: /dev/nvme0n1p4 maj-min: 259:4 label: N/A
  uuid: 54bc3c2d-2961-42cb-8e7f-0757f065ca6f
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
  used: 27.6 MiB (28.7%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  label: N/A uuid: 2242-8E55
Swap:
  Alert: No swap data was found.
Unmounted:
  ID-1: /dev/nvme0n1p2 maj-min: 259:2 size: 16 MiB fs: <superuser required>
  label: N/A uuid: N/A
  ID-2: /dev/nvme0n1p3 maj-min: 259:3 size: 385.65 GiB fs: ntfs label: N/A
  uuid: 5ACA40CDCA40A6DB
  ID-3: /dev/sda1 maj-min: 8:1 size: 16 MiB fs: <superuser required>
  label: N/A uuid: N/A
  ID-4: /dev/sda2 maj-min: 8:2 size: 894.24 GiB fs: ntfs label: SSD 1TB
  uuid: 2C6838B66838809E
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 16 rev: 2.0
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-6:2 info: IMC Networks Integrated Camera type: Video
  driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
  chip-ID: 13d3:56a6 class-ID: 0e02 serial: <filter>
  Device-2: 1-14:3 info: Intel Bluetooth 9460/9560 Jefferson Peak (JfP)
  type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s
  power: 100mA chip-ID: 8087:0aaa class-ID: e001
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 8 rev: 3.1 speed: 10 Gb/s
  chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 52.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 286 Uptime: 18m wakeups: 1 Init: systemd v: 249 tool: systemctl
  Compilers: gcc: 11.1.0 Packages: 1388 note: see --pkg pacman: 1379 lib: 442
  snap: 9 Shell: Bash v: 5.1.8 running-in: alacritty inxi: 3.3.08

El problema podria estar relacionado con los drivers de video?
Si alguien sabe lo que pasa y/o como solucionarlo me haría un gran favor.
Gracias de antemano.

Hola.
No sé mucho del tema pero: ¿tienes una partición swap de al menos 16GB?

Hola

No tengo una partición swap, voy a crear una de 16 GB como has dicho a ver si funciona.

Vale ya está montada (a la izquierda de la partición principal):

$ inxi --admin --verbosity=7 --filter --no-host --width

...

Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 16 GiB used: 0 KiB (0.0%) priority: -2
  dev: /dev/nvme0n1p5 maj-min: 259:5 label: N/A
  uuid: a1f88276-5861-4544-8971-7e6c187bb7f5

...

No obstante el problema persiste

Hola.
He estado investigando por ahí y, por lo visto, podría ser del kernel. Prueba a instalar y ejecutar el 5.10.70-1 LTS. Después de crear la partición SWAP hay que indicarle al kernel que tiene que despertar desde la SWAP con el parámetro resume=swap_partition (ejemplo: resume=UUID=4209c845-f495-4c43-8a03-5363dd433153). También podría ser debido a la tarjeta gráfica, ya que dices que sólo te pasa cuando usas la batería, o de alguna configuración de energía en la BIOS.
Espero que estos enlaces sean de ayuda.
https://wiki.archlinux.org/index.php/Power_management_(Español)/Suspend_and_hibernate_(Español)#Suspender/hibernar_no_funciona_o_no_es_consistente

https://forums.linuxmint.com/viewtopic.php?t=247359