0

After having fullscreen issue even after installing install the Guest Additions I fallowed steps on different forums. One caused me to have a black screen after login using the command xrandr like so :

xrandr --output VGA-1 --mode 1024x768

After rebooting, now I have a black screen after login. When I try to changed the xrandr to something it was before 600x800 the command xrandr returns Can't open display.

Is there a solution, a file to remove/change or some command to use instead of get rid of my VM (I have many things I don't want to lose)

Using Virtual Box 6.1 and Ubuntu 18.0.4 LTS

Here are the last commands I used :

sudo apt-get remove libcheese-gtk23
sudo apt-get install xserver-xorg-core
sudo apt-get install virtualbox-guest-x11
sudo apt-get -q -y -f build-dep virtualbox-ose-guest-utils virtualbox-guest-x11 virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms
sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
xrandr
xrandr --output VGA-1 --size 1024x768

Edit :

I upgraded to the latest Ubuntu 19.10 hoping it'll changed anything. Now the screen isn't black anymore but I cannot interact with it after login. Keyboard and mouse don't do anything even if the mouse is showing up.

Fix

I found a method reinstall ubuntu-desktop which worked for me. Hope it could help others :

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
5
  • What are the "steps on different forums"?
    – Pilot6
    Jun 1, 2020 at 21:02
  • @Pilot6 I updated the question adding the command I used
    – Hearner
    Jun 1, 2020 at 21:06
  • This command won't stay after a reboot. There must be something else.
    – Pilot6
    Jun 1, 2020 at 21:07
  • Is there a way to get the logs ?
    – Hearner
    Jun 1, 2020 at 21:19
  • history command.
    – Pilot6
    Jun 1, 2020 at 21:20

2 Answers 2

0

I think that you need to adjust the video settings from VirtualBox. I know this is not a full answer but it is the only way I know to post pictures. Below you can see the settings I am using. Adjust the Virtualization and Video Acceleration. And adjust the kind of Graphics Controller. enter image description here

1
  • Thank you for answering. I already have the exact same configuration as you except my Ubuntu.vdi is 50 GB
    – Hearner
    Jun 1, 2020 at 21:22
0

I think you need to first setup the new mode. Below is from some notes a while back. You will need to adjust everything for your own resolution.

To get the settings for the resolution, type the following at the terminal window

cvt 1440 900

Take the modeline info you will get and paste into the command below to give the graphics system the new resolution.

xrandr --newmode "1440x900" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync

Now add that mode to the current session

xrandr --addmode DVI-0 "1440x900"

Now output it to the display that you want.

xrandr --output DVI-0 --mode 1440x900

NOTE:Once it works then you can write a shell script such as the one below and it will run at boot.

xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync && xrandr --addmode VGA1 "1368x768_60.00" && xrandr --output VGA1 --mode  1368x768_60.00
3
  • I can't use xrandr because I cannot access the screen after login
    – Hearner
    Jun 2, 2020 at 8:07
  • Ok. For some reasons, now I have something on my screen but i cannot click anything and my keyboard doesn't do anything
    – Hearner
    Jun 2, 2020 at 8:21
  • Before you login you can try Control-Alt-F1 and get to the black and white screen. Then run the commands above to add the mode. Then lastly startx which will start the GUI. Jun 2, 2020 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .