Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I am running Mint 18.1 with Cinnamon and I love it.
My only problem is that my laptop screen is 4k but my 2 external screens are 1080p. So I have set my laptop screen to use the resoltution 1080p which works great. BUT when I reboot or connect a screen the laptop screen goes back to 4k.
How can I hard code the resolution of this screen so have a max of 1080p?
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by kraziekris
Hi, I am running Mint 18.1 with Cinnamon and I love it.
My only problem is that my laptop screen is 4k but my 2 external screens are 1080p. So I have set my laptop screen to use the resoltution 1080p which works great. BUT when I reboot or connect a screen the laptop screen goes back to 4k.
How can I hard code the resolution of this screen so have a max of 1080p?
Thanks
Chris
What video card are you using (and also video driver)??
As with the NVIDIA driver (from NVIDIA themselves) you could run the following command to set screen res for good (as superuser/root);
Code:
nvidia-xconfig --mode 1366x768
If you wanted/needed a screen resolution of 1366x768
Could you also tell us exactly which resolution you would like? As 1080p is a little general.
I am using 3 screens and its just the laptop display I am trying to change permenent. When I do this through the Nvidia GUI it only lasts a while until any screen change and then it resorts back.
I am running Nvidia driver version: 367.57
My card is: NVIDIA GM107GLM [Quadro M2000M]
Also if I run the command you said I get this:
Code:
nvidia-xconfig --mode 1920x1080
WARNING: Unable to locate/open X configuration file.
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
New X configuration file written to '/etc/X11/xorg.conf'
Many Thanks
Last edited by kraziekris; 02-14-2017 at 07:25 AM.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by kraziekris
Hi, thanks so much for the fast reply.
I am using 3 screens and its just the laptop display I am trying to change permenent. When I do this through the Nvidia GUI it only lasts a while until any screen change and then it resorts back.
I am running Nvidia driver version: 367.57
My card is: NVIDIA GM107GLM [Quadro M2000M]
Also if I run the command you said I get this:
Code:
nvidia-xconfig --mode 1920x1080
WARNING: Unable to locate/open X configuration file.
Package xorg-server was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-server.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-server' found
New X configuration file written to '/etc/X11/xorg.conf'
Many Thanks
That's what we're here for! And thanks for the info requested.
You may not have had the xorg.conf file there before so I'm guessing that why it's saying 'WARNING: Unable to locate/open X configuration file.' As the driver may have been getting the config for your monitor from EDID (and sounds like it was).
If your desktop is working then xorg should be installed, in which case I would not worry about the output of nvidia-xconfig
Hi, yes, even with that file being generated it still put my screen at 4k, it also messed up the positioning of my screens so I had to delete /etc/X11/xorg.conf file.
Now everything is ok again but I still have 4k on 1 screen unless I manually edit it in the nvidia GUI each time.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by kraziekris
Hi, yes, even with that file being generated it still put my screen at 4k, it also messed up the positioning of my screens so I had to delete /etc/X11/xorg.conf file.
Now everything is ok again but I still have 4k on 1 screen unless I manually edit it in the nvidia GUI each time.
I should have said before, you NEED to restart the X server after you have run nvidia-xconfig command.
You may also need to tell nvidia-xconfig which monitor to change screen res for.
I just dont seem to be able to get the settings to stick!!!
I can see in your xorg.conf that "nvidia-auto-select' is still enabled and not the screen res/mode that you want instead. This looks like the problem from where I'm sitting.
Is the xorg.conf file located in /etc/X11/ ?
Try running;
Code:
nvidia-xconfig --no-use-edid-dpi
and then,
Code:
nvidia-xconfig --mode 1920x1080
and then restart X
Edit: Another option is to manually edit your xorg.conf file, here's mine;
Code:
# File generated by XFdrake (rev 262502)
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 352.63 (tex@localhost.localdomain) Thu Dec 10 13:19:19 CST 2015
# File generated by XFdrake (rev 262502)
# **********************************************************************
# Refer to the xorg.conf man page for details about the format of
# this file.
# **********************************************************************
Section "ServerLayout"
Identifier "layout1"
InputDevice "Keyboard0" "CoreKeyboard"
Screen "screen1" 0 0
EndSection
Section "Module"
Load "v4l" # Video for Linux
Load "glx"
EndSection
Section "ServerFlags"
Option "DontZap" "False" # disable <Ctrl><Alt><BS> (server abort)
# allows the server to start up even if the mouse does not work
#DontZoom # disable <Ctrl><Alt><KP_+>/<KP_-> (resolution switching)
Option "allowmouseopenfail"
EndSection
Section "InputDevice"
# generated from data in "/etc/sysconfig/keyboard"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "Monitor"
# TV fullscreen mode or DVD fullscreen output.
# 768x576 @ 79 Hz, 50 kHz hsync
Identifier "monitor1"
VendorName "Plug'n Play"
ModeLine "768x576" 50.00 768 832 846 1000 576 590 595 630
ModeLine "768x576" 63.07 768 800 960 1024 576 578 590 616
EndSection
Section "Device"
Identifier "device1"
VendorName "NVIDIA Corporation"
BoardName "NVIDIA GeForce 420 series and later"
Driver "nvidia"
Option "TripleBuffer" "True"
EndSection
Section "Screen"
Identifier "screen1"
Device "device1"
Monitor "monitor1"
DefaultDepth 24
Subsection "Display"
Depth 24
Modes "1366x768" "1200x720" "nvidia-auto-select"
EndSubsection
Option "DynamicTwinView" "false"
Option "DPMS"
Option "AddARGBGLXVisuals"
EndSection
Last edited by jsbjsb001; 02-14-2017 at 09:04 AM.
Reason: extra info
Ok so I have edited my xorg.conf but I am pretty sure that nvidia is ignoring it completely and sometimes even deleting it because one time it was gone completely and it still ignores this resolution on reboot....
Also I think that this may have something to do with it? If i go to the normal Display settings in Linux, it will only give me 4k as a resolution, there are no other resolutions here. Maybe this is overriding it initially?
Last edited by kraziekris; 02-14-2017 at 10:56 AM.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by kraziekris
Hi, thanks again for all of this!!!
Ok so I have edited my xorg.conf but I am pretty sure that nvidia is ignoring it completely and sometimes even deleting it because one time it was gone completely and it still ignores this resolution on reboot....
Also I think that this may have something to do with it? If i go to the normal Display settings in Linux, it will only give me 4k as a resolution, there are no other resolutions here. Maybe this is overriding it initially?
From what you said before it sounds like it IS looking at your xorg.conf file.
If you look at the following line, there is no screen res in your xorg.conf file;
-rw-r--r-- 1 root root 1671 Feb 14 17:41 /etc/X11/xorg.conf
Not sure if it makes any difference or helps us solve this but it seems to load the correct resolution up to the login box, then I type my password and a few seconds later I see the resolution change to 4k.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by kraziekris
Hi, thanks, I get back the same as you!!
Code:
-rw-r--r-- 1 root root 1671 Feb 14 17:41 /etc/X11/xorg.conf
Not sure if it makes any difference or helps us solve this but it seems to load the correct resolution up to the login box, then I type my password and a few seconds later I see the resolution change to 4k.
Nope, just to rule it out as a possible cause/issue in terms of file permissions.
Now from what you just said, it sounds like, once you login, something is changing the screen res again. Interesting.
How did you try and change it before (which program did you use)? eg. some sort of control center/panel, etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.