High Refresh Rate Under Linux Is Jank

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
high refresh rate monitors under xorg are certainly strange to say the least now for the sake of xorg i'm considering anything above 60 hertz to be high refresh rate now i know that by modern standards 75 for example is not a high refresh rate but it is for xorg and anything above 60 is going to require at least a little bit of tinkering now for a single monitor it's perfectly fine there's like one or two commands you need to run where you start seeing a little bit of issues is with multi monitor setups now they do work contrary to the mountains of forum posts saying they don't it's just that a lot of people seem to have absolutely no idea how to do troubleshooting now while there are probably gui tools that can do what we're going to be doing i'm going to be doing everything straight through x-rander just because i know this is going to work i don't know if aranda actually has everything available that we actually need to be using so the first thing you need to do is make sure you actually have x render installed at least on arch linux that's going to be in the x org dash x-rander package now on a lot of other distros it is going to be pre-installed i believe on ubuntu it is i can't guarantee on other things it's going to be if it's not installed usually it's in a package called xorgx render if it's not in that package just check what it is for your distro this is going to be the application that does everything we need x-ranger is basically a program that you can figure things like your monitor layout resolution the refresh rate and a bunch of other things but the only thing we care about today is going to be the refresh rate running x-rander without any arguments is going to list out all of the monitors you currently have attached now it doesn't matter if the monitor is attached or not xranda can go and disable monitors that you don't want to be using so in this case my main monitor the one that actually is the high refresh rate monitor is the one connected to displayport zero make sure you get this name exactly correct because x-rander is going to be case sensitive so it might be something like edp one if you're using a laptop and you're using the internal display or it might be something like hdmi 0 if you're using hdmi instead or maybe you have dvi whatever it is you have get the name this is what we need now you might notice that some of the refresh rates in here don't line up with the numbers that make sense in your head so things like 74.97 99.93 143.98 these are the actual refresh rates the monitor is going to be running at but we typically round them up just because it's easier to work with things like 164.92 that would be 165 hertz now even though i have these extra monitors plugged in x-rander does have the ability to go and disable monitors in xorg so it doesn't actually matter i can still demonstrate this single monitor setup so if we want to go and select a refresh rate so right now i'm running at 165 so let's go and drop it down to 144. find the value you want to go and run of that so in this case 143.98 round it up to the sensible numbers so from that number to 144 and then we go and run x-rander dash r 144 now we don't actually need to care about the name of the monitor because if we run it with a single monitor x rand is going to know okay we'll run it with the main monitor and you'll be good to go now when you run that command i have no idea if that actually killed my camera hopefully it didn't when you run that command your screen will go black for a moment it did actually freeze the recording of my desktop though so that's why the command didn't seem like it disappeared but if we go and run x render again as we can see now it's actually selected 143.98 and if you go and run some sort of refresh rate test maybe you go and play a game and you go and do vsync that should lock it at 144 or whatever you'd gone and set it to honestly a good way to demonstrate it is if you're going from 60 up to 144 or whatever high refresh rate you're going to go and grab a window and then move it around and you'll notice it should be considerably smoother than otherwise would be now in your case you know the video is still running at 30 fps so it looks horrible but you get my point go and test it and you'll see what i mean now keep in mind that when you set something through x-rander it's only going to be set for the current xorg session so if you go and quit xorg and then restart it or you go and reboot your system all of your settings you set through x-rander are going to be completely gone you can get around this by adding any of the commands you want to run into a startup script that runs after xorg runs let's say you have your window manager or desktop environment run it whenever those actually open up or in my case what i do is because i want to sometimes swap between having one monitor two monitors or three monitors available i actually add it into a configuration script and then i can easily jump between them or if you're really weird you could just rerun the command every single time you boot your system i wouldn't recommend doing that but if you really want to then that option is available i'm just trying to save you at least you know a tiny bit of time now if you're running a multi-monitor setup like i am you might have noticed that when you ran that command all of your other monitors except for the main one stayed off they didn't come back on that's because when you run the x render r option it assumes you just want to run a single monitor and doesn't care about the rest of them that's a problem but luckily it can be fixed now there may be a way to run this within a single x-rander command but i've never actually got it to work so i just run multiple commands and everything works exactly as it should the first thing i always do is go on x render dash r and then set my refresh rate that's perfectly fine the monitors have turned off we can go and re-enable them so in my case my secondary monitors are displayport dash 1 which is to the left of my main monitor and then hdmi a 0 and that is to the right of my main monitor so what we need to go and do is firstly go and turn those back on so that is going to be x-rander dash dash output then the name of the output you want to be using so display port dash 1 and then dash dash mode and then the resolution you actually want to run of that so obviously it has to be a resolution within this table but most of the time you're going to want to run it at whatever the highest resolution actually is so in this case 1920 by 1080 and then we can keep changing these output commands together for every single extra model that we have so dash dash output then hdmi dash a dash zero dash dash mode 1920 by 1080. now you've probably already noticed but all of your secondary monitors are now duplicating the main monitor that's intentional we're gonna fix that as well the reason why it's like that is because by default xorg is gonna do duplication because it doesn't actually know where those monitors should be placed within the grand scheme of the monitor layout and luckily fixing that is fairly easy because x-rander has some pre-defined locations where your monitor could be located things like left of right of above and below now i didn't mention this earlier but if you want to do things like have one of your monitors be rotated that can be done with the rotate option as well that should be run with the previous command we ran i don't use a monitor like that though so i just didn't bother to cover it now these will cover 99 of use cases if you need to have one that is you know slightly off alignment for whatever reason so the mouse doesn't easily move across you can go and do that it's just not something i'm going to be covering today so what we need to do is go run x-rander dash dash output and then the output we need to be including at least the way that i like to do it is going relative to our main monitor so displayport zero then i can go and say that our secondary monitor is going to be right of the main monitor so that is display port dash one and then the other monitor is going to be to the left of that and that is hdmi a dash zero and you'll notice that your monitors may blink out for a second if you don't have them already with the exact same configuration and then it should be good to go running xrander at this point you'll notice that even though we've gone and run a bunch of extra x random commands our refresh rate is still set to what it needs to be set to this is what we want to see going over to a website like ufo test you'll see this is running at 165 hertz or whatever refresh rate you've got it set to this actually is working except okay this is where people don't know how to do any troubleshooting so i noticed that when i first tried to run this my mouse was running at 165 hertz perfectly fine but if i moved around a window it was clearly not running at 165 it was running at 60. this is actually expected behavior because 99 of people on linux are running compositors at this point and compositors i've realized are the source of all of our problems whether you're using k-win model or maybe someone else's pycom configuration it's very likely you have v-sync enabled v-sync can be very useful to make sure you have much less screen tearing but i've never seen a single implementation of vsync from any compositor that does it properly or does it well it doesn't seem to be a problem on weyland it just seems to be a problem based on how old xorg is and how xorg was never made around having multiple monitors plugged into it what it does is it goes and v-syncs around whatever the lowest refresh rate in the setup actually is so in my case that would be 60 hertz and then everything runs at 60 hertz that's why when you have a single monitor and you're running vsync it still works fine because it's gonna vsync based on the 165 or if you have you know two monitors both running at 120 it's gonna be fine it's mixed refresh rates where it does not work properly and it's probably never gonna be fixed so first thing you need to do when you're troubleshooting disable vsync better yet disable the compositor get rid of it for the sake of testing bring it back if the problem comes in you know that it's going to be the vsync now while you're trying to troubleshoot this issue a lot of the things you may want to use to troubleshoot will not actually be working so my monitor actually has an fps counter built into it which will not actually work because xorg is gonna be trying to run at 165 it's just the compositor which is going to be lowering it down so the monitor is still thinking it's actually running at that 165 fps even though it's definitely not x-rander is still going to report that you're at whatever you've set it to because xorg thinks that's what it's set to so neither of those are going to work you sort of have to go and test it through games and also test it by your eye if you've got a 60hz monitor in your chain and a 165 seeing the window movement isn't as smooth as it should be is very very noticeable now everything i've said today is from the context of being an amd gpu user i haven't found any reports online with people actually troubleshooting it properly getting rid of their compositor saying that this shouldn't work if you're using nvidia by all accounts mixed refresh rates should work exactly the same between both of the cards i'm pretty sure for intel there wouldn't be any issues as well but you'll probably know until the intel gpus come out you're probably not running 165 on an intel chip anyway but on the ones that actually matter right now i think it should be fine but i cannot confirm it if someone has an nvidia card and can test it for me that would be very very helpful another thing i have not now to confirm is whether mixed refresh rates will get in the way of things like freesync or g-sync functioning properly i do have a freesync monitor but i don't have the tools to properly test if freesync is actually running it certainly seems like it's running but without properly testing it i cannot really say one way or the other but ultimately if you're playing a game it's better to just be using a single monitor anyway just so you don't have the extra overhead of driving any of the other screens for anyone who's curious this is the script i'm actually using to configure my monitors basically i take in the names of the monitors so i can just go and easily reference them throughout the script then i go and set my refresh rate i'll talk about what this one does in a later video keep an eye out for that one and then based on the thing that i actually select let's say main plus second i will then go and turn the second monitor on and then set where the monitor should be placed in my layout pretty basic stuff and this basically gets everything i need done now all of this stuff i've been doing with x-rander can be configured within the xor configuration file so it'll be automatically set when you actually launch up xorg i don't like to do it like that because i like to have this very easy way to go and figure stuff and i don't really ever have a way that i want it to be set up by default sometimes i want two monitors if i'm just like you know doing my regular day-to-day stuff some days i want to have three monitors when i'm recording these videos so for me it doesn't make any sense if you want to go and do that though i'll leave a link to the archwiki down below and you can go and work out the absolute insane configuration format you actually need to go and do this this is the other reason i have no interest in actually touching this because what is this this is ridiculous that's too many options let me just let me just go and set stuff and we'll be good to go that's why x brand is great and will save you a bit of time this has been supported on xorg for quite a while and i would like more people to know that you actually can run mixed refresh rates you don't need to buy a bunch of very expensive monitors it runs perfectly fine i don't know what else to say so if you like this video and you want to support the channel and become one of these amazing people over here go check out my patreon subscribers generally bear up a link in the description down below i've got a podcast called tech over t available basically anywhere i've got a gaming channel called broader option plays where i live stream twice a week upload about five of youtube shorts and this channel is also available over on odyssey that's gonna be it for me and i'm out [Applause] [Music] you
Info
Channel: Brodie Robertson
Views: 3,983
Rating: undefined out of 5
Keywords: brodie robertson, brodie robertson linux, arch linux, linux, high refresh rate, high refresh rate linux, linux gaming, gaming on linux, mixed refresh rate, mixed refresh rate monitors, linux high refresh rate, high refresh rate gaming, variable refresh rate linux, brodie robertson gaming, mixed refresh rate linux, linux mixed refresh rate, how to game on linux, linux tutorial, linux 120hz, linux 165hz, linux 360hz, how to linux
Id: mqlAhq68hGY
Channel Id: undefined
Length: 15min 4sec (904 seconds)
Published: Sat Dec 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.