1

I am able to adjust the settings of any external monitors I connect with xrandr with no issues. But, my main laptop screen will go black upon changing any settings with xrandr. Upon booting into recovery terminal I am met with "can't open display" upon running xrandr -q

My laptops native resolution is 3840x2160 60hz and I am attempting to downscale that to 1920x1080 either with the supported mode or with --scale 0.5x0.5

The laptop is a Lenovo X1 Extreme running Void Linux with nouveau drivers.

My /etc/X11/xorg.conf:

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/X11/misc"
    FontPath     "/usr/share/fonts/X11/TTF"
    FontPath     "/usr/share/fonts/X11/OTF"
    FontPath     "/usr/share/fonts/X11/Type1"
    FontPath     "/usr/share/fonts/X11/100dpi"
    FontPath     "/usr/share/fonts/X11/75dpi"
EndSection

Section "Module"
#   Load  "glx-xorg"
#   Load  "vnc"
    Load  "glx"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option      "Protocol" "auto"
    Option      "Device" "/dev/input/mice"
    Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "Monitor Vendor"
    ModelName    "Monitor Model"
        Modeline "3440x1440R"  319.75  3440 3488 3520 3600  1440 1443 1453 1481 +hsync -vsync
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"              # [<bool>]
        #Option     "HWcursor"              # [<bool>]
        #Option     "NoAccel"               # [<bool>]
        #Option     "ShadowFB"              # [<bool>]
        #Option     "VideoKey"              # <i>
        #Option     "WrappedFB"             # [<bool>]
        #Option     "GLXVBlank"             # [<bool>]
        #Option     "ZaphodHeads"           # <str>
        #Option     "PageFlip"              # [<bool>]
        #Option     "SwapLimit"             # <i>
        #Option     "AsyncUTSDFS"           # [<bool>]
        #Option     "AccelMethod"           # <str>
        #Option     "DRI"                   # <i>
        Option      "ModeValidation"            "AllowNonEdidModes"
    Identifier  "Card0"
    Driver      "nouveau"
    BusID       "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     24
                Modes    "1920x1080"
    EndSubSection
EndSection

Output of xrandr -q with external monitor connected:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080     60.00*+
   3840x2160     60.00 +
   3440x1440R    59.97  
   1920x1200     59.95  
   1600x1200     59.95  
   1680x1050     60.00  
   1400x1050     60.00  
   1280x1024     59.95  
   1280x960      59.99  
   1152x864      59.97  
   1024x768      59.95  
   800x600       59.96  
   640x480       59.94  
   720x400       59.97  
   640x400       59.96  
   640x350       59.84  
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 531mm x 298mm
   1920x1080     60.00*+  50.00    59.94    24.00    23.98  
   1920x1080i    60.00    50.00    59.94  
   1280x1024     75.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768     119.99    99.97    75.03    60.00  
   832x624       74.55  
   800x600      119.97    99.99    75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480      119.99   100.00    75.00    60.00    59.94  
   720x400       70.08  

eDP-1 is my native laptop display and HDMI-1 is the external monitor. Currently, if I boot with the external monitor disconnected the laptop will boot into a black screen and the 'can't open display' issue occurs. Upon booting with the external monitor connected, the laptop screen still goes black but the monitor works as intended.

Thank you.

  • "Screen goes black when using xrandr with nouveau" points to a bug in the open source nouveau driver. Upgrade to newest version of nouveau, if the problem persists, file a bug report. You can also try the closed-source nvidia driver. – dirkt Mar 3 at 7:27
  • removing 'Modeline' in Monitor section and 'Modes' lines entire allows me to scale down with --scale 0.5x0.5 now which is good progress. I still am unable to do a --mode 1920x1080 – will Mar 4 at 3:47
  • Ok, so the bug was probably that the calculated values after scaling exceed some hardware limitations (whatever they are). That's still a bug, because the driver should detect and disallow it. Any error messages in /var/log/Xorg.0.log? – dirkt Mar 4 at 11:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.