clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

Laptop suspension freezes computer #953

Open nsgnn opened 5 years ago

nsgnn commented 5 years ago

Clear Linux Version

Hardware

Steps

  1. Close Laptop lid or select suspend from within Gnome
  2. Wait for screen to sleep.
  3. Attempt to wake device by power button and/or opening laptop lid again.

Expected Result

Actual Result

Notes

thiagomacieira commented 5 years ago

Can you still ping it from the network? Can you ssh into it from another machine?

If so, take a look at dmesg to see if any faults were logged. It may instruct you to extract a fault file from somewhere in /sys to help debug the issue.

nsgnn commented 5 years ago

Can you still ping it from the network? Can you ssh into it from another machine?

No connection during the blank screen. This does remind me that on boot, I get a few different lines telling me about some bugs. They are as follows:

[Firmware Bug]: TSC_DEADLINE disabled to Errata; please update microcode to version: 0xb2 (or later)
[Firmware Bug]: TSC_DEADLINE disabled to Errata; please update microcode to version: 0xb2 (or later)
lebensterben commented 5 years ago

Can you still ping it from the network? Can you ssh into it from another machine? ...

@nsgnn Update your bios may probably fix this

Sent with GitHawk

nsgnn commented 5 years ago

Can you still ping it from the network? Can you ssh into it from another machine? ...

@nsgnn Update your bios may probably fix this

Sent with GitHawk

Going from bios version 306 to 308, the problem persisted. This patch for my bios is the first in 3 years from about a month ago. I no longer get the firmware bug messages on boot though.

lebensterben commented 5 years ago

Exactly, I was referring to that error message. As for the problem with suspension, I had that problem before but only when I connect my display to my motherboard GPU. Since you also has a motherboard GPU, I'd like to know how do you disabled it?

Sent with GitHawk

nsgnn commented 5 years ago

Nvidia drivers are not installed, so I just use the igpu.

nsgnn commented 5 years ago

Update: I installed nvidia drivers, but the problem persists. The iGPU is still enabled in bios though.

lebensterben commented 5 years ago

Update: I installed nvidia drivers, but the problem persists. The iGPU is still enabled in bios though.

@nsgnn From feedback of other users, if they installed NVIDIA proprietary driver then they have to disable iGPU otherwise they will encounter a white screen. Unless your NVIDIA GPU has it's own HDMI/displayport I think you have to disable the iGPU.

I have a desktop computer and if I connect the display to iGPU I will have the same white screen problem.

I suspect that though you installed the NVIDIA driver, it's not enabled. How do you install the driver? Do you followed the instructions in tutorial?

Sent with GitHawk

nsgnn commented 5 years ago

It seems that my drivers were installed, but not active. When activated (I assume), they would give me the white screen. I have no option to disable iGPU in my bios. I guess I will stick to integrated gfx for now. For installation, I used your automation scripts.

lebensterben commented 5 years ago

It seems that my drivers were installed, but not active. When activated (I assume), they would give me the white screen. I have no option to disable iGPU in my bios. I guess I will stick to integrated gfx for now. For installation, I used your automation scripts.

@nsgnn This is very strange.

Sent with GitHawk

nsgnn commented 5 years ago

Update: I have continued to update regularly and am now on version 30500. The issue is reliable enough now that I cant even recreate a scenario in which it does not freeze on sleep/suspension. No internet connection when it is stuck on a black screen. I am using nouveau drivers still.

bryteise commented 5 years ago

Can you suspend if you boot the installation live image? I'm just looking to eliminate the encrypted rootfs as a possible issue with that test.

Have you tried to blacklist or disable (nouveau.modeset=0) the nouveau driver?

agravelot commented 5 years ago

I'm facing a similar issue on my side, i was able to reproduce the issue with both suggestions.

No issue so far on Fedora.

System:
  Host: asterix Kernel: 5.2.2-805.native x86_64 bits: 64 Console: tty 0 
  Distro: Clear Linux OS 30490 1 
Machine:
  Type: Laptop System: ASUSTeK product: GL552VX v: 1.0 
  serial: xxxxxxxxxxxxxxxxxx 
  Mobo: ASUSTeK model: GL552VX v: 1.0 serial: xxxxxxxxxxxxxx 
  UEFI: American Megatrends v: GL552VX.300 date: 09/14/2016 
Battery:
  ID-1: BAT0 charge: 34.5 Wh condition: 34.5/48.2 Wh (72%) 
CPU:
  Topology: Quad Core model: Intel Core i7-6700HQ bits: 64 type: MT MCP 
  L2 cache: 6144 KiB 
  Speed: 3299 MHz min/max: 800/3500 MHz Core speeds (MHz): 1: 3369 2: 3385 
  3: 3436 4: 2303 5: 3300 6: 3370 7: 3466 8: 3302 
Graphics:
  Device-1: Intel HD Graphics 530 driver: i915 v: kernel 
  Device-2: NVIDIA GM107M [GeForce GTX 950M] driver: nvidiafb v: kernel 
  Display: server: X.org 1.20.5 driver: modesetting unloaded: fbdev,vesa 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2) 
  v: 4.5 Mesa 19.2.0-devel 
Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio 
  driver: snd_hda_intel 
  Sound Server: ALSA v: k5.2.2-805.native 
Network:
  Device-1: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter 
  driver: ath9k 
  IF: wlp2s0 state: down mac: xxxxxxxxxxxxxxxxxxx
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  driver: r8169 
  IF: enp3s0f1 state: up speed: 1000 Mbps duplex: full 
  mac: xxxxxxxxxxxxxxxxxxxx
Drives:
  Local Storage: total: 608.29 GiB used: 10.74 GiB (1.8%) 
  ID-1: /dev/sda vendor: Samsung model: SSD 840 PRO Series size: 119.24 GiB 
  ID-2: /dev/sdb vendor: Crucial model: CT525MX300SSD4 size: 489.05 GiB 
