3

If i suspend ubuntu 23.04 on my lenovo laptop, when i wake up again from suspention,the login menu appear but i cant login and it seems buggy, or the screen remain all black, and either way i cant login.And if happens to show the login menu,i can't type the password to enter gnome, and i have again to force shutdown. Is this a bug that everyone is having? and will be there a a update to fix this?

i have installed Mate desktop and the same issue happens, i cant login back to the desktop. i suspect it migth also be true for other desktops like kde,xfce and so on.

And suspend works fine with windows 11 on my laptop.

And is anyone having the same issue, and will be there an update to fix this? Also i cant wake from the suspend mode by pressing a key, like the space, i have to touch the power button,this feature works fine in windows 11. And i want to be able to wake up the system by pressing any key on the keyboard like the space bar.

i have all the updates installed on the system.Is anyone else having the same issues?and is there going to be updates to fix the suspention?

And with the live installation of ubuntu 23.04, suspention, work fine, although i dont have to type my password to get in, and maybe that is the issue(the login menu of ubuntu) since when i wake up the system from suspention i try to type the password but nothing is written in the box of the login, and i have to force shutdown to login into the system But now with the new updates the screen remains all black and not even the login menu to enter the password is showned.

And i have all the updates installed and still suspention is not working.

And there is a way to tell canonical about this issue so that they fix it and make it availble the fix through the updates, and that way everyone wins, and i can use ubuntu and to suspend like i can with windows 11.

to reply to the comment:

$ journalctl --grep='sleep|suspend|resume' --no-pager --since='-1day'
-- Boot 5b9075975011418a8623c03e696c438e --
 02 23:53:34 tiago-82R9 kernel: Low-power S0 idle used by default for system suspend
