Bug 108801 - Various ASUS notebooks REBOOT instead of RESUMING from S3
Summary: Various ASUS notebooks REBOOT instead of RESUMING from S3
Status: REOPENED
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Zhang Rui
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-02 22:24 UTC by János Illés
Modified: 2019-05-06 18:47 UTC (History)
36 users (show)

See Also:
Kernel Version: 4.4-rc4
Tree: Mainline
Regression: No


Attachments
UX305UA acpi dumps (deleted)
2016-03-23 07:41 UTC, Francois Cartegnie
Details
UX305UA acpidump kernel 4.4.8 nofastboot (rebooting) (deleted)
2016-05-11 09:03 UTC, Francois Cartegnie
Details
Content of the dmesg of a faulty resume (24.52 KB, application/octet-stream)
2016-10-25 19:45 UTC, Gábor AUTH
Details
reboot on pm tests to "none" (66.82 KB, text/plain)
2018-10-19 17:40 UTC, Francois Cartegnie
Details
reboot on pm tests to "none" after testing all other modes (64.93 KB, text/plain)
2018-10-19 17:41 UTC, Francois Cartegnie
Details

Description János Illés 2015-12-02 22:24:46 UTC
This is a 4.4-rc3 regression, I cannot reproduce on 4.4-rc2 
 
When the AC adapter is unplugged and the laptop tries to wake from suspend instead of a wakeup a reboot will occur. 

Never managed to reproduce when the AC plugged in (tried around 20 suspend cycles)

Unplug the AC - send the laptop to suspend - press any key to wake up -> reboot
Unplug the AC - send the laptop to suspend - plug AC back in - try to wake -> reboot
Suspend while AC attached -> unplug AC -> try to wake -> reboot

Tried about 15 cycles and it happens every time. 

The reboot is instant, flashing leds or blank screen occurs, the last log entry is of a successful suspend.
Comment 1 János Illés 2015-12-07 13:29:11 UTC
Still happens with 4.4-rc4
Comment 2 János Illés 2015-12-10 22:51:09 UTC
I have to correct myself. This is also reproducible using 4.4-rc2
Comment 3 Zhang Rui 2015-12-14 05:58:44 UTC
is there any kernel that the problem does not exist?
Comment 4 János Illés 2015-12-14 06:45:58 UTC
I did not have too much time to build and try different kernels, but the laptop is only functional with 4.2 and 4.4 rc kernels since 4.3 produced black only screen last time I tried. 

This wakeup-reboot bug is a bit hectic, I *feel* it happens more often on 4.4-rc4 but It happened on rc2 also but I don't know how to trigger it, but once it happened it will do it every time until the next full shutdown  cycle so maybe it is firmware related. 

The only thing I am sure at this point is that it never happenes with the dual-booted Windows.

Would you like me to provide some additional info about the firmware or run some command?
Comment 5 Zhang Rui 2015-12-28 13:06:54 UTC
please check if the problem still exists if you boot with "idle=poll".
Comment 6 János Illés 2015-12-28 20:50:58 UTC
Hi! Thanks I will try that.

Currently I'm struggling to reproduce this bug. Sometimes it just happens and then it will happen until the next proper shutdown but I don't see any specific reason that causes it. When I opened the bug it just appeared frequently, nowadays it occurs once or twice a week.
Comment 7 Andy Clayton 2016-02-19 17:45:47 UTC
Possibly unrelated, but I have been seeing very similar behavior on 4.4.0 with a Dell XPS 15 9550 (also skylake). My experience is reversed, starting with little to no suspend issues over the last month and now rebooting on almost every attempted resume. It may be coincidence but initial testing has suspend and resume functioning correctly when plugged in and the sleep is very brief. I'll try to test a bit with idle=poll and report back.
Comment 8 János Illés 2016-02-20 10:12:19 UTC
I was meaning to close this ticket because I could not reproduce it in the last month.
Comment 9 Francois Cartegnie 2016-03-01 19:27:25 UTC
Okay, maybe I can enlighten things a bit.
I have UX305UA, not CA, but there's the same issue.

It happens when UEFI/Bios FastBoot is On.
Resumes correctly when off.
Kernel 4.4.2 and 4.5.0rc6
Comment 10 János Illés 2016-03-01 19:53:12 UTC
Are you dual booting Windows on it? 

I am not totally sure but I had the feeling that the bug disappeared when I remove windows from the laptop and started using Linux exclusively.
Comment 11 Francois Cartegnie 2016-03-01 20:16:22 UTC
There's no windows on my side. I have no idea what fastboot is related to acpi.
Comment 12 Zhang Rui 2016-03-15 08:00:36 UTC
can you please send the acpidump both when UEFI/Bios FastBoot is enabled & disabled?
Comment 13 Francois Cartegnie 2016-03-23 07:41:07 UTC
Created attachment 210301 [details]
UX305UA acpi dumps

Sorry for the late feedback,
was on some OSS conf.

Here's split acpi dumps.
Comment 14 Alex Xu (Hello71) 2016-04-08 15:26:37 UTC
Binary files no_fastboot/dbgp.dat and with_fastfoot/dbgp.dat differ
diff -ru no_fastboot/dbgp.dsl with_fastfoot/dbgp.dsl
--- no_fastboot/dbgp.dsl        2016-04-08 11:25:22.258411301 -0400
+++ with_fastfoot/dbgp.dsl      2016-04-08 11:25:22.315078235 -0400
@@ -13,7 +13,7 @@
 [000h 0000   4]                    Signature : "DBGP"    [Debug Port table]
 [004h 0004   4]                 Table Length : 00000034
 [008h 0008   1]                     Revision : 01
-[009h 0009   1]                     Checksum : 72
+[009h 0009   1]                     Checksum : 9A
 [00Ah 0010   6]                       Oem ID : "INTEL "
 [010h 0016   8]                 Oem Table ID : ""
 [018h 0024   4]                 Oem Revision : 00000000
@@ -21,7 +21,7 @@
 [020h 0032   4]        Asl Compiler Revision : 0000005F

 [024h 0036   1]               Interface Type : 00
-[025h 0037   3]                     Reserved : 69CC87
+[025h 0037   3]                     Reserved : 2B0069

 [028h 0040  12]          Debug Port Register : [Generic Address Structure]
 [028h 0040   1]                     Space ID : 01 [SystemIO]
@@ -33,7 +33,7 @@

 Raw Table Data: Length 52 (0x34)

-  0000: 44 42 47 50 34 00 00 00 01 72 49 4E 54 45 4C 20  // DBGP4....rINTEL
+  0000: 44 42 47 50 34 00 00 00 01 9A 49 4E 54 45 4C 20  // DBGP4.....INTEL
   0010: 00 00 00 00 00 00 00 00 00 00 00 00 4D 53 46 54  // ............MSFT
-  0020: 5F 00 00 00 00 87 CC 69 01 08 00 00 40 02 00 00  // _......i....@...
+  0020: 5F 00 00 00 00 69 00 2B 01 08 00 00 40 02 00 00  // _....i.+....@...
   0030: 00 00 00 00                                      // ....
Binary files no_fastboot/facs.dat and with_fastfoot/facs.dat differ
diff -ru no_fastboot/facs.dsl with_fastfoot/facs.dsl
--- no_fastboot/facs.dsl        2016-04-08 11:25:22.301744839 -0400
+++ with_fastfoot/facs.dsl      2016-04-08 11:25:22.351745073 -0400
@@ -12,7 +12,7 @@

 [000h 0000   4]                    Signature : "FACS"
 [004h 0004   4]                       Length : 00000040
-[008h 0008   4]           Hardware Signature : 56784D3B
+[008h 0008   4]           Hardware Signature : 7A65553E
 [00Ch 0012   4]    32 Firmware Waking Vector : 00000000
 [010h 0016   4]                  Global Lock : 00000000
 [014h 0020   4]        Flags (decoded below) : 00000000
@@ -26,7 +26,7 @@

 Raw Table Data: Length 64 (0x40)

-  0000: 46 41 43 53 40 00 00 00 3B 4D 78 56 00 00 00 00  // FACS@...;MxV....
+  0000: 46 41 43 53 40 00 00 00 3E 55 65 7A 00 00 00 00  // FACS@...>Uez....
   0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
   0020: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
   0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // ................
Comment 15 Alex Xu (Hello71) 2016-04-08 15:50:06 UTC
IOW: no relevant changes. FACS looks relevant but is actually set by the kernel. DBGP is totally irrelevant.
Comment 16 Joël Porquet 2016-04-20 04:16:31 UTC
I have a UX305U and I'm also encountering the reboot after suspend issue (actually just had it now). I'm running the latest kernel provided by ArchLinux which is 4.5.0.

I will try deactivating the fast boot feature.


PS: do you guys also have screen issues? When on battery, the screen keeps flickering like crazy. The upper or lower part of the screen repeatedly goes black for a fraction of a second. When on power, it pretty much stop. I tried with the intel video driver and the modesetting driver, but it didn't change anything. Anyway, if you know of a bug report related to this issue before I open a new one, let me know!
Comment 17 Joël Porquet 2016-04-21 05:33:33 UTC
As suggested above, I tried deactivating UEFI/Fastboot but the laptop still reboots after waking up from suspend.

Let me know if you need more information or if there is something I can do to help.
Comment 18 Yi Hong 2016-05-06 10:39:58 UTC
I have exactly the same issue with my ASUS Zenbook UX303. When I tried to wake up from suspend, it immediately rebooted. This only happened when AC adapter was unplugged.
Comment 19 Zhang Rui 2016-05-10 06:16:43 UTC
Okay, now we have four reporters in this thread, all with Asus laptops.
1. János Illés, ASUS Zenbook UX305CA, the original reporter, prefers to close this bug report because it can not be reproduced any more, after removing windows partition.
2. Francois Cartegnie, ASUS Zenbook UX305UA, confirmed clear BIOS Fastboot workarounds the problem.
3. Joël Porquet, UX305U, confirmed that the BIOS Fastboot workaround doesn't work.
4. Yi Hong, ASUS Zenbook UX303.

IMO, we should confirm if we're experiencing exactly the same issue here, or else the response from different reporter would be misleading. So, Francois, Joël and Yi, can you please confirm
Q1. the problem can only be reproduced with AC unplug actions, like János described in comment #0?
Q2. Yi, please confirm if the BIOS fastboot trick works for you or not.
Q3, do you have dual boot windows installed? If yes, please don't use windows (don't try boot into windows), and see if the problem can be reproduced.
Comment 20 Francois Cartegnie 2016-05-10 10:13:51 UTC
Okay, so I did test again today, and this time it does not work.
Pretty sure resume from suspend (lid closed) did work on battery.
This gets really confusing for me.

So, today, whatever combination:
* Plugged from start/in session.
* Unplugged before/while suspend.
* Suspend by Lid/Button/command
* Wake on button/key
* Fastboot enabled/disabled

Everything ends with a reboot on wakeup.

