Announcement

Collapse
No announcement yet.

X Server can't open display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] X Server can't open display

    Hi all.
    So, after an update today (ssh, xserver and other things) after rebooting, I can't login in graphic mode. If I type ALT+F2 I can login in text mode and when I try
    Code:
    startx
    I receive a message that more or less says "Xserver can't open display".
    I seem to remember I already had this problem long ago, but I can't remember how to solve it...
    Thanks in advance!

    #2
    try startplasma-x11 and see if this gives more informative errors.

    Are you getting to the SDDM login screen at all?
    Nvidia graphics?

    Try updating on the command line, and see if anything was missing, or you get any errors there.
    Or try a Wayland session if you get to the login screen (or startplasma-wayland if not). This might you you a desktop, maybe even a well working one, or enough to be useful for the moment.

    Comment


      #3
      Thank yoiu, claydoh.
      No, I don't even get to the login screen.
      try startplasma-x11 and see if this gives more informative errors.​
      startplasma-x11 gives me "DISPLAY is not set or cannot connect to x server".

      Try updating on the command line, and see if anything was missing, or you get any errors there.
      I updated and everything went OK, but no solution there...

      Or try a Wayland session
      I did (from command line) and I did get to the desktop for like a minute before plasmashell gave me an error and, after seemengly recovering, it totally froze.

      Nvidia graphics?
      That seems to me could be the problem. Is it possible that the updating of xserver rendered the drivers outdated and incompatible? Updating from command line didn't offer anything related to nVidia drivers...

      Comment


        #4
        Originally posted by Fernando View Post
        […]
        Nvidia graphics?
        That seems to me could be the problem. Is it possible that the updating of xserver rendered the drivers outdated and incompatible? Updating from command line didn't offer anything related to nVidia drivers...
        Did you install the Nvidia-drivers from (K)ubuntu or directly from Nvidia?
        Try reinstalling them and if this doesn't work perhaps try the other one of the two sources.

        Installing them from the (K)ubuntu repositories is always the recommended/preferred method in my experience:
        Code:
        ubuntu-drivers devices
        sudo ubuntu-drivers autoinstall
        reboot
        PS: If this doesn't work you would likely have to apt reinstall the appropriate packages.
        Last edited by Schwarzer Kater; Nov 29, 2022, 04:22 AM. Reason: added PS
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

        Comment


          #5
          Thanks, Schwarzer Kater​.

          I did what you suggested and it worked, somehow; basically, nVidia proprietary drivers (nVidia-driver-390) were reinstalled and selected and, after rebooting, i could get to the login screen and, later, to the desktop. Now the thing is, these drivers make everything look rather awful, so I tried do revert back to the nouveau ones, which I was using before the updating of x server. After rebooting, the problem was back and no login screen. So I reverted again to the nVidia 390.
          So the problem seems to be nouveau drivers are not compatible with the updated x server... Do someone know how (if at all possible right now) to update the nouveau drivers or if the are being updated soon? Nvidia 390 really really make everything in my system look awful...

          Another thing is that this driver (390) is not using the custom resolution of 2560x1440 that I had set in my .profile file why??

          Comment


            #6
            When uninstalling the nvidia drivers, you often need to run sudo apt autoremove to also remove any stray propriatary nvidia library and related support packages that may have been left behind, and can interfere with other drivers operating correctly.

            Comment


              #7
              I don't think this is relevant to your problem, but someone may find this in a search:
              Originally posted by Fernando View Post
              startplasma-x11 gives me "DISPLAY is not set or cannot connect to x server".
              That means one needs
              Code:
              export DISPLAY=:0
              before running it.
              Regards, John Little

              Comment


                #8
                Originally posted by Fernando View Post
                […] Nvidia 390 really really make everything in my system look awful...

                Another thing is that this driver (390) is not using the custom resolution of 2560x1440 that I had set in my .profile file why??

                What does "awful" mean? If the resolution you set in .profile does not work: Did you try setting it in Systemsettings -> Display after installing the Nvidia drivers?
                Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

                Comment


                  #9
                  I mean the fonts are kind of fuzzy and it seems to be doing funny things to the night color applet (it activates and deactivates randomly).
                  Yes, I tried to set my custom resolution but it is not there in the list that system settings gives for my monitor, although my .profile file seems to be unchanged.

                  If I go to the command line and type
                  Code:
                  xrandr
                  it gives:
                  Code:
                  [COLOR=#000000]Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384 [/COLOR]
                  DVI-I-0 disconnected (normal left inverted right x axis y axis)
                  VGA-0 connected (normal left inverted right x axis y axis)
                    1440x900      59.89 +  74.98  
                    1280x1024     75.02    60.02  
                    1280x800      59.81  
                    1152x864      75.00  
                    1024x768      75.03    70.07    60.00  
                    800x600       75.00    72.19    60.32    56.25  
                    640x480       75.00    72.81    59.94  
                  DVI-I-1 disconnected (normal left inverted right x axis y axis)
                  HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 550mm x 310mm
                    1920x1080     60.00*+  59.94    50.00    29.97    25.00    23.98    60.00    50.04  
                    1680x1050     59.95  
                    1600x900      60.00  
                    1280x1024     75.02    60.02  
                    1280x800      59.81  
                    1280x720      60.00    59.94    50.00  
                    1024x768      75.03    60.00  
                    800x600       75.00    60.32  
                    720x576       50.00  
                    720x480       59.94  
                    640x480       75.00    59.94    59.93  
                  2560x1440_60.00 (0x2b7) 312.250MHz -HSync +VSync
                         h: width  2560 start 2752 end 3024 total 3488 skew    0 clock  89.52KHz
                         v: height 1440 start 1443 end 1448 total 1493           clock  59.96Hz


                  But then
                  Code:
                  xrandr -s 2560x1440
                  or
                  Code:
                  xrandr -s 2560x1440_60.00
                  give
                  Code:
                  Size 2560x1440 not found in available modes
                  Last edited by Fernando; Nov 29, 2022, 11:57 PM.

                  Comment


                    #10
                    Originally posted by Fernando View Post
                    I mean the fonts are kind of fuzzy and it seems to be doing funny things to the night color applet (it activates and deactivates randomly).
                    […]
                    I guess the fonts look fuzzy because of the low/not native resolution of your display… IIrc there were one or two other threads in this forum about setting the correct resolution manually for Nvidia GPUs - try the search.

                    I also have the weird behavior of the night color with my Nvidia card (mostly it does not activate despite the symbol is shown as activated in the system tray and I have to switch it off and on manually once to work). This behavior only occurs in Kubuntu - in KDE Plasma of Debian, openSUSE and Garuda it works "despite" my Nvidia card.
                    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                    get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

                    Comment


                      #11
                      I tried the following:
                      Code:
                      xrandr
                      which gave as a result
                      Code:
                      Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
                      DVI-I-0 disconnected (normal left inverted right x axis y axis)
                      VGA-0 connected (normal left inverted right x axis y axis)
                        1440x900      59.89 +  74.98  
                        1280x1024     75.02    60.02  
                        1280x800      59.81  
                        1152x864      75.00  
                        1024x768      75.03    70.07    60.00  
                        800x600       75.00    72.19    60.32    56.25  
                        640x480       75.00    72.81    59.94  
                      DVI-I-1 disconnected (normal left inverted right x axis y axis)
                      HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 550mm x 310mm
                        1920x1080     60.00*+  59.94    50.00    29.97    25.00    23.98    60.00    50.04  
                        1680x1050     59.95  
                        1600x900      60.00  
                        1280x1024     75.02    60.02  
                        1280x800      59.81  
                        1280x720      60.00    59.94    50.00  
                        1024x768      75.03    60.00  
                        800x600       75.00    60.32  
                        720x576       50.00  
                        720x480       59.94  
                        640x480       75.00    59.94    59.93
                      and then
                      Code:
                      cvt 20560 1440
                      which gave

                      Code:
                      2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz [/COLOR]
                      Modeline "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
                      then

                      Code:
                      xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
                      and
                      Code:
                      xrandr --addmode HDMI-0 "2560x1440_60.00"
                      which gave

                      Code:
                      X Error of failed request:  BadMatch (invalid parameter attributes)
                       Major opcode of failed request:  140 (RANDR)
                       Minor opcode of failed request:  18 (RRAddOutputMode)
                       Serial number of failed request:  29
                       Current serial number in output stream:  30



                      Last edited by Fernando; Nov 30, 2022, 11:54 PM.

                      Comment


                        #12
                        IIrc there were one or two other threads in this forum about setting the correct resolution manually for Nvidia GPUs - try the search.
                        Yes. I knew I had this problem before. I found my own thread. Then it was the opposite and I changed to the nouveau driver. I think the reason xrandr is not working now is the nVdia 390 driver is somehow incompatible with that resolution or something...

                        Comment


                          #13
                          Allright, so after much reading and looking around, I got it!
                          I found this guy here who gave me the clue and I just followed along more or less.
                          I opened nvidia-settings and modified the resolution to 2560x1440. I tried to save the configuration to a xorg.conf file from nvidia-settings as the program offered but I couldn't so I created the file manually on /etc/x11 and copied in it the configuration nvidia-settings created.
                          And voilà, after rebooting 2560x1440!

                          Comment

                          Working...
                          X