KMS, EDID and KVM Woes

Problems and successes with specific brands/models of computer video hardware
Post Reply
Message
Author
AQUAR
Posts: 12
Joined: Fri 08 Feb 2013, 07:49

KMS, EDID and KVM Woes

#1 Post by AQUAR »

After setting up Macpup529 for a specific requirement I got interested in other Puppy Distros. Simply because Puppy Linux is amazing :D .

For my PC setup, the puppy linux distros are locked at a maximum screen resolution of 1024 by 768 (except for Macpup 529).

Now I have 2 PC's that are dsub connected to a KVM switch. Apparently the EDID information from the monitor is not transmitted by the KVM switch. Hence puppy fails in auto detecting the monitor specifications and defaults to some fail safe but limited video resolutions.

To set the screen resolution to the monitor native resolution turned out to be rediculously simple. Finding the solution was Hell.

Hopefully the process notes outlined below will help out others with this sort of issue.

As I am a Linux Noob it would also be great if the video gurus here could vet the process, provide comment and other options.

------------------------------------------------------------------------------------

PROBLEM:
Puppy Linux defaults to a 1024 x 768 screen resolution and cannot be set to a higher resoltion to match the monitor's native resolution (1920 x 1080 in my case).

REASON FOR PROBLEM:
I use a KVM switch that does not transmit EDID monitor information.

CONSEQUENCE:
The video auto configuration fails and defaults to a basic configuration for the video output port used.

FIX:

Step 1: Create a save file for recording the new configuration changes.
Step 1a:
Start puppy linux in ram mode only, reboot and create a save file for the frugal install.

Step 2: Use XOrgWizard to create a complete xorg.conf file for later tweaking.
Step 2a:
Start puppy linux, from the Menu select Xorg Video Wizard and run XOrgWizard.
Step 2b:
Select Probe and let it complete to the next step.
Note 1:
It will complain that it cannot probe the monitor (reason no EDID) and requests manual selection of the screen options. provided.
Note 2:
For my PC the Probe will select the Radeon Driver.

Step 3: Enter monitor parameters.
Step 3a:
Select option "Z" (Select this if you know monitor frequency specs)and enter the monitor details.
For the LG monitor they are:
Horizontal Frequency: 31.5 - 70
Vertical Frequency: 57 - 70
Video Mode: 1920 x 1080 x 24

Step 4: Determine which video output is connected.
Step 4a:
Open the Xorg.0.log file (/var/log/Xorg.0.log) and look for lines similar to these.
RADEON(0): Output HDMI-0 disconnected
RADEON(0): Output DVI-0 disconnected
RADEON(0): Output VGA-0 connected
Note 1:
"VGA-0" "HDMI-0" and "DVI-0" are default monitor identifiers.
Note 2:
These default monitor identifiers need to be used in the "monitor section" of the xorg.conf file for tweaking the default basic configuration of these video outputs.
Note 3:
In my case "VGA-0" is connected and we need to add a new screen resolution to this output.

Step 5: Create a modeline for the new resolution.
Step 5a:
Open up a terminal and issue the "gtf" command
Step 5b:
Eg for a resolution of 1920x1080 and 60 Hz refresh issue
"#gtf 1920 1080 60".
This results in the following output,

# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync

Step 6: Modify the xorg.conf file to add the new screen resolution.
Step 6a)
Open the xorg.conf file (/etc/X11/xorg.conf)
Note 1:
Quick way to do this is via the Menu - Xorg Video Wizard.
Step 6b:
Add the new Modeline to the "Modes" section, against Identifier "modes0", as follows:

Section "Modes"
Identifier "Modes0"
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
#modes0modeline0
EndSection

Note 2:
Here we are simply using the modes identifier "Modes0" because its already set up.
Step 6c:
Edit the name of the Modeline from "1920x1080_60.00" to "New_1920x1080"
Note 3:
This makes it easier to separate this new user defined screen resolution from the default screen resolutions.

Step 7: Modify the xorg.conf file to include the new mode line.
Step 7a:
Uncomment the "UseModes" line for "Modes0" in the monitor sections

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 31.5-70
VertRefresh 56-72
* UseModes "Modes0" #monitor0usemodes
Option "PreferredMode" "1920x1080"
EndSection


Step 8: Modify the xorg.conf file to point the default "VGA-0" monitor identifier.
Note 1:
After running XOrgWizard in step 2: the xorg.conf is set up using "Screen0", "Card0" and "Monitor0".
Step 8a:
Change all instances of "Monitor0" to "VGA-0"

Section "Monitor"
* Identifier "VGA-0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 31.5-70
VertRefresh 56-72
UseModes "Modes0" #monitor0usemodes
Option "PreferredMode" "1920x1080"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
* Monitor "VGA-0"
DefaultDepth 24
#Option "metamodes" "1920x1080_60 +0+0" #METAMODES_0
Subsection "Display"
Depth 24
Modes "1920x1080"
EndSubsection
EndSection
Note 2:
Now the default basic configuration will find the "VGA-0" monitor section in xorg.conf and include the new modeline for selection via XRANDR (or by setting it as the preffered mode in xorg.conf).

Step 9: Modify the xorg.conf file to set the prefered resolution on startup to the new screen resolution named
"New_1920x1080".
Step 9a:
In the monitor section for "VGA-0" change the line
Option "preferredmode" "1920x1080"
to
Option "PreferredMode" "New_1920x1080"

Step 10: Optional changes,
Step 10a:
As EDID is false we can inform the "Card0" driver section of this via the options.

Modify this line:
#Option "IgnoreEDID" # [<bool>]
to
Option "IgnoreEDID" "true"

Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "AccelDFS" # [<bool>]
* Option "IgnoreEDID" "true"
#Option "CustomEDID" # [<str>] *****
Identifier "Card0"
Driver "radeon" #card0driver
BusID "PCI:1:0:0"
EndSection

Step 10b:
Might be wise to also change the Modes line in the "Screen0" section to include the new screen resolution.

Section "Screen"
Identifier "Screen0"
Device "Card0" *****
Monitor "Monitor0"
DefaultDepth 24
#Option "metamodes" "1920x1080_60 +0+0" #METAMODES_0
Subsection "Display"
Depth 24
Modes "New_1920x1080"
EndSubsection
EndSection

Step 10c:
To be tidy, remove all unused monitor, driver and screen sections in xorg.conf.

Step 11: Restart The Xserver.
Step 11a:
If all is well then restarting the xserver should now serve up the desktop with the new screen resolution.

FINALLY: A Bit Of A Warning.
Of course it is obvious that this xorg tweak is monitor specific. So don't use it on another monitor if its frequency specification doesn't match. At best you get an out of range warning and at worse it blows up your monitor (most unlikely!).

AQUAR
Posts: 12
Joined: Fri 08 Feb 2013, 07:49

#2 Post by AQUAR »

Some extra information:
Recent Puppy Distros use KMS (Kernel Mode Setting) for setting up the initial video resolution. Without a monitor's EDID the KMS seems to fall back to some basic monitor parameters.

Instead of the above xorg.config tweak:
You could simply turn off the KMS feature by specifying radeon.modeset=0 on the kernel command line (for radeon drivers).
Then just run the xorgwizard to set the required screen resolution and restart the Xserver. This worked just fine.

Not sure which method is better for my graphics card (HD5670) but
KMS is supposed to improve hardware acceleration, 3D etc.
With radeon.modeset=0 the GLXGEARS program manages about half the FPS I get with the tweaked xorg.conf file. Tweak = better (maybe)?

I noticed also that puppy has the drm_kms_helper module.
But drm_kms_helper.edid_firmware=edid/1920x1080.bin (instead of radeon.modeset=0) on the kernel command line did not work.

Does anyone know if this kernel configuration item is enabled on slacko 5.5?

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

KMS EDID

#3 Post by L18L »

AQUAR wrote:...
I noticed also that puppy has the drm_kms_helper module.
But drm_kms_helper.edid_firmware=edid/1920x1080.bin (instead of radeon.modeset=0) on the kernel command line did not work.

Does anyone know if this kernel configuration item is enabled on slacko 5.5?
My guess: command line does not work if kernel is not configured to do so.

Working in Fatdog64 and in slacko64-6.9.6.4 (and in RemixOS :wink: )
http://murga-linux.com/puppy/viewtopic. ... &start=272

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: KMS EDID

#4 Post by L18L »

L18L wrote:
AQUAR wrote:...
I noticed also that puppy has the drm_kms_helper module.
But drm_kms_helper.edid_firmware=edid/1920x1080.bin (instead of radeon.modeset=0) on the kernel command line did not work.

Does anyone know if this kernel configuration item is enabled on slacko 5.5?
My guess: command line does not work if kernel is not configured to do so.

Working in Fatdog64 and in slacko64-6.9.6.4 (and in RemixOS :wink: )
http://murga-linux.com/puppy/viewtopic. ... &start=272
I do know it for sure now.
Working also with xenialpup64-7.0.8.5

Booted from grub4dos:

Code: Select all

# Linux bootable directory config begins
  title xenialpup64-7.0.8.5 /dev/sda3 (1920x1080)
  uuid 9aead8c0-19fb-443f-a473-300c1baed346
  kernel /xenial7085/vmlinuz root=/dev/sda3 pmedia=atahd pdev1=sda3 psubdir=xenial7085 pfix=fsck  drm_kms_helper.edid_firmware=edid/1920x1080.bin
  initrd /xenial7085/initrd.gz
Working also with Barry's next Easy

:wink:
Attachments
kms_helper.png
(18.88 KiB) Downloaded 1093 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

drm_kms_EDID

#5 Post by L18L »

Working also with Barry's Quirky Pyro64 version 0.2 (alpha)

Append e.g.

Code: Select all

 drm_kms_helper.edid_firmware=edid/1920x1080.bin
to APPEND lines in syslinux.cfg files direct and under EFI

AQUAR
Posts: 12
Joined: Fri 08 Feb 2013, 07:49

#6 Post by AQUAR »

Been using this "save on demand" version of Macpup/firefox for safer online banking now for many years.
Unfortunately it will only update to firefox version 45 and recently that is failing to render some of their login pages.

Moved on to bionicpup64 now and that thankfully is very easy to setup as a "save on demand" only system (for online banking purposes).

But this KVM, EDID issue has come back with a vengeance.
None of the earlier approaches have worked except for radeon.modeset=0.

The GPU card is an amd HD5670 and now considered "old".
With KMS off for the ati driver I cannot get past a screen resolution of 1280x1024.

Xorg settings are just ignored for the generic ati driver loaded
AND the propriety AMD drivers for this video card don't work in this bionic pup.

Does anyone know of any compatible ati drivers that will push the resolution up to 1920x1080?
OR
How to get the generic driver to operate at the higher screen resolution?

1920x1080 is the native resolution of my monitor (bog standard these days!) and the bank login pages look much better at it.

Post Reply