Contribute
Register

[WIP-Guide] HP ENVY x360 13-y013cl - i7-7500U Kaby Lake

Status
Not open for further replies.
Hi Guys.

Like others in this thread i am able to boot osx with no issues from the nvme as long as i boot clover from a USB device(HDD/SSD/Flash .. etc) and then select the osx installation on the Nvme, however, if i boot clover from the Nvme (exact same EFI/Clover folder as on USB) then OSX will KP immediately once selected ...

I have 2017 15" HP Spectre X360 which also suffers from this apparent uefi/bios issue ... that the 2017 HP Envy users are seeing, I've been looking into the issue but so far have been unable to fix it.

Question to the Envy users: If you boot clover from the nvme is the touch screen keyboard enabled ? do you get a keyboard icon in top right corner which toggles on screen touch keyboard .... if so then presumably if you boot clover from USB you have no touch screen keyboard ?

I believe that for some reason the uefi/bios is treating clover (when booted from nvme) in a similar way to the HP diagnostics and enabling the touch screen and touch keyboard during post os boot ... if so then it maybe switching the nvme device into some sort of test or diagnostic mode ...

Its just a theory right now but i would like confirmation from you HP Envy guys if the touch screen & touch keyboard is behaving like it is on my 2017 HP Spectre X360 (enabled if clover booted from nvme / disabled if booted from usb) ..

I've installed Linux to the nvme and grub/grub2 does not suffer from this issue .. (no touch keyboard active during post).

For now i am using a tiny USB flash drive to negate the issue, the USB 3 Type C port is working fine so most of the time i can leave the tiny USB flash drive plugged into the laptop... i've added custom UEFI entries for each OS .. so its not a massive issue, just need to press f9 at boot and select which os to boot, not prefect i know but workable for now until i find a solution.

small-usb.jpg boot-menu.jpg


Cheers
Jay
 
Hi Guys.

Like others in this thread i am able to boot osx with no issues from the nvme as long as i boot clover from a USB device(HDD/SSD/Flash .. etc) and then select the osx installation on the Nvme, however, if i boot clover from the Nvme (exact same EFI/Clover folder as on USB) then OSX will KP immediately once selected ...

I have 2017 15" HP Spectre X360 which also suffers from this apparent uefi/bios issue ... that the 2017 HP Envy users are seeing, I've been looking into the issue but so far have been unable to fix it.

Question to the Envy users: If you boot clover from the nvme is the touch screen keyboard enabled ? do you get a keyboard icon in top right corner which toggles on screen touch keyboard .... if so then presumably if you boot clover from USB you have no touch screen keyboard ?

I believe that for some reason the uefi/bios is treating clover (when booted from nvme) in a similar way to the HP diagnostics and enabling the touch screen and touch keyboard during post os boot ... if so then it maybe switching the nvme device into some sort of test or diagnostic mode ...

Its just a theory right now but i would like confirmation from you HP Envy guys if the touch screen & touch keyboard is behaving like it is on my 2017 HP Spectre X360 (enabled if clover booted from nvme / disabled if booted from usb) ..

I've installed Linux to the nvme and grub/grub2 does not suffer from this issue .. (no touch keyboard active during post).

For now i am using a tiny USB flash drive to negate the issue, the USB 3 Type C port is working fine so most of the time i can leave the tiny USB flash drive plugged into the laptop... i've added custom UEFI entries for each OS .. so its not a massive issue, just need to press f9 at boot and select which os to boot, not prefect i know but workable for now until i find a solution.

View attachment 247554 View attachment 247553


Cheers
Jay

There is a way (or at least used to be) to run Clover in text mode, so that would be something to try...
 
Its just a theory right now but i would like confirmation from you HP Envy guys if the touch screen & touch keyboard is behaving like it is on my 2017 HP Spectre X360 (enabled if clover booted from nvme / disabled if booted from usb) ..

Yes that's the exact behavior I see on the Envy...

For now i am using a tiny USB flash drive to negate the issue, the USB 3 Type C port is working fine so most of the time i can leave the tiny USB flash drive plugged into the laptop... i've added custom UEFI entries for each OS .. so its not a massive issue, just need to press f9 at boot and select which os to boot, not prefect i know but workable for now until i find a solution.

Look had codeye's post #54 on this thread. If you install Clover to the NVME on legacy mode, will will boot without using a USB dongle.
 
There is a way (or at least used to be) to run Clover in text mode, so that would be something to try...

Cheers RM ... I look into it, you never know .....

Update: 17th Apr - Tried text mode only - same result :crazy:


Yes that's the exact behavior I see on the Envy...

Interesting .. thanks for confirming this .... i'm pretty sure its related to the OSX KP .. will dig deeper in to it ... going to try dumping the AMI UEFI/BIOS and try and figure out why it treats Clover differently to Grub or Windows boot loaders/managers ...