ago 02 23:53:34 tiago-82R9 kernel: nvme 0000:03:00.0: platform quirk: setting simple suspend
-- Boot ff73e99787f547eba07be38b5d8d78d8 --
ago 02 23:00:28 tiago-82R9 NetworkManager[1025]: <info>  [1691013628.3479] device (wlp2s0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
ago 02 23:00:28 tiago-82R9 NetworkManager[1025]: <info>  [1691013628.4410] device (wlp2s0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
ago 02 23:00:32 tiago-82R9 systemd[1]: Reached target sleep.target - Sleep.
ago 02 23:00:32 tiago-82R9 systemd[1]: Starting systemd-suspend.service - System Suspend...
ago 02 23:00:32 tiago-82R9 systemd-sleep[3179]: Entering sleep state 'suspend'...
ago 02 23:00:32 tiago-82R9 kernel: PM: suspend entry (s2idle)
-- Boot e384d25878a74233ba46678dcb0390de --
ago 02 23:02:21 tiago-82R9 kernel: Low-power S0 idle used by default for system suspend

AMD Ryzen™ 5 5500U with Radeon™ Graphics × 12 AMD Radeon™ Graphics

And i have installed debian 12 and suspention also doesnt work correctly(i cant login back after suspend), and since ubuntu is based on debian, perhapes is a issue that starts there

I installed kde on ubuntu 23.04 and with that i change the login menu to the kde,sddm, and even with this, i cant login back on the system either using gnome or kde,after suspend the system.

is there a way to inform canonical to fix this, the suspention mode , and so it will be fix and update so i can update my system and the suspend mode works as it work in my laptop with windows 11.And to add the feature to wake up from suspend mode by pressing a key.

This is must on any modern system, to have suspend mode to be working on any os, and so far with ubuntu 23.04 is not working.

And i have all the updates installed, and i can not use my computer with ubuntu 23.04, since suspend is a thing i use very often when i use my lenovo laptop.

Is there any adicional information i can provide about my laptop, so that it helps to solve this issue ?

  • Assuming this issue occurred at least once in the past day, please [edit] your question to include the output of `journalctl --grep='sleep|suspend|resume' --no-pager --since='-1day'` and also include your machine's hardware specifications like CPU, GPU, chips … etc. – Raffa Aug 02 '23 at 07:09
  • i had boot from the oldest linux kernel of 23.04 and suspention also doesnt work – Tiago Earth Aug 14 '23 at 23:13
  • Is there any adicional information i can provide about my laptop, so that it helps to solve this issue ? – Tiago Earth Aug 30 '23 at 22:04

2 Answers2

1

The output of journalctl --grep='sleep|suspend|resume' --no-pager --since='-1day' tells you that your system power saving mode is in S0:

kernel: Low-power S0 idle used by default for system suspend

And that will default to the sleep state s2idle:

kernel: PM: suspend entry (s2idle)

... form which, your system seems to never come back up ... Probably due to unsupported/unstable/misconfigured/buggy firmware/settings of an NVME storage device:

kernel: nvme 0000:03:00.0: platform quirk: setting simple suspend

A workaround might be to force your system into power management mode S3 which will default to the sleep state deep.

Confirm that first with:

cat /sys/power/mem_sleep

which should return s2idle set as default:

[s2idle] deep

Notice: deep has to be already there(although not selected) for the next step to work ... i.e. you don't add it by writing to that file, but rather select it by writing to that file if it's already there ... If it's not there already, then it means your system isn't capable of entering the deep power saving sleep state and that is caused mainly by either your system not having S3 power saving mode built in(which is very rare these days) or S3 is not enabled/configured correctly in the BIOS(which you can fix by changing some BIOS settings) or you made changes to your system's hardware/software that disables S3 power saving mode and in these cases you will get tee: /sys/power/mem_sleep: Invalid argument error in the next step.

Then, change that to deep like so:

echo "deep" | sudo tee /sys/power/mem_sleep

Then, confirm the change with:

cat /sys/power/mem_sleep

which should now return:

s2idle [deep]

Then, test suspending your system which hopefully will suspend and then resume normally.

Then, after resuming, check with:

journalctl --grep='sleep|suspend|resume' --no-pager --since='-1hour'

and make sure that your system has actually changed to and entered the deep sleep state then resumed successfully afterwards ... You should see something like:

systemd[1]: Starting System Suspend...
systemd-sleep[55874]: Entering sleep state 'suspend'...
kernel: PM: suspend entry (deep)
kernel: ACPI: PM: Preparing to enter system sleep state S3
kernel: ACPI: PM: Low-level resume complete
kernel: ACPI: PM: Waking up from system sleep state S3
systemd-sleep[55874]: System returned from sleep state.
kernel: PM: suspend exit

If all goes well, then you might want to make the change to S3 power management mode permanent by e.g. adding the kernel boot parameter mem_sleep_default=deep to your /etc/default/grub file by changing the line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mem_sleep_default=deep"

then, updating GRUB with:

sudo update-grub

then, rebooting your machine.

If, however, that didn’t work to restore your system's normal power saving management functionality, then I would suggest you boot to an older kernel and see if power saving management will work as this seems to have been caused by some kind of incompatibility or update probably kernel or some hardware(nvme related in particular) firmware.

Raffa
  • 24,905
  • 3
  • 35
  • 79
  • i follow the first lines but some errors occur but i tried to sleep the computer and the same error occur i couldnt get in, sometimes a black screen sometimes the login blue screen to enten my password ,but i type and nothing appear and even type the password and enter, i cant login.Also i cant wake uo the system by pressing a key,like the space , i have to power button – Tiago Earth Aug 06 '23 at 17:45
  • @TiagoEarth Please see the answer update and check this related question https://askubuntu.com/q/1482191 – Raffa Aug 13 '23 at 17:34
  • when i type [s2idle] deep it says:[s2idle]: comando não encontrado(command not found in english). when i type sudo sh -c 'echo "deep" > /sys/power/mem_sleep' it returns sh: 1: echo: echo: I/O error – Tiago Earth Aug 13 '23 at 17:58
  • and suspention still doesnt work – Tiago Earth Aug 13 '23 at 18:03
  • @TiagoEarth I changed that to `echo "deep" | sudo tee /sys/power/mem_sleep` … Please try it it should work without error now – Raffa Aug 13 '23 at 18:27
  • @TiagoEarth Please also note that you don’t type `[s2idle] deep` … that should be the output of the command `cat /sys/power/mem_sleep` – Raffa Aug 13 '23 at 18:33
  • by typing in the terminal echo "deep" | sudo tee /sys/power/mem_sleep it says tee: /sys/power/mem_sleep: Argumento inválido( invalid argumment in english) – Tiago Earth Aug 13 '23 at 21:18
  • @TiagoEarth I updated the answer with explanation for that. – Raffa Aug 14 '23 at 11:08
  • i just installed normally ubuntu, and did the updates, and with windows 11 on the same laptop it work perfectly, i can suspend the system and wake up without a problem and i even can wake up the system by pressing the space bar what i cant with ubntu using gnome – Tiago Earth Aug 15 '23 at 22:36
1

Just an idea: Maybe the OP should try disabling the GPU's ULPS (Ultra-low power state) feature also marketed as "AMD ZeroCore Power" technology*. The screen staying black after some sort of energy-saving, a common problem based on ULPS malfunction, hints to give it a try.

Unfortunately, I do not know how to deactivate (or re-enable) the ULPS feature in Linux distributions.

* = compare https://en.wikipedia.org/wiki/Graphics_Core_Next#ZeroCore_Power