Skip to content
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

During boot, touch image comes up (with circles visible) if so configured, but is non-functional on Vivobook 14 Flip #31

Closed
CalculonPrime opened this issue Mar 14, 2022 · 3 comments

Comments

@CalculonPrime
Copy link

CalculonPrime commented Mar 14, 2022

I have ASUS Vivobook 14 Flip is 2-in-1 laptop with keyboard and touch screen. Touch screen works in Windows and also in the BIOS.

For the following DcsProp config, the image with the circles is shown, but touch interaction doesn't work. You can't type by touching the circles, though you can move the cursor with the arrow keys and enter a password that way, even when TouchSimulate is set to 0.

<?xml version="1.0" encoding="utf-8"?>
<VeraCrypt>
	<configuration>
		<config key="PasswordType">1</config>
		<config key="PasswordMsg">Password: </config>
		<config key="PasswordPicture">login.bmp</config>
		<config key="HashMsg">(0) TEST ALL (1) SHA512 (2) WHIRLPOOL (3) SHA256
                                      (4) RIPEMD160 (5) STREEBOG Hash:</config>
		<config key="Hash">1</config>
		<config key="HashRqt">0</config>
		<config key="PimMsg">PIM (Leave empty for default): </config>
		<config key="Pim">0</config>
		<config key="PimRqt">0</config>
		<config key="AuthorizeVisible">0</config>
		<config key="AuthorizeRetry">10</config>
		<config key="DcsBmlLockFlags">0</config>
		<config key="DcsBmlDriver">0</config>
		<config key="ActionSuccess"></config>
		<config key="TouchDevice">0</config>
                <config key="TouchSimulate">0</config>
	</configuration>
</VeraCrypt>

This is the relevant bit from PlatformInfo:

 <TouchDevices count="1">
  <TouchDevice index="0" minx="0" miny="0" minz="0" maxx="800" maxy="589" maxz="0" attr="0x00"/>
 </TouchDevices>

I tried changing TouchDevice to -1, but it makes no difference. (I looked at the source code, so I see why it doesn't matter.) Also note that the cursor can be moved by arrow keys even if TouchSimulate is 0, as I've set it.

Has the code been tested on any actual touch platforms? I suppose I can build it myself, but I'm not set up with VS2019 so it's going to take some work to install the relevant tools, and that's if they're all free - I'm not sure that the Community version allows UEFI development.

@CalculonPrime
Copy link
Author

CalculonPrime commented Mar 14, 2022

Also, I found that if I actually use the keyboard arrow "simulation" during login, the keyboard becomes non-functional in Windows 10. It still works to log in while in the BIOS, but once inside Windows it is non-functional. In this situation, I have to reboot to get the keyboard back (or sleep/wake). So I think something that you're doing with the Events in this code is not kosher and is causing the keyboard to go offline or not connect to Windows. I'm not sure whether it's something you're doing in the arrow key/cursor code, or whether it's general but only shows up with arrow key/cursor movement because that generally involves many more keystrokes than typing a password. (Some buffer size exceeded? Something not closed properly?)

Also, I noticed that sleep/wake doesn't require signing into the volume encryption again. Seems like a security flaw. If you let your laptop go to sleep, and then forget, you've left it unprotected. It does make it easy to work around the keyboard getting killed, but that doesn't mean it's the correct behavior.

(Perhaps I should create a separate Issue filing for this one? I've already created two issues tonight so not creating another one just yet.)

@CalculonPrime
Copy link
Author

I was able to build the project and test with some instrumentation. (BTW, what renames the files from .efi to .dcs - all the files generated by the build end in .efi.)

What I found is that gTouchPointer does get set, but no touch events ever arrive in the main event loop. I'm not sure why. The touch screen is active inside ASUS' BIOS, so it does work before the OS handoff.

@CalculonPrime
Copy link
Author

Superseded by issue #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant