<SOLVED> Mint doesn't recover from sleep

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

SMG wrote: Sat Apr 17, 2021 9:24 am How are you "using the Nvidia driver"?
I tried using the nvidia driver because it was marked as recommended and even if currently I'm not playing video games, I might try playing some with whine soon.
This is a screenshot of the driver manager window.
I'm not sure if this is the information that you where looking fore, if not I'll be happy to answer.

SMG wrote: Sat Apr 17, 2021 9:24 am
Your computer has dual graphics (Intel-Nvidia) and most people installing LM20.1 have been running into an issue with the nvidia-prime-applet not working properly due to some bugs in related files. That bug causes a problem when trying to switch to nvidia, but it has not affected all computers the same way. (Probably because not all computers set up dual graphics the same way.) There is a fix which has helped most people, but I want to understand what is happening in your case before making recommendations.
Do you need the output of other terminal commands?
SMG wrote: Sat Apr 17, 2021 9:24 am Your system is currently using the Intel driver to render graphics.

Graphics:
Device-1: Intel HD Graphics 630 vendor: Hewlett-Packard driver: i915
v: kernel bus ID: 00:02.0 chip ID: 8086:591b
Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: Hewlett-Packard
driver: nouveau v: kernel bus ID: 01:00.0 chip ID: 10de:1c8d
Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa
resolution: 1920x1080~60Hz
OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 20.2.6
direct render: Yes
I'm not sure if it could be useful but I have a strange diagonal that appears when I move windows.
This is a wetransfer link of a 4MB video recording of my screen.
This last problem is nothing particularly disturbing but since my problem regards graphics I thought it could be useful.
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Mint doesn't recover from sleep

Post by SMG »

DavidMKane wrote: Sat Apr 17, 2021 10:39 amI tried using the nvidia driver because it was marked as recommended and even if currently I'm not playing video games, I might try playing some with whine soon.
This is a screenshot of the driver manager window.
I'm not sure if this is the information that you where looking fore, if not I'll be happy to answer.
When one "uses" the nvidia driver, one installs it and switches from using Intel to using Nvidia with the nvidia-prime-applet or using terminal commands.

If all you did was install it and continue to use Intel, then it is possible it did not install properly or the bug may have affected its install. After installing it and rebooting, you would run inxi -Gx and check to verify the nvidia-prime-applet in the panel.
DavidMKane wrote: Sat Apr 17, 2021 10:39 amI'm not sure if it could be useful but I have a strange diagonal that appears when I move windows.
This is a wetransfer link of a 4MB video recording of my screen.
This last problem is nothing particularly disturbing but since my problem regards graphics I thought it could be useful.
It's possible a kernel upgrade to 5.8 might help with that, but I'm not sure exactly what it is, so I do not know if a kernel upgrade will help. The 5.8 kernel is available for install in Update Manager.

Open Update Manager. Select View > Linux Kernels and click Continue. Make sure 5.8 is selected on the left panel and then click the top-most option on the right panel. An "Install" button will appear. Install the kernel and then reboot for it to become active.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

SMG wrote: Sat Apr 17, 2021 12:46 pm When one "uses" the nvidia driver, one installs it and switches from using Intel to using Nvidia with the nvidia-prime-applet or using terminal commands.

If all you did was install it and continue to use Intel, then it is possible it did not install properly or the bug may have affected its install. After installing it and rebooting, you would run inxi -Gx and check to verify the nvidia-prime-applet in the panel.
I installed the nvidia driver using the build in program called driver manager and to me it looks as the driver is actually installed and in use, but for safety the output of inxi -Gx now is:

Code: Select all

~$ inxi -Gx
Graphics:
  Device-1: Intel HD Graphics 630 vendor: Hewlett-Packard driver: i915 
  v: kernel bus ID: 00:02.0 
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Mobile] vendor: Hewlett-Packard 
  driver: nvidia v: 460.56 bus ID: 01:00.0 
  Display: x11 server: X.Org 1.20.9 driver: modesetting,nvidia 
  unloaded: fbdev,nouveau,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: GeForce GTX 1050/PCIe/SSE2 v: 4.6.0 NVIDIA 460.56 
  direct render: Yes 
Unfortunately as soon as I installed the nvidia driver the laptop stopped waking from sleep mode, do you have any idea on what I could do to solve this issue? :)
SMG wrote: Sat Apr 17, 2021 12:46 pm It's possible a kernel upgrade to 5.8 might help with that, but I'm not sure exactly what it is, so I do not know if a kernel upgrade will help. The 5.8 kernel is available for install in Update Manager.

