简体   繁体   中英

Initial Ubuntu guest screen resolution on VMWare

Windows 7 (host) with VMWare Workstation 11.

Kubuntu 15.04 as Guest.

Problem:

After system startup, in example, on login screen - screen size/resolution is 800x600. Ba, even earlier - during startup when console is active. Making window fullscreen isn't helping, as console output limits itself to small window in the middle.

Setting VMWare window into fullscreen helps a little - screen gets bigger (size of host 1920x1080) - guest Kubuntu applications windows are taking whole screen area. But, for example, desktop wallpaper acts still as if 800x600 was in effect. And inside System settings -> display Virtual screen stays at 800x600, nevertheless Resolution list is long. Unfortunately - 1920x1080 isn't there.

This what xrandr shows:
Screen 0: minimum 1 x 1, current 1920 x 1080, maximum 8192 x 8192
Virtual1 connected primary 1920x1080+0+0 (normal left inverted right x axis   y axis) 0mm x 0mm
   1920x1080      60.0*+
   2560x1600      60.0  
   1920x1440      60.0  
   1856x1392      60.0  
   1792x1344      60.0  
   1920x1200      59.9  
   1600x1200      60.0  
   1680x1050      60.0  
   1400x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1360x768       60.0  
   1280x800       59.8  
   1152x864       75.0  
   1280x768       59.9  
   1024x768       60.0  
   800x600        60.3  
   640x480        59.9 

From this it seems that proper resolution is set properly.

Now, some magic. I logout from Kubuntu. Login screen is already taking whole 1920x1080 screen area. Settings -> Display shows Virtual screen as 1920x1080, xrandr shows the same set of resolutions. VMWare Tools were installed - at least to the point that I have bidirectional access to shared folders.

What to do to have proper screen resolution right from the beginning? Yea, I know that I can freeze whole session and resume it whenever I need it.

My configuration is host : windows 7 and vmware guest : ubuntu 14.04. For long time I've seen if I update the vmplayer or some software in vmplayer that screws my display and then in full screen it can no longer capture host display.So today I just followed the instruction provided in this link and fixed it without installing any additional software.I hope it helps other.

At first run :

$ xrandr -q

tanay@ubuntu:~$ xrandr -q Screen 0: minimum 1 x 1, current 1904 x 1070, maximum 8192 x 8192 Virtual1 connected primary 1904x1070+0+0 (normal left inverted right x axis y axis) 0mm x 0mm    800x600       
60.0 +   60.3      2560x1600      60.0      1920x1440      60.0      1856x1392      60.0      1792x1344      60.0      1920x1200      59.9  1600x1200      60.0      1680x1050      60.0      1400x1050      60.0  1280x1024      60.0      1440x900       59.9      1280x960       60.0  1360x768       60.0      1280x800       59.8      1152x864       75.0  1280x768       59.9      1024x768       60.0      640x480        59.9  1904x1070_75.00   74.9*  Virtual2 disconnected (normal left inverted right x axis y axis) Virtual3 disconnected (normal left inverted right x axis y axis) Virtual4 disconnected (normal left inverted right x axis y axis) Virtual5 disconnected (normal left inverted right x axis y axis) Virtual6 disconnected (normal left inverted right x axis y axis) Virtual7 disconnected (normal left inverted right x axis y axis) Virtual8 disconnected (normal left inverted right x axis y axis)

Then you can see which output is connected,here Virtual1 is connected. Then guess a good resolution for your screen.For me I guessed following configuration.

Eg:cvt <horizontal length> <vertical length> <refresh rate>

$ cvt 1900 1070 75

The output is

# 1904x1070 74.87 Hz (CVT) hsync: 83.85 kHz; pclk: 216.00 MHz Modeline "1904x1070_75.00"  216.00  1904 2040 2240 2576  1070 1073    1083 1120
-hsync +vsync

Then you need to copy the text after "Modelline" and paste that in following command after "newmode" like the example below

$ xrandr --newmode "1904x1070_75.00"  216.00  1904 2040 2240 2576  1070 1073 1083 1120 -hsync +vsync

Then take the screen resolution details from the quote and use it in next command.For me the command is

$ xrandr --addmode Virtual1 1904x1070_75.00

The next command to set it in ubuntu for me is

$ xrandr --output Virtual1 --mode 1904x1070_75.00

If the last command doesn't work for you,you can go back to ubuntu display gui setting and can chose the display you have added just now.For me the option was 1904 x 1070 (16:9)

However if you are fine with this experiment and have found the desired screen resolution and to make that permanent,write the all the last 3 commands starting from xrandr --newmode command in your .xprofile file using following command and then save,exit and restart your ubuntu vm and you will get your desired resolution permanently.

$ gedit ~/.xprofile

Here is what worked for me-

  1. $ xrandr
    out-put-

Screen 0: minimum 8 x 8, current 1024 x 768, maximum 32767 x 32767 DP1 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
1024x768 75.08*+ 60.00
800x600 60.32 56.25
848x480 60.00
640x480 59.94
VIRTUAL1 disconnected (normal left inverted right x axis y axis) 1920x1080_60.00 (0x113) 173.000MHz -HSync +VSync h: width 1920 start 2048 end 2248 total 2576 skew 0 clock 67.16KHz v: height 1080 start 1083 end 1088 total 1120 clock 59.96Hz

Note:- found the connected on, for my case VGA1 connected primary 1024x768+0+0 all others are not connected.

  1. $ cvt 1920 1080

    1. $ sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

Note:- based on connection we have to use on as-

4. sudo xrandr --addmode VGA1 "1920x1080_60.00"

It worked for me, as suggested here , another source presented here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM