#!/bin/sh # Extract from Xorg.0.log when monitor was connected via DVI/HDMI cable # (II) NOUVEAU(0): Manufacturer: GSM Model: 59f1 Serial#: 105956 # (II) NOUVEAU(0): Modeline "2560x1080"x60.0 185.58 2560 2624 2688 2784 1080 1083 1093 1111 -hsync -vsync (66.7 kHz eP) /usr/bin/xrandr --newmode "2560x1080_60.0" 185.58 2560 2624 2688 2784 1080 1083 1093 1111 -hsync -vsync /usr/bin/xrandr --addmode HDMI-1 2560x1080_60.0 /usr/bin/xrandr --output HDMI-1 --mode 2560x1080_60.0Details follow.
Remember the bad old days of monitors on Linux? A new monitor meant trying to figure out the modeline, tweaking various configuration files, all the while hoping you didn't smoke your monitor?
It's been a long time since I've had to do anything like this, and so I was out of practice when my brand new LG monitor (2560x1080, 34" diagonal) didn't work "out of the box" with my computer.
I brought the monitor home from our neighborhood Costco, where I had been eyeing it for some time. Because of my temporal separation from the bad old days, I didn't even think of checking for compatibility until it didn't work. But I'm getting ahead of myself.
First thing, I got home and noticed oops, it only has HDMI inputs, no DVI (even I didn't think it might have (S)VGA). No problem; I have a DVI/HDMI cable. Which the quick start guide warns against using. Well, what was I going to do about that? So I connected it up, and after the initial screen, nothing. Fortunately, my old monitor had started working again by then so I could look at /var/log/Xorg.0.log and such.
Eventually I noticed this in the logfile:
[ 18.396] (II) NOUVEAU(0): Initializing outputs ... [ 18.424] (II) NOUVEAU(0): Output DVI-I-1 has no monitor section [ 18.480] (II) NOUVEAU(0): Output DVI-I-2 has no monitor section [ 18.482] (II) NOUVEAU(0): Output HDMI-1 has no monitor sectionWhat do you mean, "HDMI-1"? Well, there was a mini-HDMI socket in the video card. I hadn't noticed it before. Keeping in mind that LG warned of (in)compatibility issues when using a DVI/HDMI cable, I sought a miniHDMI/HDMI cable.
With that cable, things started working better, but still I was getting 1920x1080 resolution, which looks ugly. Also not so useful. And the monitor whined about it. After some web searches, I came up with the script you see at the top of this post; I run it after login and it works fine.
There is a way to make Xorg just come up in this mode, but I don't have the motivation to figure out what it is... Just call me slacker.