Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Running 11.04 beta in a Parallels 5.0 virtual machine, but this question will apply to any virtualization software.

Parallels 5 Linux tools (guest additions) don't work for 10.10 and 11.04 and I don't want them. I like how the VM is integrated as is. The only thing that needs tuning is the screen geometry.

None of the options in the Systems -> Preferences -> Monitors fit my display perfectly. I need it at 1080 x 1920 (9:16) or 1920 x 1080 (16:9).

Many different resolutions work (see screen-shot bellow), among which are:

  • 1680 x 1080 (too narrow horizontally and a bit too short vertically)
  • 1920 x 1200 (perfect horizontally, but a bit too tall vertically)

How can I adjust the screen resolution (display/monitor size) manually?

What I tried so far

$ cvt 1920 1080
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
$ sudo xrandr --newmode "1920x1080"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr: Failed to get size of gamma for output default

$ cvt 1080 1920 
# 1080x1920 59.96 Hz (CVT) hsync: 119.26 kHz; pclk: 176.50 MHz
Modeline "1080x1920_60.00"  176.50  1080 1168 1280 1480  1920 1923 1933 1989 -hsync +vsync
$ sudo xrandr --newmode "1080x1920"  176.50  1080 1168 1280 1480  1920 1923 1933 1989 -hsync +vsync

$ sudo xrandr -q
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1920 x 1200, maximum 1920 x 1200
default connected 1920x1200+0+0 0mm x 0mm
   1920x1200       0.0* 
   1600x1200       0.0  
   1680x1050       0.0  
   1400x1050       0.0  
   1280x1024       0.0  
   1440x900        0.0  
   1280x960        0.0  
   1280x800        0.0  
   1024x768        0.0  
   800x600         0.0  
   640x480         0.0  
  1920x1080 (0x11d)  173.0MHz
        h: width  1920 start 2048 end 2248 total 2576 skew    0 clock   67.2KHz
        v: height 1080 start 1083 end 1088 total 1120           clock   60.0Hz
  1080x1920 (0x11e)  176.5MHz
        h: width  1080 start 1168 end 1280 total 1480 skew    0 clock  119.3KHz
        v: height 1920 start 1923 end 1933 total 1989           clock   60.0Hz

The 2 new resolutions do not show up in the Monitor Preferences GUI: enter image description here

Trying Takkat's Solution

Here is what I do and get:

$ gtf 1920 1080 60 -x

  # 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
  Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync

$ sudo xrandr --newmode "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync

$ sudo xrandr --addmode default 1920x1080_60.00

$ xrandr 
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 640 x 480, current 1680 x 1050, maximum 1920 x 1200
default connected 1680x1050+0+0 0mm x 0mm
   1920x1200       0.0  
   1600x1200       0.0  
   1680x1050       0.0* 
   1400x1050       0.0  
   1280x1024       0.0  
   1440x900        0.0  
   1280x960        0.0  
   1280x800        0.0  
   1024x768        0.0  
   800x600         0.0  
   640x480         0.0  
   1920x1080_60.00   60.0  

I also tried gtf 1920 1080 60 -x.

In both cases I can't switch to that resolution and get:

  • Could not set configuration for CRTC 262

enter image description here

All the other resolutions work.

share|improve this question
1  
Did you install the guest additions? ( or open-vmware-tools if using vmware ) –  OpenNingia Nov 11 '10 at 7:50
    
@OpenNingia, I'm installing it on Parallels 5. Would like to avoid using guest additions. All I need is to change the screen resolution. –  Aleksandr Levchuk Apr 23 '11 at 22:40
    
@Alexsandr Levchuk the point of guest additions, vmware tools, etc.: is to give you better graphics driver support, keyboard/mouse integration, and some other miscellaneous hardware & network support. –  Jeremy Bicha Apr 24 '11 at 19:08
    
@jbicha, that's why I don't need guest additions - for me all of the mentioned points work fine without the guest additions. Guest additions break every time there is a kernel update. In case of Parallels 5 they are simply not available for Ubuntu 10.10 and 11.4 –  Aleksandr Levchuk Apr 24 '11 at 21:39
    
except that the graphics driver doesn't work right which is the reason you opened this question –  Jeremy Bicha Apr 25 '11 at 1:11

4 Answers 4

In VirtualBox I use a minimal version of the good old xorg.conf:

Section "Monitor"
    Identifier      "Monitor0"
    HorizSync       30.0 - 96.0
    VertRefresh     50.0 - 160.0
EndSection

Section "Device"
    Identifier      "Device0"
    Driver          "vesa"
EndSection

Section "Screen"
    Identifier      "Screen0"
    Monitor         "Monitor0"
    Device          "Device0"
    DefaultDepth    24
    SubSection "Display"
        Depth       24
        Modes       "1280x1024"
    EndSubSection
