Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: linux_kernel_15khz: 640x480i via AMD APU  (Read 232 times)

0 Members and 1 Guest are viewing this topic.

fdaniels

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:December 04, 2022, 02:49:07 pm
  • Building the ultimate CRT HTPC
linux_kernel_15khz: 640x480i via AMD APU
« on: November 22, 2022, 08:22:44 pm »
Hey all, I have been struggling to get a 15kHz signal from my AMD APU (AMD A808600B with an AMD Radeon R6 APU). I previously attempted to use CRT Emudriver on Windows but ran into issues get EDID to work due my graphics card being an APU.

I installed Ubuntu 20.04, and updated its kernel to 5.15.79 compiled with linux_kernel_15khz. After updating GRUB, I configured the GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=VGA-1:640x480ieS". The machine boots without error, but the PVM attached to my VGA port via RGB seems to be display 640x480p, since the image is wavy and horizontally duplicated.

Am I doing something dumb, or it my hardware configuration not supported?
« Last Edit: November 24, 2022, 04:06:10 am by fdaniels »

fdaniels

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:December 04, 2022, 02:49:07 pm
  • Building the ultimate CRT HTPC
Re: linux_kernel_15khz: 640x480i via AMD APU
« Reply #1 on: November 22, 2022, 08:43:09 pm »
Here are my modelines for anyone interested.

https://justpaste.it/d33qr

Looks like I have to use DP-3 or something instead of VGA-1? Likely because I am running on an APU?

Code: [Select]
fdaniels@HTPC:~$ ls /sys/class/drm
card0  card0-DP-1  card0-DP-2  card0-DP-3  renderD128  version

I confirmed that this is true, my VGA shows up as DP-3
Code: [Select]
fdaniels@HTPC:~$ for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done
DP-1: connected
DP-2: disconnected
DP-3: connected

When I set my resolution in GRUB the PC boots with an error and my VGA port is no longer visible in Ubuntu Display Settings

Code: [Select]
Nov 22 21:39:40 HTPC kernel: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.79 root=UUID=b7604868-08b8-403d-85a6-41fb73826c45 ro quiet splash video=DP-3:640x480ieS vt.handoff=7
Nov 22 21:39:42 HTPC kernel: [drm] forcing DP-3 connector on
Nov 22 21:39:42 HTPC kernel: [drm:dc_link_detect_helper [amdgpu]] *ERROR* No EDID read.

If I try to force an EDID (that was generated using switchres, I tried both generic_15 and arcade_15, not sure what the difference is but neither worked).

Code: [Select]
Nov 22 21:28:22 HTPC kernel: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.15.79 root=UUID=b7604868-08b8-403d-85a6-41fb73826c45 ro quiet splash video=DP-3:e drm.edid_firmware=DP-3:edid/arcade_15.bin vt.handoff=7
Nov 22 21:28:24 HTPC kernel: [drm] forcing DP-3 connector on
Nov 22 21:28:24 HTPC kernel: [drm] Got external EDID base block and 0 extensions from "edid/arcade_15.bin" for connector "DP-3"

I don't see any display related errors, but when I boot into Linux only my 4k monitor is visible in Ubuntu Display Settings, and there is no signal to my PVM.

If I remove the kernel video setting my VGA port is visible but appears to be outputting a 480p signal.




« Last Edit: November 23, 2022, 12:43:58 am by fdaniels »

fdaniels

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:December 04, 2022, 02:49:07 pm
  • Building the ultimate CRT HTPC
Re: linux_kernel_15khz: 640x480i via AMD APU
« Reply #2 on: November 23, 2022, 01:54:12 am »
Okay, I've made progress. I disabled the Wayland server in favor of Xorg.

I then used xrandr to set 480i on my PVM (Sony Trinitron PVM-1342Q) using these commands.
Code: [Select]
xrandr --newmode "720x480_60 15,7KHz 60,0Hz" 15.100 720 776 840 960 480 488 494 524 interlace -hsync -vsync
xrandr --addmode DisplayPort-2 "720x480_60 15,7KHz 60,0Hz"
xrandr --output DisplayPort-2 --mode "720x480_60 15,7KHz 60,0Hz"

It works buuuuut, the image is super skinny (only about 30% of middle width of the screen is displayed, the height is 100%). So likely I just need to tweak some settings to get a fullscreen image.

