Announcement

Collapse
No announcement yet.

How can I reliably force vsync on, with FPS capped at 60 100 percent of the time?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [DESKTOP] How can I reliably force vsync on, with FPS capped at 60 100 percent of the time?

    Apologies, but this post is kinda lengthy, in order to try to be clear. System specs are at the bottom of this post.

    A little background:
    * I've been toying with Ubuntu (kubuntu in particular, when it was released), for quite some time off and on, (since before ubuntu started using any GUI),and am ever so slowly migrating over from Windows (currently win10)
    * While I've got a half decent grasp of CLI, (including using apt, or apt-get, to install, remove, or update packages, editing fstab, starting/stopping systemd services, and other such things), I do rely heavily on the DE, and other GUI apps (such as Lutris) to do the more complicated stuff, because I've been a DOS/Windows user, since the late 80's.
    * Kubuntu 20.04 is using the recommended proprietary drivers for my GPU (latest available, when using the command `sudo apt update && sudo apt full-upgrade`)
    * The issue below also applies identically to Pop_OS! 20.04, which was previously installed.
    * For me, applies to all 19.xx, and later versions of Kubuntu/Pop! (have not tried 20.10, because I'm preferring LTS builds right now)

    Issue:
    * In Windows, I rely on two settings, force-enabled system-wide, via the nvidia control panel; vsync, and Triple Buffering.
    * I can't seem to get the same thing in Kubuntu, no matter what I do.
    Why I feel this is important to have, regardless of my OS:
    * My displays are only capable of showing 60 FPS. Anything above that is completely wasted.
    * Screen tearing in some situations
    * All games that are uncapped cause my graphics card to consume HIGH amounts of power, which can result in a higher electricity bill.
    * Uncapped games that offload most of the work to the GPU, instead of the CPU end up with stuttering, or other performance issues, because the GPU is too busy rendering 2k+ FPS

    What I've tried:
    * Enable said options via in-game settings - Works perfectly, but obviously only for games that have these settings (such as Slime Rancher!)
    * Enabled compositing in kubuntu's display settings
    * Disabled the option for apps to disable compositing in kubuntu's display settings
    * Set compositing to full, (with my limited understanding, it's the same as 'vsync=true'), with the following command 'nvidia-settings --assign CurrentMetaMode="HDMI-0: 1920x1080 +0+0 {ForceCompositionPipeline=On}"' (Full composition pipeline enabled in NVidia XServer settings)
    * libstrangle - This has varying results, and comes with it's own share of issues; doesn't seem to work with games that use Steam Play (Proton), is hit or miss on other games, causes runners like Steam to fail to launch if they're not already running at game launch, to name a few.

    Summary:
    * Want a (hopefully simple) way to consistently enable vsync system-wide in Kubuntu 20.04 for performance, and power saving reasons.
    * Can't seem to find a reliable way to achieve this.
    * Not getting this is a deal breaker for me on a MUCH desired migration to Linux

    Any help would be greatly appreciated! As a gamer, and as a disabled individual who relies heavily on my PC, I'm absolutely impressed with how far Linux has come in recent years, and really want to see the OS succeed as a viable replacement of Windows, due to Windows's blatent lack of privacy. If you need more information, please do not hesitate to ask.

    Desktop
    System: Custom Desktop PC
    Motherboard: ROG STRIX Z390-F Gaming (LGA1151)
    CPU: Intel Core i9-9900K @ 3.70GHz (8 cores, 16 threads)
    RAM: 32GB Dual Channel G-Skill Trident Z RGB (F4-3200C16-16GTZR x2)
    Graphics: NVidia GeForce RTX 2080 Super (8GB)
    Sound: RealTech HD Audio
    Display 1 (Secondary): HP 1080p Monitor
    Display 2 (Primary): Vizio 43" 4k UHD Home Theater Display
    Display 3 (Handicapped primary): Samsung 1080p HDTV (Used in place of Display 2, if needed)
    Network type: Wi-Fi/Ethernet (Interchangeable, but almost exclusively Ethernet with gigabit speeds)
    PCIE Add-in: SATA controller card (Not a RAID controller, 3/6 SATA slots in use, and seems fully compatible with Ubuntu)
    Storage Space: LOTS (All OS installs, and Home/Users are located on SSD)
    Control type: Keyboard, Mouse, DS4 (via bluetooth), and X-Box One S Wireless Controller for Windows (via USB)
    Last edited by Snowhog; Dec 23, 2020, 06:57 AM.

    #2
    I can't help with Nvidia driver settings, I abandoned the brand on Linux as the constant tweaking required was bothersome. Not impossible, but just tedious for me.
    if the Nvidia Settings app does not offer relevant settings, there most definitely will be ways to se things using the xorg.conf file edits. This will be a general Linux thing, unrelated to the distro in most cases, and probably will take a bit of research but there should be lots of discussions on this all over the place. SO don't limit yourself to Kubuntu, as general Ubuntu info, as well as for Linux resources in general as it relates to Nvidia . Screen tearing seems a common issue, depending on the specific card, and driver, and sometimes the particular cycle of the moon....


    I do wonder if you are confusing monitor refresh rates (hz), resolution capabilities (ex: 4K@60) , and game FPS.



    Hopefully someone with similar graphics can provide some specific hints and help.
    Last edited by claydoh; Dec 23, 2020, 02:24 PM.

    Comment


      #3
      Given your level of technical skill I'll assume that you have tested all the settings in the the Settings-->Display and Monitor dialog, and had the sync settings in the nvidia GUI set to auto, and didn't find relief. Beyond that I have no suggestions to make. However, your post prompted me to check my display settings, something I haven't done in years (defaulting to automatic). I noticed that my display refresh rate had an active dropdown combo box. The second option was 120 fps. Choosing that has nearly doubled my display fps. It carries through to my Nvidia GT 650M settings as well.

      Sorry I couldn't offer any real help and I hope you find a solution to your problem without having to rejoin the dark side. But, ya gotta do what ya gotta do.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        @claydoh I can see why you might think that. I've definitely got experience, so here are the basics. (No searching)

        Refresh rate = Screen repaint rate

        Resolution capabilities = size, (1024z768, 720p, 1080p, 4k), and refresh rate capabilities of the hardware, OS, video, or game.

        Game FPS = redraw rate of the game, based entirely on resolution capabilities, as defined above.

        TBH, I would prefer higher FPS, and my PC is certainly more than capable, but my displays aren't, so I prefer to just lock it at 60.

        Great advice concerning the xorg.conf file, but I've had mixed results with that so far, because my understanding of it is umm... EXTREMELY limited. The last time I even created that file, (I think it was some 6-8 months ago, when I still had my GTX 1080), I had some very weird scaling issues.

        don't remember what I did, but removing the file restored the settings. I would certainly need to do more research on that, before trying again, so knowing to not limit research on that to any particular distro will be helpful!

        @GreyGeek, you're good! I've messed with those settings, and the mileage varied. I don't recall finding anything that really did the trick, though I might look again, because it's been a while since I've messed with Kubuntu's display settings, other than to set the compositor.

        Comment


          #5
          Jason, I re-read your OP to see if you had tried Nvidia's Linux driver for the NVidia GeForce RTX 2080 Super and noticed that you hadn't indicated that you had. So, here is the link to the Nvidia Linux driver recommended for your GPU:
          https://www.nvidia.com/Download/driv...x/148589/en-us

          The driver that Nvidia recommended for your card is the 430.34.
          Have you downloaded and tried it?


          BTW, the 430 driver is also in the repository but it depends on the 440 driver, which is also in the repository, so you'd have to install them both, apparently, to get the full package. Seems to me that just using the 430 driver from Nvidia would be easier, but as I used to tell my physics students "theory proposes but experiment disposes". So, perhaps, the 430+440 may work but if it doesn't then try the binary from the link above.

          Before the Nvidia proprietary binary drivers began appearing in the repository I'd use a driver from the Nvidia website. Since my 650M is the secondary GPU which cannot be set to be the primary in the BIOS I had to use the bumblebee method (from a console: optirun someapp) to use the 650M to run apps individually. But, when the nvidia binaries began appearing in the repository installing them made my 650M the primary driver for both the display and all the apps I ran and I didn't have to use bumblebee or optirun. The Nvidia 390.138 from the repository is currently driving my GT 650M GPU (My Acer Aspire V3-771G is 8 years old).
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            I tried the 430+440 driver in the repo, and had nothing but troubles with it. Any time it was installed, I was forced to TTY, and downgrade to a previous driver, just to boot.

            When 455 was released into the repo, the command
            Code:
            sudo apt full-upgrade
            upgraded the drivers to those, and I've been using them ever since. In Discovery, they are listed as "proprietary, tested", and with the command
            Code:
            sudo ubuntu-drivers devices
            those are listed as the recommended drivers. I've also had issues any time I've tried installing drivers from their website... which makes sense, because they recommend using the repos instead.

            Regardless, it doesn't seem to matter what drivers I'm using, because the symptoms have been pretty consistent through kubuntu versions, each supporting different drivers in their repos.

            Comment


              #7
              Jason, after reading about your troubles I decided to experiment with the XFAA setting in my Nvidia config gui. With that turned on my graphics speed slowed noticeably, and text displayed in browsers, Kate and various other apps, and in the Konsole began randomly going in and out of focus. I turned that option off and rebooted. My speed and display returned to normal.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                GreyGeek, did you mean FXAA? If so, this is a form of anti-aliasing, and is generally only recommended to enable in games, for the reasons you saw. FXAA, (aka Fast, Approximate Anti-Aliasing), like other methods of AA, softens the edges of textures as a way to help mitigate, or remove the pixelated aliasing effects. In modern, AAA titles, aliasing is most noticeable when scenes are moving, especially if all forms of AA are disabled.

                Many older games came out before AA was invented. FXAA is a method that nvidia HW can apply to any game, or application, including those that do not support anti-aliasing natively. Setting it there, and not in app profiles (elsewhere in that GUI) enables it globally, resulting in what you saw. This feature exists in the Windows version of the driver as well.

                Comment


                  #9
                  Can you try something please?

                  First, do a Vsync test; check to see if you notice screen tearing in this video: https://www.youtube.com/watch?v=MfL_JkcEFbE

                  If you don't have screen tearing, perhaps you don't actually have an issue! If you do have screen tearing, move on to the next step:

                  Open Settings > Display & Monitor > Compositor.

                  What's your scale method?
                  What's your tearing prevention?

                  Personally, I use OpenGL 3.0, "Enable Compositor on Startup," "Smooth," and "Full Screen Repaints."

                  Now, leave the Settings window open. Go back and watch the YouTube video again, with the Settings window open behind your browser. Is Vsync working now?
                  Now, close the Settings window, and watch the video again. Is tearing back again?

                  That's what I'm experiencing on my system - as long as the Compositor settings window is open, I have functional Vsync on that desktop. As soon as I close the Settings window, Vsync turns back off. I tried the advice I found here: https://www.youtube.com/watch?v=0Ux9bz_Tfw0

                  It worked! For one single reboot, and now the problem is back.

                  I created this thread recently, but no one responded: https://www.kubuntuforums.net/showth...window-is-open

                  Truth be told, I really don't know how to officially report a bug. I was hoping someone would tell me if this is truly unexpected behavior, and guide me to submitting a bug report if it was warranted.
                  Last edited by bradleypariah; Dec 29, 2020, 11:05 AM.
                  Gaming/HTPC: Kubuntu 23.10 | MSI B450 Gaming+ MAX Motherboard | AMD Ryzen 5 3600XT @ 3.8GHz (x12) CPU | RX6700XT 12GB GPU | 32 GB DDR4 RAM
                  Laptop: Kubuntu 23.04.1 | 2012 MacBook Pro | i7 @ 2.9GHz (x4) CPU | 16 GB DDR3 RAM​

                  Comment


                    #10
                    Your problem doesn't appear to be the same. I don't seem to have screen tearing in videos played in my browser. I gave you some tips in your post, including a sample command that you can modify, based on your own display setup. That command is the same one I listed in my post above, and I have it set to run in a script at every start up.

                    My problem is that I can't seem to reliably limit the framerate to 60fps system-wide.

                    Comment

                    Working...
                    X