Cheers
Jay
 
Last edited:
Here's a more functional way of using tent mode. The kext is installed in /S/L/E. The app produces a button that floats on top of the screen. You can position the button by dragging the small horizontal line above it. On my computer tent mode is limited to 1600x900 and 3200x1800 (Unfortunately the computer kernel panics when rotated to 90 or 270 degrees so I've left this out as an option)
 

Attachments

  • tent.zip
    152.4 KB · Views: 118
Last edited:
Here's a more functional way of using tent mode. ...

Hi codeye,

Interesting development ... so is the touch screen and touch keyboard working for you in OSX ?
If so .. how did you achieve this ? some sort of kext or device injection ?
What about the n-trig pen & digitiser (if available) .. you have any luck with that ?

I have 2017 HP Spectre X360 15" which has a very similar specification to 2017 Envy X360 except for audio device (ALC295) and nvidia GPU (GT 940MX) however the touch screen and digitiser seem to be on i2c bus on the spectre .. not USB HID ?

Are you booting clover via UEFI/USB device or booting clover from nvme in legacy mode ?
Is the touch screen and touch keyboard active in clover ?

------------

Since my last post i've installed clover in legacy mode and can now boot clover from nvme via f9 and then selecting 'notebook hard disk' .. however i kept my exsiting uefi clover insatll (copied from working usb) in the esp (EFI partition) ... after re-installing clover (in legecy mode) i deleted the new (legecy mode) /EFI folder from the root of the OSX volume ... this is very similar to how i had to install clover on my Sony Viao SE2 a few years ago .... the bios boots legacy 'boot' file (in uefi msr) which then falls back to the /EFI folder of the efi partition of the nvme (hence the 6/7 boot status) .. its what i call a Hybrid EFI install, i detailed the process in my old guide here :-

https://www.tonymacx86.com/threads/guide-update-sony-s-series-to-clover-yosemite.156533/#STEP2

Its a fair compromise since once clover is loaded it can still boot windows and linux via EFI boot loaders ..

Cheers
Jay
 
Last edited:
Hi Guys,

Further to my last post i now have Clover auto booting at power on and reset ... :) ... no more having to press F9.

Warning:

Following this method could potentially (temporally) remove the ability to boot your computer if for some reason something goes wrong, so before making any changes ensure you have a full backup of your EFI partition of the internal SSD, i would recommend formatting a USB flash drive as GUID/UEFI and copy your EFI folder to the USB EFI partition. That way if anything does go wrong (which it shouldn't) you can always boot via USB and restore your EFI folder and make any other changes to get your system back to working order again.

The method is pretty easy and stright forward and should not cause any issues but i'm not responsible for any data/system loss that may arise if something does go wrong ...

Prerequisites:

You must have Secure Boot Disabled and Legacy Mode Enabled in the BIOS

You should also have Clover installed and working in legacy mode (via f9), i think most of you in this thread have already done this ... if not it is covered in a number of posts over the last few pages of this thread so i wont repeat that process here.

Before going any further its worth making sure you have working Clover entries for all the bootable OS's you have installed and any post utilities you want to use such as Apple Recovery .... in my case I have Widows 10, OSX and Linux Mint installed along with Apple HD recovery.

Once your happy that all Clover selections/entries are working we can continue ...

Method:

First we must disable the Windows Boot Manager entry in the windows bcd file, we do not want to remove it as this will cause windows to fail to load as it will not detect an entry for windows in the bcd file, we simply need to flag it as disabled which will cause the BIOS to ignore it.

The easiest way to do this is to boot into Windows and install EasyUEFI which can be downloaded from:-

http://www.easyuefi.com/index-us.html

The free version is fine for what we need to do, once downloaded run the app and select 'Manage EFI Boot Option', confusingly this is not referring the UEFI entry list held in the BIOS but the boot options in the windows BCD file used by the Windows Boot Manager when booting in UEFI mode ... god bless Microsoft for making it so confusing ..

In most cases there will be just two entries the first will point to the Windows Boot Manager and the second should be for removable devices. If the first entry has a status of Enabled then select it by clicking on it so its highlighted and then set it to Disabled by clicking on the icon with the red dot in a circle, !!! do not delete the entry !!!! if you do windows will fail to load and you will have to repair the BCD.

EasyUEFI-Disable.PNG


Once your happy that its status is disabled you can quit EasyUEFI and reboot, in some instances this may be enough to force the BIOS to revert to legacy boot mode and boot clover (in legacy mode), however i found that the HP BIOS also had an UEFI entry for the Microsoft Boot Manager in addition to the entry in the BCD.

Since the HP BIOS will automatically favour UEFI booting over legacy booting we need to remove all additonal UEFI entries from the BIOS configuration ...

In order to do this i use Clovers EFI shell, this is normally the first icon on the second row on the GUI and will have a text/help prompt of "Start UEFI Shell 64" :-

clover-menu.png


If you don't have this option then you need to enable Clovers 'Tool' option in clovers config.plist :-
<key>Scan</key>
<dict>
<key>Tool</key>
<true/>
</dict>
For those using Clover Configurator this is achieved via selecting the 'Tool' option in the Gui section :-

Screen Shot 2017-04-18 at 12.40.07.png


Save the change (if necessary) and reboot.

Boot into Clover and select the EFI shell, wait for the startup script to complete and you should get a shell prompt.

You can list the current UEFI Boot entries with the following command :-
bcfg boot dump
Make a mental note of the number entries, in order for the the BIOS to fall back to legacy booting we need to remove them all.

Use the following command :-
bcfg boot rm 0
This will remove the first entry in the list, repeat the command by pressing the up arrow as many times as there where items in the list, when done check the list is empty by repeating the dump command :-
bcfg boot dump
Once complete quit the shell with the 'exit' command which should return you back to the Clover GUI
Restart the computer by selecting the 'Restart Computer' option or with <CTRL><ALT><DEL>

If all has gone well then your laptop should now boot straight into Clover.

You still have the option of pressing F9 and manually selecting a boot loader .. if you need to permantley re-enable UEFI booting of Windows you can re-add the UEFI entry by booting back into Clovers EFI shell and executing the following commands :-
fs0:
cd efi/microsoft/boot
bcfg boot add 0 bootmgfw.efi "Windows 10"
exit
If you want to learn more about the EFI shell commands take a look at this reference page :-

http://docstore.mik.ua/manuals/hp-ux/en/5991-1247B/ch04s13.html

Note: Clover does not support some of the commands (eg lanboot) but you can use the built in 'help' command to check which commands are supported ..

There are other methods of managing the UEFI entries in the BIOS such as the linux efibootmgr command :-

https://linux.die.net/man/8/efibootmgr

But using the efi shell built into clover is by far the simplest and most convenient ..

I hope this helps some of you guys .. let me know how you get on.
Cheers
Jay
 
Last edited:
Hi Jay,
The touchscreen on the Envy is Elan USB (PID: 0x22af VID: 0x04f3). It is recognised natively as an AppleUSBHostCompositeDevice. The kext just alters the x,y in the super::dispatchAbsolutePointerEvent call to adjust for screen rotation - unfortunately Sierra doesn't seem to handle portrait mode too well (kernel panic on touching the titlebar of any window). I use Apple's built in Keyboard viewer in tent-mode (inkwell activates but doesn't respond). No digitizer or n-trig support.

If it's i2c maybe voodooi2c will help?

Booting in legacy mode here as well.
 
Once your happy that all Clover selections/entries are working we can continue ... since the HP UEFI BIOS will automatically favour UEFI booting over legacy booting we need to remove all defined UEFI entries from the BIOS configuration ...

There is no option in BIOS to simply disable UEFI?
 
There is no option in BIOS to simply disable UEFI?

Unfortunately Not ... The 2017 HP Spectre X360 (And Envy ?) BIOS favours UEFI entries first .. so by removing them it falls back to booting first legacy loader defined in MSR ... a bit messy i know but it works so a big step forwards ... no more having to boot from USB via F9.

As alrady shared with you .. the BIOS is very very limited .... no access to any form of CSM mangment, just Secure Boot :-

BIOS-SYS-CFG-BOOT.jpg


I've dumped the BIOS and used the AMI utils to analise the BIOS menu structures .. all the really usefull menu's and settings are hidden, i can easly enable the menus and build a new BIOS image .. but unfortuantley it needs to be a signed BIOS image .. however i'm not flash a changed bios as a few reports of it bricking laptops if not signed ... shame HP feels the need to do this sort of thing .. i know its all related to warranty and support but still we should have the option ..

It also seems that HP are moving towards full native UEFI for all POST utilities ..

The HP folder on the Nvme EFI partition contains many efi utilities, diagnostics, BIOS update, mem test .. all sorts of stuff that can be manually run via F9 and selecting the appropiate efi file :-

Directory of /EFI/HP/BIOSUpdate
Screen Shot 2017-04-18 at 15.28.36.png

Directory of /EFI/HP/SystemDiags
Screen Shot 2017-04-18 at 15.28.55.png


I think its this change in post software stratagey (rather than these utils being burned into BIOS) that causes OSX to KP when Clover is booted from the nvme (as UEFI) ... the BIOS seems to treat Clover as one of these HP efi utilities .. enabling the Touch screen and touch keyboard ... which seems to switch the device into some sort of diagnostic mode ... still looking into that but at least things are working well now using MSR to boot Clover (legecy mode)

Cheers
Jay
 
Last edited:
Status
Not open for further replies.
Back
Top