VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » IT, programs, coding
Linux Monitor Resolution and Positioning that Never Resets - Chris Titus Tech

Linux Monitor Resolution and Positioning that Never Resets - Chris Titus Tech

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Linux Monitor Resolution and Positioning that Never Resets - Chris Titus Tech Linux Monitor Resolution and Positioning that Never Resets In this video, I go over hard-coding resolution fixes in Linux. This will force monitors into resolutions and positions that you need so you never have to do calibration again! xrandr = terminal - sudo apt-get install x11-xserver-utils arandr = gui -sudo apt-get install arandr - depends on xrandr /etc/X11/xorg.conf.d/10-monitor.conf Source: Full Syntax - https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml Section Monitor ### Monitor Identity - Typically HDMI-0 or DisplayPort-0 Identifier HDMI1 ### Setting Resolution and Modes ## Modeline is usually not required, but you can force resolution with it Modeline 1920x1080 172.80 1920 2040 2248 2576 1080 1081 1084 1118 Option PreferredMode 1920x1080 Option TargetRefresh 60 ### Positioning the Monitor ## Basic Option LeftOf or RightOf or Above or Below DisplayPort-0 ## Advanced Option Position 1680 0 ## Disable a Monitor Option Disable true EndSection
Date: 2022-03-21

Comments and reviews: 10


I know Im commenting quite late after the vid was released, but for some weird reason this tutorial is not working for me. Id really appreciate it if anyone could assist.
So for starters Im trying to use this tutorial with Debian on VirtualBox, I dont think that that would cause problems though. Im using a LG monitor 2560x1080 and currently have the display setting on 2560x1080 because for some reason debian doesnt have an option for my resolution.
So when I run the xrandr command I get the following.
Screen 0: minimum 320 x 200, current 2560 x 1600, maximum 8192 x 8192
XWAYLAND0 connected 2560x1600+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
2560x1600 59.94-+
I followed the tutorial and did everything till I got to the editing of the 10-monitors.conf file.
This is where I think I couldve made a mistake.
This is what I put there:
Section -Monitor-
### Monitor Identity - Typically HDMI-0 or DisplayPort-0
Identifier -XWAYLAND0-
### Setting Resolution and Modes
## Modeline is usually not required, but you can force resolution with it
Option -PreferredMode- -2560x1080-
Option -TargetRefresh- -60-
### Positioning the Monitor
## Basic
Option -Above- -DisplayPort-0-
## Advanced
Option -Position- -0 0-
## Disable a Monitor
Option -Disable- -true-
At first I removed the ''Positioning the Monitor' and 'Disable Monitor Part' , restarted my PC. My resolution was still 2560x1600. I added it back, same.
I somehow think the error might be in the monitor Identifier where I had the xwayland thing, but honestly I tried a lot of tutorials.
If anyone can assist it would be highly appreciated.

reply

Have a question for you. Recently installed Parrotsec OS as main OS on old laptop. So far I love it but ran into an issue with using HDMI. I have searched everywhere even reached out to some friends who are more experienced than I and can't find the answer. As you are probably aware I had to set up Nvidia drivers for Parrot and followed the docs and had no issues. If I want my Nvidia card to handle apps I use the command: optirun _yourprogram_ For whatever reason when I plug in both TV or computer monitor Parrot does not detect the second monitor. Windows no problem so it's not a hardware issue. I ran xrandr and it says HDMI1 disconnected. My question is do you know how to enable HDMI and or what the HDMI command would be if I have to use optirun and have my graphics card handle the HDMI output? I have tried several solutions including searching Parrot forums and nothing works. So I thought I would ask you after watching this awesome video! (I find it really weird as my raspberry pi detected my second monitor automatically, so figured Parrot would too!) Thanks for all your videos and hard work!
reply

Ok I couldn't quite get the advanced part where it controls the position for each monitor(how you calculate that) so I just removed it for both monitors and I suppose it didn't affected the process drastically. I'm using Opensuse Lead 15.1 so there was already unused conf file called 50-monitor.conf so I removed its useless content and adapted and pasted your one - it worked so it now sets the correct resolutions at bootup. But I have another issue - I'm using laptop with external monitor and with the current setting at bootup laptop's display is set as primary monitor and I want the external big display to be primary. So after each boot now I need to go to -Configure Desktop- to configure it manually. Is there a way to automatically set the external monitor as primary instead of laptop's one at bootup? Thanks in advance!
reply

I'm mindblown by this. I had somehow hacked my own solution. I used arandr at first. Then I noticed that creating a layout with arandr just creates a shell script thats using xrandr. from there I created my own shell script using xrandr that would run after logging in. But seeing your elegant solution makes me feel like a caveman haha. I have two questions though!
First question: Has it happened to you that the display identifier names changed over time? Because I think I have observered that over the years. sometimes it was eDP1, suddenly eDP-1 or something like that. Very minor changes that threw off my script and I had to adjust. Just wondering, since that would probably also impact the xorg config.
My second question: What DE is that in your video?
Great video, have a nice day!

reply

Hi Chris, I have a few simple questions (simple for you, anyway ):
1. In the xranrd output, what exactly does the + indicate? You said the - indicated the current mode, and one has the plus, while the other does not. it is on a different line.
2. You are creating a new config for the X displays, but if you didn't, what is the default config file? I saw a file named xorg.conf in the xorg directory, and if this is the default, does adding the .d directory with conf file in it cause the system to ignore this much simpler file?
Thanks, Richard
P.S. Sent two more newbs your way - one loves you while the other asked of you were speaking a language found on Earth... (guess you were a bit over his head ).

reply

I wrestled with it on a laptop with a new external monitor running Manjaro/Windows installed on separate internal hard drives. I had made the mistake of not putting the config of each monitor in its own block and that was giving me a blank screen on reboot, no way to access the terminal even. All was fixed by enclosing each monitor configuration details in its own block starting and ending with Section -Monitor- and EndSection respectively. After that was fixed it worked smoothly and now I feel the excitement of understanding how the display coordinates work in X for multiple displays. Thanks for the video.
reply

this Solutions sucks! way too many syntax errors with your config. Just go into Nvidia x server setting and set your monitor configuration the way you want it, then hit the save to x configuration file button, then hit the show preview button, now copy the script in the preview screen. Paste this to a word file until you create the etc/x11/xorg.conf.d/10-monitors.conf file . Now do sudo Nano 10-monitors.conf and copy and paste the script you got from the previous screen, save & exit Nano. reboot . Now everything will work perfectly from now on just as Mr. Titus said.
reply

Hi, I'm using an external monitor connected to my Nvidia Card on my laptop [Acer predator helios 300] I'm using KDE DE on kali linux. I have installed the Nvidia drivers and the Nvidia program created a xorg.conf file which makes only the monitor visible and when I delete the config file, the laptop screen becomes visible. What I want is, both screens on at the same time. I tried playing with Xorg config file many times but in the end result is only one screen becomes visible. If you can help please let me know.
reply

I have a unique issue with my monitors. One display only supports 59.95Hz native, while the other supports 59.97 and 60Hz, and this causes very bad screen tearing issues, or frame dropping issues. So far the only way I've been able to fix that is by using Windows which somehow doesn't seem to have an issue with mismatched framerates, or to use different monitors. I've since replaced one of the displays so now they both run at the same framerate. But how would I fix that issue if spending money wasn't an option?
reply

I have 3 to 7 additional monitors plugged in to my laptop when it is docked, depending on where I'm docking and what I'm working on--monitor hotswapping has always been a real pain in X. Relative monitor placements and resolutions should be remembered whenever a monitor is added or removed. Further, different relative placements for each different combination of monitors plugged in should also be remembered and automatically implemented whenever a monitor is added or removed.
reply
Add a review, comment






Other channel videos