2

The DPI of my primary monitor is unreasonably large, so at boot I run xrandr --output eDP1 --scale 0.75x0.75. This is done automatically due to a ~/.config/autostart/xrandr.desktop file that I have containing this command on my Xubuntu 20.04 machine. However, only if my secondary monitor is plugged in, this blacks out the screen on my primary monitor, such that I can only see the mouse. This also makes the secondary monitor a bit glitchy, with extreme screen flickering. This issue can be prevented by waiting to plug in the secondary monitor until the command has already been run, but if the issue has occurred, I believe that the only fix is to log out, unplug the secondary monitor, and log back in.

Where can I begin diagnosing the cause of this issue? Is it a known bug?

When everything is working properly, this is my xrandr output:

$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected primary 1440x810+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
   1920x1080     60.06*+  59.93  
   1680x1050     59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      60.00    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1368x768      60.00    59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.81    59.91  
   1152x864      60.00  
   1280x720      59.86    60.00    59.74  
   1024x768      60.00  
   1024x576      60.00    59.90    59.82  
   960x540       60.00    59.63    59.82  
   800x600       60.32    56.25  
   864x486       60.00    59.92    59.57  
   640x480       59.94  
   720x405       59.51    60.00    58.99  
   640x360       59.84    59.32    60.00  
HDMI1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 530mm x 300mm
   1920x1080     60.00*+  50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

When I have the issues in question, this is my xrandr output:

$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected primary 1440x810+0+0 (normal left inverted right x axis y axis) 310mm x 170mm
   1920x1080     60.06*+  59.93  
   1680x1050     59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      60.00    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1368x768      60.00    59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.81    59.91  
   1152x864      60.00  
   1280x720      59.86    60.00    59.74  
   1024x768      60.00  
   1024x576      60.00    59.90    59.82  
   960x540       60.00    59.63    59.82  
   800x600       60.32    56.25  
   864x486       60.00    59.92    59.57  
   640x480       59.94  
   720x405       59.51    60.00    58.99  
   640x360       59.84    59.32    60.00  
HDMI1 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 530mm x 300mm
   1920x1080     60.00*+  50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x576i      50.00  
   720x480       60.00    59.94  
   720x480i      60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
J. Mini
  • 190
  • 1
  • 18
  • Could you add the output of xrandr in your question? – Akash Karnatak Jun 07 '21 at 13:52
  • @AkashKarnatak Added it. – J. Mini Jun 07 '21 at 16:11
  • What do you mean by DPI of my primary monitor is unreasonably large? Is it some kind of resolution issue? If it is, then don't run xrandr --output eDP1 --scale 0.75x0.75, instead try different resolutions. xrandr will give you a list of all the supported resolutions. You can then apply a resolution using xrandr --output eDP1 --mode 1920x1080 (replace 1920x1080 with whatever resolution you want to apply). – Akash Karnatak Jun 07 '21 at 16:52
  • If you want to use both the screen simultaneously, then you can run this command xrandr --output eDP1 --auto --output HDMI1 --auto --right-of eDP1 – Akash Karnatak Jun 07 '21 at 17:00
  • @AkashKarnatak My DPI complaint is that the default settings on my primary monitor make the screen seem far too small, as if it's zoomed out. I took your advise and changed the resolution to 1680x1050, but this cropped some of the screen. I tried a few other values and what looks closest to what I originally had is 1600x900. I'm unsure if it's really what I had previously, but it seems to have fixed the dual monitor issue in question (will test). However, this destroyed Firefox. It had major graphical bugs until I used safe mode to disable Hardware Acceleration. Can you explain that?. – J. Mini Jun 07 '21 at 19:21
  • Reboot your PC. See if xrandr's output has the resolution 1440x810. If it does, then set the resolution to 1440x810. If it does not then follow this answer to create a custom resolution of 1440x810. https://askubuntu.com/a/377944 – Akash Karnatak Jun 08 '21 at 02:56
  • @AkashKarnatak Thanks. It does not. – J. Mini Jun 08 '21 at 07:37
  • @AkashKarnatak Interesting. The graph plotting for RStudio has also broken. I'm pretty sure that both it and Firefox share a rendering engine. I'll have to figure out how to debug that. – J. Mini Jun 09 '21 at 21:29

0 Answers0