I have just installed Ubuntu 22.04 LTS. It works fine but after I suspend the session, the screen remains black after restarting the session.
How can I solve it?
This is my Final Final ;> Answer -
The Network card fix from previous answer had worked for quite a while, but the problem kept coming back.
At this point I had 2 final suspicions,
1. AMD-gpu (graphics driver for the APU)
2. Firmware bug (within AMD processors)
About AMD-gpu: I have tried the Proprietary driver as well as MESA package and all additional drivers, nothing worked.
About Firmware bug: In the community, it is suspected that the power management fails and the device no longer responds, this is somewhat correct, and beyond the fix of my expertise, yet there are things I have done -
confirmed My 2500U has only 2 C states displayed (C1, C2) in power top.
The System setting indicated it was trying up to C8 - at /sys/module/processor/parameters/max_cstate
To limit the C state, I have updated the grub to C2 - at - /etc/default/grub. The C state was limited to the defined value, but the crashing didn't solve.
At this point I didn't find any justification to delve with this issue any further as this is still a live issue in many forums and as I was out of leads to further investigate, It seems the AMD has issues with Linux in it's all forms.
Better to keep away from AMD if you want to do some serious work on Linux.
Update - the solution provided below has not improved the situation in the long term, I had to disconnect the Wi-Fi module and use a cheap USB Wi-Fi dongle.
This is Probably caused by a PCIe adapter (the wifi card for me)- When I checked the driver in use was a Realtek one whereas the device is an Intel one. However, installing the correct driver has prevented the recurrence.
1. How to check the suspected device
I was in search of a good resource monitor and found Flatpack Resources
I was aware of the make of the WIFI card and seeing the Realtek driver it was pretty obvious. kindly, refer to the image.
2. Check the hardware
After finding out the driver in use have a look at the hardware
3. Get the proper drivers
Go to the maker's official website (preferably) and download the appropriate package.
3a. Install the Intel driver
Extract the contents
There will be 2 files, '.ucode' is the driver, and there will also be a 'READ ME' file
Open the 'READ ME' file with any text editor and follow the instructions which is to copy the '.ucode' file to the ' /lib/firmware ' folder.
You have to perform the copy from the command line, with root privileges, GUI will probably not work. The instructions are in the 'READ ME' file, around line 64.
-- You need to cd to the download folder
cd Downloads (keep the '.ucode' file outside to avoid getting into the intel folder again)
-- Check the Resources app to verify the change.
Hopefully, your Ubuntu crash has been solved.
None of these solutions provided below had any lasting effect so far But a solution was found and that is related to the WIFI adapter (PCIe) for laptops, but didn't last long. Kindly refer to the other answer for the solution. I am not deleting any of these answers as most of those updates are unchanged, though hardly had an effect.
**update 3 Another Addition
(if anyone having confusion seeing so many updates please know that I haven't undone any updates that are written, the solution is stacked).
TURN OFF SWAP
(in addition also turned on UEFI boot, the system is much more responsive now. The system was stable even without UEFI)
Disabling the swap didn't work for me (it was re-enabling at reboot, and adding a cron job wasn't my choice ), I had to clear (delete) the swap partition all together. Use Gparted (preinstalled in Ubuntu) it is very intuitive.
swap is the Linux version of paging files in Windows, A segment of Harddisk where data stored in RAM gets shifted if memory uses exceeds the system RAM. Sometimes unchanged data (that is unchanged for a while) also get moved there, even if RAM uses are very minimal.
Ubuntu probably stores some of the data on the Harddrive (even in suspend mode) the hard disk, for my case the laptop has 2 Harddisks (SSD and HDD) the SSD, boot drive for Ubuntu appears in bios as Disk 2, I believe that's the reason behind. If it's a common scenario, please inform the community.*
Pressing the power button sometimes act very delayed or doesn't work, in that case after pressing the power button once. count to 20, if no response, try pressing 'ALT' 'CTRL' + 'F1'
Depending on the system a stable/ unstable (will auto exit) text input field opens, just press 'ESC' and login.
The issue reoccurred
Solution - Just press the power button once, don't hold
please allow sometime after pressing the power button
Some modifications performed after the old answer, are-
Suspecting the swap size is too low (mine is 2gb) and to eliminate multiple writes to the SSD I have changed the lid close function to SUSPEND (suspended stores the data in RAM instead of writing to the disk, beware it's risky) from the /etc/systems/logind.conf. (just delete the # (commenting) before the - lid close suspended option
After that the issue has been reappeared, fortunately, I have found the solution as well.
Hypotheses - probably it's not a graphic driver problem but a deep sleep where all the drivers get shut down and only the power button carries the wake-up signal
(AMD integrated graphics laptop) (Tested for 5 lid down cycles over 2 days, no contradictions yet)