Ubuntu: How can I make Linux behave better when EDID is unavailable?



Question:

I'm using Mythbuntu 12.04 with a TV which only provides EDID information when it is turned on. Since the computer will be used for recording video via MythTV, I don't want to always have the TV on while the computer is running.

I saved the EDID to a file, put it in /lib/firmware, and added drm_kms_helper.edid_firmware=DVI-I-1:LT26-A.VGA.EDID.bin to the kernel command line. The kernel loads EDID from this file, and X starts with the proper resolution. However, the kernel still attempts to read EDID from the device and spams my logs with messages like this:

[   31.926373] [drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder is 128  [   31.927144] Raw EDID:  [   31.927352]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [   31.927882]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [   31.928454]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [   31.928984]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [   31.929513]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [   31.930042]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [   31.930569]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [   31.931097]          ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  [   31.931630] radeon 0000:01:00.0: DVI-I-1: Ignoring invalid EDID block 1.  [   31.990143] i2c i2c-3: sendbytes: NAK bailout.  [   31.993215] [drm:radeon_dvi_detect] *ERROR* DVI-I-1: probed a monitor but no|invalid EDID  [   32.023802] [drm] Got external EDID base block and 0 extensions from "LT26-A.VGA.EDID.bin" for connector "DVI-I-1"  [   32.774355] i2c i2c-3: sendbytes: NAK bailout.  

Adding the drm_kms_helper.edid_firmware option also causes a long delay when shutting down or rebooting. It happens even when the monitor is on. Part of it is due to all invocations of plymouth hanging for a while, probably due to plymouthd hanging. This makes scripts executed at shutdown hang for a while. Not running plymouthd at shutdown helps, but there is still a delay.

After the delay, I see:

[drm:edid_load] *ERROR* Requesting EDID firmware "LT26-A.VGA.EDID.bin" failed (err=-2)  

This flashes by very quickly and is followed by the splash screen or reboot. I could only record it using a camera. It makes no sense to me because during the delay the computer was fully usable via SSH. The kernel should have been able to read the file.

I don't think this is a Plymouth problem. It's probably hanging because some video mode change it requests is hanging. However, I'd love to be able to tell Plymouth to always stay in ordinary VGA text mode.

I also tried drm_kms_helper.poll=0 and drm_kms_helper.poll=N kernel options. They can set the option according to /sys, but I don't see any change from that.

Adding the nomodeset kernel parameter gets rid of the these issues. However, then the current version of the radeon driver in the X server doesn't work properly and newer versions refuse to run.

Update: Adding --tty=/dev/console to the invocation of plymouthd at shutdown in /etc/init/plymouth.conf has fixed the shutdown hang, even when the TV is turned off.


Solution:1

I don't have exactly same problem, but I found some problems with xorg when I switch user between opened sessions:

PROBLEM: I have session with 1600x1050 and switch to another user's session that was previously set with same 1600x1050 resolution. But when I switch to this session, the screen gets 1280x1024 and for some reason the size of the session is very very wrong (it is bigger than the screen resolution and I can't move or click most of the things so I have to restart all Xorg).

WORKAROUND: Fortunately I have found some way to resolve it in a tricky way: Change resolution file name with your resolution file.

  1. Install get-edid command:

    sudo apt-get install read-edid  
  2. Create a bin file with edid information:

    sudo get-edid  > 1600x1050.bin  
  3. Create a folder to store this file:

     sudo mkdir /lib/firmware/edid  
  4. Copy the file:

     sudo cp 1600x1050.bin /lib/firmware/edid  
  5. Edit grub to edit linux command to load this file in kms:

     sudoedit /etc/default/grub  

    Edit line:

     GRUB_CMDLINE_LINUX_DEFAULT="drm_kms_helper.edid_firmware=edid/1600x1050.bin quiet"   

    Change your name.bin file and run

     sudo update-grub  
  6. Reboot and test.

For some reason it worked for me very well. I have this card and driver:
fglrxinfo
display: :0 screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon HD 6450
OpenGL version string: 4.2.12002 Compatibility Profile Context 9.012

My edid information below, shown after running the command
# parse-edid < 1600x1050.bin:

parse-edid: parse-edid version 2.0.0  parse-edid: EDID checksum passed.            # EDID version 1 revision 3  Section "Monitor"          # Block type: 2:0 3:fc          Identifier "22T41-H-AN"          VendorName "KTC"          ModelName "22T41-H-AN"          # Block type: 2:0 3:fc          # Block type: 2:0 3:fd          HorizSync 15-68          VertRefresh 49-61          # Max dot clock (video bandwidth) 150 MHz          # DPMS capabilities: Active off:no  Suspend:no  Standby:no            Mode    "1280x720"      # vfreq 60.000Hz, hfreq 45.000kHz                  DotClock        74.250000                  HTimings        1280 1390 1430 1650                  VTimings        720 725 730 750                  Flags   "+HSync" "+VSync"          EndMode          Mode    "1680x1050"     # vfreq 59.883Hz, hfreq 64.674kHz                  DotClock        119.000000                  HTimings        1680 1728 1760 1840                  VTimings        1050 1053 1059 1080                  Flags   "-HSync" "+VSync"          EndMode          # Block type: 2:0 3:fc          # Block type: 2:0 3:fd  EndSection  

kernel.log:

2139 Oct  2 21:45:06 dans679-computer kernel: [    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.8.0-30-generic root=UUID=939b3111-4906-46ae-9ad7-7faa783d490d ro drm_kms_helper.edid_firmware=edid/1600x1050.bin quiet  

I was looking for other bug reports similar in launchpad, but still looking for the correct one. I think this problem affects many things in KMS (Kernel mode switch), not just switching between user sessions, also games in full screen with different resolution and others things.

It is very hard to find the correct way to report this issue, I would like to have some help with some Xorg/Kernel team.

I think this could be fixed at some low level, but could be also fixed with this kind of workaround in some easier way for users: For example adding some script to test whether edid is detected or not, and asking the user if they want to let the script get the edid info and pass it to the kernel command, then ask if it was working fine and if the user wants to keep these settings.

I have found most of this information in The Arch wiki kernel mode setting page

I'm posting it on:

https://askubuntu.com/posts/352978

https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/579292


Solution:2

Edid must begin with

00 FF FF FF FF FF FF 00  

but not to be 128 times FF.

You have no EDID perhaps because of it is erase broken it is no chip with EDID or what is very probable, it is broken some physical contact on EDID interface between monitor or video card. Or even inside your monitor.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »