After 7 years. After getting an entrepreneur visa, you are required to run the company viably for about seven years in Hong Kong to apply for a permanent identity card. During this application, you need to demonstrate that you have a residence in Hong Kong and sufficient income to support the family.
The card has all the information about you and can be used in exit kiosks in airports and sea ports. It is a requirement that you always carry the identity card with you and provide it to the police when required to do so. With a permanent Hong Kong identity card, you are free to stay in the country without getting deported.