Screen resolution got all funky? Try dpkg-reconfigure xserver-xorg
Have you experienced booting up your laptop and your screen resolution sucks? It has happened to me several times over. Not just my laptop but the desktop machines in the office as well. There are times when it’s easy to fix via the admin menu on the panel but it’s not the case all the time. Sometimes, when it’s so bad already, I don’t even get anything graphical. I get stuck on the command line. Because it has happened to me more than once, I remembered how to use
dpkg-reconfigure xserver-xorg. I could edit xorg.conf but I was afraid I’d botch it up so I opted to remember the command dpkg-reconfigure xserver-xorg instead.
- You want to edit the screen resolution for some reason or another.
- You have sudo rights or you are root. Doing things as root or super user would mean that you could actually end up doing the wrong thing and it would be quite tough to undo it. When you execute it via sudo, you’re acting like the super user.
- You are using Ubuntu, Debian, and such distros. (Sorry, Red Hat, etc. users. I am really not very familiar with your package managers.)
When you’re thinking about changing the resolution, you could run Gnome-terminal or press CTRL-F1 to get a terminal. Then log in as root then run the command
dpkg-reconfigure xserver-xorg. Or if you don’t want to log in as root, then you could
sudo dpkg-reconfigure xserver-xorg.
What happens next is that you will see a bunch of options. You need to indicate stuff like the graphics driver, the keyboard layout, screen resolution, etc. More often than not, you just have to mark them and you would have guides on marking them, depending on which ‘page’ of it you are on already. After that you will have to log off then log on again. Usually, you’d get the desired resolution after that but there are times when you have to do it again. I am not quite sure why though.
In any case, dpkg-reconfigure doesn’t only work for fixing xserver-xorg. It also does that for the other apps. Debian made that in order to help the users not remember too many quirks for config files. After all, you’d probably forget anyway. Or maybe you won’t but it might take some time to remember all the details. If you want to know more about dpkg-reconfigure, an article pointing out the differences between Debian and Red Hat might be a good read. (Actual page link is here. I gave the link of the cached article in Google because the site was down.)
I hope that helps!:)