Announcement

Collapse
No announcement yet.

Nvidia Drivers and KDE Plasma Conflict Causes GUI DPI to Stretch

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

    [KDE] Nvidia Drivers and KDE Plasma Conflict Causes GUI DPI to Stretch

    I am new to the world of Linux. I started with dual-booting Ubuntu on my desktop in the spring of this year. Recently, I installed Kubuntu on my old HP laptop to bring it back to life, and it's done wonders in terms of speed and stability. I really love it. The laptop has an Intel GPU/CPU combo chip as well as an Nvidia GPU chip. After some research, I learned that Linux operating systems tend to have some difficulty knowing when to swap between the two, and prefer you just use one GPU. I have installed the latest official Nvidia drivers (515.76) and have enabled "High Performance" mode in the "PRIME Profiles" section of the Nvidia X Server application.

    After rebooting, the KDE GUI inflates the system font to a much higher DPI than it should. Applications launched within the OS look normal. I have searched the internet for solutions and found that forcing the font size in system settings to a specific DPI (like the default of 96) fixes pretty much everything... except for the login screen.

    As you're likely aware, due to the nature of the KDE startup process, my forced font size setting only takes effect after login. This means that while the rest of the operating system looks great, including the lock screen, the login screen is still stretched.

    I have scoured the system settings and Nvidia settings for some kind of option I'm missing. I've tried solutions I've come across online. I have tried using xrandr to manually set the resolution and DPI. I tried purging all Nvidia content and completely reinstalling them. I've tried modifying Grub at startup (when you press 'e' on the Ubuntu listing just after the bios) to try and use nouveau at login instead. None of these options have worked.

    This issue is certainly not the end of the world, but it would be nice to have the system look clean and uniform. For the time being, I have swapped back to the "On Demand" Nvidia Server X setting so that the Intel GPU is utilized and everything looks normal. When I want to play games on Steam/Proton I just re-enable High-Performance mode. If you have any ideas I should try, please let me know. Thanks for reading!

    #2
    Nvidia always does funky stuff.
    You probably want to have grub set the resolution to match the screen's native resolution during boot, which would also include the login manager (SDDM) before things are passed off to a user account's specific settings.
    I am not sure if running the Nvidia tool with sudo/admin privileges has any effect on pre-login settings, someone with appropriate hardware would have to chime in on that.

    Here are some instructions on this, with some useful grub links as well
    https://www.dedoimedo.com/computers/...esolution.html
    You were in the ballpark, as you can test this edit by hitting 'e' at the grub menu and trying it out.

    You can use Kate or Kwrite to edit, which will ask for your password when saving, so sudo is not needed or used here.

    Comment


      #3
      Originally posted by claydoh View Post
      Nvidia always does funky stuff.
      You probably want to have grub set the resolution to match the screen's native resolution during boot, which would also include the login manager (SDDM) before things are passed off to a user account's specific settings.
      I am not sure if running the Nvidia tool with sudo/admin privileges has any effect on pre-login settings, someone with appropriate hardware would have to chime in on that.

      Here are some instructions on this, with some useful grub links as well
      https://www.dedoimedo.com/computers/...esolution.html
      You were in the ballpark, as you can test this edit by hitting 'e' at the grub menu and trying it out.

      You can use Kate or Kwrite to edit, which will ask for your password when saving, so sudo is not needed or used here.
      Thank you for the reply! I followed the instructions from the link you provided and tried modifying both grub as well as the login screen setting in the Xsetup file for SDDM. But, still no luck. It's still stretched It's like something in the Nvidia driver is overriding any changes I try to make between the time Grub boots the OS and when I hit the login screen. I also noticed that once I'm in the OS, if I log out it re-stretches. I'm stumped
      Last edited by Arcadia; Oct 05, 2022, 01:27 PM.

      Comment


        #4
        Also a quick note for anyone else reading this in the future - the tutorial mentions using "vbeprobe" in grub to view supported resolutions, but in grub 2.06 (which my system uses) this has been changed to "videoinfo"

        https://www.gnu.org/software/grub/ma...html#videoinfo

        Comment


          #5
          What's the model of your NVidia GPU?
          "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
            Originally posted by greygeek View Post
            what's the model of your nvidia gpu?
            rtx 3080! ---> Edit: Brain fart, that's my desktop's GPU. My laptop's GPU is an Nvidia 930M lol.
            Last edited by Arcadia; Oct 10, 2022, 06:49 PM.

            Comment


              #7
              I do not have a laptop capable of replicating this, but I do run dual (dissimilar) Nvidia graphics cards on my desktop, each hooked up to their own (dissimilar) monitor. I might be able to give you a few ideas where to look. I do have a similar problem with it changing the DPI depending on which card I set to primary, and it tends to bork my desktop widget sizing and fonts.

              It should be reminded that when you are logged in, you are in "user space" and any changes made with the NV control panel are local. When you are in the login screen, you are in SDDM. What is likely happening is SDDM is still using one driver (the OB), and then when logging in, its trying to switch to the other, and the screen (monitor) settings are being interpreted differently. So, I would look into SDDMs configs.

              That being said, if you consider a laptop with a 3080 to be "older", I wanna be you.
              Last edited by ShadYoung; Oct 10, 2022, 10:07 AM.

              Comment


                #8
                ShadYoung

                Thanks for the advice!! It definitely seems to be something with SDDM, I've tried some grub commands to modify its behavior but no luck so far. It's an issue with an elusive solution, I've just been living with it since it's only at the login screen and doesn't impact my user experience much. Also, my mentioning my 3080 was a total brain fart, work has had me exhausted lately. That's my desktop GPU haha. My laptop uses an Nvidia 930m
                Last edited by Snowhog; Oct 10, 2022, 06:58 PM.

                Comment


                  #9
                  Originally posted by Arcadia View Post
                  ShadYoung

                  I've tried some grub commands to modify its behavior but no luck so far.
                  I don't think grub will get you there. Grub will set its own resolution using the BIOS, where SDDM will be using X. There are other DMs you can try as well.

                  Comment


                    #10
                    I have been battling multi-monitor problems for the past couple of days and its frankly frustrating the hell out of me. The issue is NOT the nvidia drivers as I can replicate the issue on the open source ones. The issue is a conflict between "pre-x" boot up and "post-x" start up. The bios is directing the kernel correctly, but when it gets to SDDM, either X or SDDM uses the wrong, non-primary display that is set in Plasma or earlier in the bios. This becomes brutally apparent if you try to rotate a screen. So, X, or SDDM, should be rotating the display or setting its synch and scaling, before we log into the desktop, but it does not. Plasma does it after. This is why its wonky in the login screen. SDDM is not handling it correctly. It is not the Nvidia driver - it is more than happy to do its job. Frankly, this problem should not exist. Not in 2022.

                    Comment


                      #11
                      Originally posted by Arcadia View Post
                      ShadYoung

                      Thanks for the advice!! It definitely seems to be something with SDDM, I've tried some grub commands to modify its behavior but no luck so far. It's an issue with an elusive solution, I've just been living with it since it's only at the login screen and doesn't impact my user experience much. Also, my mentioning my 3080 was a total brain fart, work has had me exhausted lately. That's my desktop GPU haha. My laptop uses an Nvidia 930m
                      So, the fix is to reconfigure SDDM and Xsettings using XRandR. Basically you need to actually configure it manually as the automatic setup is wrong. Here are some links:

                      https://blog.victormendonca.com/2018...tiple-screens/

                      https://x.org/releases/X11R7.5/doc/m.../xrandr.1.html

                      The first webpage is only a very basic setup. If you read the manual for XRandR (X rotate and resize) you will see you can do far more advanced setup for things like physical dimensions, resolution, DPI, scaling, orientation, and aspect ratio, and which is primary (this is the part that will fix your login screen).

                      The key is to first list the attached displays, then add then add the defined xrandr string to Xsettings - then, it wont matter which GPU is being used, its always going to use the one you specified - probably the built in one on the laptop.

                      Comment

                      Working...
                      X