Partition:
  ID-1: / size: 116.50 GiB used: 10.74 GiB (9.2%) fs: ext4 dev: /dev/sda3 
  ID-2: swap-1 size: 244.0 MiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda2 
Sensors:
  Missing: Required tool sensors not installed. Check --recommends 
Info:
  Processes: 220 Uptime: N/A Memory: 15.09 GiB used: 1.48 GiB (9.8%) 
  Shell: bash inxi: 3.0.35 
nsgnn commented 5 years ago

I'm waiting on the 30610 release that fixes an issue with live-desktop to try it without luks being a factor as @bryteise suggested.

nsgnn commented 5 years ago

The problem persisted on a live desktop on version 30670. Steps taken were as follows:

  1. boot into live desktop

  2. open terminal and neofetch (just so something was open at least)

  3. hold press power button in gnome menu till it turned to the suspend button.

  4. Press suspend and close laptop lid.

  5. Open laptop lid and attempt to wake.

a-lakhani commented 4 years ago

I'm having this issue on Asus K501UX with Clear 31230. I don't know how to check if the device is still accessible by ssh when it is unresponsive after going to sleep. What other info can I provide to help?

nsgnn commented 4 years ago

I'm having this issue on Asus K501UX with Clear 31230. I don't know how to check if the device is still accessible by ssh when it is unresponsive after going to sleep. What other info can I provide to help?

For me, I used a network ping to check if the laptop was responsive after suspending. In my case, the laptop does not reconnect after attempting to wake.

a-lakhani commented 4 years ago

@thiagomacieira shouldn't this be at least medium priority? Isn't it bad to repeatedly cut power with the power button instead of doing a proper shut down? This bug forces user to do that.

Anyone else having the issue, I tried editing logind.conf.d and edited a Upower.conf file as well but the following is what finally prevented my laptop from going to sleep:

sudo systemd-inhibit --what=handle-lid-switch:handle-suspend-key --mode=block

This way I have the option of merely locking the screen (Super+L) before closing the lid, rather than having to shut down first.

nsgnn commented 4 years ago

This way I have the option of merely locking the screen (Super+L) before closing the lid, rather than having to shut down first.

This seems like a good interim solution for me, but how is the battery life impacted would you say? I would love to go back to CL for my laptop.

a-lakhani commented 4 years ago

I can't answer quantitatively, but the only power savings are from turning off the display. My laptop has poor battery life and I have to stay near an outlet anyways.

If you need to be mobile I would still shutdown or hibernate when taking long breaks.

On Fri, Oct 11, 2019, 6:37 PM Nathan Gazey notifications@github.com wrote:

This way I have the option of merely locking the screen (Super+L) before closing the lid, rather than having to shut down first.

This seems like a good interim solution for me, but how is the battery life impacted would you say? I would love to go back to CL for my laptop.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/953?email_source=notifications&email_token=ANMKU2VZOCZCEG2OU2KLUD3QOES7DA5CNFSM4H4IVN4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBBSALQ#issuecomment-541270062, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANMKU2TVHIM2I6N7MTGWXTTQOES7DANCNFSM4H4IVN4A .

thatcriticguy commented 4 years ago

I've had this issue as well on my ThinkPad Carbon Gen 7. One thing I found in the bios was an option to choose between Windows and Linux system hibernation. I switched to Linux and am doing a reinstall to see if that helps. I'm also curious if the issue comes from no suspend to disk swap enlargement option in the installer?

kujeger commented 4 years ago

Also experiencing the same issue. XPS 13 9343, on clear linux 32340, with latest BIOS (A20). Closing lid or running systemctl suspend completely freezes the system, making it completely unresponsive. Have to forcibly power it off.

Suspending works fine with other distributions (fedora, ubuntu).

nsgnn commented 4 years ago

I believe it has something to do with the suspend vs hibernate. I still wish I could use clear linux without this plaguing my system. Nothing in my bios has options regarding laptop lid close functionality.

nsgnn commented 4 years ago

I swapped back to CL for the time being. I still have this error, and I have looked into a few different forum posts about this issue. I noticed someone talked about cat /sys/power/state listing the supported states the machine can be in. My machine listed freeze mem disk which after looking at the docs is not the one that is being used by my machine. cat /sys/power/mem_sleep reports that the kernal is attempting to use deep, an unsupported power state for my machine. Is there any way that I can change this without breaking anything else? I would love to fix it however, I don't know if changing mem_sleep alone would work fully. Thanks again.

thiagomacieira commented 4 years ago

/sys/power/mem_sleep is writable. So just run as root:

echo s2idle > /sys/power/mem_sleep

Here's the trick to do it with sudo:

echo s2idle | sudo tee /sys/power/mem_sleep
nsgnn commented 4 years ago

@thiagomacieira I used this and it adds it to the output of cat /sys/power/mem_sleep, however it still leaves deep selected. Output from my machine after the given command: cat /sys/power/mem_sleep s2idle [deep] I have seen some other people talking about how to fix this, but it was all in kernal parameters through a grub file. I don't know how to change these on systemd and/or stateless systems. (I know most of what I saw was relating to editing an /etc/ file.)

a-lakhani commented 4 years ago

@thiagomacieira even with s2idle selected I cannot resume from sleep on Clear 32760. I am still having to resort to disabling anything that can cause the system to suspend.

Is there additional info I can provide to help troubleshoot?

tcardenasc commented 1 year ago

I'm having the exact same issue on CL 39400. My specs are about the same as @agravelot 's, 6th gen intel i3 with Nvidia GeForce GTX 920M, with 0 problems on Linux Mint.