LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Change screen resolution to a unsupported mode (https://www.linuxquestions.org/questions/linux-general-1/change-screen-resolution-to-a-unsupported-mode-879465/)

vitorsgoncalves 05-08-2011 07:26 AM

Change screen resolution to a unsupported mode
 
Hello

I just installed Opensuse 11.4 (gnome) in a new desktop but the screen resolution is 1360x768 60hz and this is not listed in monitor settings, so the monitor keeps displaying "not optimized mode" message.

In order to use the correct resolution, I used these two commands:

xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
xrandr --addmode VGA1 "1360x768_60.00"

it worked, but every time the computer is restarted, I must run this command again. So I think "I just have to create a script in the initialization!". It works, every time the computer is started, there is no need to run the commands again. But when program enters in full screen, the resolution is "lost" and the monitor message is displayed again.

The question is: Is there another way to change the resolution or perhaps a way to save these settings?

rylan76 05-09-2011 05:21 AM

Quote:

Originally Posted by vitorsgoncalves (Post 4349957)
Hello

I just installed Opensuse 11.4 (gnome) in a new desktop but the screen resolution is 1360x768 60hz and this is not listed in monitor settings, so the monitor keeps displaying "not optimized mode" message.
.
.
.
it worked, but every time the computer is restarted, I must run this command again. So I think "I just have to create a script in the initialization!". It works, every time the computer is started, there is no need to run the commands again. But when program enters in full screen, the resolution is "lost" and the monitor message is displayed again.

The question is: Is there another way to change the resolution or perhaps a way to save these settings?

Well, you can probably set these settings up as the ONLY available settings in your xorg.conf file?

I had much the same problem after installing Fedora 11 (old I know, yes, but it does what I want and its Linux, so no forced upgrading). What I did was to edit my xorg.conf file in

Code:

/etc/X11/xorg.conf
and changed the "screen" section. My screen section had several resolutions listed, allowing me to jump between them with CTRL+ and CTRL- (if I remember right). However, I wanted my display on my Nvidia 7950GT outputting via an LG Flatron L1919s to always be 1152x864. So I put in this "screen" section in my xorg.conf:

Code:

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option        "TwinView" "0"
    Option        "TwinViewXineramaInfoOrder" "CRT-0"
    Option        "metamodes" "1152x864_75 +0+0"
    SubSection    "Display"
        Depth      24
    EndSubSection

Here's my entire xorg.conf:

Code:

Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    FontPath        "/usr/share/fonts/default/Type1"
EndSection

Section "ServerFlags"
    Option        "Xinerama" "0"
EndSection

Section "InputDevice"

    # generated from default
    Identifier    "Mouse0"
    Driver        "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/input/mice"
    Option        "Emulate3Buttons" "no"
    Option        "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from data in "/etc/sysconfig/keyboard"
    Identifier    "Keyboard0"
    Driver        "kbd"
    Option        "XkbLayout" "us"
    Option        "XkbModel" "pc105"
EndSection

Section "Monitor"
    Identifier    "Monitor0"
    VendorName    "Unknown"
    ModelName      "LG L1919S"
    HorizSync      30.0 - 83.0
    VertRefresh    56.0 - 75.0
    Option        "DPMS"
EndSection

Section "Device"
    Identifier    "Device0"
    Driver        "nvidia"
    VendorName    "NVIDIA Corporation"
    BoardName      "GeForce 7950 GT"
EndSection

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option        "TwinView" "0"
    Option        "TwinViewXineramaInfoOrder" "CRT-0"
    Option        "metamodes" "1152x864_75 +0+0"
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

I'm not exactly sure though how you will translate

Code:

xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
xrandr --addmode VGA1 "1360x768_60.00"

into xorg.conf statements, but it shouldn't be too hard.

E. g. the idea is to have ONLY your desired mode listed in the xorg.conf, thus forcing the X-Server to set that mode only whenever it is started up... at least that is the reasoning I used to set my display to my desired resolution without using automatically-executed startup scripts each time I boot my system.

vitorsgoncalves 05-09-2011 06:09 PM

But there is no Xorg.conf file, instead, there is a folder called "/etc/X11/xorg.conf.d".

Inside that folder there are those files:

10-evdev.conf
11-mouse.conf
50-device.conf
50-monitor.conf
50-screen.conf
50-synaptics.conf
50-vmmouse.conf
50-wacom.conf
60-vboxmouse.conf
90-keytable.conf

How this structure works?

rylan76 05-10-2011 08:54 AM

Very strange, that folder you found is not what you want.

Note the file is

Code:

xorg.conf
NOT

Code:

Xorg.conf
e. g. sub-capital x, not capital X.

Have you tried, as root, to find the xorg.conf file?

As root, in a terminal, type

Code:

find / -name xorg.conf
and see if anything turns up.

I'm not sure if you can even start an X server WITHOUT an xorg.conf file, as far as I know you can't so I'm guessing you -must- have an xorg.conf hanging around somewhere.

Alternatively, if it IS possible to start an X server WITHOUT an xorg.conf to configure it at startup, that might be why you have such widely varying resolutions available - e. g. maybe the X server starts, but -because- you do not configure it (no xorg.conf, if that's true) it tries to offer you as wide a range of options as possible?

vitorsgoncalves 05-10-2011 02:11 PM

According to this page (https://fedoraproject.org/wiki/Input...on#xorg.conf.d), the X server now can use the xorg.conf.d folder that contains "parts" of xorg.conf contents and its files are parsed before xorg.conf.

I will try editing those files and/or creating a xorg.conf file (there is no xorg.conf)

rylan76 05-11-2011 08:13 AM

Quote:

Originally Posted by vitorsgoncalves (Post 4352285)
According to this page (https://fedoraproject.org/wiki/Input...on#xorg.conf.d), the X server now can use the xorg.conf.d folder that contains "parts" of xorg.conf contents and its files are parsed before xorg.conf.

I will try editing those files and/or creating a xorg.conf file (there is no xorg.conf)

Ok, I didn't know that... Hope you get it fixed.

vitorsgoncalves 05-13-2011 07:50 AM

After several attempts to solve this issue, I decided to make a script for the initialization (inside init.d):

Code:

#!/bin/bash
xrandr --newmode "1360x768_60.00" 84.75 1360 1432 1568 1776 768 771 781 798 -hsync +vsync
xrandr --addmode VGA1 "1360x768_60.00"

I activated the script using yast, but it does not work...
But if I run "/etc/init.d/myscript" from command line it works...

vitorsgoncalves 05-14-2011 12:21 PM

Forgot to set the runlevel for the script, it is running now...

too bad it was not done the "right" way...


All times are GMT -5. The time now is 07:10 AM.