Created attachment 126901 [details]
poweroff patch from Jan Michael Brummer
I have a Dell Venue 8 Pro, and I've been working with several other folks with similar tablets - that is, tablets based on the first-generation Intel Baytrail platform.
They all appear to need quirk handling to shutdown / reboot correctly.
I'm attaching a couple of patches. Jan Michael Brummer at Intel wrote the 'poweroff' patch and the reboot quirk for the Venue 8 Pro. I've been applying those two to my 'fedlet' kernel builds - see https://www.happyassassin.net/fedlet-a-fedora-remix-for-bay-trail-tablets/ - and they make the V8P shut down and reboot reliably for me, and others with V8Ps who've tested the build.
The 'reboot quirk' patch contains that V8P quirk. It also contains a quirk for the Asus T100TA which has been written and tested by Jacek Danecki. It also contains a quirk for the Lenovo Miix 2: I don't have one of these, but someone following my Fedlet posts contacted me and sent the dmidecode, so I wrote a quirk based on that.
Phil Knirsch at Red Hat has an HP Omni 10, and I've contacted him to ask if it also has the same shutdown/reboot problems, and to ask for dmidecode output so we could add a quirk for that one too.
Created attachment 126911 [details]
reboot quirk patch: V8P from Jan Michael, T100TA from Jacek Danecki, Miix 2 by me
Created attachment 126921 [details]
dmidecode from Miix 2 (provided by Vaidotas Kazla) for reference
Created attachment 126931 [details]
dmidecode from Venue 8 Pro (mine) for reference
I've tested the kernel build with the attached patches - http://happyassassin.net/fedlet/repo/i386/kernel-3.14.0-0.rc3.git5.1.1awb.i686.rpm - on my V8P, and it both shuts down and reboots correctly.
Please send the quirk patch to ACPI and x86 maillist.
For the longer term we should be using either EFI reboot (and the 64/32bit EFI thunking Matt is working on) or possibly PMU. PMU is being looked at internally at the moment.
Bay Trail-T tablet doesn't support ACPI poweroff, and has only
32bit EFI runtime service to support shutdown, which can't be
called from current 64bit linux kernel.
I'm working on a Power management controller(PMC) driver for Bay Trail-T SoC
and found there is a native way to poweroff the tablet via PMC PCI IO port.
I have a patch to make 64bit kernel poweroff work.
So we have the following 3 methods:
(1) ACPI shutdown
(2) EFI runtime service shutdown
(3) PMC PCI IO port shutdown
I'm thinking if it's acceptable to add a cheap power off hook
to install PMC PCI IO poweroff method and called in native_machine_power_off.
Just for the record, I'm still using a 32-bit kernel and userspace for my 'fedlet' build.
Do you still want the quirk patch mailed out to the lists?
Created attachment 127611 [details]
introduce BOOT_EFI and BOOT_CF9 into reboot sequence loop
Generally, we expect EFI handle all of the reported cases.
for 32bit/64bit linux on 32bit/64bit EFI:
- we need the attached patch to include BOOT_EFI into the reboot sequence loop so that we don't need "reboot=efi" in the command line.
for linux and EFI in 32bit and 64bit mixed mode:
- we need Matt Fleming's work to make linux calling EFI runtime service in mixed mode, his work will be coming soon in the upstream linux kernel.
for currently 64bit linux on 32bit EFI:
- we fall into BOOT_CF9 and write to 0xCF9 to reboot with the attached patch.
poweroff is similar to reboot, we still expect EFI runtime service handles all of the cases. The exception is that we don't have 0xCF9 to poweroff the machine. But, my another patch will install a pmc_power_off function to pm_power_off hook, to provide a PCI IO port to power off the machine.
So, we don't need any dmidecode based quirks any more.
Adam, can you please check if this patch makes any difference?
(In reply to Rafael J. Wysocki from comment #11)
> Patch: https://patchwork.kernel.org/patch/3808341/
> Adam, can you please check if this patch makes any difference?
This patch will not make any difference. This patch just releases the not-working ACPI power off method, so that a native power method provided by pmc driver can be installed and power off the machine.
We'll consider EFI runtime service here once Fleming's mixed mode is landed.
Created attachment 128941 [details]
work to provide poweroff functionality after the following patch is applied.
So *in* *addition* to applying the patch from comment #11, users will need the new PMC driver from comment #13, right?
Please take care of this bug going forward.
Reboot patch is here:
Sorry, I kind of got lost in the giant email exchange that accompanied the patch and forgot to test it. I'll throw it in the next Fedlet kernel build and verify that it works. I'm still carrying the old quirk patches at present.
You'll need both patches from comment #11 and comment #13.
For power off:
- patches from comment #11 and comment #13.
- patch from comment 15
Please make sure the old quirk patches are removed.
Both 32bit and 64bit should work.
OK, I have a kernel build going now with the latest versions I could find of the three patches, plus https://patchwork.kernel.org/patch/3780211/ . Will report back when it's built and tested.
Looks good here on the Venue 8 Pro. Shutdown and restart both work. Will ask for feedback from Fedlet users.
Thanks Adam, did you remove the old reboot quirk via DMI strings before checking? Hopefully yes.. but just checking
Yep, of course.
So it looks like as of current 3.15, the smaller patches have been merged but the new PMC driver still hasn't. Do we need to poke upstream to get that merged?
Still doesn't seem to have been merged for 3.16(!) I've mailed Aubrey to ask why.
already merged by:
(1) efi/reboot: Add generic wrapper around EfiResetSystem()
(2) efi/reboot: Allow powering off machines using EFI
(3) x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag
shipped in 3.15-rc1:
Author: Li, Aubrey <email@example.com>
Date: Sun Mar 2 18:39:02 2014 +0800
x86, reboot: Add EFI and CF9 reboot methods into the default list
If a kernel newer than that isn't rebooting on the machines
mentioned here, then please re-open this report.