EndSection

Section "ServerLayout"
    Identifier      "Layout0"
    Screen          "Screen0"
EndSection

I don't know if you need to provide HorizSync and VertRefresh for a TFT, but in any case don't copy my values!

share|improve this answer
    
+1 Thanks. I will give this a try. –  Aleksandr Levchuk Dec 13 '10 at 21:25
    
Probably not necessary any more. Virtual box 4.0 has a new "scale mode" for screen size. virtualbox.org/wiki/Changelog –  djangofan Dec 23 '10 at 23:12
    
This did not work for me. After placing the xorg.conf file and rebooting the screen goes black. Recovered with ctrl + alt + f1 –  Aleksandr Levchuk Apr 23 '11 at 22:42

I am running ubuntu 10.10 on Virtualbox i had the same problem . couldn't adjust the resolution and also the full screen mode was not working. After a bit googling i found this article http://tutorial.downloadatoz.com/how-to-fix-ubuntu-10-10-virtualbox-guest-additions-problems.html

This really worked for me.

share|improve this answer
    
Virtual box 4.0 has a new "scale mode" for screen size. virtualbox.org/wiki/Changelog –  djangofan Dec 23 '10 at 23:12

Display Geometry Settings in Virtual Box

In Oracle Virtual Box you can adjust the virtual screen resolution after having installed the Guest Additions simply by dragging the window with the mouse or by choosing full screen mode. No need to do anything with xorg.conf. XServer 1.10 (included in 11.04) and thus Unity 3D runs only in Virtual Box >=4.0.6.

1. Use Mouse to adjust screen size

Adjusting the screen by resizing the Virtual Box Windows with the mouse allows for any screen resolution up to the host screen resolution.

2. Use predefinde standard screen sizes

If you need a fixed (standard) resolution you may also choose System Settings -> Monitors (for 11.04) or Displays (for 12.04) for a selection of fixed resolutions (here shown for 12.04):

enter image description here

  • For maximum host screen resolution you will need to run Virtual Box in Fullscreen mode (Host + F)
  • For a fixed host screen resolution we need to disable Auto-resize Guest Display (HOST+G) from Virtual Box Manager View menu.

3. Define new geometry with xrandr

If you need a fixed geometry that is not in the list of resolutions for monitors you will have to use xrandr to define a new resolution:

First we use gtf for calculating the modeline of possible resolutions:

gtf <xres> <yres> <refresh> [-x]

Give the desired values for x-resolution, y-resolution and refresh rate. The flag -x is default and can be omitted. For a portrait resolution 480x640 at 60 Hz you will get the following output:

$ gtf 480 640 60 -x
$ 480x640 @ 60.00 Hz (GTF) hsync: 39.78 kHz; pclk: 24.82 MHz Modeline "480x640_60.00" 24.82 480 504 552 624 640 641 644 663 -HSync +Vsync

From this we can copy & paste the modeline to add it to xrandr list of known resolutions:

xrandr --newmode "480x640_60.00" 24.82 480 504 552 624 640 641 644 663 -HSync +Vsync

and add this for the Virtual Box Monitor:

xrandr --addmode VBOX0 480x640_60.00

Replace VBOX0 with the appropriate monitor if you have setup Virtual Box with multiple monitors (or any other output name the driver reports).

We can now switch to the newly defined geometry as described above (2.).

share|improve this answer
3  
Virtual box 4.0 has a new "scale mode" for screen size. virtualbox.org/wiki/Changelog –  djangofan Dec 23 '10 at 23:11
2  
I highly recommend using VirtualBox (VB); it works on any operating system, not just Macs. It is open source and thus is in the Ubuntu repositories if you'd like for Ubuntu to be the host operating system and the guest-utils are in the repos if you want Ubuntu to be the guest (but you want to make sure the guest-utils version number matches the VB version). As most of us do not have Parallels installed it is more difficult for you to find community support from Ubuntu users. –  Jeremy Bicha Apr 24 '11 at 19:13
    
Dear @Takkat, I'm stuck on the last part - xrandr --addmode VBOX0 480x60_60.00. I don't have the VBOX0. Where can I get the list of available monitors? –  Aleksandr Levchuk Apr 28 '11 at 19:30
    
@Takkat, thanks for explaining how to lookup the monitor (mine was "default"). I'm further but still have a blocker. Please see my update in the question. –  Aleksandr Levchuk Apr 29 '11 at 22:42
    
@Takkat, all of my operations were in fullscreen mode. –  Aleksandr Levchuk Apr 30 '11 at 7:42

Possible one could try the commands and xorg.conf snippets that are listed here:

http://wiki.debian.org/XStrikeForce/HowToRandR12

I haven't tried that yet and don't know if there is enough information to get it working.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.