[Solved] Resolution in Arch Linux

Discussions about using Linux guests in VirtualBox.
Post Reply
Suleyth
Posts: 2
Joined: 11. Apr 2018, 23:56

[Solved] Resolution in Arch Linux

Post by Suleyth »

First of all, hi everyone, I'm new to the forums, thanks for reading this ^^

So I have the "virtualbox-guest-utils" and "virtualbox-guest-modules-arch" package (yes, using the default kernel) and I'm using Arch Linux on a Windows 10 host.
I installed "xorg", "xorg-apps" and "xterm", then installed i3-gaps, i3lock, i3status, i3blocks, etc, and added "exec i3" on the .xinitrc

The problem is, I do startx and it works just fine, for a long time, even when rebooting, but after closing the VM and opening it again the resolution is only 1024x768. And I still don't understand why. I tried reinstalling the guest additions, installing the dkms ones, but it didn't work. For some reason when I installed LightDM and started the service the resolution went to the full size of the VM window again, but only once, it didn't resize with the Window like it usually does. I was happy with the half fix but again, when reopening the VM after closing it it went back to 1024x768. I did 'X -configure' and copied the xorg.conf.new to the default xorg.conf and the same thing happened.

I don't think this is an Arch or an Xorg problem because I just use the default xorg.conf and I never did any modifications to it, and because after testing, the issue is the exact same with Gentoo and Void Linux and their respective guest additions packages.

Any ideas to why is this happening? Thank you for reading again.
Suleyth
Posts: 2
Joined: 11. Apr 2018, 23:56

Solved!

Post by Suleyth »

Ok, so, I fixed it if anyone is interested, turns out it was a combination between an Xorg and a GRUB issue.

You have to set GRUB_CMDLINE_LINUX_DEFAULT to "quiet video=(((resolution)))" and GRUB_GFXMODE to "(((resolution)))" in the GRUB config file.
This will fix the tty resolution, but on Xorg you have to run "xrandr --output VGA-1 --primary --mode (((resolution))) --pos 0x0 --rotate normal" and this will set the resolution to whatever you wanted. Sadly this effect only works once, if you logout you will have default resolution again, however I think you can make it start always if you put the command in your .xinitrc
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Resolution in Arch Linux

Post by socratis »

Thank you for the feedback and the solution, hope someone finds it useful in the future. Marking as [Solved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply