Re: [gentoo-user] Heads up: Video mode and booting with KVM switch

2015-11-14 Thread Peter Humphrey
On Friday 13 Nov 2015 15:54:02 Walter Dnes wrote:
>   I have 3 machines kicking around.  One is a Dell Inspiron 530 from
> June 2008 that simply refuses to die.  The others are more recent.
> On my desk (actually a re-purposed kitchen table) I only have room for 1
> 24 inch monitor, 1 big Unicomp "IBM-like clickety-clack" USB keyboard
> 
http://www.pckeyboard.com/mm5/merchant.mvc?Screen=PROD_code=UNI041
> A and 1 trackball.
> 
>   I got an IOGear 4-port USB KVM.  It has a remote clicker to switch
> between the 4 ports; no icky escape/control sequences.  Because it's
> hardware-controlled, there are no drivers required.  It works great
> with one exception, which is a linux kernel problem, not a switch
> problem.  The problem I've found occurs when booting a machine that is
> not currently selected by the KVM switch.  I found the BIOS settings to
> eliminate the...
> 
> Keyboard failure
> Select F1 to continue; F2 to enter SETUP
> 
> ...message.  The linux kernel problem is that it doesn't detect the
> display when that particular machine is not selected at bootup
> (du), and assumes 1024x768 console and graphics video.  If the
> machine is selected by the switch at bootup, things work properly.
> 
>   But don't panic.  Even if I boot into 1024x768 text mode, and default
> to 1024x768 graphics, running "xrandr -s 1920x1080" gets me 1920x1080
> X Window display.  The available modes for your display may be
> different.  Just run "xrandr" for a list of available modes.

I don't think there's a problem at all. I have a 2-port USB KVM too, but I 
don't have any difficulty with the keyboard. Of course I get the 80x24 
screen if the monitor isn't connected to the PC at boot time. I just make 
sure I do have that PC selected when I boot it - or if I can't, such as 
after a power cut while I'm out, I just reboot it when I can.

There's a kernel config option somewhere, I think, about choosing whether to 
read the EDID from the screen or to use a preset value, but I haven't 
bothered with it for the few occasions I might need it.

Can your PC BIOS start in headless mode? That would sidestep the missing-
keyboard problem.

-- 
Rgds
Peter




Re: [gentoo-user] Heads up: Video mode and booting with KVM switch

2015-11-14 Thread Matti Nykyri
On Fri, Nov 13, 2015 at 03:54:02PM -0500, Walter Dnes wrote:
>   I have 3 machines kicking around.  One is a Dell Inspiron 530 from
> June 2008 that simply refuses to die.  The others are more recent.
> On my desk (actually a re-purposed kitchen table) I only have room for 1
> 24 inch monitor, 1 big Unicomp "IBM-like clickety-clack" USB keyboard
> http://www.pckeyboard.com/mm5/merchant.mvc?Screen=PROD_code=UNI041A
> and 1 trackball.
> 
>   I got an IOGear 4-port USB KVM.  It has a remote clicker to switch
> between the 4 ports; no icky escape/control sequences.  Because it's
> hardware-controlled, there are no drivers required.  It works great
> with one exception, which is a linux kernel problem, not a switch
> problem.  The problem I've found occurs when booting a machine that is
> not currently selected by the KVM switch.  I found the BIOS settings to
> eliminate the...
> 
> Keyboard failure
> Select F1 to continue; F2 to enter SETUP
> 
> ...message.  The linux kernel problem is that it doesn't detect the
> display when that particular machine is not selected at bootup
> (du), and assumes 1024x768 console and graphics video.  If the
> machine is selected by the switch at bootup, things work properly.
> 
>   But don't panic.  Even if I boot into 1024x768 text mode, and default
> to 1024x768 graphics, running "xrandr -s 1920x1080" gets me 1920x1080
> X Window display.  The available modes for your display may be
> different.  Just run "xrandr" for a list of available modes.

Don't panic!

There is a simple solution to this... Kernel developers have foreseen this 
problem already! In your situation your graphics hardware is not getting 
the EDID of your display, decause it is physically not connected to the 
monitor when you boot up. See /Documentation/EDID for details.

Set DRM_LOAD_EDID_FIRMWARE=y

You can use x11-misc/read-edid to fetch edid from your monitor: 
get-edid > your_edid.bin. Or you can use modedebug in xorg.conf and get 
edid from Xorg.0.log

Save the edid from your monitor to /lib/firmware/edid/ and include in your 
kernel commandline "drm_kms_helper.edid_firmware=edid/your_edid.bin". You 
can also set your video mode in comman line "video=DVI-I-1:1024x768@85". 
The names for your connectors are found in "/sys/class/drm/*/status". 

https://wiki.archlinux.org/index.php/Kernel_mode_setting

These work with kernel mode setting. If you are using some proprietary 
driver, see the documentation of that driver. At least with nvidia you 
can set your custom edid in xorg.conf "Option CustomEDID DFP-0:/your_edid.bin"
and force monitors to be detected as connected at all times 
"Option ConnectedMonitor DFP".

-- 
-M



Re: [gentoo-user] Heads up: Video mode and booting with KVM switch

2015-11-14 Thread Walter Dnes
On Sat, Nov 14, 2015 at 02:56:09PM -0500, Walter Dnes wrote
>   Thanks for the ideas.  "video=VGA-1:1920x1080@60" (as indicated by
> xrandr) didn't work well.  The text console showed 2 copies of the
> screen side-by each.  Imagine working with the "screen" or "tmux"
> program, or the vim ":vsplit" command.  And it was offset 3/4 inch down
> and to the right.  X Window showed only one image, but the down and
> right shift was still there.  I couldn't see the autoraising menubar at
> the bottom of the screen in ICEWM, so it was unusable.
> 
>   "video=VGA-1:1920x1080@60m", where the "m" is to allow some margin in
> the calculations, got rid of the double image in text console, but the
> down and right shift was still there in both the text console, and X.
> 
>   I tried sticking "xrandr -s 1920x1080" in my .xinitrc.  It "works",
> but the fonts are noticably "fatter" after a disconnected boot versus
> a connected boot.
> 
>   I ran "cp /sys/class/drm/card0/card0-VGA-1/edid my_edid.bin" and I'll
> try loading it in the kernel later today.

  Plan A

[d531][root][~] get-edid > my_edid.bin
This is read-edid version 3.0.1. Prepare for some fun.
Attempting to use i2c interface
Looks like no busses have an EDID. Sorry!
Attempting to use the classical VBE interface
Illegal instruction

  Plan B

  I generated an xorg.conf file (Xorg -configure), dumped it in /etc/X11
and inserted...
Option   "ModeDebug" "True" 
as per https://forums.gentoo.org/viewtopic-t-992752.html

  The result I got in the log was...

(WW) intel(0): Option "ModeDebug" is not used

...this was getting annoying

  Remember what I mentioned about "fatter" fonts?  This brought back
memories of the bad old days when we needed a /etc/X11/xorg.conf file
to run X.  DPI was one of the things we worried about.  After much
experimentation, I inserted the line...

/usr/bin/xterm -e xrandr -s 1920x1080 && xrandr --dpi 96 &

...into my .xinitrc, and every thing looks just fine inside X.  In case
you were wondering, no...

/usr/bin/xterm -e xrandr -s 1920x1080 --dpi 96 &

...does *NOT* work.  Yes, the setup is a kludge, but it works.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] Heads up: Video mode and booting with KVM switch

2015-11-14 Thread Walter Dnes
  Thanks for the ideas.  "video=VGA-1:1920x1080@60" (as indicated by
xrandr) didn't work well.  The text console showed 2 copies of the
screen side-by each.  Imagine working with the "screen" or "tmux"
program, or the vim ":vsplit" command.  And it was offset 3/4 inch down
and to the right.  X Window showed only one image, but the down and
right shift was still there.  I couldn't see the autoraising menubar at
the bottom of the screen in ICEWM, so it was unusable.

  "video=VGA-1:1920x1080@60m", where the "m" is to allow some margin in
the calculations, got rid of the double image in text console, but the
down and right shift was still there in both the text console, and X.

  I tried sticking "xrandr -s 1920x1080" in my .xinitrc.  It "works",
but the fonts are noticably "fatter" after a disconnected boot versus
a connected boot.

  I ran "cp /sys/class/drm/card0/card0-VGA-1/edid my_edid.bin" and I'll
try loading it in the kernel later today.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



[gentoo-user] Heads up: Video mode and booting with KVM switch

2015-11-13 Thread Walter Dnes
  I have 3 machines kicking around.  One is a Dell Inspiron 530 from
June 2008 that simply refuses to die.  The others are more recent.
On my desk (actually a re-purposed kitchen table) I only have room for 1
24 inch monitor, 1 big Unicomp "IBM-like clickety-clack" USB keyboard
http://www.pckeyboard.com/mm5/merchant.mvc?Screen=PROD_code=UNI041A
and 1 trackball.

  I got an IOGear 4-port USB KVM.  It has a remote clicker to switch
between the 4 ports; no icky escape/control sequences.  Because it's
hardware-controlled, there are no drivers required.  It works great
with one exception, which is a linux kernel problem, not a switch
problem.  The problem I've found occurs when booting a machine that is
not currently selected by the KVM switch.  I found the BIOS settings to
eliminate the...

Keyboard failure
Select F1 to continue; F2 to enter SETUP

...message.  The linux kernel problem is that it doesn't detect the
display when that particular machine is not selected at bootup
(du), and assumes 1024x768 console and graphics video.  If the
machine is selected by the switch at bootup, things work properly.

  But don't panic.  Even if I boot into 1024x768 text mode, and default
to 1024x768 graphics, running "xrandr -s 1920x1080" gets me 1920x1080
X Window display.  The available modes for your display may be
different.  Just run "xrandr" for a list of available modes.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications