DEV Community

Stack All Flow
Stack All Flow

Posted on • Originally published at stackallflow.com on

How to Make Xrandr Customization Permanent in Ubuntu?

lightdmxrandr

I used to edit the startup script for the GDM (/etc/gdm/Init/Default) to permanently change my display resolution.

How can I do this with LigthDM in Ubuntu Oneiric?

Accepted Answer

I think you can add the display modes to /etc/X11/xorg.conf.

If you don’t have a xorg.conf, then you can use the following as a basis. You need to replace the entries with the names Modeline, Driver and Modes with the correct entries for your system. Depending on your hardware, you may need additional entries, for example if your system has more than one graphic chip.

Section "Monitor"
    Identifier "Monitor0"
    Modeline "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
    Modeline "1024x768_60.00" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
        Modes "1280x1024_60.00" "1024x768_60.00"
    EndSubSection
EndSection

Section "Device"
    Identifier "Card0"
    Driver "nvidia"
EndSection

Enter fullscreen mode Exit fullscreen mode

If you don’t know the name of the video driver that your system is using then you may get the name as follows (if you have an intel graphic chip, the driver name is just “intel”):

lshw -class display | grep "driver"

Enter fullscreen mode Exit fullscreen mode

The modelines can be generated with cvt:

cvt <h-resolution> <v-resolution> [refresh]

Enter fullscreen mode Exit fullscreen mode

The post How to Make Xrandr Customization Permanent in Ubuntu? appeared first on Stack All Flow.

Top comments (0)