Changing video resolution manually (Resolved)

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Changing video resolution manually (Resolved)

Post by GELvdH »

How do I change the video resolution when the desired resolution is not available in the 'Display" settings?
I am running linux mint 19.1 and have a VISIO 22" display.
Last edited by GELvdH on Sun Oct 27, 2019 8:20 am, edited 1 time in total.
User avatar
kukamuumuka
Level 16
Level 16
Posts: 6699
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Changing video resolution manually

Post by kukamuumuka »

You can use xrandr commands. An example:
https://puolanka.info/goto/set-custom-r ... on-xrandr/
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

https://puolanka.info/goto/set-custom-r ... on-xrandr/
Unfortunately that did not work, No such file or directory "puolanka.info"
User avatar
kukamuumuka
Level 16
Level 16
Posts: 6699
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Changing video resolution manually

Post by kukamuumuka »

GELvdH wrote:
Tue May 14, 2019 1:04 pm
https://puolanka.info/goto/set-custom-r ... on-xrandr/
Unfortunately that did not work, No such file or directory "puolanka.info"
It is a www-link. Open it using browser.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

My bad, getting so used to doing things in the terminal.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

That is very nice except I can't read Finish. Any other ideas?
User avatar
kukamuumuka
Level 16
Level 16
Posts: 6699
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Changing video resolution manually

Post by kukamuumuka »

GELvdH wrote:
Tue May 14, 2019 1:36 pm
That is very nice except I can't read Finish. Any other ideas?
I have always wondered that strange language. :lol:
finnish.. or what.png
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

Typed in the command line and got these results.
gunter@Gunter-Desktop-1:~$ cvt 1368 768
# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
gunter@Gunter-Desktop-1:~$ xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
X Error of failed request: BadName (named color or font does not exist)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 16 (RRCreateMode)
Serial number of failed request: 33
Current serial number in output stream: 33
gunter@Gunter-Desktop-1:~$ xrandr --addmode VGA-1 1368x768_60.00
xrandr: cannot find output "VGA-1"
gunter@Gunter-Desktop-1:~$
User avatar
kukamuumuka
Level 16
Level 16
Posts: 6699
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Changing video resolution manually

Post by kukamuumuka »

GELvdH wrote:
Tue May 14, 2019 4:23 pm
xrandr --addmode VGA-1 1368x768_60.00
xrandr: cannot find output "VGA-1"
xrandr command tells your output.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

Outstanding, it works.
Dank schoen, gracias, mercie bocou, domo arigato, thanks, etc.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

You had mentioned to put the resolution command into a script file and add it to the startup commands. I know how to write a DOS batch file but how do you create an executable script in linux?
User avatar
kukamuumuka
Level 16
Level 16
Posts: 6699
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Changing video resolution manually

Post by kukamuumuka »

GELvdH wrote:
Tue May 14, 2019 9:28 pm
You had mentioned to put the resolution command into a script file and add it to the startup commands. I know how to write a DOS batch file but how do you create an executable script in linux?

Code: Select all

xed RESO
... the contents

Code: Select all

#! /bin/sh
xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
xrandr --addmode your_output_here 1368x768_60.00
xrandr -s 1368x768
xrandr command told your output
... save and quit and run

Code: Select all

chmod +x RESO
... and add RESO to the startup applications.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

OK, I entered the lines you sent with RESO, saved it as "RESO" in the HOME directory.

#! /bin/sh
xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
xrandr --addmode VGA-0 1368x768_60.00
xrandr -s 1368x768

Went to Startup Applications and added the RESO startup with the following command line.

chmod +x RESO

Re-started the system, no luck. I can enter the commands manually and it works fine, what am I missing?
User avatar
kukamuumuka
Level 16
Level 16
Posts: 6699
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Changing video resolution manually

Post by kukamuumuka »

Check that RESO is into startup applications

Code: Select all

cat $HOME/.config/autostart/RESO.desktop
If it is ok, open displays and set 1368x768 as the default resolution.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

Thanks for all the help and patience.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

OK, I entered these lines exactly as you sent,
#! /bin/sh
xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
xrandr --addmode your_output_here 1368x768_60.00
xrandr -s 1368x768
into reso. I saved them to the desktop since the command you had sent to put into the Startup Applications but it still will not retain the new video mode.
I can copy and paste the "#! /bin/sh etc" commands manually and it works fine it just will not do it automatically.
I feel like a moron asking this again.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

Still need help with doing the resolution change automatically, would appreciate it if someone has any ideas.
Thanks
athi
Level 6
Level 6
Posts: 1459
Joined: Sun Mar 30, 2014 10:15 am
Location: USA

Re: Changing video resolution manually

Post by athi »

Script is working but not executing during startup, maybe an issue with how script was added to startup programs. Steps to add item to startup programs for Mint Mate, Mint Cinnamon should be similar:
1) Select Menu/Control Center/Startup Applications to open Startup Application Preferences window.
2) Select Add to open Add Startup Program window.
3) Enter name in name field, enter note or comment about item/function in the Comment field.
4) Click Browse to open Select Command window, browse to location of program/script, click on program/script to select program/script and click Open to enter path and command in the Command field.
5) Click Add to add item to Startup Programs list.
6) Scroll to find item and ensure that item is check marked.
Mint Mate 19.1. Main rig is HP 800G2 I5 6500 16GB ram, 120GB boot drive, 2x3TB, 1x4TB data drives. Oldest rig is Mate 18.3 on Dell D620 with 32bits core duo.
User avatar
GELvdH
Level 3
Level 3
Posts: 197
Joined: Tue Jan 08, 2019 10:10 am
Location: Havelock, NC USA

Re: Changing video resolution manually

Post by GELvdH »

Hi athi, if you are still around. I tried to create a file with the commands in it and start it with Startup Applications but it does not want to start automatically. These are the commands I typed into a reso file and put on the desktop...
#! /bin/sh
xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
xrandr --addmode VGA-0 1368x768_60.00
xrandr -s 1368x768
I can manually copy and paste those commands into the terminal and it works fine but have not been able to do it automatically.
Any suggestions?
athi
Level 6
Level 6
Posts: 1459
Joined: Sun Mar 30, 2014 10:15 am
Location: USA

Re: Changing video resolution manually

Post by athi »

GELvdH wrote:
Fri Aug 09, 2019 9:55 pm
Hi athi, if you are still around. I tried to create a file with the commands in it and start it with Startup Applications but it does not want to start automatically. These are the commands I typed into a reso file and put on the desktop...
#! /bin/sh
xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
xrandr --addmode VGA-0 1368x768_60.00
xrandr -s 1368x768
I can manually copy and paste those commands into the terminal and it works fine but have not been able to do it automatically.
Any suggestions?
Still around, how is the network working for you? Have not done much shell script, but here goes.

You already tested the commands so you will have to:
1) save it as a .sh file (shell script) in a location that is easy to find for later maintenance. Directory in /home/user/ is always good.
2) make file executable. You can use CLI as tutorial or run chmod +x shellscriptname.sh to make file executable.
3) create a new item in Start Menu and add file to start-up menu.
Link to a tutorial on how to add script file to start menu: https://www.writebash.com/bash-gui/add- ... t-659.html

In this case, file was saved to user home directory, chmod via CLI to add execution rights, and add to Start Menu items.
Mint Mate 19.1. Main rig is HP 800G2 I5 6500 16GB ram, 120GB boot drive, 2x3TB, 1x4TB data drives. Oldest rig is Mate 18.3 on Dell D620 with 32bits core duo.
Post Reply

Return to “Installation & Boot”