Using something like the settings below widens the image to fill about half of the screen.
Code: [Select]
fdaniels@HTPC:~$ xrandr --newmode "640x480@60i" 11.32 640 672 712 744 480 491 494 505 interlace -hsync -vsync
fdaniels@HTPC:~$ xrandr --addmode DisplayPort-2 "640x480@60i"
fdaniels@HTPC:~$ xrandr --output DisplayPort-2 --mode "640x480@60i"


Any help will be appreciated  :lol
« Last Edit: November 23, 2022, 02:31:00 am by fdaniels »

fdaniels

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:December 04, 2022, 02:49:07 pm
  • Building the ultimate CRT HTPC
Re: linux_kernel_15khz: 640x480i via AMD APU
« Reply #3 on: November 23, 2022, 12:35:51 pm »
When I set the resolution to 240p the entire screen fills out with no vertical bars.

Code: [Select]
fdaniels@HTPC:~$ xrandr --newmode "320x240@60" 6.08 320 352 368 400 240 245 248 253
fdaniels@HTPC:~$ xrandr --addmode DisplayPort-2 "320x240@60"
fdaniels@HTPC:~$ xrandr --output DisplayPort-2 --mode "320x240@60"

The desktop is full screen
https://ibb.co/fCXhHNw


It looks like videos are being truncated, on the top left quartile is being rendered. Could be that YouTube has a minimum resolution of 480p or something.
https://ibb.co/ZdMS44s

fdaniels

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:December 04, 2022, 02:49:07 pm
  • Building the ultimate CRT HTPC
Re: linux_kernel_15khz: 640x480i via AMD APU
« Reply #4 on: November 23, 2022, 05:11:03 pm »
While 240p works great, it is not suitable for my use-case. I am still stumped on getting a fully working Modeline for 480i. Below is an example of what 640x480i looks like.
Code: [Select]
fdaniels@HTPC:~/code/switchres-master$ xrandr --newmode "v06 640x480" 11.12 640 672 712 744 480 491 494 505 interlace
fdaniels@HTPC:~/code/switchres-master$ xrandr --addmode DisplayPort-2 "v06 640x480"
fdaniels@HTPC:~/code/switchres-master$ xrandr --output DisplayPort-2 --mode "v06 640x480"

https://ibb.co/nLr9R7f

fdaniels

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:December 04, 2022, 02:49:07 pm
  • Building the ultimate CRT HTPC
Re: linux_kernel_15khz: 640x480i via AMD APU
« Reply #5 on: November 24, 2022, 12:03:50 am »
Okay, I am giving up for now. I tried getting a Wifi/Bluetooth USB combo dongle to work on Ubuntu and it seems like drivers are going to be an issue here too. I purchased a PVM CRT that supports 480p output and that will suit me just fine. Came close, but I just could not figure out how to get 480i to work on this APU.  :'(

Going to see if I can at least get 480p to work on my new PVM. Wish me luck.
« Last Edit: November 24, 2022, 04:07:05 am by fdaniels »

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 755
  • Last login:Yesterday at 03:27:48 pm
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: linux_kernel_15khz: 640x480i via AMD APU
« Reply #6 on: December 04, 2022, 02:31:56 pm »
Lycky you, your VGA is a fake one, and is in fact a bridged DP. !The only solution in your case is to use an EDID file and force the onnector to enabled.

I haven't tried that with Ubuntu, so I don't know if you have to push the EDID in the initramfs or not

fdaniels

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 7
  • Last login:December 04, 2022, 02:49:07 pm
  • Building the ultimate CRT HTPC
Re: linux_kernel_15khz: 640x480i via AMD APU
« Reply #7 on: December 04, 2022, 02:49:07 pm »
That makes a lot of sense, cause xrandr calls my VGA interface (Displayport-2).  :lol

It is still strange that I was able to get working 240p after compiling support into the compiler. That said I was able to get a really nice example of a PVM-14L5 which natively supports 480p and 720p in addition to the low dot-clock resolutions. Watching some old movies at 480p was super otherworldly, no flicker and almost felt like I was watching it on a modern display. I WAS surprised that the actual screen was only 13 inches in diameter, which is half an inch smaller than my PVM-1342Q - which is a 13 inch PVM.

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 755
  • Last login:Yesterday at 03:27:48 pm
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: linux_kernel_15khz: 640x480i via AMD APU
« Reply #8 on: December 05, 2022, 04:56:33 pm »
the DP interface is usually loaded with some generic 31kHz resolutions when a monitor is detected but no EDID was returned. When you use the 15kHz kernel patch, specifying a mode with the video= like you did just adds the resolution to the pool associated to the connector, and is not the default one. That's why you must use an EDID. Switchres can generate such an EDID, it's much used in GroovyArcade