I basically followed a similar path to you with the same results.
For where to put acpi, I found this page: http://developers-club.com/posts/165897/
I was also concerned that I screwed up the AML file, so I edited my grub to launch a normal kernel instead of the Xen kernel and was able to see the S3 state then.
That does point to Xen doing something differently. I couldn't find any resources directly relating to Xen, but I did find this thread that sounds like it could be related: https://lists.gnu.org/archive/html/grub-devel/2017-03/msg00088.html
I haven't made any progress past that. :(
Best wishes,
--Bo
im also very disappointed and sad... i had high hopes for my first laptop upgrade after a long time and the x1c6 is not living up to it.
Basically all fine with linux, changing the kernel parameter to enable s2idle etc solves the suspend issue (i followed the arch linux wiki).
But then with qubes its a nightmare, it gets unbearably hot all the time (5 VMs running just a browser normal office workload) and of course no progress with suspend. Just to let you know the laptop gets so constantly hot all the time ( this is with the latest bios mind you!) that the adhesive on the bottom screen bezel has come off.
So sad.. :(
I get inspired by people like you to contribute to open source projects.
I followed your guide to the letter and got the results you were describing exactly.
I believe your efforts should be documented in the qubes wiki.
Let me know how you are getting along with the set up, did you try any under volting?
I can also confirm initial success with these instructions.
Should we be on the lookout for any other issues with suspend, now that waking up works?
From a fresh Qubes install, I have compiled the patched kernel and specified the following kernel command options in my /boot/efi/EFI/qubes/xen.cfg file:
acpi_force_s3=5
mem_sleep_default=deep
The system now responds to the power button being pushed or the lid being opened in a sleep state. The pulsing power button light turns to a steady light. So that's nice.
Unfortunately, the system freezes within seconds. Sometimes at the X lock screen. Sometimes it just remains blank.
(Given that this is a UEFI install using the Lenovo Red Hat LiveCD usb disk creation trick, I do not know how to otherwise specify kernel command options at boot. Should I get a menu similar to the GRUB menu I see on a legacy install? Because I don't. I see a row of penguins and then the typical scrolling wall of linux boot text)
Any thoughts?
By process of elimination, I was able to pinpoint the wakeup issue to sys-usb.
With further testing, I found that removing the USB-C Thunderbolt 3 Controller from sys-usb's device list resolved the issue.
Will test further to see if fiddling with Thunderbolt BIOS assist mode will help. Might a BIOS update might fix this? (The BIOS is on N23ET40W v1.15 from 2018-04-13). Is there a way to update the BIOS without a Windows 10 utility?
Side notes:
1. Despite dmidecode reporting back the proper magic LENOVO and X1 Carbon magic strings, I still need to manually specify acpi_force_s3=5 into my xen.cfg, otherwise the kernel patch does not appear to work.
2. My aside about needing the LiveCD Lenovo trick was irrelevant. I can install from an install disk created with dd, so I don't know what I was doing wrong the first time.
You basically need to download the BIOS update as ISO image, then use 'geteltorito' to convert it to an image. Then 'dd' it to a USB stick.
Turning Thunderbolt BIOS assist on should be the solution.
I had the same issue in Linux and fixed it by turning that on.
Hi Dan,
I followed kernel-compile-notes.txt twice. The first time failed, the second time worked a charm with minor changes to the method. These are my notes on the experience.
Before I proceed, I note that the current version of the qubes-linux-kernel git on stable-4.14 is 4.14.67-1. This is the version of the kernel that I have compiled and applied your patch to.
The first (failed) attempted, I was on a fresh install of Qubes R4.0, kernel 4.14.18-1. Compiling the kernel seemed to work, as did installing. Upon boot and unlocking my hard-drive the system never seemed to get anywhere on the loading. Upon pressing escape I noticed I was being spammed with a `dracut` error before eventually it dropped to an emergency shell. A more forward thinking me would have written down the error message. I simply reinstalled Qubes R4.0 fresh to start over.
The second (successful) attempt was after I had updated dom0. I was running kernel 4.14.57-2. I knew that this was an earlier version than the one I was going to compile so it wasn't going to be an issue (as you've described in your excellent notes). I doubt updating dom0 had anything to do with the success of this attempt, instead I did two things differently to your notes:
1. I ran the following command twice, superfluous I presume:
make verify-sources
2. I ran the following command in dom0 after installing:
dom0 $ sudo dracut -f "/boot/efi/EFI/qubes/initramfs-$version.img" "$version"
Paying special attention that the variable $version was expanded correctly.
After adding the kernel parameter:
mem_sleep_default=deep
to the appropriate line in /boot/efi/EFI/qubes/xen.cfg - again as you've described.
To conclude, I can confirm that your patch works for version 4.14.67-1 of the qubes-linux-kernel too. That is, standby and wake from standby work as intended and the command:
dmesg | grep ACPI | grep supports
yields:
ACPI: (supports S0 S3 S5)
on my Carbon X1 Gen 6, i7 8550U.
However, perhaps unrelated, I have noticed the CPU doesn't turbo boost. Running the following command in dom0:
xenpm get-cpufreq-states
shows that only 13 / 16 P-States are usable with P0, P1, P3 (the turbo states) clearly as the ones that aren't available.
Regards,
Aqeel
Dan's notes worked perfectly for me once I remembered to enable thunderbolt assist. Thanks djb!
The only problem I had with original instruction is that yum didn't want to install another kernel (compiled one) with identical version (one was already installed since I did upgrade first) - I had to increment value in qubes-linux-kernel/rel file and recompile again so my version named as 4.14.72.2.
hi friends just update the bios and choose the linux sleep option in the bios, the issue has been fixed
Can confirm. Perform the BIOS update, and enter BIOS configuration at boot:
Config -> Power -> Sleep State -> Linux
I switched xen.cfg default kernel to 4.14.18-1.pvops.qubes.x86_64.
Sleep now works great! Laptop even wakes to XScreenSaver when lid is opened.
Just updated the bios to 1.34 (N23ET59W) on a 6th gen X1. Set Sleep State to "Linux" and the laptop still does not wake up when the lid is closed and re-opened. Running 4.14.74-1.
Do I still need to downgrade the kernel and patch? It sounded like the bios update would be enough.
Ah, still needs to turn on the Thunderbolt assist on as well.