Open Update Manager. Select View > Linux Kernels and click Continue. Make sure 5.8 is selected on the left panel and then click the top-most option on the right panel. An "Install" button will appear. Install the kernel and then reboot for it to become active.
I installed the most recent kernel ( 5.8.0-50-generic ) and the strange diagonal line issue seems to be solved, thanks. :D
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Mint doesn't recover from sleep

Post by SMG »

DavidMKane wrote: Sat Apr 17, 2021 6:20 pmUnfortunately as soon as I installed the nvidia driver the laptop stopped waking from sleep mode, do you have any idea on what I could do to solve this issue?
If you powered off the laptop and then powered it back on, then please provide the url which is returned from running this command:
journalctl -rb -1 | nc termbin.com 9999
It prints the journal log information of the prior boot cycle in reverse order (so the cause of the non-resumption should be near the top) and sends it to termbin.

If you tested the Nvidia driver during a suspension and powered off the laptop and then installed the 5.8 kernel and rebooted then use this command:
journalctl -rb -2 | nc termbin.com 9999
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

SMG wrote: Sat Apr 17, 2021 6:56 pm
DavidMKane wrote: Sat Apr 17, 2021 6:20 pmUnfortunately as soon as I installed the nvidia driver the laptop stopped waking from sleep mode, do you have any idea on what I could do to solve this issue?
If you powered off the laptop and then powered it back on, then please provide the url which is returned from running this command:
journalctl -rb -1 | nc termbin.com 9999
It prints the journal log information of the prior boot cycle in reverse order (so the cause of the non-resumption should be near the top) and sends it to termbin.

If you tested the Nvidia driver during a suspension and powered off the laptop and then installed the 5.8 kernel and rebooted then use this command:
journalctl -rb -2 | nc termbin.com 9999
This is the termbin link. I used the code journalctl -rb -1 | nc termbin.com 9999 since I installed the kernel and afterwards I tried the nvidia drivers.
I'm almost sure that was the order that I followed but for safety this is the output of the second code that you provided.
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Mint doesn't recover from sleep

Post by SMG »

DavidMKane wrote: Sat Apr 17, 2021 7:29 pmI'm almost sure that was the order that I followed but for safety this is the output of the second code that you provided.
Yes, this is the boot cycle where you installed the Nvidia driver and then rebooted the computer.
DavidMKane wrote: Sat Apr 17, 2021 7:29 pmThis is the termbin link. I used the code journalctl -rb -1 | nc termbin.com 9999 since I installed the kernel and afterwards I tried the nvidia drivers.
This boot cycle has the Nvidia drivers installed, but there is no sleep/suspend session initiated in it. The computer was started, it appears something was done on the terminal, and then the cinnamon logout sound happened which is usually the normal start to a shutdown on a computer with the Cinnamon desktop.

The three lines below are the screensaver coming onto the bus which normally happens right around the time the Cinnamon desktop loads. Then less than two minutes later the logout sound is played and the shutdown process begins. Within four seconds the system is shut down.

Code: Select all

Apr 18 01:19:29 Patronus-Mint cinnamon-session[1398]: WARNING: t+7,68814s: Detected that screensaver has appeared on the bus

Apr 18 01:21:15 Patronus-Mint cinnamon-session[1398]: WARNING: t+114,18437s: Playing logout sound '/usr/share/mint-artwork/sounds/logout.ogg'

Apr 18 01:21:19 Patronus-Mint systemd-journald[372]: Journal stopped
What steps are you taking to suspend/sleep the laptop?
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

SMG wrote: Sat Apr 17, 2021 8:52 pmWhat steps are you taking to suspend/sleep the laptop?
Since I have installed the applet "User Applet" I press on the user icon, I press on power off and then in the menu that appears in the middle of the screen with the fours options (suspend restart cancel shutdown) I select suspend. If you need I can post a video of the process.
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Mint doesn't recover from sleep

Post by SMG »

DavidMKane wrote: Sat Apr 17, 2021 9:23 pm If you need I can post a video of the process.
Not needed. I understand what you are doing.

Based on that log it appears the reason your computer is not recovering from sleep is because it is not going to sleep. I have no idea why something different might be happening based on what graphics driver is installed.

Check in your computer's BIOS/UEFI to see if there are any settings options for Graphics card or power states. Some laptops with dual graphics give the option to change what can be used based on a firmware setting. Some laptops also give options for power states such as what happens when the lid is closed while the computer is still powered. You do not need to change any of the settings; just let us know what is there as it might help us figure out what is happening.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

