THEDEVIOUS1 / CHUWI-MINIBOOK-HACKINTOSH

EFI files for hackintosh on the CHUWI Minibook
38 stars 7 forks source link

[Enhancement] Rotation Scripts #14

Open ThongSong7 opened 3 years ago

ThongSong7 commented 3 years ago

Hello! I wanted to assist in trying to help everyone on this wonderful device. I had read in the comments that you were researching ways to use the Accelerometer and/or ways to improve rotation. I have yet to be able to find the way to programmatically disabling the Keyboard/Mouse, partly because the solutions that exist that disable the mouse ALSO disable the Touchscreen because it is seen as a Magic Trackpad and also I cannot seem to unload kexts from Catalina's R/O FS... it might be counter-intuitive to have to sudo just to get this done and using sudo password-less might not be the best for everyone either.

I enclose Three Apple Automator scripts which will Rotate your Internal Screen to the orientation noted.... please note that for this to work correctly, your internal display should already be set to 270 Degrees rotated (Chuwi Landscaped). Also note that it is set for the Internal screen, however I am not sure that your screen will have the same exact ID, so please check this out on your own by launcing the fb-rotate binary in the terminal. The binary 'fb-rotate' is called from your 'HOME' root in a folder named 'fb-rotate-master'.

I put these here in the hopes of only assisting the work in getting this device to its best potential.

Stay Safe!

PS: Unzip and place the folder "fb-rotate-master" in your home root and the applications can go anywhere.

I hope these are helpful!

Rotation_Apps.zip ..

balopez83 commented 3 years ago

Hi @ThongSong7 , thank you for contributing to this project. We certainly can use all the help and expertise.

I have been actually researching methods to control the keyboard and turning it off when flipped through a special SSDT that monitors memory locations for the trigger resulting from the flip. My hope is that once I find the correct memory location we can create a monitoring kext or script that will be notified of the flip and trigger the rotation of the screen.

I have been able to locate the memory location that actually turns off the keyboard when the keyboard is flipped closed and it speeds up and improves reliability of the computer going to sleep (this patch will be released with EFI release version 0.3.0 at a later date). The SSDT currently allows for notification and automation without needing sudo and provides for a more native action. Currently though the memory location I am monitoring does not register when the keyboard has been flipped into tablet mode and will require continued research to find the memory location that is notified so I can incorporate it into the SSDT.

With any luck I will find the memory location soon and perhaps we can combine my system automation with a kext or script (perhaps yours) that can monitor the notification and rotate the screen.

If there is a particular skill you have in hackintoshing such as kext writing, Low Level DSDT programming, EC or UEFI firmware programming, or even EDID editing, you may be able to add a lot of additional value in finishing the final few items.

Thanks again for the contribution.