-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu 16.04.1 LTS : 3840x2160.bin contains wrong data #5
Comments
I'm having similar results with the modeline I'm trying to convert: $ ./modeline2edid - <<< 'Modeline "1920x1080x120.00" 297.000000 1920 2028 2060 2200 1080 1084 1088 1125 +HSync -Vsync'
Searching for runaway unicorns in '/dev/stdin'
-- Found naughty unicorn: Modeline "1920x1080x120.00" 297.000000 1920 2028 2060 2200 1080 1084 1088 1125 +HSync -Vsync
Wrote 1920x1080x120.00.S
$ make
cc -c -DCRC="0x00" -o 1920x1080x120.00.o 1920x1080x120.00.S
edid.S: Assembler messages:
edid.S:270: Warning: repeat < 0; .fill ignored
objcopy -Obinary 1920x1080x120.00.o 1920x1080x120.00.bin.nocrc
cat 1920x1080x120.00.bin.nocrc | edid-decode \
| sed -ne 's/^[ ]*Checksum: 0x\w\+ (should be \(0x\w\+\))$/\1/p' >1920x1080x120.00.crc
cc -c -DCRC="$(cat 1920x1080x120.00.crc)" -o 1920x1080x120.00.p 1920x1080x120.00.S
edid.S: Assembler messages:
edid.S:270: Warning: repeat < 0; .fill ignored
objcopy -Obinary 1920x1080x120.00.p 1920x1080x120.00.bin
cc -c -DCRC="0x00" -o 1600x1200.o 1600x1200.S
objcopy -Obinary 1600x1200.o 1600x1200.bin.nocrc
cat 1600x1200.bin.nocrc | edid-decode \
| sed -ne 's/^[ ]*Checksum: 0x\w\+ (should be \(0x\w\+\))$/\1/p' >1600x1200.crc
cc -c -DCRC="$(cat 1600x1200.crc)" -o 1600x1200.p 1600x1200.S
objcopy -Oihex 1600x1200.p 1600x1200.bin.ihex
dos2unix 1600x1200.bin.ihex 2>/dev/null
make: *** [Makefile:33: 1600x1200.bin.ihex] Error 127
rm 1920x1080x120.00.bin.nocrc 1600x1200.bin.nocrc 1920x1080x120.00.crc 1600x1200.crc 1600x1200.p 1920x1080x120.00.o 1600x1200.o 1920x1080x120.00.p
$ parse-edid < 1920x1080x120.00.bin
You seem to have too many extension blocks. Will not continue to parse
Something strange happened. Please contact the author,
Matthew Kern at <[email protected]> |
What's in the generated template file? ie, |
I was using Ubuntu 16.04.1 when I wrote this, so I'm curious ! |
This is what's curious to me:
|
@MPolymath Did you mean to have a newline in there? ie ```
|
$ cat 1920x1080x120.00.S
/* 1920x1080x120.00: Modeline "1920x1080x120.00" 297.000000 1920 2028 2060 2200 1080 1084 1088 1125 +HSync -Vsync */
#define HSYNC_POL 1
#define VSYNC_POL 1
#define YPULSE (63+4)
#define XPULSE 32
#define YPIX 1080
#define XPIX 1920
#define VFREQ 60
#define DPI 96
#define CLOCK 297000
#define VERSION 1
#define XOFFSET 108
#define REVISION 3
#define YOFFSET (63+4)
#define YBLANK 45
#define XY_RATIO XY_RATIO_16_9
#define XBLANK 280
#define TIMING_NAME "1920x1080x120.00"
#include "edid.S" |
@vith Care to try the latest commit I made? |
It's not working because it's not finished building. I'm curious how you even have Here's an example from mine:
|
Ah I see, |
tried with 5d79400: ~/code/edid-generator master
❯ ./modeline2edid - <<< 'Modeline "1920x1080x120.00" 297.000000 1920 2028 2060 2200 1080 1084 1088 1125 +HSync -Vsync'
Searching for modelines in '/dev/stdin'
-- Found modeline: Modeline "1920x1080x120.00" 297.000000 1920 2028 2060 2200 1080 1084 1088 1125 +HSync -Vsync
Computed ratio: 16:9Wrote 1920x1080x120.00.S
~/code/edid-generator master*
❯ make
cc -c -DCRC="0x00" -o 1920x1080x120.00.o 1920x1080x120.00.S
edid.S: Assembler messages:
edid.S:270: Warning: repeat < 0; .fill ignored
objcopy -Obinary 1920x1080x120.00.o 1920x1080x120.00.bin.nocrc
cat 1920x1080x120.00.bin.nocrc | edid-decode \
| sed -ne 's/^[ ]*Checksum: 0x\w\+ (should be \(0x\w\+\))$/\1/p' >1920x1080x120.00.crc
cc -c -DCRC="$(cat 1920x1080x120.00.crc)" -o 1920x1080x120.00.p 1920x1080x120.00.S
edid.S: Assembler messages:
edid.S:270: Warning: repeat < 0; .fill ignored
objcopy -Obinary 1920x1080x120.00.p 1920x1080x120.00.bin
cc -c -DCRC="0x00" -o 1600x1200.o 1600x1200.S
objcopy -Obinary 1600x1200.o 1600x1200.bin.nocrc
cat 1600x1200.bin.nocrc | edid-decode \
| sed -ne 's/^[ ]*Checksum: 0x\w\+ (should be \(0x\w\+\))$/\1/p' >1600x1200.crc
cc -c -DCRC="$(cat 1600x1200.crc)" -o 1600x1200.p 1600x1200.S
objcopy -Oihex 1600x1200.p 1600x1200.bin.ihex
dos2unix 1600x1200.bin.ihex 2>/dev/null
make: *** [Makefile:33: 1600x1200.bin.ihex] Error 127
rm 1920x1080x120.00.bin.nocrc 1600x1200.bin.nocrc 1920x1080x120.00.crc 1600x1200.crc 1600x1200.p 1920x1080x120.00.o 1600x1200.o 1920x1080x120.00.p
~/code/edid-generator master*
❯ parse-edid < 1920x1080x120.00.bin
You seem to have too many extension blocks. Will not continue to parse
Something strange happened. Please contact the author,
Matthew Kern at <[email protected]>
~/code/edid-generator master*
❯ cat 1920x1080x120.00.S
/* 1920x1080x120.00: Modeline "1920x1080x120.00" 297.000000 1920 2028 2060 2200 1080 1084 1088 1125 +HSync -Vsync */
#define HSYNC_POL 1
#define VSYNC_POL 1
#define YPULSE (63+4)
#define XPULSE 32
#define YPIX 1080
#define XPIX 1920
#define VFREQ 60
#define DPI 96
#define CLOCK 297000
#define VERSION 1
#define REVISION 3
#define XOFFSET 108
#define YOFFSET (63+4)
#define XY_RATIO XY_RATIO_16_9
#define YBLANK 45
#define XBLANK 280
#define TIMING_NAME "1920x1080x120.00"
#include "edid.S" |
@vith install dos2unix :) |
@vith ret code 127 is normally a missing command. In this case, it's dos2unix |
There's another error past that however, where it's actually mistempating your modeline (open up the .c file generated, and you'll see what's wrong pretty quickly ;) |
So, you want a 120hz refresh rate, but it's generating it with 60. Interesting. |
Ah, I cheated here with vfreq_hz. You can manually append local -i hsync_polarity=0 vsync_polarity=0 dpi=96 vfreq_hz=60
local edid_version="1.3" ratio="compute"
local arg
for arg in "$@"; do
case "${(L)arg}" in
[-+]hsync) [[ "${arg:1:1}" == "-" ]] || hsync_polarity=1 ;;
[-+]vsync) [[ "${arg:1:1}" == "-" ]] || vsync_polarity=1 ;;
ratio=*|xy_ratio=*) ratio="${arg#*=}" ;;
dpi=*) dpi="${arg#*=}" ;;
edid_version=*) edid_version="${arg#*=}" ;;
vfreq=*|vfreq_hz=*) vfreq_hz="${arg#*=}" ;;
*) echo "Ignoring unknown modeline option passed: '$arg'" >&2 ;;
esac
done |
Bahaha, it's the name of the mode! |
My bad about the Unfortunately I'm running Linux under virtualization now so I can't easily test a generated EDID anymore |
Haha, yeah, that'll do it (also no prob, thanks for mentioning that and the PR to make it easier) |
I started rewriting this as a python script to avoid the gotchas as well, I hope to have something out this weekend. |
Sounds good. There's definitely a need for an easy to use tool to do this now that wayland is more common. Honestly seems like something that should be integrated into desktop environments' settings GUIs and not require editing kernel parameters manually, but what do I know. |
lol, I agree with you there, it's crazy that in 2018 we're still dealing with bad EDID data from devices! |
Remove consecutive spaces from modeline you are giving to modeline2edid and try again. should instead be "1920x1080x120.00" 297.000000 1920 |
I got an invalid edid file generated using this command It was fixed by changing the name of the mode to not have the refresh rate. |
Just wanted to share that the problem seems to be on the modeline name. as having similar issues with "1600x900_60.00", changing it to "1600x900" made it work fine. |
So with that change we can say that this is a working method now? |
Not working for 120Hz. I limited name to 12 chars and the file is too small
|
you got it working now?In my case, I got the script to generate bin successfully but it doesn't change refresh rate to 75hz |
I'm still stuck with it creating the wrong sized bins |
Also, see #31 - seems to include the ability to generate 4k EDIDs. It hasn't been merged, but you can use his fork:
|
The qemu I built qemu from source, you may also be able to install it via your package manager
You may need to install a few dependencies ( Then I tested it:
Haven't tested it to see if it actually has the desired effect on the display, but it looks about right in |
@parkerlreed you might want to give |
#Operating system: Ubuntu 16.04.1 LTS
Problem:
When using the parse-edid program (sudo apt-get install read-edid):
parse-edid < /etc/X11/3840x2160.bin
The data outputted does not match the data that should be outputted:
I have tried creating a edid.bin as instructed in the readme but that also gives me the wrong value:
./modeline2edid - <<< 'Modeline "3840x2160_60.00" 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync'
make
parse-edid < 3840x2160_60.00.bin
Would you have any idea on why this is happening?
The text was updated successfully, but these errors were encountered: