-
-
Notifications
You must be signed in to change notification settings - Fork 323
feat: initial Miyoo Mini Flip compatibility; hardware detection, lid close events, lid close settings options #1860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4.5-dev
Are you sure you want to change the base?
Conversation
|
@xXJSONDeruloXx Thank you very much for this PR. I will test these additions and get back to you as soon as possible. |
|
@xXJSONDeruloXx I’m curious how you created MainUI 285 clean and MainUI 285 expert ? |
|
@xXJSONDeruloXx Ok, |
|
@Sichroteph thanks for the review, updated this to point to same bin |
|
I tested this and the hinge/lid isn'tbeing detected still, i have however started my own Onion Fork for the Mini Flip & got most stuff functional if you'd like me to make a PR with my changes instead?
|
|
Yes please, that would be great. We’ll make sure to credit both of you. |
|
I'm happy to test today when I get back from the office if anyone would like me to 👍 |
|
@Dark98 I can not find your fork, but if you like I would be happy to implement your working version of lid detection and co author the commits |
|
@xXJSONDeruloXx @Sichroteph @ajb3932 I'll get them PR'ed later today :)
|
|
well, now I wanna race ya to find a working method lol |
|
ok have my flip mini now, was able to test this and with recent commit I am having lid close and open sleep wake, and tweaks options to change from sleep to shutdown does appear to be working too, so lid shut shuts down |
|
I've had it working for a while so I technically won the race :P (tenlevels beat everyone 😂) No point me making a PR if you've now got it working :) Aside from a few visual glitches & chargingState, I think I have most stuff working on my fork so if you want help with anything like USB-C audio for example
|
|
Demo with the 3 lid close settings in tweaks: |
Is chargingState working properly for you?(i didnt test when i tested your build at first) I cant get it working on my fork 😅 |
|
@Dark98 can you link me to your fork? |
It's currently private :P sorry😅 |
|
@ajb3932 @Sichroteph ready to test |
|
pushed a few housekeeping commits, plus I realized when lid close is set to shutdown and game is running, we were doing hard shutdown, now its same as half sec power button press, where it saves state and shuts down gracefully with also did some A/B testing with the screen blanking concept vs the fallback for sleep, negligible heat and battery life, so instead of the logic overhead I reverted that to mirror behavior of brief power btn press |
|
per discussions in the discord, here is a release off this branch, will encourage testing and report back or point users to this PR to gather feedback https://github.com/xXJSONDeruloXx/Onion/releases/tag/v4.5-dev-pr-1860 |
|
285headphone.c |
|
@fengfrw i prefer to keep the headphone change a separate PR |
|
I just tested your build on my mini flip. It works great. Thx for all your effort. Two observations: |
src/keymon/keymon.c
Outdated
| int suspend_lid_state = read_lid_state(); // Store initial lid state | ||
|
|
||
| // Use shorter poll timeout for lid detection on flip devices | ||
| int poll_timeout = (DEVICE_ID == MIYOO285) ? 500 : timeout; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should respect timeout=-1 (no auto-sleep)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xXJSONDeruloXx what about this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, if no auto sleep, then on lid close if in tweaks it's set to suspend it just stays suspended till you open lid or battery dies. If do nothing or shutdown, same concept
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying from discord for posterity
better battery life but then when sleep is set to off, and tweaks setting set to sleep on lid close, upon lid open the screen would not come back on because no poll. That would be inconsistent with lid open behavior if sleep set to 5 min or whatever else, where on lid open screen comes back up, lid open is treated as power button tap.
What’s the preference here? I’d prefer consistent lid open behavior regardless of sleep timeout setting but lmk if you feel differently
|
Addressed all comments/change requests and tested on my device. also went ahead and added the tenlevels headphone detection slightly modified for deviceid rather than hal sensor detect. Also on sleep to shutdown if set I am having that be respected on lid close shutdown, I think that grants the most consistent behavior across devices. if sleep to shutdown is not set, then lid close sleeps indefinitely as before. LMK if any other changes needed |
Long time Onion Enjoyer, first time PR-er.
I do not have a MM flip yet to test, but these additions are all in reference to the implementation work done in Allium to accommodate the flip's hardware and implement features around the lid events.
Please let me know if this is at all helpful, and what needs to be changed to get this in a merge ready state. Anyone with MM Flip hardware any testing would be greatly appreciated.