Only half of the periods of residence in Germany for the purpose of studying or professional training apply when determining the periods of residence with a residence permit. This means that if you had a residence permit according to Sect. 16 AufenthG for six years, three of these years will be taken into account and you need two further years within the scope of another residence permit for a permanent residence permit to be granted.
The required language skills and basic knowledge of social conditions in the Federal Republic of Germany are considered proven when you have completed an integration course. If you were not entitled to attend an integration course (e.g. due to a low need for integration due to the fact that you hold a university degree), level A1 language skills are already deemed to be sufficient for the granting of a permanent residence permit. Knowledge of the legal and social order is assessed separately.