9 ms·
Managing an external display on Linux shouldn’t be this hard
- pengaru 5y agoExternal displays have been relatively trouble-free for me ever since Xinerama+xrandr became the norm on Linux/Xorg systems. Prior to that it was a nightmare, and I'm sure it's become a disaster all over again with Wayland.
- beebeepka 5y ago> I have a USB-C dock that provides both power and a Thunderbolt display output over the single cable to the laptop. That's where I stopped reading. Mac and Windows also have problems with such setups. Not to mention having displays with different resolutions and refresh rates
- dev_tty01 5y ago>Mac and Windows also have problems with such setups. Not to mention having displays with different resolutions and refresh rates Sorry, but this is just not correct. I have used multiple monitors with varying resolutions and refresh rates with a Mac for well over twenty years.
- Falell 5y agoIt's correct in my experience. My mac refuses to recognize 2 independent monitors in the following setup: laptop -> USB-C -> dock -> 2x 1440p@144hz Displayport monitors. Supposedly this is because Apple doesn't implement the entire Displayport spec, I don't really know the details. My windows laptop handles this particular setup just fine, but forgets one of my displays at work every so often. It's a mess.
- FireBeyond 5y ago> Supposedly this is because Apple doesn't implement the entire Displayport spec, I don't really know the details. I can see that. I had 2 27" 4K HDR 144Hz monitors that worked fine in Catalina. Big Sur and Monterey, they do not: they'll do 95Hz SDR and 60Hz HDR. If on my screens I change DisplayPort mode from 1.4 to 1.2, they'll do better (120Hz SDR). So something in Big Sur broke DP 1.4. And Apple doesn't care, because there have been hundreds of bug reports on it ever since the Big Sur betas and it's still broken as of Monterey 12.0.1. I guess Apple's philosophy is "we don't care if you don't have a Pro Display XDR" (and I say that as someone who owns one).
- howinteresting 5y agoCorrect, Big Sur broke DisplayPort above a certain bandwidth, but only on Intel Macs as I understand it. https://discussions.apple.com/thread/252174979?page=1 https://discussions.apple.com/thread/252174979?page=1 https://egpu.io/forums/mac-setup/4k144hz-no-longer-available-after-upgrade-to-big-sur/ https://egpu.io/forums/mac-setup/4k144hz-no-longer-available... I have to use SwitchResX to define a custom resolution (95Hz), otherwise my gaming monitor won't go above a sad 60Hz. Meanwhile, Linux runs perfectly on the same setup all the way up to 160Hz. Yet another place where Linux has fundamentally better hardware support than Mac.
- FireBeyond 5y agoInteresting. My M1 Max laptop arrived the other day. I might have to try it. Even Catalina wouldn't support my displays at 160Hz, only 144Hz.
- halikular 5y agoThe different refresh rate issue was fixed on windows as far as I'm aware a year ago.
- cassianoleal 5y agoI use my external display as a USB-C dock. I run it at its native 3840 x 1600 resolution at 120Hz or 144Hz, connected to my MacBook Air 13" running retina native resolution at 60Hz. Never had an issue with this setup on macOS.
- fortran77 5y agoMy Windows laptop has no problems with this. And neither do the Mac laptops that visitors sometimes bring to the office.
- filoleg 5y agoI currently have that setup for my old work-provided Macbook Pro from 2017. One cable going from the laptop into the thunderbolt dock (no extra cables, as the same cable also charges the laptop). The dock outputs to 2 external displays, one 4k@60hz, another 1080p@60hz. Same 2 monitors are also plugged into my Windows desktop directly. Been using that setup for almost 2 years, zero issues whatsoever, so I have no idea what you are talking about. I would be willing to concede that I just got lucky with the stability of my setup, but my friends who use similar multi-monitor setups with thunderbolt docks have no such issues either.
- sgt 5y agoThis is simply factually incorrect.
- csdvrx 5y ago> Mac and Windows also have problems with such setups. Lol no. I have issues on my Windows laptop when I try to use 2x 4k + one 2k display display from the single thunderbolt connector, due to Dell TB19 dock allocating too much bandwidth for the DP and HDMI ports (while 2 of my screens are USB-C) regardless of the resolution they use or the number of screens connected. But with just 2x 4k USB-C screen, it provides both power and display output over a single cable, both in Windows 10 and 11. And if I connect the 3rd screen to the dock after connecting that single cable, everything works. FYI, since it is a dock bug, the same thing happens in Linux. > Not to mention having displays with different resolutions and refresh rates Lol no!!! My displays are different: the 3rd one connected by DP is an ultra wide CHG49 - so neither the same frequency, aspect ratio or DPI. Yet it still all works fine. Linux users are weird when they start assuming just because I use Windows, I must have an experience as bad as theirs. Even my terminal (mintty) is far better than the best Linux has to offer - and I'm not even talking about AHK that lets me control my keys in a language far more advanced what the few configuration xkb or xmodmap offer.
- kaba0 5y agoThe amount of flickering windows gets away with is astonishing to me, and I say that as someone coming from linux. Also, what about audio that likes to update in the background and can simply fail until I reboot? The thing is, OSs are goddamn complex and thus they have plenty of bugs all around.
- csdvrx 5y ago> The amount of flickering windows gets away with is astonishing to me, and I say that as someone coming from linux. I have noticed a little flickering on my Lumia 950 that runs Windows 10, but I'm ready to give a pass to 5 years old hardware running an experimental build of ARM64 Windows. Maybe we have different hardware? I'm mostly using Lenovo laptops with one Microsoft and one Dells tablet. > Also, what about audio that likes to update in the background and can simply fail until I reboot? You mean driver updates? It depends on your Windows Update settings. If you mean the audio getting rerouted, I like that when I plug a new device it gets the audio sink priority without fiddling. And I like I can control that behavior with AutoHotKey scripts to do precisely what I want if I need to. > The thing is, OSs are goddamn complex and thus they have plenty of bugs all around. That is an absolutely fair comment! I'm just surprised linux geeks especially in a specific age group (over 25) seem to believe Windows is evil and anyone using it must not be a techie / must have a horrible experience and would find immediate enlightenment and satisfaction if installing Ubuntu. All kind of nuance seems to be lost when you explain that it works fine for you, and give practical examples of advanced things that would be extremely complicated and sometimes totally impossible to do in Linux
- wudangmonk 5y agoThat was my experience with a Macbook-Pro 2019, trying to use 2 2k monitors on it was a nightmare. Sometimes it would work and sometimes I would need to spend a while trying different plugin sequences until it worked again. It was such a problem that I never wanted to take it with me and use it as a laptop and just left it there connected all the time. This wasn't an issue with older models that had some other means to connect a monitor other than thunderbolt but these newer models only had thunderbolt display and it didn't work properly.
- MonaroVXR 5y agoDoesn't that depend on which dock you use? I believe Caldigit (The one Jeff Geerling uses) is the good one.
- wudangmonk 5y agothis was with and without a dock, had the same issue when I used a dock and when I connected the two monitors into the laptop's thunderbolt ports directly.
- philliphaydon 5y ago> Windows also have problems with such setups. Not at all. Windows just works.
- grumpyprole 5y agoNot true. For example the Amazon reviews of any displayport KVM will be mostly one star. This is usually because dynamic switching of displayport works so badly on all operating systems.
- philliphaydon 5y agoThat’s a problem with the KVM not windows lol.
- grumpyprole 5y agoIt's not that simple (and never is). Displayport and Windows are a big part of the problem.
- philliphaydon 5y agoYet, usbc->display port works fine for my monitor on windows, but doesn’t work in any distro I’ve tried. And using hdmi works but I get flickering if I want to run the monitors in any refresh rate other than 60.
- grumpyprole 5y agoIt works as well on Linux as it does using Windows for me, using Intel graphics (both have minor issues with displayport MST, i.e one USBC and two monitors). Are you using NVidia hardware by any chance?
- sfjailbird 5y agoWorks fine on Windows. One cable to dock, three 4K external monitors (as well as sound, network, all the USB stuff etc.)
- beebeepka 5y agoI see a lot of people have taken an issue with my statement. Someone with a few accounts has downvoted every single post of mine from yesterday. Fanbois are really something. It's great that some of you, most people even, don't have these problems with multiple screens on your preferred OS. However, that doesn't mean that no one does. Think about it. If everyone had these problems, they would have been fixed. Things are not black and white. Not every setup is the same.
- md8z 5y agoI have no idea about some of those other desktops, but all the basic moving parts are mostly necessary: - logind because you probably still want lid/sleep events to work when at a VT - gdm because you probably still want lid/sleep events to work while nobody is logged in - desktop settings because different users may want different things to happen on those events I'm a little confused as to why the gdm settings were needed, at least for me those only take effect when the greeter is actually open. And in GNOME the separate screensaver daemon has been removed, in part because it simplifies the whole equation.
- kelnos 5y agoIt's been a long time since I've worked with this stuff in any depth, but I wonder if there's the concept of "handoff". While a VT is front-and-center, logind should be in control. While GDM is in the foreground, GDM should be in control. While the desktop environment... etc. But it seems to me that each of these things aren't entirely aware of the other, and constantly fight for control. I know logind has an "inhibit" API that lets another program take over some functions, but who knows if everyone uses it properly. And does GDM have the same thing? Or is it expected to just know when it should step aside?
- md8z 5y agoYes, part of it is the inhibitor API although IIRC there are some other parts. GDM and GNOME share the same implementation of this API so they should at least do the right thing, not sure about other desktops and login managers. Edit: The other part is the device handling logic in logind: https://www.freedesktop.org/software/systemd/man/org.freedesktop.login1.html#Signals3 https://www.freedesktop.org/software/systemd/man/org.freedes... Older tools which may use suid helpers to open these devices will probably stomp all over the logind handling.
- turbinerneiter 5y agoAll of this works oob on my Fedora system. We Linux users keep endlessly personalizing our systems, forking off into the sunset with ever more weird and over-optimized specialisations, and then we wonder why stuff bugs and why new users have a hard time. Look at Windows and OSX - and the numerous problems they have supporting just one system. And here we are with our 362894 million DEs and we want different initsystems and file systems and plugins and themes and god knows what, but we get so mad when this obvious mess does not work perfectly . Maybe stop for second and marvle at the fact that this thing can boot at all, given that no 2 people in the community can agree on how that even should be done. (To be read in a comedic tone, channeling my Lunduke here)
- halikular 5y agoThings work differently on Linux. The software is supposed to respect Unix philosophy and standards. So it should matter what combination of packages you run. They're not supposed to be tightly integrated, the gnome team seems to have forgotten all of this. As for managing displays, it has become much better with wayland and it's improving fast.
- kelnos 5y agoI think the problem is that making things look to the user as an integrated, polished experience is exceptionally hard when you have the loosest of loose coupling all over the place, and differing views as to how to get things done. Sure, you can put APIs and documented IPC interfaces between things, but that doesn't mean everything will match up in a usable way. So, eventually, you just decide: screw it, we'll own the entire stack, or at least gain enough influence over the people who make parts we don't control, such that everything works seamlessly for us. In part, this is why Apple can give their customers such a polished, "just works" experience. Buy all-Apple gear, and stay in their software ecosystem, and (modulo bugs) everything will work together seamlessly. I don't like this outcome by any means. And I still think that some desktop components certainly benefit from loose coupling and well-defined interfaces, and it's possible to avoid the "polish" downsides in some cases. But doing everything that way, while still being able to put everything together in a polished way, might actually be impossible.
- bolangi 5y agoWhat's hard is not using an external display but responding to events such as closing lid or plugging in a external monitor. I find the lack of advertising and nagging more than compensates for manually entering an xrandr command or setting a sleep mode.
- shadowgovt 5y agoIt does, until you cook a laptop beyond its operational thermal tolerances because you shut the lid, threw it in a bag, and it never suspended. If that's a problem you don't have though, it's not something you need to worry about.
- fragmede 5y agoWhich is a problem, but my 2015 Macbook did that way more often (which is to say, a handful of times) than my Thinkpad which did that exactly once, while I was setting it up.
- bitwize 5y agosudo pm-suspend Having to type that before I put my laptop in a bag is worth not having to worry that the laptop will spin up in the bag and cook itself trying to update the OS.
- lozf 5y agoaliased to "zzz", and a sudoers entry to not require password - been perfect for years :)
- shadowgovt 5y agoWhy do we need to type anything though? That's terrible UX.
- bitwize 5y agoComing out of suspension with the lid closed is even worse UX.
- arminiusreturns 5y agoSometimes when I dont feel like messing with xrandr settings and profiles, I use arandr. If you are having troubles try it out sometime.
- shadowgovt 5y agoautorandr has been great for automatically swapping between configs. I use arandr to set up config on a new machine and then autorandr to manage on common hardware setups.
- deleted 5y ago[deleted]
- alfiedotwtf 5y agoApart from the screen locking bits, everything works for me in Arch
- Krisjohn 5y ago"When an external display is disconnected, stop using it. If the lid is closed when the external display is disconnected, go into suspend mode." Yeah, that doesn't sound simple anymore. I'm not sure I've seen anything do that second bit.
- biggerfisch 5y agoWasn't this a MacBook feature at one point? That behavior sounds quite familiar to me.
- foxfluff 5y agoI have and it drives me mad. Yet another "feature" that I need to figure out how to disable or it keeps biting me. I wish computers would stop trying to second guess my intentions and just do as I say and not more.
- georgewsinger 5y agoDon't mean to be snarky =), but one solution is to stop using external displays altogether: https://www.simulavr.com https://www.simulavr.com
- meribold 5y agoI recently watched most of your demo videos and later some of Immersed's and found it quite odd that Immersed, unlike Simula, has a virtual monitor concept. Adding a monitor even looks a bit janky as it makes all monitors disappear shortly [1]. Immersed's animated 3D environments do look pretty cool, but seeing you use Emacs in a Linux-based VR system definitely got me more exited. Keep it up! [1]: https://youtu.be/1TLC2tdImZ0 https://youtu.be/1TLC2tdImZ0
- shadowgovt 5y agoI have had none of these problems with a base Ubuntu install. Installing Xmonad though introduced all of them. And my active conclusion is that there's simply a hundred corner cases and it takes time and effort to beat a specific configuration of window manager, graphics subsystem, and system status monitoring into submission. Change a major piece and break the accreted fixes. Installing Xmonad was worth it, but lot of configuration was needed and the end result still isn't as reliable as what I left behind.
- wwilim 5y agoI've got a Thinkpad T470 running Ubuntu 18. I use two external monitors - one over USB3.0, the other over HDMI. When I wake the computer from sleep mode, 50% of the time it wakes up with the HDMI screen disconnected. If I now go enable that screen in display settings, my 3-screen layout resets. I have to resort to unplugging both, waiting for it to figure out how to display things on just one screen again, then plug each screen in separately, HDMI first, taking a moment to let it get its sh*t together each time. It drives me crazy. I've learned to interrupt cooking dinner and pop into my office room to jiggle the mouse just so I don't have to go through this procedure again because I hate it.
- thinkmassive 5y agoSince you’re preventing the computer from sleeping anyway, why not just disable sleep instead of regularly interrupting your daily activities?
- mattf_resist 5y agoHave you considered upgrading from 18.04 to at least 20.04 lts? Perhaps the newer kernels/udev etc... handle this better.
- ryandrake 5y agoYea, the whole psychotic dance that computers do when you plug or unplug another monitor is just a terrible user experience. This happens not just in Linux, but in macOS and Windows, too. Have two monitors and plug another one in, and it blanks both of them, screen comes back on one of them, blanks again, then comes back on another one, then a second one comes on, blanks both of them, then, if you're lucky, all three will light up in some random order. Also, if you're lucky all three monitors will display correct, most recently configured resolutions. It's so bad, and seems to affect all kinds of monitors, all kinds of graphics adapters, and all OSes. And it's been this way since the very first time I had a second monitor back in 1999. Plugging in a monitor shouldn't confuse a computer so much but here we still are. When I plug a monitor in, I expect the other ones I'm looking at to simply stay on. This doesn't seem like a huge development effort, but what do I know?
- PaulDavisThe1st 5y agoI run 3 displays across 2 video adapters. Getting them all to work as I want (one of them is generally powered down, but not disconnected) was a struggle, but now works flawlessly and I tend to forget about the work involved. The key things I needed to find out: 1. figuring out how to run a script when a display was connected or disconnected. This needed to be in a udev .rules file somewhere ACTION=="change", SUBSYSTEM=="drm", ENV{HOTPLUG}=="1", RUN+="/usr/local/bin/monitor-hotplug.sh" 2. how to enumerate all possible video display names: DEVICES=$(find /sys/class/drm/*/status) 3. Writing the rest of the script. The last step is mostly left as an exercise for the reader. There are some good examples online; I'll put my current version here https://pastebin.com/V5yGgCbh https://pastebin.com/V5yGgCbh for a couple of weeks.
- Lhiw 5y agoYou should checkout srandrd, it lets you run a simple bash script when monitor changes happen. It includes some Env vars so you can figure out what happened. Been a while but I had real issues using udev rules as they created timing problems or something like that. https://github.com/jceb/srandrd https://github.com/jceb/srandrd
- tdeck 5y agoIt's pretty telling how the top two solutions here for this common problem involve writing custom scripts. I love scripting at least as much as the next guy, but this seems like something that should be easily configurable out of the box without a text editor.
- PaulDavisThe1st 5y agoIf your setup is relatively static, then there are GUI tools that will work just fine. But if you have displays coming and going in different orders, it's quite a big ask to have a GUI tool that can define the sort of conditional logic that is required to get things right. This is precisely what I've got in my case.
- TruthWillHurt 5y agoMy work Macbook won't sleep with external monitor connected, and keepes forgetting which screen is main one. Meanwhile, ubuntu 18 + Mate - everything works fine.
- baybal2 5y agoGNOME people are intentionally braking things, and making it harder to run without GNOME. This way they want to preserve their waning userbase.
- dimgl 5y agoIt's been a struggle getting two monitors to work on my GeForce 2080ti. I've been trying to install Linux natively on my machine and unless I turn off one monitor, I get crazy artifacts and I can't even see the UI at all for the setup. I've tried different distros even... All of the latest versions of these distros have this problem, so I'm assuming it's some kind of kernel bug.
- kymaz 5y agoThat does not at all sound normal. A stable system (linpack and furmark at the same time stable) shouldn't do that. It's not impossible for that to be a BIOS/EFI issue. Personally my 2060super with Debian stable has been a surprisingly pleasant experience. At least you haven't gotten to the part where you can effectively(not literally) send hotplug events and such over displayport if you have two computers connected to one monitor. Kscreen gets a bit obnoxious in that situation. It wouldn't be too hard to send data between computers with that...
- deleted 5y ago[deleted]
- plif 5y agoYeah, this is the biggest reason I switched to MacOS. Not enough time / mental energy to deal with scaling fonts on external displays.
- nvarsj 5y agoI guess you never ran into https://spin.atomicobject.com/2018/08/24/macbook-pro-external-monitor-display-problem/ https://spin.atomicobject.com/2018/08/24/macbook-pro-externa.... The chroma is broken on a large number of external displays when using OS X. Just search the apple forums for how common this problem is, and Apple hasn't fixed it in years now. It's one of the reasons I gave up on OS X because I need external monitors to just work without blurry fonts.
- herbst 5y agoThe one time I had a Mac book some years ago external screens would only work if the laptop was on power, and after sleep I had to reattach the screen each time. This is issue was present the whole time (some months) I had this 2000$ beast (for the whole series, not just my Exemplar), afaik the 2015 macbook pro. Forums filled with the problem, no solutions in sight. Honestly a horrible experience that I could do nothing but wait with such crucial issues. On Linux I could just edit my xconf and everything was fine.
- chaps 5y agoIt's really bad. If I turn off my main monitor, it reverts to a default setting and I have to reconfigure the rotation of right-monitor, enable middle monitor, and swap the positions of left and right monitor. Every day.. but I hit a key combo to fix it. Ended up making an awk script that can be run by hand to create the xrandr command line based on the current configuration (to be applied when it fucks up). Not at my computer now but if anyone is interested in it, I can link to it.
- anilakar 5y agoMy pet peeve is that closing or opening the laptop lid resets the orientation and location of all other displays.
- michelledepeil 5y agoI think all of the initially stated requirements work for me with default settings on LM20.2 + xfce (on an x230), however not over a usb-c hub (just a display port cable and power cable directly attached to the laptop). I wonder if the problem isn't really the combination of power+display over thunderbolt.
- nvarsj 5y agoI'll just say this is a good reason to use a full DE like Gnome or KDE. At least with Gnome/X11 I never had any issues with external monitors. And it seems to always remember the display config of any monitors I had used in the past.
- Macha 5y agoWhat I don't get is that all the problems I've had with external displays on Linux, I also have with the same display on OS X. On Linux I have a script to explicitly configure what I want, on mac OS I usually just unplug and replug and hope it remembers the right layout and detects all displays this time. I could do the unplug and replug strategy on Linux too, but the script is easier