[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: eMac video modes



I'm resending this message in pure plain text (rather than multipart,
which I didn't realise my mailer was using), because it was rejected
by the list the first time I think.

On Wed, 1 Apr 2020 at 17:45, John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
>
>
> > I wondered if it is possible to directly support eMac machines by
> > supporting this in the installer and taking the necessary steps during
> > installation? Is this something that you would be happy to have upstream?
>
> Depending on what it's involved to achieve that, absolutely yes.


That's great

>
> > I do not know how to go about adding this but I am happy to do testing
> > (including committing to release testing) or try to add the support myself
> > if you could provide some pointers?
>
> Just let me know what needs to be patched where and how. Then I can figure
> out how we can upstream this.

The process I followed is
1. Install from a net install image (last time I tried a number and
could only get [1] to work because the others wanted to use grub and
it was broken). Then boot the machine with the "nomodeset" parameter,
edit source.list to include the sid repository, install the debian
ports keyring (from [2]), update the kernel, install ca-certificates,
ssh server, firmwares and X. This step is pretty much business as
usual.
2. I used switchresx on mac OS X to export all the video modes of the
eMac monitor, rewrote them into modelines, and then used [3] to
generate an EDID bin file (1280x960.bin). It only contains the video
mode for the highest resolution, 1280x960@72Hz. The modeline is
"1280x960" 122.24 1280 1328 1424 1696 960 961 964 1002 +hsync +vsync.
3. Copy the EDID bin file to /lib/firmware/edid/1280x960.bin
4. Create /usr/share/initramfs-tools/hooks/edid with contents as below
(looking at it now, I guess this could actually be done with a one
line "install -D" but anyway...)

#!/bin/sh
mkdir -p ${DESTDIR}/lib/firmware/edid
cp -pnL /lib/firmware/edid/1280x960.bin
${DESTDIR}/lib/firmware/edid/1280x960.bin
chmod 644 ${DESTDIR}/lib/firmware/edid/1280x960.bin

5. Run "update-initramfs -u" to create the new initramfs
6. Edit /etc/yaboot.conf and add a line to add a kernel argument for
this: append="drm.edid_firmware=edid/1280x960.bin"
7. Run "ybin -v"

I also added the other modelines to xsessionrc, as follows. I am not
sure how to create an EDID bin with all the modes in it, but that
would be a better solution.
#!/bin/sh
xrandr --newmode "640x480" 62.27 640 656 720 864 480 481 484 522 +hsync +vsync
xrandr --newmode "800x600" 77.84 800 816 896 1080 600 601 604 642 +hsync +vsync
xrandr --newmode "1024x768" 99.19 1024 1072 1168 1376 768 769 772 810
+hsync +vsync
xrandr --newmode "1152x864" 112.44 1152 1216 1344 1560 864 865 868 906
+hsync +vsync
xrandr --addmode VGA-0 640x480
xrandr --addmode VGA-0 800x600
xrandr --addmode VGA-0 1024x768
xrandr --addmode VGA-0 1152x864

I think that you would need to detect that the installer is running on
an eMac and take the steps as above, but I guess that adding the
kernel parameter will be different under grub.

The only other thing to note is that while this has been tested on all
the ATI graphics models of eMac, the very first models had NVIDIA
GeForce 2 MX graphics and have not been tested. I think they have a
modesetting driver, so I guess it may work, but I can't be sure.

Also, I have created a really rough gtk tool for configuring the
monitor size/position etc. They don't seem to follow any kind of
DDC/CI protocol like other monitors, unfortunately [4].

Let me know if I can provide any further details, it would be really
great to get these machines fully supported!

Best,
Ed

[1] https://cdimage.debian.org/cdimage/ports/10.0/powerpc/iso-cd/debian-10.0-powerpc-NETINST-1.iso
[2] http://archive.ubuntu.com/ubuntu/pool/universe/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2018.01.05_all.deb
[3] https://github.com/akatrevorjay/edid-generator
[4] https://github.com/static-void/emac_monitor_tool


Reply to: