How to recover from switching external monitor to 'primary'

I tried switching my external hdmi monitor to ‘primary’. Now I have no desktop on my laptop screen and can do almost nothing. I do have a root shell, but not sure what to change. How can I switch laptop screen back to ‘primary’ to get back normal desktop? If I knew the command name of the app to config displays, that might do it.

Even with the external monitor disconnected, I get no desktop stuff on the native screen.

Please help, I"m dead in the water. I don’t want to have to wipe and reinstall linux just because of experimenting with display configs.

– George

One possibility is through the terminal. Can you run and post your output:

$ xrandr

Then you could try to us xrandr to define which monitor is what. Supposing your laptop is eDP-1 and the external monitor HDMI-1, you could try this:

xrandr --output eDP-1 --auto

to activate your laptop screen. It is also possible to use xrandr to define the position of the external monitor relative to the laptop monitor and define resolution etc… but easier to use your system settings what DE are you using?

More infos about xrandr in the Arch wiki… somehow I cannot post the link because I am a new forum user since a couple of minutes ago.

Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
eDP1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 380mm x 210mm
   3840x2160     60.04*+  59.97    48.03  
   3200x1800     59.96    60.00    59.94  
   2880x1620     60.00    59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.96    60.00    59.95  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     60.00    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     59.96    60.00    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      60.00    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1368x768      60.00    59.88    59.85  
   1280x800      59.81    59.91  
   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  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
eDP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
DP-1-3 disconnected (normal left inverted right x axis y axis)

$ xrandr --output eDP1 --auto
This seemed to return OK but not sure what it did. Should I try rebooting now?

Ok, it is odd because xrandr does not show any HDMI connection, I see only your laptop assuming that you have a high dpi screen 3840x2160.

normally the xrandr command should set your laptop screen in your session and no reboot would be necessary. There are ways to save xrandr configuration using autorandr but I do not think we need to go into this for this thread.

Reboot or logout/in doesn’t hurt to try. Also disconnecting/connecting the external hdmi may help.

OK, reboot put things back somewhat, although I seem to have lost some of my very hard fought config of DPI and scaling. Anyway, thank you very very much for saving me! I’ll just leave the external display disconnected for the time being.

Ok, sorry to hear that. Perhaps if you indicate which desktop you use, kde, cinnamon or else someone could help you. I played around a lot with monitors and trying to fix high dpi screen on laptop vs. lower resolution on external monitor. My conclusion is that cinnamon seems to work best out of the box. In the start menu, I just type “display”. Then I select “normal” and 200% for the high dpi and 100% for external monitor. Also note that connecting/disconnecting your hdmi cable with an external monitor should not break your distro. Good luck!

I’m using kde, though I’m by no means wedded to it. I’ve had a great deal of grief trying to get mandaro kde to behave well with my HiDPI display. Then, sometimes I need to temporarily add my remote hdmi screen, which is moderate DPI, mirroring. Thus the nightmare. I’ve shied away from cinnamon, since I’m not fond of apple interfaces, but I might try it if it has easy support for HiDPI.

Kde is great! For sure it’s difficult, to my knowledge either gnome with wayland or cinnamon are the only DE who can do per screen scaling that works with high dpi and non high dpi screens. I tried fiddling with icon and font scaling but its not satisfying. Wayland with nvidia cards does not seem to work well, therefore cinnamon is my best option.

Gnome is more apple like, cinnamon is more traditional desktop (modern windows xp or 7 like?like) :grin:

I tried assigning the external monitor as primary and it worked. When unplugging the hdmi it should automatically switch back to your laptop as primary screen. Perhaps it depends on your hardware and whether you use hybrid intel/nvidia grafics. Just make sure to have the right drivers installed to have a smooth experience. Manjaro makes our life easier, click on start, manjaro settings and there should be a hardware option that shows which graphics drivers are installed (open source or proprietary).

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.