SMG wrote: Sun Apr 18, 2021 9:19 am
DavidMKane wrote: Sat Apr 17, 2021 9:23 pm If you need I can post a video of the process.
Not needed. I understand what you are doing.

Based on that log it appears the reason your computer is not recovering from sleep is because it is not going to sleep. I have no idea why something different might be happening based on what graphics driver is installed.

Check in your computer's BIOS/UEFI to see if there are any settings options for Graphics card or power states. Some laptops with dual graphics give the option to change what can be used based on a firmware setting. Some laptops also give options for power states such as what happens when the lid is closed while the computer is still powered. You do not need to change any of the settings; just let us know what is there as it might help us figure out what is happening.
I looked in the BIOS/UEFI settings and there is nothing of the settings that you mentioned, my bios is pretty basic, classic grey and blue bios menu.
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Mint doesn't recover from sleep

Post by SMG »

I'm helping someone with a different HP laptop and that BIOS/UEFI is also quite sparse. When Nvidia was installed on that computer, the nvidia-prime-applet needed the fix to work properly and switch to Nvidia rendering. Your computer switched as soon as Nvidia was installed. To me, that means HP is designing these computers slightly differently which makes the troubleshooting more challenging.

If the nouveau driver works for you, then you do not have to use Nvidia.

If you want to use Nvidia, take a one-time Timeshift snapshot and then see if you can switch to On-Demand mode using the applet and reboot to activate that mode. Does the computer go to sleep in that mode?

Because there is no setting in BIOS/UEFI for graphics and your laptop is not responding the way others are, I'm not sure if the On-Demand mode will activate the way it normally does. That's why I want you to take a snapshot.

Timeshift can be run manually and saved to an external drive. Here is the method I use How to Use Timeshift to Backup and Restore Linux Mint 19 Systems from USB Drive. The default is to save Timeshift to your hard drive in your root directory, but that will take up space. Your choice as to whether to save it externally or on your drive. Both ways work.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

SMG wrote: Sun Apr 18, 2021 11:43 am I'm helping someone with a different HP laptop and that BIOS/UEFI is also quite sparse. When Nvidia was installed on that computer, the nvidia-prime-applet needed the fix to work properly and switch to Nvidia rendering. Your computer switched as soon as Nvidia was installed. To me, that means HP is designing these computers slightly differently which makes the troubleshooting more challenging.

If the nouveau driver works for you, then you do not have to use Nvidia.

If you want to use Nvidia, take a one-time Timeshift snapshot and then see if you can switch to On-Demand mode using the applet and reboot to activate that mode. Does the computer go to sleep in that mode?
I tried the on-demand setting but my computer didn't recover from sleep.

Not sure if it is relevant but every time I tried some things on the nvidia driver I fresh install it and afterwards I reboot the system because at the moment I'm using the nouveau driver for daily tasks in order to use the sleep function.

The only difference that I noticed between the nvidia and nouveau driver (not considering the sleep problem) is that it seams as the strange diagonal line that I previously talked about appears only with the nouveau one and in particular only on the external monitor that I use (the laptop screen is fine).
If you have additional ideas on how to fix the problem it will be grate, otherwise I think I'll just stick with the nouveau driver and the diagonal line.

In every circumstance thank you for your help, it was very appreciated. :D
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Mint doesn't recover from sleep

Post by SMG »

DavidMKane wrote: Sun Apr 18, 2021 5:49 pmThe only difference that I noticed between the nvidia and nouveau driver (not considering the sleep problem) is that it seams as the strange diagonal line that I previously talked about appears only with the nouveau one and in particular only on the external monitor that I use (the laptop screen is fine).
If you have additional ideas on how to fix the problem it will be grate, otherwise I think I'll just stick with the nouveau driver and the diagonal line.
I am not sure from your description what it might be. You mentioned earlier in the thread that upgrading to the 5.8 kernel removed the line. Was it on both monitors then or maybe just switching to the Nvidia driver removed the line? If you can post a photo of it, that would be helpful.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

SMG wrote: Sun Apr 18, 2021 7:12 pm I am not sure from your description what it might be. You mentioned earlier in the thread that upgrading to the 5.8 kernel removed the line. Was it on both monitors then or maybe just switching to the Nvidia driver removed the line? If you can post a photo of it, that would be helpful.
This diagonal line is visible usually when I move windows around or when I scroll a window (like a web page). After the kernel update It looked all fine because I switched to the nvidia driver right away and checked the diagonal line issue only afterwards (with the nvidia driver it there is no diagonal line).
Photo 1
Photo 2
Photo 3
Photo 4
(I'm aware that in the photos the webcam is switched on).
In the first photo I was moving the window around and in the others I was scrolling the web page.
Hope this images can help understand the issue :D .
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

Hi,
Do you think it could be an option to try using an older driver? or it will turn out in even more issues?
The driver suggested by the system driver manager are this.

I noticed that while using the Nvidia driver the system looks a bit smother and the cpu usage seams lower, I think it could be due to the os using hardware acceleration (just an hypothesis).
Using the Nvidia driver I noticed that the os doesn't recognize the external monitor as audio output (when i use the noveau driver the audio output is fine).
This audio problem isn't much of a problem, if I had to chose between the diagonal line and the audio output I'll go with the line, hoping that the sleep issue can be fixed.
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Mint doesn't recover from sleep

Post by SMG »

DavidMKane wrote: Mon Apr 19, 2021 5:33 amDo you think it could be an option to try using an older driver? or it will turn out in even more issues?
The driver suggested by the system driver manager are this.
There are a number of people who stayed with the Nvidia-450 because of issues the Nvidia-460 created with their install. There are many different factors because of all of the hardware combinations possible, so there is not specifically anything "wrong" with the Nvidia-460, but you do not have to be on the latest version if a prior version works better for you.

Give the Nvidia-450 a try. I do not have any guesses why the system is shutting down when you tell it to suspend when the Nvidia-460 is installed. That means I do not have any guesses whether the Nvidia-450 will work better on your system.
DavidMKane wrote: Mon Apr 19, 2021 5:33 amUsing the Nvidia driver I noticed that the os doesn't recognize the external monitor as audio output (when i use the noveau driver the audio output is fine).
There might be a way to correct that audio issue when Nvidia is installed, but You would have to post a new thread in the Audio & codec section of the forum. I'm currently only at the beginner level on audio troubleshooting. There might be threads there already about this issue. I seem to recall reading titles which suggest that might be the case.
DavidMKane wrote: Mon Apr 19, 2021 5:33 amThis audio problem isn't much of a problem, if I had to chose between the diagonal line and the audio output I'll go with the line, hoping that the sleep issue can be fixed.
That diagonal line issue is "interesting". This is the first I've seen it. Since it is only affecting the external monitor, there must be something about how nouveau is seeing port/cable/monitor that is different than how Nvidia sees it. That is my guess at this point. I have not done much nouveau driver issue troubleshooting. If you decide to stay with it and want help eliminating the issue, I suggest creating a new thread in the Graphics and Monitors section of the forum. There are others who have more experience using that driver who may recognize the issue and/or have suggestions.
DavidMKane wrote: Mon Apr 19, 2021 3:58 amIn the first photo I was moving the window around and in the others I was scrolling the web page.
If the issues seem to be mostly related to using the browser, there are settings within the browser about using hardware acceleration and other options which can be changed which might help with the issue.

Let us know how the Nvidia-450 works for you.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Mint doesn't recover from sleep

Post by SMG »

Image
A woman typing on a laptop with LM20.3 Cinnamon.
User avatar
DavidMKane
Level 1
Level 1
Posts: 23
Joined: Sat Apr 10, 2021 11:00 am
Location: Italy

Re: Mint doesn't recover from sleep

Post by DavidMKane »

SMG wrote: Mon Apr 19, 2021 3:33 pm Let us know how the Nvidia-450 works for you.
I passed to the nvidia driver 450 and now it looks all perfect: the line is not showing up, the audio output gets recognise and most important the computer is able to wake from sleep.

Thank you very much, it was very kind from you to be so helpful in solving this problem. :D :D :D

I'm sorry that I still haven't responded to the post regarding the logitech mouse, but in the last days I used my free time to solve this sleep problem that was more important compared to assigning some fancy shortcuts to a mouse that already does all it's primary actions.
Today I took a look to the program that you suggested installing for the logitech mouse and I'm still figuring out how to install it, If I'll manage I'll mark that post as solved but in the meanwhile I think this post finally can be considered as solved.
Again thank you very much for your help :D .
User avatar
SMG
Level 25
Level 25
Posts: 31971
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: <SOLVED> Mint doesn't recover from sleep

Post by SMG »

Glad to hear all is working well now. I did not realize the Nvidia driver might have been the cause, so thanks for the feedback. I will keep that in mind when helping others.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Locked

Return to “Installation & Boot”