Suspend and hibernate does not work on Debian buster on Asus UX501V notebook
Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Some laptops have this amazingly annoying tendency to either refuse to suspend unless the screen / lid is shut, or sometimes wake up from suspend when the lid is shut. Which one are you doing?
So it looks like the system goes to sleep for a few seconds, then wakes up. Here's some thoughts.
First off, would it be possible to try this same experiment (suspending the computer) with a different distribution, preferably not Debian or something Debian-based, possibly a live CD or the like? If it only appears in Debian, then it's worthy of a Debian bug report. If not, either there's a long-running kernel bug (or other bug), or it's a hardware fault.
Second, what devices do you have attached to this laptop? I've heard a few reports of beacon signals from wireless routers waking laptops up from suspend if the laptop was connected to a wireless network at the time of suspend, or if the laptop has a specially configured wireless receiver attached. Bluetooth devices are also known problems. I used to have problems with the hyper-sensitivity of the lid switch on my old laptop (so old you could see and touch the switch), but if this happens no matter what position the switch is in, I don't think it's a lid switch problem.
Third, so this fails even for hibernate mode? Hibernation (suspend state S4) is almost identical to shutdown (suspend state S5), but some systems can be woken up from one state but not the other due to external devices. Please upload the contents of the file /proc/acpi/wakeup -- it lists (most of) the devices authorized to wake the system up, and what sleep state they can wake the system up from. So a line like this (excerpt from my own /proc/acpi/wakeup file):
Code:
PS2K S4 *enabled pnp:00:08
...would indicate that I can tap on a key on the keyboard and wake the computer up, even in hibernate mode. But in system shutdown mode, I could not wake the computer up using the keyboard -- I'd have to refer to the trusty (and rusty -- this system's pretty old now) power button, or...
Code:
UAR1 S5 *disabled pnp:00:05
...the trusty serial port, which as you can see right now I can't wake the system up using the serial port; to enable that, I'd use:
Code:
echo UAR1 > /proc/acpi/wakeup
...as root.
Finally, I'll note that some laptops that I've seen will immediately wake up from suspend if the battery starts to run low. Is the battery charged up?
Last edited by The Squash; 06-28-2020 at 09:08 PM.
Disabling XHC in /proc/acpi/wakeup has solved the issue, temporarily (after reboot notebook wakes up again from suspend).
Code:
sudo -s
echo XHC > /proc/acpi/wakeup
Answering (at least some of) your questions: hibernation was working properly, but from suspend, the machine was always waking up in a second, even in that case if there was no external peripheral connected to the notebook. These were the enabled devices in my /proc/acpi/wakeup:
Code:
Device S-state Status Sysfs node
PEG0 S4 *enabled pci:0000:00:01.0
RP02 S4 *enabled pci:0000:00:1c.0
RP03 S4 *enabled pci:0000:00:1c.2
XHC S3 *enabled pci:0000:00:14.0
SLPB S4 *enabled platform:PNP0C0E:00
$ lspci -vv |grep -A 20 00:14.0
00:14.0 USB controller: Intel Corporation Sunrise Point-H USB 3.0 xHCI Controller (rev 31) (prog-if 30 [XHCI])
Subsystem: ASUSTeK Computer Inc. 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 131
Region 0: Memory at dd310000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Address: 00000000fee00378 Data: 0000
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
To make the fix permanent I have tried to add udev rule for entries in lsusb -t, which has used xhci, like this:
Code:
$ cat /etc/udev/rules.d/xhc.rules
ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="1d6b", ATTR{power/wakeup}="disabled"
$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 4: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 4: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 6: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 6: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 9: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 9: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 8087:0a2a Intel Corp.
Bus 001 Device 003: ID 045e:07b2 Microsoft Corp. 2.4GHz Transceiver v8.0 used by mouse Wireless Desktop 900
Bus 001 Device 002: ID 04f2:b3fd Chicony Electronics Co., Ltd HD WebCam (Asus N-series)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
does not help. Also, I have recognized that there might be a better solution than disabling wakeup for the entire usb hub (I might want to get the machine wake up from external usb keyboard later). So, what is your opinion, shall I put
Quote:
echo XHC > /proc/acpi/wakeup
into some startup script or shall I try to make udev rules for not the usb hub, but for all the devices connected to the usb hub (then prevent wakeup only for the problematic one finally).. or is there a better/different way?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.