In all the books I read, they always praise Pedro I and Pedro II, and that about how the monarchy was down on Earth and for the people. But in every textbook, they talk how the monarchy couldnt control the country and done nothing.
Two comments, one on your sources and another on Imperial Brazil.
Regarding sources, you're being very general here. 'Textbooks' vs 'History books'. History textbooks tend to be written by historians, meaning that somewhere there should be a 'history book' and articles saying roughly the same thing, but in a much more academic way.
Textbooks in schools tend to promote the 'right' vision of history and be a part of the ideological formation of young students. So you have to ask yourself, where are you right now? Brazil? Is it a public school or a private Catholic school? Who benefits from the version of history you are reading, regardless of who is ultimately closer to the truth.
This brings me to the matter of Imperial Brazil itself. The Brazilian monarchy passed the extremely popular decree, among non-slave owners, of abolishing slavery. People of color never forgot that it was the Empire and not the Republic that freed them. In addition, the Republic was a secularizing force as compared to the more religious empire, which made the Empire more popular in hindsight with the devout poor. Finally, the early Brazilian Republic was definitely not some kind of utopian democratic republic. It was an oligarchical republic which closely followed the economic interests of the richest and most powerful, which at the time were the coffee planters and the large cattle ranchers, leading to the nick-name of the 'café com leite' Republic [coffee with milk].
Monarchies did not represent the people, but the power concentrated in the throne often allowed them to push through policies that were unpopular with some vested interests but that were better for the country (in this case Brazil) in the long run. Monarchies also had the bonus of being able to base themselves on the very affective indoctrination of the poor and uneducated who would often adore their monarch (whose rule was justified as divinely authorized) while blaming problems and decisions he made on his ministers. When the Republic came to power not only did it replace an institution still cherished by some but it became harder to dodge criticisms of real issues and responsibility for mistakes.
Mario Vargas Llosa wrote an amazing novel on the period immediately following the fall of the Empire called La Guerra del Fin del Mundo [War of the End of the World/War of the Ends of the Earth]. It looks at the very real rebellion of Canudos, where a revolt happened that was simultaneously popular and anti-Republican, revolutionary and reactionary. It does a great job showing how most people who don't study Latin America closely won't be able to understand the plethora of contradictions embodied in the revolt.