If I renounce my citizenship for my home country (to become stateless person) while having a residence permit from Germany that I applied using my passport from the very same country, would my residence permit cancelled, or would it prevent me from getting a permanent residence in Germany later on?
These are two questions.
Yes, your residence permit will become invalid, because a condition (no valid passport) under which the residence permit was issued has changed.
You will also not have a valid passport.
You must immediately apply for a new residence permit at your responsible Immigration Office, during which a stateless passport will be issued. Until you receive that passport, travel outside Germany will not be possible.
You must supply all relevant documents (including your present residence permit) leading up to the loss of your present citizenship. When possible, a letter stating that no new passport will be issued by your present country of citizenship should also be presented. Depending on the jurasdiction, the loss of citizenship (through the withdrawal of the passport) may become effective immediately, but only officially confirmed (through a Certificate of Loss of Nationality) much later.
For persons within the process of nationalization, the
- Assurance of citizenship (Einbürgerungszusicherung)
must also be submitted.
The conditions for a permanent residence are based on the amount of time (with certain exceptions for students) that you, as a person, have legally spent within the country. The change of citizenship will therefore not affect the amount of time collected.