Could it depend on something else ? Wifi ? Battery state ?
Comment 21 Yi Hong 2016-05-10 10:18:38 UTC
Yes, I have dual boot Windows 10 installed but I haven't used it for weeks. 
I experienced exactly the same as János described above, this only happened when AC adapter was unplugged.

Disabling Fastboot in BIOS does the trick for me, thanks!
Comment 22 Francois Cartegnie 2016-05-10 10:24:27 UTC
Okay, so confirms the weirdness of the issue.

Just after posting the above comment,
I tried rebooting and switch FN+F2 wifi off which didn't worked.
And I did unplug the AC from the power socket (not the PC plug).

And now, every wake from suspend works.
Comment 23 Joël Porquet 2016-05-11 05:31:56 UTC
Hi Zhang,

Thanks for taking the time to reach to us!

> Q1. the problem can only be reproduced with AC unplug actions, like János
> described in comment #0?
> Q2. Yi, please confirm if the BIOS fastboot trick works for you or not.
> Q3, do you have dual boot windows installed? If yes, please don't use
> windows (don't try boot into windows), and see if the problem can be
> reproduced.

I do not have dual boot, just Linux.

When I hit the issue described in this bug report, I always made sure that my laptop was connected to AC, before attempting a wake from suspend, which has been working fine for the past few weeks.

Now, I tried again tonight without AC plugged (Linux 4.5.2 on ArchLinux) and everything seems to work! :)

I tried activating/deactivating fastboot and suspending/waking up with AC unplugged, and I wasn't able to reproduce the inopportune reboot in any of the combination.

Was a fix committed in the kernel between 4.5.1 and 4.5.2?

Thanks,
Joël
Comment 24 Zhang Rui 2016-05-11 05:52:27 UTC
(In reply to Joël Porquet from comment #23)
> Hi Zhang,
> 
> Thanks for taking the time to reach to us!
> 
> > Q1. the problem can only be reproduced with AC unplug actions, like János
> > described in comment #0?
> > Q2. Yi, please confirm if the BIOS fastboot trick works for you or not.
> > Q3, do you have dual boot windows installed? If yes, please don't use
> > windows (don't try boot into windows), and see if the problem can be
> > reproduced.
> 
> I do not have dual boot, just Linux.
> 
> When I hit the issue described in this bug report, I always made sure that
> my laptop was connected to AC, before attempting a wake from suspend, which
> has been working fine for the past few weeks.
> 
> Now, I tried again tonight without AC plugged (Linux 4.5.2 on ArchLinux) and
> everything seems to work! :)
> 
> I tried activating/deactivating fastboot and suspending/waking up with AC
> unplugged, and I wasn't able to reproduce the inopportune reboot in any of
> the combination.
>
So can you reproduce the problem with AC plugged?
I'm trying to make clear if AC plug/unplug makes any difference in this bug report.
 
> Was a fix committed in the kernel between 4.5.1 and 4.5.2?

I don't know.

But I'd suggest Francois and Yi to try 4.5.2 kernel as well, maybe even the same kernel configuration.
Comment 25 Zhang Rui 2016-05-11 05:53:04 UTC
(In reply to Francois Cartegnie from comment #20)
> Okay, so I did test again today, and this time it does not work.
> Pretty sure resume from suspend (lid closed) did work on battery.
> This gets really confusing for me.
> 
> So, today, whatever combination:
> * Plugged from start/in session.
> * Unplugged before/while suspend.
> * Suspend by Lid/Button/command
> * Wake on button/key
> * Fastboot enabled/disabled
> 
> Everything ends with a reboot on wakeup.
> 
what kernel version are you using?
Can you try 4.5.2?
Comment 26 Zhang Rui 2016-05-11 05:53:52 UTC
(In reply to Yi Hong from comment #21)
> Yes, I have dual boot Windows 10 installed but I haven't used it for weeks. 
> I experienced exactly the same as János described above, this only happened
> when AC adapter was unplugged.
> 
> Disabling Fastboot in BIOS does the trick for me, thanks!

what kernel version are you using?
please try 4.5.2.
Comment 27 Joël Porquet 2016-05-11 05:57:32 UTC
(In reply to Zhang Rui from comment #24)
> So can you reproduce the problem with AC plugged?
> I'm trying to make clear if AC plug/unplug makes any difference in this bug
> report.

As I was saying, I didn't have the problem when AC was plugged. And I confirm that I still don't.

AC plug/unplug was making a difference before (at least for me), but doesn't seem to make a difference now.

Thanks,
Joël
Comment 28 Zhang Rui 2016-05-11 06:29:37 UTC
(In reply to Joël Porquet from comment #27)
> (In reply to Zhang Rui from comment #24)
> > So can you reproduce the problem with AC plugged?
> > I'm trying to make clear if AC plug/unplug makes any difference in this bug
> > report.
> 
> As I was saying, I didn't have the problem when AC was plugged. And I
> confirm that I still don't.
> 
> AC plug/unplug was making a difference before (at least for me), but doesn't
> seem to make a difference now.
> 
so it seems that you're now in the same page with János Illés, the original bug reporter, and you're not able to reproduce the problem any more, right?
Comment 29 Joël Porquet 2016-05-11 06:30:09 UTC
(In reply to Zhang Rui from comment #28)
> (In reply to Joël Porquet from comment #27)
> > (In reply to Zhang Rui from comment #24)
> > > So can you reproduce the problem with AC plugged?
> > > I'm trying to make clear if AC plug/unplug makes any difference in this
> bug
> > > report.
> > 
> > As I was saying, I didn't have the problem when AC was plugged. And I
> > confirm that I still don't.
> > 
> > AC plug/unplug was making a difference before (at least for me), but
> doesn't
> > seem to make a difference now.
> > 
> so it seems that you're now in the same page with János Illés, the original
> bug reporter, and you're not able to reproduce the problem any more, right?

Yes, correct.
Comment 30 Zhang Rui 2016-05-11 06:31:31 UTC
Good to know.
Now let's see if Yi and Francois can reproduce the problem or not, after switching to the same kernel as yours.
Comment 31 Francois Cartegnie 2016-05-11 08:04:04 UTC
(In reply to Joël Porquet from comment #23)
> I tried activating/deactivating fastboot and suspending/waking up with AC
> unplugged, and I wasn't able to reproduce the inopportune reboot in any of
> the combination.
> 
> Was a fix committed in the kernel between 4.5.1 and 4.5.2?

As mentioned in my latest tests,
with the same exact configuration it was 100% failing then 100% working the same day.

There's an unidentified "switch" that triggers the issue, whatever the kernel was (4.2, 4.6), and i'm still unable to identify it.
Comment 32 Francois Cartegnie 2016-05-11 09:03:40 UTC
Created attachment 215921 [details]
UX305UA acpidump kernel 4.4.8 nofastboot (rebooting)

I've been able to put the device into the "crash" mode.
Seems the long button off press/hard reset has something to do.

The new acpidump (rebooting) now differs from the previous ones (with/without fastboot, but when the problem was not occuring).
Comment 33 Francois Cartegnie 2016-05-11 09:39:15 UTC
Additional info:

- kernel 4.4.8 reboots
- kernel 4.5.3 reboots
- kernel 4.6.0rc7 reboots

Whilst the last acpidump attachment is different from the first ones,
it is now the same when reboots does not happen.


Seems the long press/hard forced poweroff is the key to put it in rebooting behavior. Still haven't figured how it exits.

Can someone, with a non rebooting one, test again by forcing shutdown with power button longpress and see if it restarts rebooting on wakeup ?
Comment 34 Cláudio Pereira 2016-05-19 03:49:19 UTC
Can reproduce on an Asus GL552VW (Skylake 6700HQ)

I think that didn't had the issue on 4.2/4.3.
Sometimes suspend resumes properly, but I'm still to find a pattern.

I have three kernels, 4.5, 4.5 with CK patches, and 4.6.
I think that the last time I had a successful resume was on 4.5-ck a day or two ago, but at least 9 out of 10 times it will simply reboot.
Still probably has nothing to do with the -ck patchset

I also have Ubuntu (16.04) on a small partition and it also reproduces the issue, but not as often. The main difference here is that besides patched packages, Ubuntu is using the dedicated GPU while my main OS (Arch) doesn't.

Also when plugged to AC resume will always work, unless if the suspension happened while on battery power. If that's the case it might as well reboot.

I think that the issue is being triggered by some mechanism that only works when on battery. Not 100% sure if it'll happen if I suspend when plugged to AC, unplug, plug again, and resume.

Overall Skylake has been a bag of problems and I'm quite tired of dealing with its bugs, still if you need any specific information or output dump just ask for it, but I won't spend dozens of hours trying software combinations with this bug.
Comment 35 Joël Porquet 2016-06-25 01:20:06 UTC
@Francois

Arg! I didn't want to try to forcefully reboot my laptop because I was so happy not to have the bug anymore, but earlier today my computer crashed and I had to shut it off using the long press on the power button. And now, the bug is back, my laptop just rebooted upon wake up from suspend ;(

So I guess you're right, it is the trigger that causes this awful bug to happen.

Have you figured out a way to make it disappear by any chance?
Comment 36 Nick Murdoch 2016-06-29 17:04:19 UTC
Hi,

I have an Asus Zenbook UX303UB and I've been experiencing the same problem (reboot on wake-up from suspend when on battery; fine when power plugged in).

Disabling Fast Boot in the BIOS seems to have fixed the problem for me.

I am running Debian's 4.6.2:

$ uname -a
Linux corsica 4.6.0-1-amd64 #1 SMP Debian 4.6.2-2 (2016-06-25) x86_64 GNU/Linux

Happy to provide any more information if needed!
Comment 37 Francois Cartegnie 2016-07-03 15:05:15 UTC
(In reply to Joël Porquet from comment #35)
> So I guess you're right, it is the trigger that causes this awful bug to
> happen.
> 
> Have you figured out a way to make it disappear by any chance?

First try saving bios config and see if that changes something.
(as mentioned turning off Fast Boot solves the issue, but isn't related to crash).
then try wifi switch. (which might also write last state to bios)
Comment 38 Joël Porquet 2016-07-08 00:33:01 UTC
(In reply to Francois Cartegnie from comment #37)
> (In reply to Joël Porquet from comment #35)
> > So I guess you're right, it is the trigger that causes this awful bug to
> > happen.
> > 
> > Have you figured out a way to make it disappear by any chance?
> 
> First try saving bios config and see if that changes something.
> (as mentioned turning off Fast Boot solves the issue, but isn't related to
> crash).
> then try wifi switch. (which might also write last state to bios)

Turning off fast boot didn't help right away for me. It was still rebooting upon resume after suspend... However, by playing several times with the fast boot option in the bios in between manual reboots, I was able to finally get rid of the bug.

Don't ask me the exact procedure though, at this point it's total magic...
Comment 39 Gábor AUTH 2016-07-13 10:39:30 UTC
Same issue here with ASUS N752vx (Vivobook Pro):
Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz],
4.6.3-1-default #1 SMP PREEMPT Sun Jun 26 07:34:33 UTC 2016 (d4bcf2a) x86_64

1, If the suspend-resume is works once, it is works right until the next reboot.
2, After reboot, the suspend-resume rarely works, most of times not works: instead of resume it will be reboot.
3, If the suspend-resume is not works once, it won't work most of times.
Comment 40 Gábor AUTH 2016-07-14 06:49:28 UTC
Hm... the continuously plugged AC "trick" works most of time with the N752vx too:
1, AC plugged
2, suspend
3, 5 secs sleep, 10 minutes sleep, 8 hours sleep
4, Normal wake up

1, AC plugged
2, suspend
3, AC unplug and plug instantly
4, Reboot instead of wake up

But the wake up with unplugged AC has worked a month ago... hm.
Comment 41 Wei Tang 2016-07-17 13:31:32 UTC
I'm running a Dell XPS 15 9050, and have been suffering from a similar problem for a long time.

In the past, I can solve it by disabling SpeedStep and C States, but it is no longer working. Now I can solve it by disabling TLP, but it results in bad battery performance.

Hope there're other ways to make it work properly...
Comment 42 Wei Tang 2016-07-17 14:35:08 UTC
I can fix the problem by disabling TLP's runtime power management:

   RUNTIME_PM_ON_BAT=on

while keep TLP enabled.

The laptop still feels hotter than usual, but bearable now.
Comment 43 Gábor AUTH 2016-07-17 14:58:41 UTC
>    RUNTIME_PM_ON_BAT=on

Its working... hm... the settings of AC was "on" (=disabled):
RUNTIME_PM_ON_AC=on

For months the suspend-wakeup worked fine, then a couple of weeks ago I changed the settings TLP...
Comment 44 Gábor AUTH 2016-07-18 09:27:56 UTC
(In reply to Wei Tang from comment #42)
> I can fix the problem by disabling TLP's runtime power management:
>   RUNTIME_PM_ON_BAT=on

Yesterday: worked until reboot
Today: not working, even disabled TLP

I don't know what is the key... I feel that is not random, but I don't know what is the reason... it is annoying... :(
Comment 45 Wei Tang 2016-07-18 11:33:06 UTC
(In reply to Gábor AUTH from comment #44)
> (In reply to Wei Tang from comment #42)
> > I can fix the problem by disabling TLP's runtime power management:
> >   RUNTIME_PM_ON_BAT=on
> 
> Yesterday: worked until reboot
> Today: not working, even disabled TLP
> 
> I don't know what is the key... I feel that is not random, but I don't know
> what is the reason... it is annoying... :(

Well, that's wired... Here're several things I tried before RUNTIME_PM_ON_BAT=on:

1. Update my kernel from 4.4 to 4.6.
2. Disable Fastboot in BIOS.
3. Disable SpeedStep and C States in BIOS.

It has been working for me for a day now. I'll get back if it happens again.
Comment 46 Wei Tang 2016-07-18 11:33:51 UTC
(In reply to Wei Tang from comment #45)
> (In reply to Gábor AUTH from comment #44)
> > (In reply to Wei Tang from comment #42)
> > > I can fix the problem by disabling TLP's runtime power management:
> > >   RUNTIME_PM_ON_BAT=on
> > 
> > Yesterday: worked until reboot
> > Today: not working, even disabled TLP
> > 
> > I don't know what is the key... I feel that is not random, but I don't know
> > what is the reason... it is annoying... :(
> 
> Well, that's wired... Here're several things I tried before
> RUNTIME_PM_ON_BAT=on:
> 
> 1. Update my kernel from 4.4 to 4.6.
> 2. Disable Fastboot in BIOS.
> 3. Disable SpeedStep and C States in BIOS.
> 
> It has been working for me for a day now. I'll get back if it happens again.

Also, I have acpi_sleep=nonv and idle=poll in boot parameters.
Comment 47 Gábor AUTH 2016-07-18 11:41:41 UTC
> 1. Update my kernel from 4.4 to 4.6.

4.6.3-1

> 2. Disable Fastboot in BIOS.

Disabled.

> 3. Disable SpeedStep and C States in BIOS.

Hm... I will check it at the next reboot (soon).

> Also, I have acpi_sleep=nonv and idle=poll in boot parameters.

My parameters: intel_idle.max_cstate=7 idle=nomwait nouveau.modeset=0 pci=noaer acpi_backlight=native acpi_osi=!

Without 'nouveau.modeset=0' it is freezing on boot, without 'pci=noaer' the advanced error reporting write a lot of warning message, without 'acpi_backlight=native' the fn- buttons are not working.

I've tried a lot of combinations and I will try add the 'acpi_sleep=nonv' and the  'idle=poll' parameters too.
Comment 48 Gábor AUTH 2016-07-19 08:01:34 UTC
Whaaaa... I did nothing, yesterday did not work, today it is working, wake up on battery, but:

[15782.225212] WARNING: CPU: 0 PID: 11963 at ../arch/x86/kernel/check.c:141 check_corruption+0xa/0x40
[15782.225214] Memory corruption detected in low memory
Comment 49 stelescuraul 2016-07-24 12:53:41 UTC
Hello everyone. I can also confirm the wake up from sleep issue on assus zenbook ux305ua. it goes into sleep, but when it tries to wake up, it restarts. It only happens if power brick is not connected. So when it is on battery it restarts, when on AC it works without acpi_sleep=nonv. 

I have tried kernel 4.4.0, 4.5.0, 4.6.4 and 4.7 RC7. All of them have the same problems with or without 'acpi_sleep=nonv'. The only way i managed to make it work, is to resume it when it AC is plugged in. 

Any ideas about the bug ? I would really appreciate a fix / workaround if any of you found something.
Comment 50 Gábor AUTH 2016-07-26 21:17:41 UTC
At the moment the wake up on battery works with these kernel parameters: "quiet splash=silent nouveau.modeset=0 pci=noaer acpi_backlight=native acpi_osi=!"

I don't know why... :(
Comment 51 János Illés 2016-07-27 07:07:32 UTC
Hi everyone!

Did you try to update the laptop firmware? I've read somewhere that Skylake microcode can be quite buggy and the only way to update skylake microcode as far as I know is to update the firmware. 

(I'm the original reporter of this bug, and the bug simply went away by itself for me, really strange, I use no kernel parameters)
Comment 52 Mark Flynn 2016-07-28 10:43:16 UTC
Hi,

Running 4.6.4-1 in an ASUS GL552VW, having the exact original issue as the initial reporter. Suspend and resume work fine while the power is connected to the laptop, but reboots when trying to resume if the power was disconnected at any point while it was suspended.

Tried all the quirks in this bug thread:

- turning on and off fast boot between manual restarts / shutdowns
- boot parameters idle=poll and acpi_sleep=nonv

Like a lot of the other reporters I do remember that there were some times when the resume from battery would work fine, but can't think of what the cause may have been in between.

I had a weird issue with this laptop where plugging or removing anything into the USB3 ports would cause a power short and nothing would turn the laptop back on unless I unplugged the power and took the battery out for a few seconds.

Anyway I tried taking the battery out for a few seconds, turning back on and the issue has been resolved!

To confirm I did a hard reset by holding the power button down and the problem returned. Powered off and removed battery, wait, replace battery, resumes fine from battery again.

Took acpi dumps before and after the removal of the battery and there were no differences in anything.

I switched over to windows to try and reproduce the bug - and I could, same issue with windows, hard reset causes reset on resume while taking the battery out resumes expected behaviour, I don't think that this is a kernel bug, I think that this might be a hardware issue, seems like it's limited to ASUS laptops?
Comment 53 Francois Cartegnie 2016-07-28 11:45:16 UTC
(In reply to Mark Flynn from comment #52)

> bug, I think that this might be a hardware issue, seems like it's limited to
> ASUS laptops?

Not limited to Asus, as there's mention of Dell laptops as well. But definitively related to Skylake.

The same device is also plagued with black screen on boot when patched with Intel's microcode update. Not a kernel issue since this is distro related,
but see fedora as ex https://bugzilla.redhat.com/show_bug.cgi?id=1353103
There is also mention of uefi updates for some Asus series. Worth trying for the current bug.
Comment 54 Gábor AUTH 2016-07-28 12:01:07 UTC
> Did you try to update the laptop firmware?

There is no new BIOS update...

> I use no kernel parameters

I'm using these kernel parameters because of the nouveau driver modeset issue, disabling the bug of PCI advanced error reporting and enable the fn-x keys on the laptop.

I've tried lot of other kernel parameters too (idle, acpi_sleep, intel_max.idle_cstate, etc)... but now it works without any extra kernel parameters... :)

...but I don't know why... :(
Comment 55 Jehosephat Quentin Turnipseed 2016-07-30 18:41:51 UTC
I have this bug on my Asus UX305C notebook.  For my computer, it doesn't matter if it is plugged in to the power supply or not - it will reboot when I try to resume from a full hibernation.  Suspend works fine.  Running Linux Mint with the 4.4.0-31-generic kernel. 

I have upgraded to the latest (version 300, 2016-06-24) bios from the Asus website as suggested in Comment 51 - no change.  I also tried the kernel parameters as suggested in Comment 50 - again, no difference or improvement in behavior.  

Any help with this annoying bug is appreciated.  Thanks all!
Comment 56 Jehosephat Quentin Turnipseed 2016-07-30 18:43:11 UTC
P.S. Fastboot is switched off in BIOS settings.
Comment 57 Fredrik Blomqvist 2016-08-05 10:24:54 UTC
I have this problem on my Asus Zenbook UX301LA after I reinstalled Ubuntu 16.04. Before the reinstall, suspending worked flawlessly for almost 2 years. Unfortunately, I do not know which kernel I was running, or which options I had set, but I know I did not run a custom kernel (aka I was running whatever kernel 16.04 fed me).

I have been battling this suspend problem for a couple of days now, trying all kinds of options and Googling a ton. It has not worked a single time.

These are the things I have tried:
* AC no AC
* Fastboot enabled/disabled
* Launch CSM yes/no
* Kernel 4.4, 4.6, 4.7
* acpi_sleep=nonvs

The reason I reinstalled Ubuntu was because I bricked my SSD by ironically pressing the power button for 10 seconds, forcing a shutdown because the computer had crashed. Obviously, I had forced shutdowns at least a 100 times before, without bricking or causing anything. I was running an older BIOS before, 209 I think, but I updated it to 211 when trying to fix this problem. Didn't work.

The amount of frustration right now is unmeasurable........
Comment 58 Fredrik Blomqvist 2016-08-06 21:48:44 UTC
I just had an 8 hour run with trying to install older versions, 15.04 and 15.10, as well as 16.10 alpha, on my UX301LA. Suspend did not work on 15.10, and I failed to install 15.04 (not sure why, but it just would not work). I also failed to install 16.10 (the installer crashed, so it's probably just a temporary problem in today's daily). Back on 16.04 with 4.4 kernel, will do a complete wipe of my computer (and BIOS) in a few weeks when I have gotten the aforementioned bricked SSD replaced, so that I can dual-boot and see if Windows can suspend fine. Will report back.
Comment 59 Cosmin Deaconu 2016-08-11 02:39:53 UTC
Asus Zenbook UX305UA here with F24. 

I've noticed so far that if the WiFi light turns on (the little light on the F2 key), then suspend will cause a reboot. Not sure if the correlation is 100$ or not because I tend not to reboot due to this problem.

My laptop ran out of batteries today, and, this may be black magic, but by toggling on and off airplane mode via fn+f2 and restarting, suspend is now fine (and the wifi light is off). 

Anxiously awaiting a bios update from Asus.
Comment 60 Fredrik Blomqvist 2016-08-12 13:29:56 UTC
I can confirm that the state described by Cosmin Deaconu is not 100% correlated with a solution to this problem. I managed to get my laptop into the same state by following his instructions, and while I have a vague memory that this is the state the laptop was in when it was working a month ago, suspend still doesn't work for me now. What BIOS version are you on Cosmin?
Comment 61 kapuraya 2016-08-17 03:40:22 UTC
I am having the same issue on Asus GL552VW with samsung 850 evo (500GB) ssd.
BIOS version 218
Arch Linux with kernel 4.7:
$ uname -a
Linux stoelzel 4.7.0-1-ARCH #1 SMP PREEMPT Mon Aug 8 22:05:58 CEST 2016 x86_64 GNU/Linux


acpi_sleep=nonvs
Resumes normally on AC but reboots instead when on battery.
Fast boot off/on
Launch CSM off/on

Somewhat magically, after disabling the "wake on lid open" in bios, resuming from battery/AC seems to work perfectly, but like Comment 59, I don't think this has any correlation at all.
Comment 62 Fredrik Blomqvist 2016-08-22 15:53:43 UTC
I got one of my SSDs replaced, so took the opportunity to completely wipe the computer and start over. I now got Ubuntu 16.04 on one drive and Windows 10 on the other. I can, therefore, confirm that this bug is as previously discussed not limited to Ubuntu, but possibly caused by Ubuntu.

There are 2 actions that could have put my laptop into this non-working state:

1. Updating the BIOS to the latest version (211) from 209.

2. Reinstalling Ubuntu 16.04.

Since suspend doesn't work in Windows either, I'm thinking of calling Asus and talk with them about it. I'm suspecting the BIOS is at fault.
Comment 63 Christian 2016-08-25 20:58:22 UTC
I have an Asus UX303UB and had the very same issue since the beginning. It worked from time to time but since I am on 4.7 (a few weeks now) it always rebooted after suspend. Last week I finally updated my BIOS from 202 to 206 which was the latest version I found on the Asus website and I am using the parameters from https://bugzilla.kernel.org/show_bug.cgi?id=108801#c50 now.

Since then resume works like a charm and I never got a reboot.

May be a coincidence. We will see. :)
Comment 64 Fredrik Blomqvist 2016-08-25 21:33:42 UTC
Thanks a lot for reporting in Christian! I'm glad you were able to get it to work. Thanks to your information, I now got this refined theory:

* ASUS UX303UB had BIOS v202 released on 2015/09/28
* ASUS UX301LA had BIOS v211 released on 2015/09/16

Clearly they are related (because similar models, etc.).

With Linux kernel 4.4 (could be 4.*) and onwards, something changed that broke the suspend functionality for Asus UX30* BIOS September 2015 release.
This problem was later fixed by Asus on 2016/04/15 by releasing v206 for UX303UB. However, such an update has clearly not been released for the older UX301LA yet.

Solution? Nag ASUS until they release such an update (and that I will do).


Here are the reasons to why this theory might be true:

* My suspend worked fine on Linux kernel <=4.4 (Ubuntu 16.04) with BIOS 209, released on 2014/06/18.

* After updating to BIOS 211, Linux kernel 4.4+ breaks suspend, putting the computer in a faulty state that inhibits all other operating systems to suspend as well (because I tried with Windows).

* Christian said it worked for him before he updated his kernel, and after he updated his BIOS.

Now, this is obviously just a theory, but hey, I ain't got nothing else to believe.
Comment 65 Fredrik Blomqvist 2016-08-25 21:42:22 UTC
I have now submitted a support request on the ASUS website, referring them to this thread and briefly describing the problem. I'll post here when I hear back.
Comment 66 Zhang Rui 2016-09-02 06:36:13 UTC
It seems that we have quite a few reporters here, :)
My intention is to close this one as it sounds like a BIOS issue and have been fixed by BIOS for some of the models.
Not sure everyone agrees with me or not, but for people who think this is a kernel problem, we should
1. show that the problem can be reproduced after a kernel update, without upgrading the BIOSes.
2. run git bisect to help find out which commit introduce the problem to these Asus platforms.
If no one helps me do this, I will close this bug and let's ping the Asus website to get BIOS upgrade.
Comment 67 Gábor AUTH 2016-09-30 16:08:48 UTC
I've updated the BIOS of my N752VX from version 204 (2016/02/25) to version 300 (2016/09/30) and nothing changed with the 4.7.5 kernel... :(
Comment 68 Andrew Miller 2016-10-01 17:29:37 UTC
I also have a new UX305UA and have this problem. I upgraded my kernel to 4.6.0. I've tried all the permutations of kernel options discussed in this thread, and turned off the fastboot and wake-on-lid BIOS options. I'd love to upgrade the firmware, but 201 is the highest version firmware for this model so far. I've also pinged ASUS support in hopes they can accelerate a firmware upgrade.
Comment 69 Facundo Bianco 2016-10-15 23:59:16 UTC
I have an UX305U and runs Debian 8.6. I was using kernel 4.6.0 and suspend works fine. But I upgraded to kernel 4.7.0 and suspend mode causes the reboot.

I tried the solutions here (ie, remove fastboot or airplane mode in comment #59) but they don't work.
Comment 70 Konstantin Ryabitsev 2016-10-19 07:10:46 UTC
The content of attachment 210301 [details] has been deleted for the following reason:

deleted upon request due to private information leak
Comment 71 Konstantin Ryabitsev 2016-10-19 07:11:10 UTC
The content of attachment 215921 [details] has been deleted for the following reason:

deleted upon request due to private information leak
Comment 72 Adam Pigg 2016-10-23 11:47:48 UTC
Can I chip in with the same issue.  Running Kernel 4.8.3 on openSuse Tumbleweed on a HP 'Star Wars' laptop, HP Pavilion Notebook/80A1, BIOS F.78 03/07/2016

When on battery, and the lid is closed, upon opening, im back at a fresh desktop, so I assume it has rebooted.
Comment 73 Francois Cartegnie 2016-10-24 14:00:43 UTC
(In reply to Fredrik Blomqvist from comment #65)
> I have now submitted a support request on the ASUS website, referring them
> to this thread and briefly describing the problem. I'll post here when I
> hear back.

I've submitted support request as well:
Clueless support is just telling there's no bios update, and ask for a W10 install and a return... which indeed is useless as they can't solve the issue for the aforementioned reason.

Pointing out W10, googling gives results about "W10 black screen" after resume.
I'm wondering then if anyone has double boot and experiences both issues.

Unrelated, but I also experience other flaws with firmware or hw: if anyone has UX305UA and USB 3.0 physical detection issues when not using hub, especially with Lexar (P10 or old lightning) brand. Feedback welcome.
Comment 74 Gábor AUTH 2016-10-24 18:25:49 UTC
> Clueless support is just telling there's no bios update, and ask for a W10
> install and a return... which indeed is useless as they can't solve the
> issue for the aforementioned reason.

The type of my laptop is N752VX, ASUS has released two new BIOS version (300 and 301) but both of them "crap" from the point of my view... :(

...but the hibernation works which is a reasonable workaround. :)
Comment 75 Gábor AUTH 2016-10-25 19:42:54 UTC
As I've written, I'm using `systemctl hybrid-sleep` as a workaround, but my laptop never wake up from the suspend, just reboot and restore the state from the saved hibernation image.

At the moment, the wake up worked but:

[ 9288.467395] PM: Hibernation mode set to 'suspend'
[ 9288.740734] PM: Syncing filesystems ... done.
[...]
[ 9337.874250] usb usb3: root hub lost power or was reset
[ 9337.874252] usb usb4: root hub lost power or was reset
[ 9342.014040] Corrupted low memory at ffff8cb4c0001000 (1000 phys) = fa1c1382940e0813
[...]
[ 9342.014184] Corrupted low memory at ffff8cb4c0001188 (1188 phys) = b094f7cb4dc91844
[ 9342.014199] ------------[ cut here ]------------
[ 9342.014208] WARNING: CPU: 0 PID: 13794 at ../arch/x86/kernel/check.c:141 check_corruption+0xa/0x40
[ 9342.014209] Memory corruption detected in low memory
[ 9342.014212] Modules linked in: snd_seq_dummy snd_seq snd_seq_device cmac rfcomm af_packet nf_log_ipv6 xt_pkttype nf_log_ipv4 nf_log_common xt_LOG xt_limit bnep msr nls_iso8859_1 nls_cp437 vfat fuse fat dm_crypt algif_skcipher af_alg uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev btusb btrtl joydev arc4 dm_mod ip6t_REJECT nf_reject_ipv6 intel_rapl xt_tcpudp x86_pkg_temp_thermal intel_powerclamp nf_conntrack_ipv6 coretemp snd_hda_codec_hdmi nf_defrag_ipv6 snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm ip6table_raw ipt_REJECT nf_reject_ipv4 i2c_designware_platform i2c_designware_core iptable_raw xt_CT asus_nb_wmi iwlmvm asus_wmi iTCO_wdt iTCO_vendor_support sparse_keymap iptable_filter snd_timer kvm_intel mac80211
[ 9342.014287]  snd kvm irqbypass crct10dif_pclmul hci_uart crc32_pclmul iwlwifi crc32c_intel btbcm ghash_clmulni_intel btqca btintel rtsx_pci_ms i2c_i801 ip6table_mangle bluetooth idma64 r8169 cfg80211 memstick pcspkr soundcore i2c_smbus mii aesni_intel mei_me int3403_thermal aes_x86_64 virt_dma processor_thermal_device lrw nf_conntrack_netbios_ns glue_helper ablk_helper mei cryptd elan_i2c intel_lpss_pci intel_soc_dts_iosf nf_conntrack_broadcast battery rfkill shpchp thermal pinctrl_sunrisepoint intel_lpss_acpi nf_conntrack_ipv4 nf_defrag_ipv4 intel_lpss pinctrl_intel ip_tables asus_wireless int3402_thermal int340x_thermal_zone int3406_thermal ac tpm_crb xt_conntrack tpm_tis int3400_thermal acpi_thermal_rel acpi_pad tpm_tis_core fjes tpm nf_conntrack ip6table_filter ip6_tables x_tables rtsx_pci_sdmmc
[ 9342.014361]  mmc_core mxm_wmi serio_raw i915 rtsx_pci i2c_algo_bit mfd_core drm_kms_helper syscopyarea xhci_pci sysfillrect sysimgblt xhci_hcd fb_sys_fops sr_mod cdrom usbcore drm usb_common i2c_hid wmi video button sg efivarfs
[ 9342.014392] CPU: 0 PID: 13794 Comm: kworker/0:1 Not tainted 4.8.3-1-default #1
[ 9342.014394] Hardware name: ASUSTeK COMPUTER INC. N752VX/N752VX, BIOS N752VX.301 08/18/2016
[ 9342.014399] Workqueue: events check_corruption
[ 9342.014402]  0000000000000000 ffffffffba3a3e62 ffff8cb6b2eb3dd0 0000000000000000
[ 9342.014409]  ffffffffba07ddde ffffffffbae2ab00 ffff8cb6b2eb3e20 ffff8cb943c18e80
[ 9342.014415]  ffffbb60bfc02d00 0000000000000000 0ffffbb60bfc02d0 ffffffffba07de4f
[ 9342.014420] Call Trace:
[ 9342.014440]  [<ffffffffba02eefe>] dump_trace+0x5e/0x310
[ 9342.014449]  [<ffffffffba02f2cb>] show_stack_log_lvl+0x11b/0x1a0
[ 9342.014457]  [<ffffffffba030001>] show_stack+0x21/0x40
[ 9342.014465]  [<ffffffffba3a3e62>] dump_stack+0x5c/0x7a
[ 9342.014471]  [<ffffffffba07ddde>] __warn+0xbe/0xe0
[ 9342.014480]  [<ffffffffba07de4f>] warn_slowpath_fmt+0x4f/0x60
[ 9342.014485]  [<ffffffffba0600ea>] check_corruption+0xa/0x40
[ 9342.014493]  [<ffffffffba0966bd>] process_one_work+0x1ed/0x4d0
[ 9342.014503]  [<ffffffffba0969e7>] worker_thread+0x47/0x4c0
[ 9342.014508]  [<ffffffffba09c59d>] kthread+0xbd/0xe0
[ 9342.014517]  [<ffffffffba6d461f>] ret_from_fork+0x1f/0x40
[ 9342.018541] DWARF2 unwinder stuck at ret_from_fork+0x1f/0x40
[ 9342.018544] Leftover inexact backtrace:
[ 9342.018550]  [<ffffffffba09c4e0>] ? kthread_worker_fn+0x170/0x170
[ 9342.018585] ---[ end trace 305f7c8bd168440c ]---

After this, some program throws general protection errors, but the rest of the system seems ok:

[13959.338814] general protection fault: 0000 [#1] PREEMPT SMP
[...]
[13959.339333] CPU: 1 PID: 18133 Comm: zypper Tainted: G        W       4.8.3-1-default #1
[13959.339352] Hardware name: ASUSTeK COMPUTER INC. N752VX/N752VX, BIOS N752VX.301 08/18/2016
[...]
Comment 76 Gábor AUTH 2016-10-25 19:45:39 UTC
Created attachment 242751 [details]
Content of the dmesg of a faulty resume
Comment 77 Facundo Bianco 2016-10-29 16:53:19 UTC
(In reply to Facundo Bianco from comment #69)
> I have an UX305U and runs Debian 8.6. I was using kernel 4.6.0 and suspend
> works fine. But I upgraded to kernel 4.7.0 and suspend mode causes the
> reboot.

Now it works on kernel 4.7.8.
Comment 78 Gábor AUTH 2016-10-30 19:33:42 UTC
> Now it works on kernel 4.7.8.

Kernel 4.8.4, N752VX, latest BIOS, still crap... :(
Comment 79 Fredrik Blomqvist 2016-10-31 01:42:52 UTC
Upgraded from 16.04 to 16.10, comes with Kernel 4.8. Still not working, same problem as earlier (reboot after suspend). Tried downgrading to 4.7.8, but also still the same problem. I have yet to receive a response to my ticket from ASUS, it's been months now. I will most likely give up and buy a new laptop sooner rather than later, and it will for sure not be an ASUS.
Comment 80 Fredrik Blomqvist 2016-10-31 17:24:31 UTC
Gave it one last shot and actually called ASUS support. They ended up telling me to install the Intel Management Engine Interface (despite it only being listed for the 5th generation CPU, I got a 4th). They said that usually solves the problem. However, it did not. Since there is no more warranty they said I could send it in for service for $690...not gonna happen. Got an extended warranty thing on it so might send it there over Christmas or so. I will try downgrading the BIOS before then, when there's time (since it might brick it).
Comment 81 H Kern 2016-11-01 17:55:25 UTC
I had this problem earlier in the year on Asus ROG GL552-VW laptop with Skylake running Linux Mint 18 / Ubuntu Xenial with Linux kernel version 4.5.4. Somehow, it resolved and I don't know what happened (perhaps when I upgraded Linux Mint from 17 to 18). A few days ago the problem re-occurred and I read through the issue, looked on Asus website and found a BIOS / firmware upgrade -- for my laptop it is 300.

After I installed the firmware update, this problem went away.
Comment 82 Michele Lacchia 2016-11-07 09:21:29 UTC
I can confirm this is still an issue with 4.8.6 on an Asus UX305UA. Unfortunately, there are no BIOS updates on Asus site. I am stuck with version 201 which is one year old.
Comment 83 Joachim Haga 2016-11-09 20:17:50 UTC
Asus UX305UA with BIOS 201. Earlier, I have been able to make it work by going back to kernel 4.4.0. But after a hard reset (long press on power button), that stopped working, too. I can confirm that the long press seems to trigger it.
Comment 84 Michele Lacchia 2016-11-09 21:36:13 UTC
I found a temporary workaround.

1. Go into the BIOS and disable "wake on lid open"
2. Reboot into your system
3. Reboot again into the BIOS and enable "wake on lid open"
4. Reboot into your system.

5. Repeat steps 1-4 as needed. After every cycle, suspend the computer and open the lid to see if it wakes. I've had to do this up to 5 times.

The computer now wakes on lid open, but it stops working *after* all kernel updates. Does this suggest it's a kernel problem? After a kernel update, steps 1-4 are required again...
Comment 85 Fredrik Blomqvist 2016-11-11 17:39:06 UTC
Tried the workaround Michele Lacchia found but was not able to get it to work, even after 5 tries. If anyone else gets it to work please do let us know.
Comment 86 Michael Weimann 2016-11-18 15:32:35 UTC
This bug also affects my system:
• Asus Zenbook UX305UA
• Latest BIOS version
• 4.8.0-27-generic #29-Ubuntu SMP Thu Oct 20 21:03:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The problem started some days ago. Had some hard resets in the last days. Nothing special else (except the normal system updates).

If I can help providing more info, let me know.
Comment 87 eke2152 2016-11-18 20:44:24 UTC
This bug also affects my system:
Asus X555UQ (6200u skylake)

I tried with 4.4, 4.8, 4.8.8, 4.9rc5 kernels. I'm using pcie_aspm=off acpi_osi=  acpi_backlight=native parameters. The problem occurs when unplugged or when unplug in sleep mode.

If i boot into windows and shutdown couple of times or reflash the same bios problem resolves also this suspend-reboot issue affects Windows too.

Also wakeup works but after wakeup a couple of pci-e devices becomes unusable until reboot (usb3 ports, nvidia gpu).

Issue is not specific to linux (as it occurs in windows too) but caused by linux.

As others mentioned issue caused by hard reset.
Comment 88 H Kern 2016-11-19 01:52:51 UTC
One thing to try is to use the Nvidia Persistence Daemon:

http://docs.nvidia.com/deploy/driver-persistence/

>apt-get install nvidia-persistenced
Comment 89 Gábor Katona 2016-11-21 22:43:07 UTC
I confirm this on a Dell E7470 running Opensuse Tumbleweed, kernel version 4.8.8.1

Suspend and resume works when on AC power, but fails immediately after the shortest removal of the AC plug, and doesn't work at all if running on battery. 

The original Windows10 worked correctly, thus I suspect a kernel issue. The same kernel works fine on an old Lenovo E125.

I'm planning to try other distro to check if it is a general issue.

If you need logs, tests, etc for resolving the bug, I'm happy to assist.
Comment 90 Gábor Katona 2016-11-23 11:19:47 UTC
I have reinstalled  Opensuse Tumbleweed (the previous was also a fresh install, previously the factory default windows 10 was installed) and now the problem is gone. Before reinstall I have installed Opensuse Leap 42.2 and Ubuntu 16.10 for testing other issues, but these were totally removed.
Comment 91 Francois Cartegnie 2016-11-23 11:36:05 UTC
(In reply to Gábor Katona from comment #90)
> I have reinstalled  Opensuse Tumbleweed (the previous was also a fresh
> install, previously the factory default windows 10 was installed) and now
> the problem is gone. Before reinstall I have installed Opensuse Leap 42.2
> and Ubuntu 16.10 for testing other issues, but these were totally removed.

Likely false negative because something has been saved in bios in between
and will reappear after a hard reset.

You need to verify after a forced shutdown. (power button down few secs)
Comment 92 Michele Lacchia 2016-11-23 12:24:24 UTC
Would reflashing the BIOS after a forced shutdown solve the problem? How does one do that? It does not let me reflash the same version. (Asus UX305UA)
Comment 93 Gábor Katona 2016-11-24 11:14:49 UTC
(In reply to Francois Cartegnie from comment #91)
> Likely false negative because something has been saved in bios in between
> and will reappear after a hard reset.
> 
> You need to verify after a forced shutdown. (power button down few secs)

Hm. I have tried. After the first forced shutdown you were right. Suspend resulted in reboot running from battery. I was quite disappointed. BUT! After this first failure it worked again, and is still working, even after forced shutdowns (power button for few secs). Strange, but at least now it works. However I still hold, that the problem exits, although it's appearance seems somehow indeterministic.
Comment 94 Francois Cartegnie 2016-11-24 11:34:28 UTC
(In reply to Gábor Katona from comment #93)
> Hm. I have tried. After the first forced shutdown you were right. Suspend
> resulted in reboot running from battery. I was quite disappointed. BUT!
> After this first failure it worked again, and is still working, even after
> forced shutdowns (power button for few secs). Strange, but at least now it
> works. However I still hold, that the problem exits, although it's
> appearance seems somehow indeterministic.

Yes, summarizing the observations here and my personal experience,
there's some "hidden" state in the bios/uefi after a hard reset which isn't
expose through acpi tables and causing the reboot.

This state changes at some point when storing some states in the bios (enabling wifi, ...) and from there the system is stable.

Unless we can figure what kind of changes have been done in other than UX305U bios updates, or have a kernel trace on resume, we're pretty stuck.
Comment 95 Michele Lacchia 2016-11-24 11:46:34 UTC
(In reply to Francois Cartegnie from comment #94)
> Unless we can figure what kind of changes have been done in other than
> UX305U bios updates, or have a kernel trace on resume, we're pretty stuck.

How does one get such a trace? Are you referring to ftrace?
Comment 96 Fredrik Blomqvist 2016-11-26 03:00:24 UTC
I just managed to fix my Asus UX301LA!

Just like I thought, it was BIOS 211 that was the problem. After trying all the tricks on this page numerous times (oh god so many hours that I wasted) I finally decided to try an unofficial BIOS flash. First I tried reflashing 211, but it did not change anything. Then I tried downgrading to 209, which I was at before this problem started. Bam. Suspend now works, both in Windows and Ubuntu (before it worked in neither of them).

I am so happy right now that there aren't words to describe it :D

Nonetheless, here are the instructions if anyone else wants to try:

1. Download and install the latest WinFlash from here (obviously you need to be running Windows):
http://www.asus.com/support/Download/3/480/0/12/36/

Sidenote: If it says that it can only be installed on ASUS laptops, you need to first download and install the ATK driver for your specific model (can be found on the model's page on asus.com).

2. Start WinFlash.exe with the /nodate parameter (this allows you to flash old/same versions):
WinFlash.exe /nodate

3. Click OK on the warning, select the file you want to downgrade to (note, it is the file that is inside the ZIP that you download from Asus' website).

4. Click Flash, click exit to restart, let it flash (took me about a minute both times), let it restart, done.

5. Try suspending. If it works, please report back here with your model name and what version you downgraded from/to for other people to know.


Screw ASUS and their uneducated support.
Comment 97 Juergen Struckmeier 2016-11-29 21:37:32 UTC
(In reply to Fredrik Blomqvist from comment #96)
> I just managed to fix my Asus UX301LA!
> 
> Just like I thought, it was BIOS 211 that was the problem. After trying all
> the tricks on this page numerous times (oh god so many hours that I wasted)
> I finally decided to try an unofficial BIOS flash. First I tried reflashing
> 211, but it did not change anything. Then I tried downgrading to 209, which
> I was at before this problem started. Bam. Suspend now works, both in
> Windows and Ubuntu (before it worked in neither of them).
> 
> I am so happy right now that there aren't words to describe it :D
> 
> Nonetheless, here are the instructions if anyone else wants to try:
> 
> 1. Download and install the latest WinFlash from here (obviously you need to
> be running Windows):
> http://www.asus.com/support/Download/3/480/0/12/36/
> 
> Sidenote: If it says that it can only be installed on ASUS laptops, you need
> to first download and install the ATK driver for your specific model (can be
> found on the model's page on asus.com).
> 
> 2. Start WinFlash.exe with the /nodate parameter (this allows you to flash
> old/same versions):
> WinFlash.exe /nodate
> 
> 3. Click OK on the warning, select the file you want to downgrade to (note,
> it is the file that is inside the ZIP that you download from Asus' website).
> 
> 4. Click Flash, click exit to restart, let it flash (took me about a minute
> both times), let it restart, done.
> 
> 5. Try suspending. If it works, please report back here with your model name
> and what version you downgraded from/to for other people to know.
> 
> 
> Screw ASUS and their uneducated support.

Thank you very much for your relentless work solving the reboot problem. I followed the steps you described above and it worked for me as well. My laptop is an Asus UX301LAA. I downgraded the BIOS from version 211 to 209. Since then suspend/resume works perfectly again for both Linux (Ubuntu 16.10) and Windows 10. As the reboot on resume issue emerged simultaneously for Windows and Linux after "upgrading" to BIOS version 211, I also presumed that the new BIOS was the culprit. With your help, the issue is now clarified.
Comment 98 Michele Lacchia 2016-11-29 23:43:30 UTC
(In reply to Juergen Struckmeier from comment #97)
> Thank you very much for your relentless work solving the reboot problem. I
> followed the steps you described above and it worked for me as well. My
> laptop is an Asus UX301LAA. I downgraded the BIOS from version 211 to 209.
> Since then suspend/resume works perfectly again for both Linux (Ubuntu
> 16.10) and Windows 10. As the reboot on resume issue emerged simultaneously
> for Windows and Linux after "upgrading" to BIOS version 211, I also presumed
> that the new BIOS was the culprit. With your help, the issue is now
> clarified.

Where did you find the older versions? The Asus site only lists the latest available one for me (UX305UA, BIOS version 201).
Comment 99 Fredrik Blomqvist 2016-11-30 19:39:06 UTC
(In reply to Michele Lacchia from comment #98)
> (In reply to Juergen Struckmeier from comment #97)
> > Thank you very much for your relentless work solving the reboot problem. I
> > followed the steps you described above and it worked for me as well. My
> > laptop is an Asus UX301LAA. I downgraded the BIOS from version 211 to 209.
> > Since then suspend/resume works perfectly again for both Linux (Ubuntu
> > 16.10) and Windows 10. As the reboot on resume issue emerged simultaneously
> > for Windows and Linux after "upgrading" to BIOS version 211, I also
> presumed
> > that the new BIOS was the culprit. With your help, the issue is now
> > clarified.
> 
> Where did you find the older versions? The Asus site only lists the latest
> available one for me (UX305UA, BIOS version 201).

I think you're unfortunately out of luck then. Only thing you can do is call up ASUS, convince them to look at this thread and hope that they'll release an update. Now, based off my own experiences with their support, you have a 1% chance of that actually happening. If it's within warranty they'll probably let you send it in for free, and considering that they're pretty dumb, they'll probably give you a new one in exchange since they don't wanna admit their BIOS is faulty. lol.
Comment 100 Kepi 2016-12-02 21:12:30 UTC
I just hit the same problem with Asus UX303UA. Luckily more recent bios was available for me (BIOS 208) which resolved the problem.

I was on previous BIOS for almost a year without any problem. I'm updating kernel almost every week and never had the problem until last week.

If there is any way how to provide more information which can help to fix this issue, let me know.
Comment 101 Brant 2016-12-15 12:32:11 UTC
I have the same problem with a Dell Latitude 7370 (Skylake Core m7 latest 1.9.3 BIOS).  I'm on an Ubuntu 16.10 system running 4.8.0-30-generic the problem exists kernel 4.6.* and the variants of 4.8.* that I've tried.  Fast boot doesn't seem to effect the reboots.
Comment 102 Gábor AUTH 2016-12-15 16:00:23 UTC
> I downgraded the BIOS from version 211 to 209.

I downgraded the BIOS of my N752VX from 300 to 202... and the issue fixed...
Comment 103 Juergen Struckmeier 2016-12-15 21:25:09 UTC
(In reply to Brant from comment #101)
> I have the same problem with a Dell Latitude 7370 (Skylake Core m7 latest
> 1.9.3 BIOS).  I'm on an Ubuntu 16.10 system running 4.8.0-30-generic the
> problem exists kernel 4.6.* and the variants of 4.8.* that I've tried.  Fast
> boot doesn't seem to effect the reboots.

The problem is not related to the Linux kernel and its version. The reboot on resume issue occurred simultaneously for Linux and Windows on my dual boot system after "upgrading" to the latest BIOS. It disappeared again simultaneously for both platforms after downgrading the BIOS to the previous version. In my case the downgrade was from BIOS version 211 to 209 for my Asus UX301LAA.
Comment 104 Zhang Rui 2016-12-16 01:09:12 UTC
well, I have not read all the comments because we have quite some bug reporters. According to the last a few comments, it seems that most of the problem can be fixed by a BIOS upgrade/downgrade, right?
For any of the reporters in this thread, if
1. the problem still exists after upgrading/downgrading BIOS
2. the problem also exists in windows as well as Linux
then this indicates it is a BIOS issue, and I'd prefer to close this bug reporter as we can really do nothing here.
For people who has not found a working BIOS version, please raise the problem to Asus instead.

BTW, if anyone has the different symptom, please let me know.
Comment 105 Zhang Rui 2016-12-22 01:23:00 UTC
Seems my last comment is wrong.

For any of the reporters in this thread, if
1. the problem is gone after upgrading/downgrading BIOS
or
2. the problem also exists in windows as well as Linux

then this indicates it is a BIOS issue.
If anyone has the different symptom, which indicates this is not a BIOS problem, please let me know.

Or else, I'd prefer to close this bug reporter as we can really do nothing here.For people who has not found a working BIOS version, please raise the problem to Asus instead.
Comment 106 Vianney Carel 2017-01-01 12:20:59 UTC
I just wanted to say that I have an Asus UX305UA with the same problem. I'm running Ubuntu 16.10, and I noticed that it works - or not - depending on minor version of the 4.8.0 kernel.

For instance:
4.8.0-30.32 : working (= successful wake-up after resume)
4.8.0-32.34 : not working (= restart after resume)

After while I upgraded to kernel 4.9 (4.9.0-040900-generic #201612111631) and then it was working again.

@Zhang Rui, I contacted the Asus support, but they won't release any upgrade/downgrade of their bios. I don't know if this works on Windows or not, but this is definitely not a bios-only issue. Otherwise the issue would remain the same across kernel versions.
Comment 107 Francois Cartegnie 2017-01-01 12:39:41 UTC
(In reply to Vianney Carel from comment #106)
> I just wanted to say that I have an Asus UX305UA with the same problem. I'm
> running Ubuntu 16.10, and I noticed that it works - or not - depending on
> minor version of the 4.8.0 kernel.

Can you guarantee you did start in 'always faulty state' (after hard reset, long power press and no changes using wifi key & such) between each test ?
Comment 108 Vianney Carel 2017-01-01 14:04:55 UTC
@François, I don't know what you mean by "always faulty state". Is it some bios configuration?
For your information, I switch off my laptop every evening... One day I noticed it was rebooting immediately after resume. Then I realized that I got a kernel update some days before. This was the only thing changed. And upgrading to 4.9.0 fixed the issue.
Comment 109 Adam Pigg 2017-01-01 14:11:17 UTC
On the HP an000na, the reboot happens when the sleep occurs, ie, it tries to go to sleep, but reboots instead.  Its also no every time, maybe every other, ie, seems like it can do a sleep/resume cycle, but then the next sleep results in a reboot and sleep.
Comment 110 Francois Cartegnie 2017-01-01 14:19:26 UTC
(In reply to Vianney Carel from comment #108)
> @François, I don't know what you mean by "always faulty state". Is it some
> bios configuration?
> For your information, I switch off my laptop every evening... One day I
> noticed it was rebooting immediately after resume. Then I realized that I
> got a kernel update some days before. This was the only thing changed. And
> upgrading to 4.9.0 fixed the issue.

"switching off" is not sufficient. We have seen many randomness here in this issue and the only way with UX305 to set it in faulty state is hard reset (long power press when running), then test without touching any hard saved state keys (wifi *).

* which in my experience changes something in bios which makes bug unreproducible for a while.
Comment 111 Francois Cartegnie 2017-01-01 17:01:17 UTC
(In reply to Vianney Carel from comment #108)
> "switching off" is not sufficient. We have seen many randomness here in this
> issue and the only way with UX305 to set it in faulty state is hard reset
> (long power press when running), then test without touching any hard saved
> state keys (wifi *).

I forgot to mention: Also must run on battery.


Regarding the claimed 4.9 fix, I've just tried with 4.10 on UX305UA:

Still rebooting. Nothing has changed.
Comment 112 p.l 2017-01-09 10:30:06 UTC
UX303UB with the actual BIOS:
I downgraded the kernel from 4.8.0-32 generic to 4.4.0-57: System works for me.
When I upgrade to 4.8.0-32: It fails.
 
Downgrading of the bios doesn't have any impact.
Comment 113 Filip Božanić Dimovski 2017-01-12 11:45:44 UTC
Asus UX303LA with UEFI version 204. Suspending and then resuming results in a cold boot.

I solved the problem by (unfortunately) installing Windows 10, downloading the older version 203 of the UEFI and the WinFlash tool and reflashing it. Before flashing, make sure you install the ATK package.

The EasyFlash tool in the UEFI does not allow you to downgrade the UEFI; same with WinFlash, but you can circumvent it by running it with the switch /nodate.
Reflashing the previous BIOS version solved the suspend issue.

I suspect the kernel or efibootmgr messed up some EFI variables or configuration.
Removing the main battery and CMOS battery did not solve the problem, only reflashing and downgrading the UEFI did.
Comment 114 Zhang Rui 2017-01-12 12:08:12 UTC
Okay, now we have two kind of symptoms, one can be fixed by downgrading BIOS, and another can be fixed by downgrading/upgrading kernels.

For the second one, 4.8.0-32 breaks p.l@posteo.de, but works for Vianney...
Well, for people who can confirm the problem can be fixed by kernel change, please run git bisect to find out the commit breaks/fixes the problem.
And
for commit fixes the problem, please confirm the problem can be reproduced by checkout the previous commit.
for commit breaks the problem, please confirm the problem does not exist by checkout the next commit.
Comment 115 Zhang Rui 2017-01-12 12:14:12 UTC
(In reply to Zhang Rui from comment #114)
> for commit breaks the problem, please confirm the problem does not exist by
> checkout the next commit.

sorry, I should say

for commit breaks the problem, please confirm the problem does not exist by
checkout the previous commit.
Comment 116 Andrew Miller 2017-01-25 17:55:35 UTC
I've had this problem off-and-on with ux305ua. While it's OK, it's fine until a hard reset. It's been stuck in "reset every time" mode for a couple weeks now. Last night I left the machine unplugged but on, and it ran out of battery. *Then* it worked immediately after. I haven't tried this too many times, but maybe battery level has something to do with it. I'll write back after experimenting more.
Comment 117 Joël Porquet 2017-01-25 19:38:36 UTC
The last time I had to hard reboot and had this reboot after suspend issue, I followed this procedure which, for me, has worked every time since last year:

I shut down the computer. I boot it and go into the BIOS. I switch the fast boot mode to enable. After saving and quitting, the computer reboots. I go directly in the BIOS again, and switch the fast boot mode to disable. Computer reboots after saving and all is good from then.

Another issue I've starting having with my UX305UA is that the cpu fan starts going full speed all of a sudden. Impossible to reset the speed from Linux (through the /sys interface), and it continues going full speed after suspend, and even after a reboot. I have to leave it completely shut down for a few minutes before I can boot again and only then the fan is finally off. I've recently discovered that doing the same trick as above when it happens gives me a week or two before the issue appears again... Anyone else has this fan issue?
Comment 118 H Kern 2017-02-21 01:43:41 UTC
This is my third time commenting on this thread (previously comments 81 and 88).

The problem re-appeared for me. First, I upgraded my kernel from 4.5.4 to 4.10 and the problem remained.

I found my first comment 81 and verified that I was still running the same 300 version of the BIOS which I had found helped previously.

Then, I found my second comment about using nvidia-persistenced. When I implemented this (the configuration must have been lost somewhere in an update or upgrade), the problem went away... again.

My speculation is that the reason that ASUS machines often show up with this problem is not because they are ASUS, but that they are often higher performance and are using new-ish NVIDIA graphics controllers, but that the real problem is buried somewhere in the mix of BIOS, graphics drivers, and Linux kernel.
Comment 119 Adam Pigg 2017-03-04 14:24:31 UTC
Ive just upgraded tumbleweed to kernel 4.10.1.  Touch-wood, my laptop has slept/resumed perfectly so far for the last 2 days.  It has never worked this well.  I dont want to be hasty and say its fixed, but can anyone else test the newer kernel?

P.S. my laptop is the HP an000na, (skylake), not the asus.
Comment 120 H Kern 2017-03-07 19:35:25 UTC
This problem reappeared for me on my Asus ROG GL552-VW laptop with Skylake and Nvidia 960M running Linux Mint 18 / Ubuntu Xenial.

This time running nvidia-persistenced did not help like it did when I commented in <a href="#c118">#118</a> and <a href="#c81">#81</a>.

I upgraded my kernel from 4.5.4 to 4.5.7 and then to 4.9.13 and it did not help. 

Then, I downgraded my BIOS from 300 to 218 and the problem went away.
Comment 121 Claudiu Cismaru 2017-03-13 18:53:28 UTC
3-4 days ago I installed openSUSE Leap 42.2. Today I observed this issue, moving from home to work.

Relevant information

Hardware:
System Information
        Manufacturer: Dell Inc.
        Product Name: Precision 3510
BIOS Information
        Vendor: Dell Inc.
        Version: 1.11.4

Before Leap 42.2, I ran Leap 42.1. The latest kernel update on 42.1 was 4.4.49. Now I run 4.4.49. However, on 42.1 the issue didn't exist. Or maybe I didn't run the latest kernel, but the previous one from the updates, which was 4.4.46.

But, before reinstalling the laptop with 42.2, I upgraded the BIOS, as well.

So, in my case, there were one of the triggers:
- upgrade to latest BIOS for my model but, as I didn't try to suspend and resume it, before reinstalling, I didn't notice
- I ran a pre 4.4.49 from openSUSE (which was either 4.4.46 or 4.4.36), where the issue didn't exist in that version.

Tell me what other information do you need.
Comment 122 Claudiu Cismaru 2017-03-13 18:55:57 UTC
I forgot to mention that, based on the suggestions in here, I disabled FastBoot in BIOS and seems to have fixed the issue.
Comment 123 Zhang Rui 2017-03-27 03:10:44 UTC
Well, given we have so many different symptoms of the problem and most of them are related with BIOS upgrade/downgrade or BIOS reset (enabling/disabling FASTBOOT, etc), I don't see a chance how we can fix the kernel to make the problem go away.

Bug closed as we can do nothing here.

If anyone can consistently reproduce the problem and can confirm the previous BIOS workarounds does not help, please feel free to open a NEW ticket instead.
Comment 124 Francois Cartegnie 2017-03-27 07:29:00 UTC
(In reply to Zhang Rui from comment #123)
> If anyone can consistently reproduce the problem and can confirm the
> previous BIOS workarounds does not help, please feel free to open a NEW
> ticket instead.

I already gave the method wich is a hard reset (long power button press) when running. 
Everything else is due to randomness.
Comment 125 Juergen Struckmeier 2017-03-27 08:00:19 UTC
(In reply to Francois Cartegnie from comment #124)
> (In reply to Zhang Rui from comment #123)
> > If anyone can consistently reproduce the problem and can confirm the
> > previous BIOS workarounds does not help, please feel free to open a NEW
> > ticket instead.
> 
> I already gave the method which is a hard reset (long power button press)
> when running. 
> Everything else is due to randomness.

Rubbish! As I described in Comment 97 regarding my laptop Asus UX301LAA, the problem occurred on my dual boot system for both Windows10 and Ubuntu Linux simultaneously on upgrading the BIOS from version 209 to 211. It again disappeared simultaneously on downgrading the BIOS from version 211 to 209.
Since then suspend/resume works perfectly again for both Linux (Ubuntu 16.10) and Windows 10. This is all but randomness!
Comment 126 Francois Cartegnie 2017-03-27 08:06:09 UTC
Le 27/03/2017 à 10:00, bugzilla-daemon@bugzilla.kernel.org a écrit :
> https://bugzilla.kernel.org/show_bug.cgi?id=108801
> 
> 
> Rubbish! As I described in Comment 97 regarding my laptop Asus UX301LAA, the
> problem occurred on my dual boot system for both Windows10 and Ubuntu Linux
> simultaneously on upgrading the BIOS from version 209 to 211. It again
> disappeared simultaneously on downgrading the BIOS from version 211 to 209.
> Since then suspend/resume works perfectly again for both Linux (Ubuntu 16.10)
> and Windows 10. This is all but randomness!
> 
And ? If you read past comments I've noticed that the bug appears on
fresh bios state, until 'something' is changed.
Hence confirms your upgrade behavior (clears bios). And the long power
press/reset does the same on UX305UA, it clears some bios state somehow,
exposing the bug.

Stating on downgrade is pointless as that's the workaround fix. Of
course you can't reproduce in that case.
Comment 127 Zhang Rui 2017-03-27 23:33:09 UTC
> As I described in Comment 97 regarding my laptop Asus UX301LAA, the
> problem occurred on my dual boot system for both Windows10 and Ubuntu Linux
> simultaneously on upgrading the BIOS from version 209 to 211. It again
> disappeared simultaneously on downgrading the BIOS from version 211 to 209.
> Since then suspend/resume works perfectly again for both Linux (Ubuntu
> 16.10) and Windows 10.

This also suggests this is a BIOS related problem, as it breaks/fixes windows and Linux at the same time.

I'm not saying this is a problem, but IMO, we should raise this issue to Asus instead, rather than a kernel bug report.
Comment 128 Joël Porquet 2017-03-28 00:14:02 UTC
Do you guys know what would be the most convenient and efficient channel to contact Asus and report this annoying bug?

It'd be great to find a way that somehow would them force to address this issue.
Comment 129 H Kern 2017-03-28 14:38:21 UTC
I have had this bug off and on for a long time. It seems to show up spontaneously and then go away seemingly in response to everything from BIOS upgrade to BIOS downgrade. Kernel upgrade to Kernel downgrade. Running nvidia-persistenced and running nvidia-prime.

My suspend / resume is now working correctly and I don't want to mess with it at the moment, but I was last trying options associated with this:

http://unix.stackexchange.com/questions/291546/laptop-reboots-instead-of-resuming-from-systemd-suspend-when-on-battery-power-s

This person reports that a BIOS setting for wake when lid opened does not get set properly and that they have to unset and then reset that setting in the BIOS when upgrading the kernel.

Perhaps someone else will want to test this and see if it helps them...
Comment 130 Francois Cartegnie 2017-03-28 14:55:03 UTC
(In reply to H Kern from comment #129)
> This person reports that a BIOS setting for wake when lid opened does not
> get set properly and that they have to unset and then reset that setting in
> the BIOS when upgrading the kernel.
> 
> Perhaps someone else will want to test this and see if it helps them...

Likely to work: that's still changing bios from the "faulty/clear state" to a working state by writing parameter.
On my side, toggling wifi using hardware button (saves state) does the same.

We still don't know what happens internally, as it does not alter acpi tables.
Comment 131 Michele Lacchia 2017-03-28 14:56:12 UTC
(In reply to H Kern from comment #129)
> http://unix.stackexchange.com/questions/291546/laptop-reboots-instead-of-
> resuming-from-systemd-suspend-when-on-battery-power-s
> 
> This person reports that a BIOS setting for wake when lid opened does not
> get set properly and that they have to unset and then reset that setting in
> the BIOS when upgrading the kernel.
> 
> Perhaps someone else will want to test this and see if it helps them...

I am that very person and, unfortunately, I have to report that the workaround that's mentioned in the StackExchange question does not work anymore. (At least for me.)

It was working consistently until an unspecified point in time, between kernel 4.8 and 4.9. I wasn't able to make it work ever since, and it's possible it was just randomness from the start.
Comment 132 Vianney Carel 2017-04-21 07:56:20 UTC
(In reply to Vianney Carel from comment #106)
> I just wanted to say that I have an Asus UX305UA with the same problem. I'm
> running Ubuntu 16.10, and I noticed that it works - or not - depending on
> minor version of the 4.8.0 kernel.
> 
> For instance:
> 4.8.0-30.32 : working (= successful wake-up after resume)
> 4.8.0-32.34 : not working (= restart after resume)
> 
> After while I upgraded to kernel 4.9 (4.9.0-040900-generic #201612111631)
> and then it was working again.
> 
> @Zhang Rui, I contacted the Asus support, but they won't release any
> upgrade/downgrade of their bios. I don't know if this works on Windows or
> not, but this is definitely not a bios-only issue. Otherwise the issue would
> remain the same across kernel versions.

So I just upgraded to Ubuntu 17.04 with kernel 4.10.0-19 and got the issue again. Mind that hard reboot doesn't change anything *at all*.

I'll try to downgrade to 4.9.0-040900 to see if it fixes the issue again.

Anyway, you are not going to make the issue disappear by just closing it. Please reopen. This is a terrible situation to loose data only because your laptop went on suspend.
Comment 133 Zhang Rui 2017-04-21 09:11:11 UTC
(In reply to Zhang Rui from comment #127)
> > As I described in Comment 97 regarding my laptop Asus UX301LAA, the
> > problem occurred on my dual boot system for both Windows10 and Ubuntu Linux
> > simultaneously on upgrading the BIOS from version 209 to 211. It again
> > disappeared simultaneously on downgrading the BIOS from version 211 to 209.
> > Since then suspend/resume works perfectly again for both Linux (Ubuntu
> > 16.10) and Windows 10.
> 
> This also suggests this is a BIOS related problem, as it breaks/fixes
> windows and Linux at the same time.
> 
> I'm not saying this is a problem, but IMO, we should raise this issue to
> Asus instead, rather than a kernel bug report.

s/I'm not saying this is a problem/I'm not saying this is NOT a problem

(In reply to Vianney Carel from comment #132)
> (In reply to Vianney Carel from comment #106)
> > I just wanted to say that I have an Asus UX305UA with the same problem. I'm
> > running Ubuntu 16.10, and I noticed that it works - or not - depending on
> > minor version of the 4.8.0 kernel.
> > 
> > For instance:
> > 4.8.0-30.32 : working (= successful wake-up after resume)
> > 4.8.0-32.34 : not working (= restart after resume)
> > 
> > After while I upgraded to kernel 4.9 (4.9.0-040900-generic #201612111631)
> > and then it was working again.
> > 
> > @Zhang Rui, I contacted the Asus support, but they won't release any
> > upgrade/downgrade of their bios. I don't know if this works on Windows or
> > not, but this is definitely not a bios-only issue. Otherwise the issue
> would
> > remain the same across kernel versions.
> 
> So I just upgraded to Ubuntu 17.04 with kernel 4.10.0-19 and got the issue
> again. Mind that hard reboot doesn't change anything *at all*.
> 
> I'll try to downgrade to 4.9.0-040900 to see if it fixes the issue again.
> 
> Anyway, you are not going to make the issue disappear by just closing it.
> Please reopen. This is a terrible situation to loose data only because your
> laptop went on suspend.

Surely this can be reopened.
If anybody thinks this is a kernel regression, please use git bisect to find out which commit introduces the problem. and confirm
1. the bad kernel with the commit reverted works
2. the good kernel with the commit applied breaks
Comment 134 Josef N 2017-04-26 10:32:40 UTC
I've encountered this problem on Ubuntu 16.04 LTS on Asus UX305U for the past few days, somewhere along the upgrade of kernel from 4.4.0-5x to my current 4.4.0-72 (can't really tell exactly when), in the course of regular updates of the kernel through apt.

This had nothing to do with BIOS update, and since BIOS for UX305U is available only as version 201, couldn't do the upgrade/downgrade test anyways.

My laptop is dual-boot with Win10.
Also, I did not do hard reset (long press of power button) before the problem appeared (and not willing to test it :).

I've tried several of the suggestions here, and eventually got the problem resolved, though not exactly sure what was the exact solution.

Here's things I did; sorry for a noob write up, just hope this will help someone:

* turned the FastBoot on and off several times (sometimes with booting to OS in-between the switches, something just one after another), currently with FastBoot off (didn't test if it matters),

* since I've got the restart-after-sleep problem in Win as well before, I've logged into Win and made sure to shut down properly, in case it left some boot flag or something (like, "safe boot next time" or whatever),

* changed boot flags in both /etc/default/grub and /etc/default/grub.ucf-dist to "nouveau.modeset=0 pci=noaer acpi_backlight=native acpi_osi=!" (not even sure which are relevant to me, btw).
Comment 135 H Kern 2017-04-27 03:30:49 UTC
This problem has re-appeared for me. I had many tasks running and it hung in the suspended state. After I hard-reset it (holding the on/off button until it turned off), the problem was back. This agrees with comments 125 and 126.

Here are the steps I have tried to get the system back to normal (all unsuccessful):

- toggled any BIOS setting I could find, including Fastboot off and on about three times
- clicked the button to set BIOS settings to defaults
- upgraded my kernel from 4.9.17 to 4.9.24
- upgraded Nvidia driver from 3.75 to 3.81
- changed video settings from Nvidia to Nouveau and back again
- turned on Intel microcode
- ran nvidia-persistenced and nvidia-prime

My BIOS is version 300, which is the most recent for my system.

One thing that I have noticed is that after the system gets suspended, it behaves like a suspended system, which is to say that the little bulb-light has its intermittent blink showing that the system is suspended. It is when it comes back to life that it goes into reboot state.
Comment 136 Fabián Mora 2017-07-26 16:09:36 UTC
Hi 

I had the same problem with my UX305UE running ubuntu.

It started when I forced the restart with the power button. 

The way I fixed it was the same way I caused the problem. I forced the restart again with the power button and once I did it worked perfectly.

I hope this will help you.
Comment 137 Viktor A. Danilov 2017-11-14 07:33:16 UTC
Hi


I have the same issue with Asus GL552VW (Skylake 6700HQ): 100% chance to get a restart during wake up with AC unplugged.

- Ubuntu 16.04 @ Linux 4.13.12 + Nvidia 384
- BIOS 300 (didn't work with 218 too)


My solution/workaround for that:

+ VT-d disabled in BIOS
+ kernel command line: pcie_aspm=force pcie_aspm.policy=powersave acpi_osi="Windows 2015" intel_iommu=on intremap=no_x2apic_optout
+ blacklist for bbswitch (it causes PCIe error with the following system hang)
+ completely suspend nvidia device (unload modules, suppress the power and disable the device) - «black magic» with nvidia in my rc.local:

    (
     if lsmod | grep nvidia 2>&1 > /dev/null; then
      rmmod nvidia_drm 2>&1 > /dev/null || true
      rmmod nvidia_uvm 2>&1 > /dev/null || true
      rmmod nvidia_modeset 2>&1 > /dev/null || true
      rmmod nvidia 2>&1 > /dev/null || true
     fi
     echo "auto" > /sys/bus/pci/devices/0000:01:00.0/power/control
     echo "0" > /sys/bus/pci/devices/0000:01:00.0/enable
    ) || true


please note that my kernel doesn't have open source nouveau/nvidia driver at all (not sure, but it could affect the result).

Pros: 
+ suspend/resume works well (with all combination of suspend/resume with/without AC)
+ battery lifetime grows almost twice
+ temperature sensors show lower temperature (about ~3-4 degrees lower than usual)

Cons:
- nvidia device goes down permanently up to the next reboot (I didn't find a way to bring it back to life without reboot)
Comment 138 Francois Cartegnie 2018-02-07 13:43:12 UTC
It's getting worse. 
Now randomly won't wake-up (power button only blinks) or just plain reboot.
(unsure if that's kernel >= 4.11 or bluetooth being now on)

Tracing the wake-up issue it points the acpi device 0d...

echo 0 > /sys/power/pm_async
echo 0 > /sys/power/pm_trace
sync && systemd suspend
Comment 139 Francois Cartegnie 2018-02-07 13:44:34 UTC
(In reply to Francois Cartegnie from comment #138)

oops, of course that's

echo 0 > /sys/power/pm_async
echo 1 > /sys/power/pm_trace
sync && systemctl suspend
Comment 140 Gábor AUTH 2018-05-06 18:15:06 UTC
FYI: I've downgraded to 4.4.x kernel about a year ago (from 4.6.x). Since then I have no problem with suspend, I'm currently using the version 4.4.126.
Comment 141 Rafael Kitover 2018-08-28 01:25:49 UTC
I have a UX51VZ, an older ivy bridge zenbook, it has the same issue.

I tried this procedure, but when suspending the laptop it would just wake up immediately.
Comment 142 Zhang Rui 2018-10-10 07:48:46 UTC
given that this is really a long thread, and it is a tough issue with so many reporters, against different platforms/kernel_version/BIOS_version.

Let's collect the test result against latest upstream kernel, please do the following test
1. set CONFIG_PM_TRACE_RTC and CONFIG_PM_DEBUG
2. echo 1 > /sys/power/pm_trace
3. set /sys/power/pm_test to different modes
4. echo mem > /sys/power/states
if system does not reboot, please tell me which pm_test mode you're using
if system reboots, please tell me which pm_test mode you're using and attach the dmesg output after reboot.
Comment 143 Francois Cartegnie 2018-10-19 17:39:32 UTC
(In reply to Zhang Rui from comment #142)

> 1. set CONFIG_PM_TRACE_RTC and CONFIG_PM_DEBUG
> 2. echo 1 > /sys/power/pm_trace
> 3. set /sys/power/pm_test to different modes
> 4. echo mem > /sys/power/states
> if system does not reboot, please tell me which pm_test mode you're using
> if system reboots, please tell me which pm_test mode you're using and attach
> the dmesg output after reboot.

I can't fault it in any mode, except when mode is set to "none"

Reboots even after running all tests when set back to "none".
Addings dumps.
Comment 144 Francois Cartegnie 2018-10-19 17:40:45 UTC
Created attachment 279103 [details]
reboot on pm tests to "none"
Comment 145 Francois Cartegnie 2018-10-19 17:41:22 UTC
Created attachment 279105 [details]
reboot on pm tests to "none" after testing all other modes
Comment 146 Francois Cartegnie 2019-02-06 08:25:52 UTC
Experiencing sometimes now steady (instead of blinking) power led with 4.20.4
trying to resume. Unsure if that means any progress

Note You need to log in before you can comment on or make changes to this bug.