Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Force resolution

  1. #1
    Join Date
    Sep 2010
    Location
    Stockholm
    Beans
    17
    Distro
    Ubuntu 10.04 Lucid Lynx

    Force resolution

    Hi
    When i start my computer without the screen and then plug it in after boot the resolution is wrong, it becomes 1440x1050 (4:3) and the screen's native is 1920x1080. This is a problem cause i need to start it without the screen and then plug it in. i have tried some stuff that i found on the forums but nothing helped. I'm using Ubuntu 10.04, AMD 4350 and fglrx drivers.

    I tried to add this to Section "Screen" in xorg.conf
    Code:
     
    SubSection     "Display"
            Depth       24
            Modes      "1920x1080"
    EndSubSection
    and this to Section Monitor
    Code:
     
    Option "noDDC"
    but nothing seem to work the resolution is still 1440x1050. If i run xrandr the highest resolution is 1440x1050 and i have tried to add a new mode with
    Code:
    xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    xrandr --addmode DFP2 1920x1080
    When it has booted up without the screen it still says that it is connected with DFP2 1920x1080 and the highest resolution is 1440x1050.
    xrandr output
    Code:
    Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 1600 x 1600
    DFP1 disconnected (normal left inverted right x axis y axis)
    DFP2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
       1400x1050      60.0  
       1280x1024      75.0     60.0  
       1440x900       59.9  
       1280x960       75.0     60.0  
       1280x800       75.0     60.0  
       1152x864       75.0     60.0  
       1280x768       74.9     59.9  
       1280x720       60.0  
       1024x768       75.0     60.0  
       800x600        75.0     60.3  
       720x480        60.0  
       640x480        75.0     60.0  
    CRT1 disconnected (normal left inverted right x axis y axis)
    CRT2 disconnected (normal left inverted right x axis y axis)
      1920x1080 (0xc1)  148.5MHz
            h: width  1920 start 2008 end 2052 total 2200 skew    0 clock   67.5KHz
            v: height 1080 start 1084 end 1089 total 1125           clock   60.0Hz
    my xorg.conf
    Code:
    Section "Screen"
    	Identifier	"Default Screen"
    	DefaultDepth	24
    	SubSection "Display"
    		Depth 24
    		Modes "1920x1080"
    	EndSubSection
    EndSection
    
    #Section "Monitor"
    #        Identifier      "Configured Monitor"
    #        Vendorname      "Generic LCD Display"
    #        Modelname       "LCD Panel 1920x1080"
    #        Horizsync       31.5-74.5
    #        Vertrefresh     59.9 - 60.1
    #        Modeline 	"1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    #        Gamma   1.0
    #EndSection
    
    Section "Module"
    	Load	"glx"
    EndSection
    
    Section "Device"
    	Identifier	"Default Device"
    	Driver	"fglrx"
    	Option "NoDDC"
    EndSection
    
    Section "ServerFlags"
    	Option "blank time"  "0"
    	Option "standby time" "0"
    	Option "suspnd time" "0"
    	Option "off time" "0"
    EndSection

  2. #2
    Join Date
    Nov 2010
    Location
    Berlin, Germany
    Beans
    4,534
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Force resolution

    Quote Originally Posted by ryezs View Post
    Code:
    xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    xrandr --addmode DFP2 1920x1080
    After running those commands, you need also to apply the added mode to the output, like this:
    Code:
    xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    xrandr --addmode DFP2 1920x1080_60.00
    xrandr --output DFP2 --mode 1920x1080_60.00
    Try setting the mode by running those commands in a terminal, if that works, you need to make them run at startup, I recommend to do so by adding them to the startup script of GDM, all that is described in this guide:
    https://wiki.ubuntu.com/X/Config/Resolution

    Greetings.

  3. #3
    Join Date
    Sep 2010
    Location
    Stockholm
    Beans
    17
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Force resolution

    Quote Originally Posted by Krytarik View Post
    After running those commands, you need also to apply the added mode to the output, like this:
    Code:
    xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    xrandr --addmode DFP2 1920x1080_60.00
    xrandr --output DFP2 --mode 1920x1080_60.00
    Thanks for the answer i have read the link you posted but i still have some problems. If a set "xrandr --output DFP2 --mode 1920x1080_60.00" i get
    Code:
    xrandr: screen cannot be larger than 1600x1600 (desired size 1920x1080)
    so I added "virtual 2048 2048" to my xorg.conf under SubSection "Display" and now when i boot up the resoulution is 1920x1080 without creating a new mode and i can move the mouse over the whole screen. But the desktop is still 1440x1050 that is wierd. But if I change res to 1280x720 and then back to 1920x1080
    Code:
    xrandr -s 1280x720
    xrandr -s 1920x1080
    the desktop will also be 1920x1080. So i added both those lines to my gmd startup script and it works, but the automatic login wont work now and i don't know why. Maybe i should write a script that runs after gdm have logged in and it will work.

    Is it ok to do it this way or will cause any problems?
    Last edited by ryezs; April 6th, 2011 at 12:37 PM.

  4. #4
    Join Date
    Apr 2011
    Beans
    1

    Re: Force resolution

    Thanks a lot for sharing this great information for the force resolution.

  5. #5
    Join Date
    Nov 2010
    Location
    Berlin, Germany
    Beans
    4,534
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Force resolution

    - "Virtual 2048 2048" seems to be a valid workaround for the mentioned issue.

    - Did you add the commands I stated to the GDM startup script?

    - Make sure that they are at the right position, like described in the guide I posted.

    - Regarding the autologin issue, please post your "/etc/gdm/custom.conf".
    Last edited by Krytarik; April 6th, 2011 at 04:40 PM.

  6. #6
    Join Date
    Sep 2010
    Location
    Stockholm
    Beans
    17
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Force resolution

    Quote Originally Posted by Krytarik View Post
    - Did you add the commands I stated to the GDM startup script?

    - Make sure that they are at the right position, like described in the guide I posted.
    Not really when I do this
    Code:
    xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
    xrandr --addmode DFP2 1920x1080_60.00
    xrandr --output DFP2 --mode 1920x1080_60.00
    I get out of bounds on the screen , but i have tested some more and 1920x1080 mode exists when the screen is plugged in so i don't have to add it. I think the problem is when the screen is unplugged. My xrandr looks like this when the screen is unplugged and after the screen is plugged in.
    Code:
    Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 1600 x 1600
    DFP1 disconnected (normal left inverted right x axis y axis)
    DFP2 disconnected (normal left inverted right x axis y axis)
    CRT1 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
       1600x1200      60.0*+
       1400x1050      60.0  
       1280x1024      60.0     47.0     43.0  
       1440x900       59.9  
       1280x960       60.0  
       1280x800       60.0  
       1152x864       60.0     47.0     43.0  
       1280x768       59.9     56.0  
       1280x720       60.0     50.0  
       1024x768       60.0     43.5  
       800x600        60.3     56.2     47.0  
       720x480        60.0  
       640x480        60.0  
    CRT2 disconnected (normal left inverted right x axis y axis)
    
    AFTER:
    Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 2048 x 2048
    DFP1 disconnected (normal left inverted right x axis y axis)
    DFP2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
       1920x1080      60.0*+
       1776x1000      60.0 +
       1680x1050      60.0  
       1400x1050      60.0  
       1280x1024      75.0     60.0  
       1440x900       59.9  
       1280x960       75.0     60.0  
       1280x800       75.0     60.0  
       1152x864       75.0     60.0  
       1280x768       74.9     59.9  
       1280x720       60.0  
       1024x768       75.0     60.0  
       800x600        75.0     60.3  
       720x480        60.0  
       640x480        75.0     60.0  
    CRT1 disconnected (normal left inverted right x axis y axis)
    CRT2 disconnected (normal left inverted right x axis y axis)
    It says that the screen is in 1920x1080 and the screen receives that signal but the desktop is only in 1400x1050. If i try to create and add a new mode at startup it wont work cause DFP2 is disconnected. I have tried to force disconnect CRT1 but it didn't help. It is like gnome desktop don't follow the resolution change. If I change the resolution to something and then back to 1920x1080 the desktop will follow the change but only if i chage to something else first. Is there a way to run a script everytime the DFP2 connects or disconnects?


    Quote Originally Posted by Krytarik View Post
    - Regarding the autologin issue, please post your "/etc/gdm/custom.conf".
    Code:
    [daemon]
    AutomaticLoginEnable=true
    AutomaticLogin=maskinen
    TimedLoginEnable=false
    TimedLogin=maskinen
    TimedLoginDelay=10
    DefaultSession=gnome
    I'm guessing the auto login issue was caused because i tried to add a mode to DFP2 when it was disconnected and when i tried to change to a resolution that CRT1 didn't support.

  7. #7
    Join Date
    Nov 2010
    Location
    Berlin, Germany
    Beans
    4,534
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Force resolution

    Quote Originally Posted by ryezs View Post
    I'm guessing the auto login issue was caused because i tried to add a mode to DFP2 when it was disconnected and when i tried to change to a resolution that CRT1 didn't support.
    Yeah, I also guess so. Just now I noticed that you didn't specify an output with these commands:
    Quote Originally Posted by ryezs View Post
    Code:
    xrandr -s 1280x720
    xrandr -s 1920x1080
    Thus they are getting applied to the currently first output. And it wouldn't affect your external monitor anyway, because it hasn't been connected at that time.

    This is also the reason why the desktop is at a lower resolution when you login.

    Why do you need to connect the monitor only after startup in the first place?

  8. #8
    Join Date
    Sep 2010
    Location
    Stockholm
    Beans
    17
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Force resolution

    Do you have any idea why the screen get a out of bounds when i try to select the mode that i have added? I have tried to disable CRT1 output in a script that runs at start up but i didn't help. I have also tried to add 1920x1080 to CRT1 in that script and thought that if CRT1 had 1920x1080 the desktop would be able to change to it.

    Is there a way to listen to the monitor changes. If it is I can solve it that way and run a script when the monitor connects

    Quote Originally Posted by Krytarik View Post
    Why do you need to connect the monitor only after startup in the first place?
    It is a computer that is running a program that i made. And when people are borrowing it they start it without the screen and then calls me and ask what is the problem so if I solve this problem they won't call me about that : )

  9. #9
    Join Date
    Nov 2010
    Location
    Berlin, Germany
    Beans
    4,534
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Force resolution

    Quote Originally Posted by ryezs View Post
    Do you have any idea why the screen get a out of bounds when i try to select the mode that i have added?
    On which monitor, the CRT1 that doesn't support those resolution or the DFP2?

    Please connect the DFP2 and run the previously stated commands from within your session. If they change the screen resolution of the desktop as specified, then we know that they work when the monitor is connected.
    Quote Originally Posted by ryezs View Post
    Is there a way to listen to the monitor changes. If it is I can solve it that way and run a script when the monitor connects
    Quote Originally Posted by ryezs View Post
    It is a computer that is running a program that i made. And when people are borrowing it they start it without the screen and then calls me and ask what is the problem so if I solve this problem they won't call me about that : )
    So, basically you are searching for a way to check on boot or on demand if DFP2 is connected, and if so set the desired screen resolution, right? If so, see my earlier post regarding the same matter:
    http://ubuntuforums.org/showthread.php?t=1712863

  10. #10
    Join Date
    Sep 2010
    Location
    Stockholm
    Beans
    17
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Force resolution

    Quote Originally Posted by Krytarik View Post
    On which monitor, the CRT1 that doesn't support those resolution or the DFP2?
    I only have one monitor but the xrander tells me that CRT1 is connected when no monitor is connected that is the weird thing. if you look at my previous post with the xrandr outputs you can see that CRT1 is connected according to xrandr when actually no monitor is connected.

    I get out of bounds when use the mode that i have made with DFP2. I use the modelline from cvt 1920 1080 60 when i crate the new mode.


    I'm going to read you other thread se if i will help me, I already have a script that checks what monitor is plugged in at startup so if i'm lucky i just need to rewrite it.
    Last edited by ryezs; April 8th, 2011 at 01:14 PM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •