Radar: Filevault2 uses incorrect keyboard layout for initial unlock

Fresh from our series “Another Day Another Radar” here’s one that stumped my associate Rene.

Since I’m getting a knack in filing these I did the “quick file” for him, as rdar://11738458 and on OpenRadar. As always I am doing this publicly because other people out there might have experienced the same issue which can be quite nerve-wrecking. Also this problem was observed on an OS X version that is public and widely used.

BSA Banner

Filevault2 uses incorrect keyboard layout for initial unlock

Summary:

When starting a 15″ MacBook Pro (Mid 2009) that is using Filevault2 full disk encryption the wrong keyboard layout is active for entering the initial boot password when starting the system.

Steps to Reproduce:

on a Mac with German keyboard set system language to English, keyboard layout to German (matching the HW keyboard)

enable Filevault2, choose a password that uses keys that are differently positioned on German and English layout. (e.g. Z and Y)

turn off Mac

when promoted for the hard disk password try to enter the password as it was entered with OS X running

Expected Results:

Password should be accepted in the keyboard layout used when setting it.

Actual Results:

Password is only accepted when entered with English keyboard layout.

Regression:

With Filevault 1 the password was queried later when the German layout was already active.

Notes:

This might lead to customer confusion because it misleads them to thinking that they have set their password incorrectly. Add to this the extremely stressful situation of thinking that you have lost access to all your data.

Most people would not recognize this problem because typically people would have the system language and keyboard layout be the same. But some users (especially developers and in IT) prefer to have their system in English even with a German keyboard. This also means that they will have to know where this certain characters can be found on an English keyboard to be able to successfully authenticate.

Filefault 2 apparently is using the system language layout instead of the actual HW layout or the one that is configured while running OS X.

I have my system in French and my keyboard in French, and I still run into that same problem. I have to type my password following the English layout on startup. I can only use French layout after startup.

Nope. I admit being regularly discouraged by the particularly unfriendly interface of the Apple Bug Reporter.

Besides, I didn’t even think of this as a bug. I instead found it obvious that at startup the system would not have loaded the keyboard configuration yet. When you start your computer as single user, you get a Qwerty keyboard and it has always been like that. So I didn’t even think to treat this behaviour as a bug. I viewed it as a normal thing.

We developers can form a good hypothesis as to what is going on and work around it. But what about the millions more users that might get stumped by this? This is why I have started to also file Radars about things that “might lead to customer confusion”.