Ubuntu – Configure Intel integrated graphics in thinkpad to drive external 4k display only, via HDMI, using xorg.conf

displayhdmiintel graphicsxorg

Using the interactive displays configuration tool from the Ubuntu desktop, I have successfully configured this Thinkpad X1 Carbon (2014) with its integrated Intel video to drive an external display at 3840×2160 via the HDMI port, and not to use the display built in to the laptop. This is the configuration I want for this workstation.

I don't use the Ubuntu desktop for every day work; rather, I use fvwm (still on Ubuntu, just not the Ubuntu desktop). Unfortunately, it appears that the configuration utility does not change the settings in a general way, for example using some generic X mechanism, so that they work with every window manager / desktop environment. When I log in with fvwm, both displays are in use (and the signal sent to the external one is 4096 pixels wide, not 3840). When I log in with Ubuntu desktop, the correct, single-display, 3840px configuration takes effect.

The configuration tool appears to have written changes to some xml file in ~/.config/monitors.xml.

I need to make the configuration change so that it is both system-wide, and window-manager-agnostic. In other words, I would like to be able to configure it via xorg.conf.

I don't know how I should specify the output used. I have identified the output as being named "HDMI2", by looking in Xorg.0.log. How do I work this in to xorg.conf?

Best Answer

I use awesome wm (like fvwm, but for more handsome users), and I do this via xrandr. Try:

xrandr --output $laptop_display --off --output $external_monitor --auto

In my case, the displays are eDP1 and HDMI2. You can dump out the values for your system by running xrandr without arguments.

Related Question