Author Topic: [SOLVED] Re: Autoloading 1280x1024 screen resolution with Xrandr?  (Read 5047 times)

Offline rvinfo

  • Jr. Member
  • **
  • Posts: 16
I have a Dell D610 laptop with Intel 915GM video. Have installed PCLOS 2011.7 with XFCE and it boots up in 1024x768 native resolution using the "Intel 810 and later" driver. Works fine that way, but now I am using a Dell P190S monitor and want to use a screen resolution of 1280x1024 which is not listed as an option. After days of digging around the forums, I was able to get this to work by opening a terminal windows and entering:

xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 1280x1024_60.00
xrandr --output VGA1 --mode 1280x1024_60.00

Works fine at 1280x1024 till I reboot. When I restart, these settings (temporarily saved in XORG.CONF) are lost. Is there a way to load these settings automatically when booting up?

Thanks!
« Last Edit: October 13, 2011, 06:33:20 AM by rvinfo »

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12645
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #1 on: October 11, 2011, 06:44:58 PM »
In Configure your Video card, Resolution in the PCLinuxOS Control Center, select other then click the button again again and there will be the option to set it for 1280x1024.



Thanks to everyone who donates. You keep the servers running.
Follow me on Twitter for the latest development info.

Offline rvinfo

  • Jr. Member
  • **
  • Posts: 16
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #2 on: October 11, 2011, 07:20:52 PM »
Thanks for the fast reply, Texstar.

I followed your instructions and the 1280x1024 setting is saved in Control Center after reboot. The display is still 1024x768 though. I verified this by rerunning the Xandr commands shown in the original post and then it did switch to 1280x1024. Maybe it is related to the Intel 810+ driver?

Here is where I got the info about Xandr:
http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html




Offline Yankee

  • Hero Member
  • *****
  • Posts: 1514
  • In theory, theory=practice, in practice ???
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #3 on: October 11, 2011, 08:03:36 PM »
Thanks for the fast reply, Texstar.

I followed your instructions and the 1280x1024 setting is saved in Control Center after reboot. The display is still 1024x768 though. I verified this by rerunning the Xandr commands shown in the original post and then it did switch to 1280x1024. Maybe it is related to the Intel 810+ driver?

Here is where I got the info about Xandr:
http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html

Does the monitor look OK at the 1280 setting ?   You could put your xandr commands in a script.
Just type them in a file and save to monitor.sh, for example.   Can run that script from the
terminal or in autostart.sh anytime.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline rvinfo

  • Jr. Member
  • **
  • Posts: 16
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #4 on: October 11, 2011, 08:36:16 PM »
Yep, the display looks great at 1280x1024 which Dell says is the "native resolution" for the P190S monitor. I am a rookie with script writing but can copy & paste the commands into a file and save it of course.

If I saved a file named autostart.sh, where would I put it in to launch during bootup? There are no files anywhere named autostart.sh or monitor.sh. Are these folders or files? What is the path?

Thanks!


Offline Yankee

  • Hero Member
  • *****
  • Posts: 1514
  • In theory, theory=practice, in practice ???
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #5 on: October 11, 2011, 08:48:56 PM »
Yep, the display looks great at 1280x1024 which Dell says is the "native resolution" for the P190S monitor. I am a rookie with script writing but can copy & paste the commands into a file and save it of course.

If I saved a file named autostart.sh, where would I put it in to launch during bootup? There are no files anywhere named autostart.sh or monitor.sh. Are these folders or files? What is the path?

Thanks!

Well first search for autostart.sh, I haven't used XFCE for a long
time and can't remember what their autostart file is, but that's
the file for OpenBox anyway.  Then put the xrandr commands in
there or in a made file like monitor.sh, that you can run instead of typing
all those commands.  /home/user/.config/openbox/autostart.sh is
where it is in OpenBox.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11681
  • ----IOFLU----
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #6 on: October 11, 2011, 09:17:10 PM »
Thanks for the fast reply, Texstar.

I followed your instructions and the 1280x1024 setting is saved in Control Center after reboot. The display is still 1024x768 though. I verified this by rerunning the Xandr commands shown in the original post and then it did switch to 1280x1024. Maybe it is related to the Intel 810+ driver?

Here is where I got the info about Xandr:
http://www.ubuntugeek.com/how-change-display-resolution-settings-using-xrandr.html



Forget xrandr and edit your /etc/X11/xorg.conf as root. In the Section "Screen" part, add the proper resolutions so it looks like this;

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24

    Subsection "Display"
        Depth 8
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection

    Subsection "Display"
        Depth 15
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection

    Subsection "Display"
        Depth 16
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection

    Subsection "Display"
        Depth 24
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
EndSection


On reboot, or logging out then back in, you should get the default resolution, which is the first entry on each of the Modes lines, or more exactly, the first entry on the DefaultColorDepth Modes line. (As shown, the Depth 24 Modes line)
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline rvinfo

  • Jr. Member
  • **
  • Posts: 16
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #7 on: October 11, 2011, 09:58:17 PM »
This seems to be similar to the procedure of changing the settings in Control Center, which writes to XORG.CONF. Unfortunately, and screen resolution above 1024x768 is ignored even though that's what the settings and XORG.CONF file say.

So far the only way to get the screen resolution to actually change has been to open Terminal and paste the following:

xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA1 1280x1024_60.00
xrandr --output VGA1 --mode 1280x1024_60.00

Here is what XORG.CONF says:

# File generated by XFdrake (rev 262502)

# **********************************************************************
# Refer to the xorg.conf man page for details about the format of
# this file.
# **********************************************************************

Section "ServerFlags"
    Option "DontZap" "False" # disable <Ctrl><Alt><BS> (server abort)
    AllowMouseOpenFail # allows the server to start up even if the mouse does not work
    #DontZoom # disable <Ctrl><Alt><KP_+>/<KP_-> (resolution switching)
EndSection

Section "Module"
    Load "v4l" # Video for Linux
EndSection

Section "Monitor"
    Identifier "monitor1"
    VendorName "Dell"
    ModelName "Dell P190S(Analog)"
    HorizSync 30.0-81.0
    VertRefresh 56.0-76.0
   
    # TV fullscreen mode or DVD fullscreen output.
    # 768x576 @ 79 Hz, 50 kHz hsync
    ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630
   
    # 768x576 @ 100 Hz, 61.6 kHz hsync
    ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616
EndSection

Section "Device"
    Identifier "device1"
    VendorName "Intel Corporation"
    BoardName "Intel 810 and later"
    Driver "intel"
    Option "DPMS"
EndSection

Section "Screen"
    Identifier "screen1"
    Device "device1"
    Monitor "monitor1"
    DefaultColorDepth 24
   
    Subsection "Display"
        Depth 8
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
   
    Subsection "Display"
        Depth 15
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
   
    Subsection "Display"
        Depth 16
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
   
    Subsection "Display"
        Depth 24
        Modes "1280x1024" "1152x864" "1024x768" "832x624" "800x600" "640x480" "480x360" "320x240"
    EndSubsection
EndSection

Section "ServerLayout"
    Identifier "layout1"
    Screen "screen1"
EndSection

 

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11681
  • ----IOFLU----
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #8 on: October 11, 2011, 10:25:43 PM »
rvinfo:

Below is from my monitor section. Note the Option line.

Section "Monitor"
    Identifier "monitor1"
    VendorName "Samsung"
    ModelName "Samsung SyncMaster 790DF"
    HorizSync 30-71
    VertRefresh 50-160
    Option "PreferredMode" "1280x1024"


You might want to try manually adding that.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline rvinfo

  • Jr. Member
  • **
  • Posts: 16
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #9 on: October 12, 2011, 07:10:10 AM »
Thanks again for your help. I added Option "PreferredMode" "1280x1024" and that did not change the VGA1 resolution from 1024x768 to 1280x1024 before or after rebooting. When I manually ran the 3 Xrandr commands in terminal, then ran Xrandr -q here is the result:

[lg@localhost ~]$ xrandr -q
Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 4096 x 4096
LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 286mm x 214mm
   1024x768       60.0*+
   800x600        60.3     56.2 
   640x480        59.9 
VGA1 connected 1280x1024+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0 
   800x600        60.3     56.2 
   848x480        60.0 
   640x480        59.9 
   1280x1024_60.00   59.9*
DVI1 disconnected (normal left inverted right x axis y axis)
TV1 unknown connection (normal left inverted right x axis y axis)
   848x480        30.0 +
   640x480        30.0 +
   1024x768       30.0 
   800x600        30.0 
[lg@localhost ~]$

VGA1 is the external Dell P190S monitor and it continues running at 1280x1024 as I want it to - until I reboot. Yes, I can manually run these 3 lines whenever I restart the computer and it always works. That has been the only successful way so far to get the external monitor to change from 1024x768 to 1280x1024. Just wondering if anyone knows a way to "autostart" these commands in Terminal. Not sure how XFCE "autostarts" applications either but I will tackle that issue separately.

I haven't found any way to get the Control Center settings nor manually editing XORG.CONF to raise the resolution higher than 1024x768 even though the settings say it did.

Maybe XFCE is not supported to the degree I am looking for? Not being a programmer nor script writer I could try installing PCLOS with a different desktop option that has more GUI and less command lines. Guess I spent too many years with Window$ but clicking works better than typing for me as I learn more.

XFCE is one of 5 download options shown at the PCLOS home page. I have seen one vote for OpenBox. Comments? Suggestions?

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12645
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #10 on: October 12, 2011, 07:20:04 AM »
try putting those commands in /etc/rc.d/rc.local file

Thanks to everyone who donates. You keep the servers running.
Follow me on Twitter for the latest development info.

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1514
  • In theory, theory=practice, in practice ???
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #11 on: October 12, 2011, 02:41:50 PM »
XFCE is one of 5 download options shown at the PCLOS home page. I have seen one vote for OpenBox. Comments? Suggestions?

XFCE shouldn't be the problem, the problem is getting the 1280 setting in
the computer permanently which I think we've just done.  One question.
Does the laptop monitor work OK when you boot without the larger monitor
plugged in, given the settings added ?
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline rvinfo

  • Jr. Member
  • **
  • Posts: 16
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #12 on: October 12, 2011, 05:46:12 PM »
Texstar, I put the three lines at the bottom of the rc.local file. No visible change after reboot.

Ferdes, The laptop screen has always worked fine with or without the external monitor. The maximum resolution is 1024x768 on the internal laptop screen though. Xrandr has separate settings for VGA1 (external) and LVDS1 (internal)

Running Windows XP I can choose up to 1600x1200 on the same Dell P190S external monitor, same Dell D610 laptop, different hard drive only. Of course the setting remains after reboot.

I prefer 1280x1024 but when PCLOS is restarted, that choice is gone. After rebooting PCLOS the list shown below from Xrandr -q is the same except no 1280x1024 choice for VGA1, so it isn't permanent. Going back to the first post in this thread, it has to be manually loaded after each restart. No progress so far but still trying.

Thanks!



 

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1514
  • In theory, theory=practice, in practice ???
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #13 on: October 12, 2011, 06:52:28 PM »
Going back to the first post in this thread, it has to be manually loaded after each restart. No progress so far but still trying.

Thanks!

I can't believe the rc.local file didn't set it up perfectly.  What I would do is go
over to the XFCE forum and ask them exactly where or how to get them three
xrandr commands into a boot-up autostart file.  Is there an autostart option
on the main or config menu's ?    Don't give up yet.   Did you put an "&"  one
space after each command in the rc.local file ?   That's needed.
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12645
Re: Autoloading 1280x1024 screen resolution with Xrandr?
« Reply #14 on: October 12, 2011, 06:56:39 PM »
I can't believe it either but I want to believe!  ;D

Thanks to everyone who donates. You keep the servers running.
Follow me on Twitter for the latest development info.