Thanks for the informative video. I'd just like to point out that the numbering scheme used in the configuration directory should be zero filled so 9 would be 09- not 9-. If you use the latter then 9- will run after 89-, if it exists and not before 10-
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.
I always wanted to know how to do this, but I did find it rather complex from where I am in Linux but Im sure I will be also be able to do this in the future. Thank you so much Chris I love all your work.
I have ubuntu 20.04, I use 1 VGA and one USB connector, it works on start, but if system goes into hibernation, then monitor 2 goes down, so I have to reboot. But I will continue researching, you have best explanation so far
Thank you, Chris. I haven't had any problems with calibration since 2008, even switching DEs such as Xfce to Gnome or WMs like Fluxbox. But good to know. I will save this.
I installed Manjaro with a DE called XFCE and removed Windows 10 a couple days ago. And I'm happy with it with apps I needed to do my work as a programmer and a gamer using proton provided by valve to make things easier. I already have enough experience through GNU+Linux and everything is ok. Thanks Chris for all the helpful videos and all that tough experience you have been through for letting me install Manjaro without fear.
I never added another monitor. Never had the need for one. This is excellent video on a subject that has dual monitors. I'll already put a mental note in my head. If I ever go using a second monitor. Thanks for all your material. I enjoy all of it. I'm a very powerful Linux user. But again I learn something new here. Keep up the good work.
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.
Awesome! I am learning and this fixed my issue. Namely: I recently installed Armbian on an Android TV Box (Tanix TX 6). My problem was that after changing resolution in my settings menu - if I changed my TV input back to regular tv or some other input then back to the box the displaay would default back to 4K and my desktop was, therefore, to small to read. I followed this tutorial and simply removed all of the stuff for multiple monitors, leaving only the resolution settings. Now when I switch inputs and return to the box, it is at 1920x1080 as preferred! Awesome. I have subscribed to your channel and appreciate your time.
A cool thing is use arandr to create/save patterns of layouts. I use then to alternate between configurations. For example I have a LG Monitor 2560x1080, Samsung TV 1080x1920 and a Sony TV 1920x1080. I use 5 different configurations like LG(single); LG+SG; Sony (single); LG+Sony and all of them together. I switch between saved layouts with key shortcuts.
i like the way linux handles multimonitors, much better than windows, i use the display app in mint , if i do use xorg can you still use the app to go back to a single monitor, as sometimes dual montors can be a pain if the other monitor is being used by something else
I disagree. Having multimonitor setup where monitors have different resolutions is unusable for me. If only Linux had some utility as Little Big Mouse in Windows, it would be much better... I wonder why something like that isn't possible in Linux.
Chris, this was VERY useful. Unfortunately now it's a bit dated as multiple distro's have defaulted to Wayland. Would you please consider addressing this same topic on Wayland?
Nice vid 👍 An oldie but a goodie. Dealing with s2disk/s2ram resume of my monitors. And happened across your video. In late 2022 with systemd, also am starting to peak at how xrandr config works in that context. Kindest regards, neighbours and friends. Edit: P.s. per Arch Wiki . . . *The files are read in ASCII order, and by convention their names start with XX- (two digits and a hyphen, so that for example 10 is read before 20). These files are parsed by the X server upon startup and are treated like part of the traditional xorg.conf configuration file. Note that on conflicting configuration, the file read last will be processed. For this reason, the most generic configuration files should be ordered first by name.* 4:34 --- so rather than going lower than 10 (e.g., "9 dash"), one has to go higher (e.g., 20).
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 ).
I will keep this video in mind. I have my larger monitor on the right and this is my primary monitor. Still, I need the cursor to move from left to right across the screens.
Xorg static config file is great when your computer is stationary PC, not laptop/notebook - for notebook it's better to deal with xrandr config loaded at startup, like XDG startup or xprofile/xinitrc/xsession file
Hi Chris, I manage to use your tutorial and fixed the issue upon restarting the machine. I have another issue: the resolution and position resets while i'm changing from Build-In Display to Join Displays or the other way around. I've been trying to find a fix for this for a long time. Any suggestion?
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!
I have an Nvidia card so I create the xorg.conf file with the sudo nvidia-xconfig command in /etc/X11 Then I edit that file if I need to with sudo nano /etc/X11/xorg.conf
This is what Chris does better than most of the Linuxtubers. He doesn't depend on any desktop-environment, he goes to the root. I hate it when they depend on any specific DE or distro to solve a problem. DE's and distros change all the time, the underlying software does not change that frequently.
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!
Hi. LA. I trying do this in my Mint for my 4k TV(HDMI cable) but is failure! - $ xrandr --output HDMI-1-1 --mode "3840x2160_60.00" xrandr: Configure crtc 0 failed ??? Although i can see new resolution (3840x2160) in my display settings when i apply i got black screen(of death :)?! Any ideas? THX.
Can you please make a video about scaling options on Linux and monitor specific scaling? I have a 4k and a 1080p monitor and currently it's a nightmare.
I use the graphical interface ARandR to create scripts that load a specific screen config through xrandr. Now these scripts I use to easily activate different screen configs by simply pressing a key combination. Currently I have one of them in the autostart launched 2 seconds after system start to setup my default config automatically, but this will serve me better as I sometimes use the magnifying function fullscreen (I did assign to Alt+Scroll) and that does actually still work as if there were all three of my screens active (as it was on system start) until I disable and enable the fullscreen mode of it in the accessibility settings.
I just made this run on startup "xrandr --output DP-2 --primary --mode 2560x1440 --rate 165.00 --output HDMI-1 --mode 1920x1080 --rate 60.00 --right-of DP-2" and I created keyboard shortcuts to disable each of the monitors like this "xrandr --output DP-2 --primary --mode 2560x1440 --rate 165.00 --output HDMI-1 --off" as well as set both back to normal. But I also only use one desktop environment. Edit: If I wanted to add position to the second monitor I could remove "--right-of DP-2" and put "--pos 0x0" replacing the 0's with the exact position I wanted.
Hi Chris, I really enjoy your content, I've watched a few videos Liked the content and subscribed to your channel. I wanted to bring up a question though, you might be able to respond to better having worked in IT professionally It seems like Linux users (especially the advanced ones) never talk about Unix, be it BSD, or otherwise. I was curious as to why not, as Unix existed long before Linux, and many of the principles of Linux are actually Unix. Was also wondering what your thoughts are on BSD being more secure and better for enterprise over Linux at this point. I know Linux has come a long way, and is also a good enterprise option. However that are people who still prefer BSD over linux and recommend it. Thanks again and have a great day.
11:38 You said when you use this method of setting up your displays, you never have to worry about your monitors getting reset or everything changing if you unplug the cable. What does happen if you turn off a monitor or unplug a cable using this Xorg configuration method?
YES!! The power of XRANDR. I have 2 login modes normal desktop and steam-session which loads only steam in bigpicture mode (like kodi-standalone) and some tweaks like no compositors etc. Some games dont like multiple monitors so i use: "xrandr --auto && xrandr --output DP-0 --off && xrandr --output DVI-D-0 --off" in the /usr/bin/steam-de script. (and some nvidiux overclock parametres for who want to know) so only my primary display will be left on. And another example, together with xorg commands like:" Option "ConnectedMonitor" "HDMI-0"" and "Option "CustomEDID" "HDMI-0:/home/abuser/edid.bin"" This way you'll have a production reliable system for use with narrow casting. This way exchanging a defective display will not require reboot he wont even notice he's gone and it works even better when using so called EDID-Minders. The fact is when your script works it will always work! Oh gosh, this message turned out way longer then intended. Scrap all that... Whoohoo 4 Chris!!
Ten years ago I did this and had made the syntax error, I didn't know how to fix it and installed windows. If I knew back then, I might be using it now.
I would not say its a bit complex ... I was Actually really surprise at how easy the first time i did this and its REALLY reliable and efficient methode! I think even new linux users can do this easly !!!
I hope there's something similar to Custom Resolution Utility on Windows in Linux. It's much more user-friendly and easier to do. I tried tons of methods and ways to OC my monitor in Linux but still no avail. One day, when I'm able to OC my monitor, I'll permanently move to Linux.
I have three monitor. Two are 1440p 27" touchscreen and one 1080p 24". I wrote a script with xrandr and xinput to make sure x.org at boot configures the the proper monitor order and map the touchscreen inputs to the proper monitor. At boot when lightdm executes a script to make sure the monitors are arranged in the a prescribed order and the touchscreen inputs are map to the appropriate monitor. Once logged in the same script ensure Cinnamon has the same arrangement and mapping.
I use the ArandR Screen Layout Editor which uses a GUI to help you create the script to run on startup for monitor positions by showing monitor sizes and positions
I recommend making a video on it for those who are more visual plus you don't have to worry about having the correct positioning with pixels as you can see it visually
Hi Chris, following your suggestion, the issue is getting acceptable the modeline settings and scale. xorg's HDMI seems to not like 3840x2160 60hz. Using cvt to get a modeline produces a result but the clock is too high and is not accepted and it switches to 1920x1080. Also, when you do use a high setting, everything shrinks using --scale 0.5x0.5 in xrandr works some of the time. you can setup kde or gnome to scale ok and even in wine. but when you do, lutris' wine is a different version and scale doesnt stick. thanks for producing great content and I really appreciate what you do. cheers
It is for multiple screens on one PC (or Notebook if you plug another monitor in) to keep the order and settings in environments were monitors are often plugged and unplugged.
Great video! One question: If I understood correctly, this will allow me to connect a low dpi monitor to my high dpi laptop display and use both of them alongside each other with hopefully no scaling issues, right?
Might want to rename this video Linux Monitor Configuration. I thought you were going to do color calibration which I wouldn't mind seeing a video on. Perhaps along with a review of a calibration tool that works with linux. Would this technique be effective in saving color calibration settings as well?
Are there any options to set individual UI scales for each monitor? I use Manjaro KDE with a 3840x2160 and a 1920x1080 screen and the UI scale always counts for both monitors. If I set it big enough for the 4k, it's way too big on the 1080p and vice versa. I heard wayland could do it, but I'd love to see a video on that. Also I have a folder: etc/X11/mhwd.d containing nvidia.conf and etc/X11/xorg.conf.d containing 00-keyboard.conf and 90-mhwd.conf Why is that?
Hey Chris, awesome video. Funny that I just have written you an email about that and you posted a video explaining exactly what I was writing about. Coincidence? Greetings from Ireland
Great video as I'm about to convert my desktop with multiple screens to Linux Mint. Question I have is, how do, or can you configure a usb scanner to work with Linux? I haven't had much success with that.
I just prefer running an xrandr command instead in the startup. I honestly don't know why the config file is needed given xrandr command is so much easier to test (just run the command, no need to reboot).
0. And if you have now edited this xorg.conf, and then log into DE, everything gets overwritten by DE config... how do I make DE now use this also and not use it's own configuration? 1. Can you use negative position values? Like primary display being 0 0 and then put one above it with 0 -1080? 2. Can you declare multiple positions per display? Example: you want to set up 4 displays in 2x2 formation (and be able to drag stuff in circles) -- with GUI display settings I have managed only U or C shape formation, but would like "O". Can you "RightOf" AND "Above" in the the same Monitor section? And do a loop this way all around -- declaring both neighbors for each display? Does it work or will it bug out? 3. How do you exit DE/gui/startx to test the config with 'Xorg -config ' like Roger suggested? (for me it gives error : "Server is already active for display 0" and can't test anything) 4. Not sure if this matters, but ' Option "Primary" "true" ' would be also nice touch, if the first display in the config isn't the one. 5. Do you really need to declare positioning in both ways, like you did have both "Above" in one and "Below" in other display? 6. Where do you get your "ModeLine" current / correct value for displays? 7. What about setting up 10bpc display? Can you do it (and more importantly, will it work) in linux even when one display is 10bpc and other one is 8bpc?
Hey Chris but what about different scaling in 2 different monitors? Like you had a 1080p and 4k so 1x and 1.5x scaling. Only Gnome supports it as inbuilt I guess.
It seems like this video isn’t so much on how to enable external monitors to display ( my external monitor is black despite being able to see cursor ) as much as it is to have a persistent config?
i got dual monitor working easily. But, I'd like the *wallpaper* and panel to be on both screens. One monitor has the login screen background for the distro.
On Manjaro we get automatically Arandr package (or maybe I installed it manually? oh, well, this was a few years ago so I don't really remember, that is how stable Manjaro is or could be in the right hands) which is a simple GUI overlay on those configs. I also didn't find the package you installed on the beginning so I assume it's named differently on Arch and installed by default because xrandr command just works OTB.
When you start talking about 2560 to 320 thats when you lose me. My 40" top monitor/LCD Tv (the top and sides are not visible and off the edge with hdmi to component adapter) is 1920x1080 (no overscan with VGA connection but at 720 resolution), my main *laptop* says with xrandr LVDS-1 connected primary 1366x768+327+1080 . Does that mean that I type 327 1080 for position and will this fix my overscan issue?
Changes still aren't persistent for me. Changes aren't even persistent on reboot (without changing the DE or unplugging or anything). Do I need to point xorg towards this config file somehow?
As a alternative if you have a Nvidia card, just run the Nvidia X Server Settings and make your changes and then it will write out the xorg.conf file to /etc/X11 automatically. (you have to tell it to save btw)
I was just about to make this comment myself. I haven't got two monitors to try it but I guess it's just a matter of positioning the screens with a mouse (like Windows) and saving it.
x11-xserver-utils is not available in the Arch-repositories under that name but randr has been installed so apparently it is part of a package with another name.
I don't use a config because you never know when using a portable install what your resolution will be (or if the config is correct). I use xrandr to control the resolution and state on site & remotely I use 'vbetool' which also lets you control monitor state (& to blank a screen if your offsite there is also xset but thats for console users if you've ever tried 'startx' over ssh you know what I mean). All I do is read the list of available resolutions and if I need to change it I do , this is the syntax of course people would replace their identifier: xrandr --output HDMI-0 --mode 1920x1080 xrandr --output HDMI-0 --off ( this turns it off if you have multiple monitors very useful , in order to turn it back on must use the 1st command with a valid resolution) Then I alias it in .bashrc for different resolutions, alias xrandr1080='xrandr --output HDMI-0 --mode 1920x1080' . This way where ever I sit down , if I am using it as a portable distro or a rescue CD I can switch resolutions with ease. You can also make the screen display a res its not even supposed to support, like this ruclips.net/video/BXAn_u1UfOQ/видео.html .
So with the new kali linux update my external display resolution disappeared. It does not show any another resolution besides 1280x800, any help would be greatly appreciated.
I followed the instructions in this video, but I still cant get Debian to detect the HDMI port. xrandr says it is disconnected. I can get it to work with Zorin and Fedora. Do you have any idea of what could be going on? Thanks a lot!
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?
Didn't work for me unfortunately. Tried doing the same with arandr, xrandr even with the commands --newmode but I keep getting the message X Error of failed request: BadMatch (invalid parameter attributes). Searched everywhere to solve this but none of the solutions have solved it. I'm a complete newcomer to Linux so I can't understand much of what I'm doing tbh. Just following the forums' suggestions.
Will this guide work on a newer version of Pop os? It’s pretty frustrating every once in awhile my pc will detect the second monitor then whenever I restart it it won’t detect it again I’m running 22.04
Hi Chris, Need your urgent help. I did the monitor config method and now I am out of Linux. Just doesn't sign in. Says incorrect password. What should I do? Keeps looping again and again to the log in screen despite putting the right password. Tried Ctr+Alt+F4 but asks me for Login and then password and says incorrect
My trouble was disappearance of any sign of a HDMI port on Ubuntu after running another distro from the DVD drive. So I could not use my laptop's external monitor. But you make no reference to such scenarios here.
i'm trying to make an ICC color profile work on linux and it's making me crazy. Because it always RESET the color calibration and i have to re-open kde or gnome settings and reload the icc color profile again. Any fix on that mr. Chris Titus?
You're a life saver! You make complex linux configs easy to understand. that's a hard thing in the linux world
its really not if you are able to read manuals
I thought you were going to calibrate the color and contrast, it is important especially for a wide gamut display.
Thanks for the informative video. I'd just like to point out that the numbering scheme used in the configuration directory should be zero filled so 9 would be 09- not 9-. If you use the latter then 9- will run after 89-, if it exists and not before 10-
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.
I always wanted to know how to do this, but I did find it rather complex from where I am in Linux but Im sure I will be also be able to do this in the future. Thank you so much Chris I love all your work.
I have ubuntu 20.04, I use 1 VGA and one USB connector, it works on start, but if system goes into hibernation, then monitor 2 goes down, so I have to reboot. But I will continue researching, you have best explanation so far
Your title should read, "Linux Monitor Configuration that Never Resets".
That's the title now
Thank you, Chris. I haven't had any problems with calibration since 2008, even switching DEs such as Xfce to Gnome or WMs like Fluxbox. But good to know. I will save this.
I installed Manjaro with a DE called XFCE and removed Windows 10 a couple days ago. And I'm happy with it with apps I needed to do my work as a programmer and a gamer using proton provided by valve to make things easier. I already have enough experience through GNU+Linux and everything is ok. Thanks Chris for all the helpful videos and all that tough experience you have been through for letting me install Manjaro without fear.
I never added another monitor. Never had the need for one. This is excellent video on a subject that has dual monitors. I'll already put a mental note in my head. If I ever go using a second monitor. Thanks for all your material. I enjoy all of it. I'm a very powerful Linux user. But again I learn something new here. Keep up the good work.
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.
Good explainer on monitor config. Also congrats on your 50k. On your way to 100k. Keep up good work
Awesome! I am learning and this fixed my issue. Namely: I recently installed Armbian on an Android TV Box (Tanix TX 6). My problem was that after changing resolution in my settings menu - if I changed my TV input back to regular tv or some other input then back to the box the displaay would default back to 4K and my desktop was, therefore, to small to read. I followed this tutorial and simply removed all of the stuff for multiple monitors, leaving only the resolution settings. Now when I switch inputs and return to the box, it is at 1920x1080 as preferred! Awesome. I have subscribed to your channel and appreciate your time.
A cool thing is use arandr to create/save patterns of layouts. I use then to alternate between configurations. For example I have a LG Monitor 2560x1080, Samsung TV 1080x1920 and a Sony TV 1920x1080. I use 5 different configurations like LG(single); LG+SG; Sony (single); LG+Sony and all of them together. I switch between saved layouts with key shortcuts.
How can you save the pattern ? When I switch between single monitor and join monitors, my resolution and position resets. Any suggestion?
How can you switch with shortcuts? Do you assign to each config file a shortcut?
@@Mark3xtrm Hello, yes I use specific keys to call each file, exemple: monitor 1 ctrl+alt+1, monitor 1 and 2 ctrl+alt+2, only monitor 2 ctrl+alt+3
Nice@@andrensimoes! I'm now using the same method.
Is there a way to trigger them when HDMI is plugged in (or when it simply is already in)?
@@Mark3xtrm Hi, I didn't understand your doubt. Can you give me an exemple?
i like the way linux handles multimonitors, much better than windows, i use the display app in mint , if i do use xorg can you still use the app to go back to a single monitor, as sometimes dual montors can be a pain if the other monitor is being used by something else
I disagree. Having multimonitor setup where monitors have different resolutions is unusable for me. If only Linux had some utility as Little Big Mouse in Windows, it would be much better... I wonder why something like that isn't possible in Linux.
I have Majaro and bad resolution on my monitor. I failed in adding an xrandr commands sh file to autorun. Then I used this guide. Amazing! Thank you!
Chris, this was VERY useful. Unfortunately now it's a bit dated as multiple distro's have defaulted to Wayland. Would you please consider addressing this same topic on Wayland?
is there a way to apply the configurations before the login screen ?
Nice vid 👍 An oldie but a goodie.
Dealing with s2disk/s2ram resume of my monitors. And happened across your video.
In late 2022 with systemd, also am starting to peak at how xrandr config works in that context.
Kindest regards, neighbours and friends.
Edit:
P.s. per Arch Wiki . . .
*The files are read in ASCII order, and by convention their names start with XX- (two digits and a hyphen, so that for example 10 is read before 20). These files are parsed by the X server upon startup and are treated like part of the traditional xorg.conf configuration file. Note that on conflicting configuration, the file read last will be processed. For this reason, the most generic configuration files should be ordered first by name.*
4:34 --- so rather than going lower than 10 (e.g., "9 dash"), one has to go higher (e.g., 20).
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 ).
This is fantastic! Similar overview for Wayland?
looks like on fedora it would be
sudo dnf install xorg-x11-server-utils
good stuff, Thank You Chris for sharing
Yea, fedora uses dnf.
Great video Chris! Thanks. Will you please share with us how did you setup the colored "titus>debian10>" in your shell? Appreciate it
Thank you. I learn a lot form your channel.
I will keep this video in mind. I have my larger monitor on the right and this is my primary monitor. Still, I need the cursor to move from left to right across the screens.
Xorg static config file is great when your computer is stationary PC, not laptop/notebook - for notebook it's better to deal with xrandr config loaded at startup, like XDG startup or xprofile/xinitrc/xsession file
Hi Chris,
I manage to use your tutorial and fixed the issue upon restarting the machine.
I have another issue: the resolution and position resets while i'm changing from Build-In Display to Join Displays or the other way around.
I've been trying to find a fix for this for a long time. Any suggestion?
Sir you're a life saver. Thank you so much
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!
Broke my pc thanks.
I have an Nvidia card so I create the xorg.conf file with the sudo nvidia-xconfig command in /etc/X11
Then I edit that file if I need to with sudo nano /etc/X11/xorg.conf
This is what Chris does better than most of the Linuxtubers. He doesn't depend on any desktop-environment, he goes to the root. I hate it when they depend on any specific DE or distro to solve a problem. DE's and distros change all the time, the underlying software does not change that frequently.
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!
That was very, very helpful - thanks a lot!
I usually set grub to boot at full resolution so it moves to the full resolution before it ever boots using grub-customizer
JessicaFEREM Interesting. I never considered this before. Gonna try this on my next install. 👍 👍
Can you make a Video about the GNU Guix package manager?
I recently heard about it but I'm a bit confused.
Thanks Chris! Fantastic video! Is it possible to do in Wayland as well? If so could you do a video about it?
Not everyone can be a great teacher as I've noticed...!
Hi. LA. I trying do this in my Mint for my 4k TV(HDMI cable) but is failure! - $ xrandr --output HDMI-1-1 --mode
"3840x2160_60.00" xrandr: Configure crtc 0 failed ??? Although i can see new resolution
(3840x2160) in my display settings when i apply i got black screen(of
death :)?! Any ideas? THX.
Can you please make a video about scaling options on Linux and monitor specific scaling? I have a 4k and a 1080p monitor and currently it's a nightmare.
Search in Internet for " scalling".
I use the graphical interface ARandR to create scripts that load a specific screen config through xrandr. Now these scripts I use to easily activate different screen configs by simply pressing a key combination.
Currently I have one of them in the autostart launched 2 seconds after system start to setup my default config automatically, but this will serve me better as I sometimes use the magnifying function fullscreen (I did assign to Alt+Scroll) and that does actually still work as if there were all three of my screens active (as it was on system start) until I disable and enable the fullscreen mode of it in the accessibility settings.
I just made this run on startup "xrandr --output DP-2 --primary --mode 2560x1440 --rate 165.00 --output HDMI-1 --mode 1920x1080 --rate 60.00 --right-of DP-2" and I created keyboard shortcuts to disable each of the monitors like this "xrandr --output DP-2 --primary --mode 2560x1440 --rate 165.00 --output HDMI-1 --off" as well as set both back to normal. But I also only use one desktop environment.
Edit: If I wanted to add position to the second monitor I could remove "--right-of DP-2" and put "--pos 0x0" replacing the 0's with the exact position I wanted.
Hi Chris, I really enjoy your content, I've watched a few videos Liked the content and subscribed to your channel. I wanted to bring up a question though, you might be able to respond to better having worked in IT professionally It seems like Linux users (especially the advanced ones) never talk about Unix, be it BSD, or otherwise. I was curious as to why not, as Unix existed long before Linux, and many of the principles of Linux are actually Unix. Was also wondering what your thoughts are on BSD being more secure and better for enterprise over Linux at this point. I know Linux has come a long way, and is also a good enterprise option. However that are people who still prefer BSD over linux and recommend it. Thanks again and have a great day.
Linux is the more modern conclusion of Unix on a modern desktop. To me Unix is the grandfather. Linux is the grandson.
11:38 You said when you use this method of setting up your displays, you never have to worry about your monitors getting reset or everything changing if you unplug the cable. What does happen if you turn off a monitor or unplug a cable using this Xorg configuration method?
An updated video for wayland and best configurations for AMD Freesync would be very much appreciated.
YES!! The power of XRANDR. I have 2 login modes normal desktop and steam-session which loads only steam in bigpicture mode (like kodi-standalone) and some tweaks like no compositors etc. Some games dont like multiple monitors so i use: "xrandr --auto && xrandr --output DP-0 --off && xrandr --output DVI-D-0 --off" in the /usr/bin/steam-de script. (and some nvidiux overclock parametres for who want to know) so only my primary display will be left on. And another example, together with xorg commands like:" Option "ConnectedMonitor" "HDMI-0"" and "Option "CustomEDID" "HDMI-0:/home/abuser/edid.bin""
This way you'll have a production reliable system for use with narrow casting. This way exchanging a defective display will not require reboot he wont even notice he's gone and it works even better when using so called EDID-Minders. The fact is when your script works it will always work! Oh gosh, this message turned out way longer then intended. Scrap all that... Whoohoo 4 Chris!!
How did you make your prompt it looks cool blue sky blue. Please let me know I want to have it.
Ten years ago I did this and had made the syntax error, I didn't know how to fix it and installed windows. If I knew back then, I might be using it now.
I would not say its a bit complex ...
I was Actually really surprise at how easy the first time i did this and its REALLY reliable and efficient methode!
I think even new linux users can do this easly !!!
I hope there's something similar to Custom Resolution Utility on Windows in Linux. It's much more user-friendly and easier to do. I tried tons of methods and ways to OC my monitor in Linux but still no avail. One day, when I'm able to OC my monitor, I'll permanently move to Linux.
I have three monitor. Two are 1440p 27" touchscreen and one 1080p 24". I wrote a script with xrandr and xinput to make sure x.org at boot configures the the proper monitor order and map the touchscreen inputs to the proper monitor.
At boot when lightdm executes a script to make sure the monitors are arranged in the a prescribed order and the touchscreen inputs are map to the appropriate monitor.
Once logged in the same script ensure Cinnamon has the same arrangement and mapping.
I use the ArandR Screen Layout Editor which uses a GUI to help you create the script to run on startup for monitor positions by showing monitor sizes and positions
I recommend making a video on it for those who are more visual plus you don't have to worry about having the correct positioning with pixels as you can see it visually
Hi Chris,
following your suggestion, the issue is getting acceptable the modeline settings and scale.
xorg's HDMI seems to not like 3840x2160 60hz.
Using cvt to get a modeline produces a result but the clock is too high and is not accepted and it switches to 1920x1080.
Also, when you do use a high setting, everything shrinks using --scale 0.5x0.5 in xrandr works some of the time.
you can setup kde or gnome to scale ok and even in wine. but when you do, lutris' wine is a different version and scale doesnt stick.
thanks for producing great content and I really appreciate what you do.
cheers
I have two laptops, both 15in screens, can I do this on them? or is this calibration only for desktops and multiple screens? I am so not getting this
It is for multiple screens on one PC (or Notebook if you plug another monitor in) to keep the order and settings in environments were monitors are often plugged and unplugged.
Do both monitors need to be connected with hdmi or can it be done wirelessly(same network)
Im working with a broken laptop that has no screen picture. I was looking for a way to set it to external monitor only permanently. Thanks
Hey Chris! Any chance we can make a follow up on this video for wayland?!
Keeping monitor setup the same between boots is such a basic thing, why would anyone be happy this even has to happen.
Brilliant, finally a clear explanation fo Xorg config. Thanks
Great video! One question: If I understood correctly, this will allow me to connect a low dpi monitor to my high dpi laptop display and use both of them alongside each other with hopefully no scaling issues, right?
Very helpful
YES! I love you.
I believe the order in which config files are parsed is based on an alphabetical sort.
Might want to rename this video Linux Monitor Configuration. I thought you were going to do color calibration which I wouldn't mind seeing a video on. Perhaps along with a review of a calibration tool that works with linux. Would this technique be effective in saving color calibration settings as well?
Amazing! Thank you!
Are there any options to set individual UI scales for each monitor? I use Manjaro KDE with a 3840x2160 and a 1920x1080 screen and the UI scale always counts for both monitors. If I set it big enough for the 4k, it's way too big on the 1080p and vice versa. I heard wayland could do it, but I'd love to see a video on that.
Also I have a folder:
etc/X11/mhwd.d containing nvidia.conf
and
etc/X11/xorg.conf.d containing 00-keyboard.conf and 90-mhwd.conf
Why is that?
If possible only change font size from 96 to 144 since for now fractional scaling has different results not expected. 144 is 1.5 fractional of 96
mhwd stands for manjaro hardware detection. IManjaro mhwd creates that file automatically.
Hey Chris, awesome video. Funny that I just have written you an email about that and you posted a video explaining exactly what I was writing about. Coincidence? Greetings from Ireland
So... when are you going to do the monitor calibrations?
Great video as I'm about to convert my desktop with multiple screens to Linux Mint. Question I have is, how do, or can you configure a usb scanner to work with Linux? I haven't had much success with that.
I know this is old, BUT, install xsane and it usually can find scanners..
why didn't you just restart X? :P
old windows habits die hard... reboot for everything! I should have just restarted X.
@@ChrisTitusTech haha indeed I too catch meself unnecessarily rebooting and I've been working exclusively in Linux for a year and a half xD
I just prefer running an xrandr command instead in the startup. I honestly don't know why the config file is needed given xrandr command is so much easier to test (just run the command, no need to reboot).
0. And if you have now edited this xorg.conf, and then log into DE, everything gets overwritten by DE config... how do I make DE now use this also and not use it's own configuration?
1. Can you use negative position values? Like primary display being 0 0 and then put one above it with 0 -1080?
2. Can you declare multiple positions per display? Example: you want to set up 4 displays in 2x2 formation (and be able to drag stuff in circles) -- with GUI display settings I have managed only U or C shape formation, but would like "O". Can you "RightOf" AND "Above" in the the same Monitor section? And do a loop this way all around -- declaring both neighbors for each display? Does it work or will it bug out?
3. How do you exit DE/gui/startx to test the config with 'Xorg -config ' like Roger suggested? (for me it gives error : "Server is already active for display 0" and can't test anything)
4. Not sure if this matters, but ' Option "Primary" "true" ' would be also nice touch, if the first display in the config isn't the one.
5. Do you really need to declare positioning in both ways, like you did have both "Above" in one and "Below" in other display?
6. Where do you get your "ModeLine" current / correct value for displays?
7. What about setting up 10bpc display? Can you do it (and more importantly, will it work) in linux even when one display is 10bpc and other one is 8bpc?
Hey Chris but what about different scaling in 2 different monitors? Like you had a 1080p and 4k so 1x and 1.5x scaling. Only Gnome supports it as inbuilt I guess.
It seems like this video isn’t so much on how to enable external monitors to display ( my external monitor is black despite being able to see cursor ) as much as it is to have a persistent config?
i got dual monitor working easily. But, I'd like the *wallpaper* and panel to be on both screens. One monitor has the login screen background for the distro.
Solved my multimotor tearing issue!
I was hoping to use three projectors as a single panoramic display. Is the principal the same?
On Manjaro we get automatically Arandr package (or maybe I installed it manually? oh, well, this was a few years ago so I don't really remember, that is how stable Manjaro is or could be in the right hands) which is a simple GUI overlay on those configs.
I also didn't find the package you installed on the beginning so I assume it's named differently on Arch and installed by default because xrandr command just works OTB.
When you start talking about 2560 to 320 thats when you lose me. My 40" top monitor/LCD Tv (the top and sides are not visible and off the edge with hdmi to component adapter) is 1920x1080 (no overscan with VGA connection but at 720 resolution), my main *laptop* says with xrandr LVDS-1 connected primary 1366x768+327+1080 . Does that mean that I type 327 1080 for position and will this fix my overscan issue?
I got addiction to watch your video....
Changes still aren't persistent for me. Changes aren't even persistent on reboot (without changing the DE or unplugging or anything). Do I need to point xorg towards this config file somehow?
As a alternative if you have a Nvidia card, just run the Nvidia X Server Settings and make your changes and then it will write out the xorg.conf file to /etc/X11 automatically. (you have to tell it to save btw)
I was just about to make this comment myself. I haven't got two monitors to try it but I guess it's just a matter of positioning the screens with a mouse (like Windows) and saving it.
Kde ignores that
Are you able to do a tutorial on VR setups, both VIVE and Oculus as well as WMR Headsets if that is all possible???
x11-xserver-utils is not available in the Arch-repositories under that name but randr has been installed so apparently it is part of a package with another name.
I don't use a config because you never know when using a portable install what your resolution will be (or if the config is correct). I use xrandr to control the resolution and state on site & remotely I use 'vbetool' which also lets you control monitor state (& to blank a screen if your offsite there is also xset but thats for console users if you've ever tried 'startx' over ssh you know what I mean). All I do is read the list of available resolutions and if I need to change it I do , this is the syntax of course people would replace their identifier:
xrandr --output HDMI-0 --mode 1920x1080
xrandr --output HDMI-0 --off ( this turns it off if you have multiple monitors very useful , in order to turn it back on must use the 1st command with a valid resolution) Then I alias it in .bashrc for different resolutions, alias xrandr1080='xrandr --output HDMI-0 --mode 1920x1080' . This way where ever I sit down , if I am using it as a portable distro or a rescue CD I can switch resolutions with ease.
You can also make the screen display a res its not even supposed to support, like this ruclips.net/video/BXAn_u1UfOQ/видео.html .
I am struggling with this a lot. Kde doesn't have per monitor setting like Cinnamon has.
So with the new kali linux update my external display resolution disappeared. It does not show any another resolution besides 1280x800, any help would be greatly appreciated.
Why do you like this THIS IS BIG ISSUE
At 9:11 you're outputting the code. How do you do that?
Greate video, thx man
I wonder why you didn't restart X instead of rebooting
I followed the instructions in this video, but I still cant get Debian to detect the HDMI port. xrandr says it is disconnected. I can get it to work with Zorin and Fedora. Do you have any idea of what could be going on?
Thanks a lot!
Your sweet terminal setup, what is that, broseph?!
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?
Didn't work for me unfortunately. Tried doing the same with arandr, xrandr even with the commands --newmode but I keep getting the message X Error of failed request: BadMatch (invalid parameter attributes). Searched everywhere to solve this but none of the solutions have solved it. I'm a complete newcomer to Linux so I can't understand much of what I'm doing tbh. Just following the forums' suggestions.
Will this guide work on a newer version of Pop os? It’s pretty frustrating every once in awhile my pc will detect the second monitor then whenever I restart it it won’t detect it again I’m running 22.04
Hi Chris, Need your urgent help. I did the monitor config method and now I am out of Linux. Just doesn't sign in. Says incorrect password. What should I do? Keeps looping again and again to the log in screen despite putting the right password. Tried Ctr+Alt+F4 but asks me for Login and then password and says incorrect
My trouble was disappearance of any sign of a HDMI port on Ubuntu after running another distro from the DVD drive. So I could not use my laptop's external monitor. But you make no reference to such scenarios here.
i'm trying to make an ICC color profile work on linux and it's making me crazy. Because it always RESET the color calibration and i have to re-open kde or gnome settings and reload the icc color profile again. Any fix on that mr. Chris Titus?
Why did this come in my recommended after i figured it out on your own?
What if I want one vertical monitor and one horizontal monitor configuration?