LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-14-2017, 08:37 AM   #1
arranskye
Member
 
Registered: Apr 2013
Location: Nottingham GB
Distribution: Ubuntu, Puppy, Zorin
Posts: 115

Rep: Reputation: Disabled
screen resolution


I need a screen resolution 1366 x 768 This setting is not available in settings or an option in xrandr. How can a change my second monitor to the correct resolution please. Thanks
 
Old 03-14-2017, 10:03 AM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
I had a 1680x1050 monitor that would not automatically set that mode. xrandr would not offer 1680x1050 as an option, so I wrote myself a little GUI-based script to set a custom mode. Perhaps it will work for you:

Code:
#!/bin/bash

"""
    A script to set up a new mode
    version 1 20150603
    version 2 add check for three parameters
    version 3 use zenity to enter parameters for gtf
    version 4 20160704 New mode name actually now works.
              Add four extra digits to mode name to make conflict
              with an existing mode name less likely
"""

# get parameters for gtf
hvf=$(zenity --forms --title="Screen Resolution Setter" \
             --separator=" " \
             --add-entry="# of Horizontal pixels: " \
             --add-entry="# of Vertical pixels: " \
       -     --add-entry="Frequency: ")
echo ""
echo ""
echo "horiz, vert, frequency: $hvf"

# get the modeline from gtf
modeline=$(gtf $hvf)
modeline=$(echo "$modeline" | tail -n 1)
echo "modeline = $modeline"

# strip mode name from modeline
modeline_sans_name=$(echo $modeline | awk '{$1=""; $2="";print}')
echo "modeline_sans_name = $modeline_sans_name"

# create new mode name - must be unique
hvf=($hvf)
mode=${hvf[0]}x${hvf[1]}_$(($(date +%N)/100000))
echo "mode = $mode"

# now we adapt my old xrandr_1680x1050.sh script
#xrandr --newmode 1680x1050 147.14  1680 1784 1968 2256  1050 1051 1054 1087  -HSync +Vsync
#xrandr --addmode $screen 1680x1050
#xrandr --output $screen --mode 1680x1050

# get name of screen
screen=$(xrandr | grep \ connected | awk '{print $1}')
echo "$screen"

# notify xrandr of new mode
newmode1="xrandr --newmode $mode $modeline_sans_name"
$newmode1
echo "newmode1 = $newmode1"

# made new mode accessible to $screen
newmode2=$(xrandr --addmode $screen $mode)
$newmode2
echo "newmode2 = $newmode2"

# switch to new mode
mode_switch=$(echo "xrandr --output $screen --mode $mode")
# uncomment the following line to implement resolution switching
## $mode_switch
echo "mode_switch = $mode_switch"
 
Old 03-15-2017, 01:59 AM   #3
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by arranskye View Post
I need a screen resolution 1366 x 768 This setting is not available in settings or an option in xrandr. How can a change my second monitor to the correct resolution please. Thanks
If your computer's video card is a NVIDIA based one, try the following;

Open a command-line (as root/superuser) and type the following;
Code:
nvidia-xconfig --mode 1366x768
If you wanted/needed a screen resolution of 1366x768

EDIT: You will need the driver installed, from NVIDIA themselves, for this to work.

Last edited by jsbjsb001; 03-15-2017 at 02:02 AM.
 
Old 03-16-2017, 05:55 PM   #4
X-LFS-2010
Member
 
Registered: Apr 2016
Posts: 510

Rep: Reputation: 58
he/she didn't say NVidia, laptop lcd, nothing. gone i think.
 
  


Reply

Tags
monitor output, screen resolution



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen resolution not taking up the hole screen leaving black edges spaje Linux - Laptop and Netbook 9 04-01-2010 10:24 PM
change screen resolution of xdm login screen in suse linux anon104 Linux - Desktop 2 04-02-2007 09:26 AM
How do i fix screen resolution / monitor choice while screen is pretty much unreadabl tinkerdog Fedora 2 09-08-2006 03:53 AM
default screen resolution smaller than max. resolution ?? Thoddy Linux - General 2 11-10-2005 01:33 AM
Unable to configure screen resolution for 15.2" LCD screen in Fedore Core 1 schu Linux - Newbie 3 01-02-2004 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration