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 Try the site in https mode Site News

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

  

Author Topic: Interlaced modes freeze Radeon cards under Linux  (Read 10210 times)

0 Members and 1 Guest are viewing this topic.

tym

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:October 29, 2019, 02:50:29 pm
  • I want to build my own arcade controls!
Interlaced modes freeze Radeon cards under Linux
« on: June 03, 2019, 03:18:49 am »
I'm using Ubuntu 19.04 paired with a Radeon HD 4650. The problem I'm having is that any time I run interlaced content, the PC will eventually (from between instantly to a couple of minutes) completely freeze. The only way to fix it is killing gnome-shell  in a TTY terminal.

It happens regardless of whether I use VGA or S-Video, and occurs on all three of the Radeon GPUs I've tried. it also occurs across different PCs. Intel's integrated graphics don't have this issue.

I actually don't think this is specific to GroovyMAME because it happens with RetroArch running SNES and MAME games too.

Any ideas what might be the cause of this? Thanks :D

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #1 on: June 03, 2019, 02:12:00 pm »

Hi Tym,

When you experience such a freeze, use dmesg to check any kernel reported issue. You can also check the interrupt by issuing cat /proc/interrupts. If possible dedicate one interrupt to your card.

If you are using the radeon driver, you can enable extra debugging information when module is loaded.

I am curious about your mention of 'interlaced content'. Does it means that progressive content does not generate the issue?

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #2 on: October 07, 2019, 08:34:36 am »

Hi Tym,

The issue has been identified and it is indeed related to the interlaced resolution. Using progressive mode, you will not encounter freezes. This is a workaround until proper solution is found.

Cheers!

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:Yesterday at 03:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #3 on: October 07, 2019, 11:56:54 am »
The issue has been identified and it is indeed related to the interlaced resolution.
Same as the ffmpeg issue ?

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #4 on: October 07, 2019, 12:23:05 pm »
The issue has been identified and it is indeed related to the interlaced resolution.
Same as the ffmpeg issue ?

Yes, unfortunately.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #5 on: October 17, 2019, 10:35:02 am »
Some news, good or bad, only testing will revealed it.

The xf86-video-ati driver got a new release (19.1) with several crash and hang fixes. Not knowing if the interlaced issue lies in xf86 or drm, tests must still be performed. Stay tuned...

Code: [Select]
dri2: reply to client for WaitMSC request in any case

otherwise client would wait for reply forever and desktop appears hang.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #6 on: October 17, 2019, 01:08:57 pm »

The new library does not provide a fix for the freezes due to interlaced resolution in X. Few hours of hope but not final answer...

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:September 12, 2022, 09:50:44 pm
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #7 on: October 18, 2019, 02:25:15 pm »

Hi Tym,

The issue has been identified and it is indeed related to the interlaced resolution. Using progressive mode, you will not encounter freezes. This is a workaround until proper solution is found.

Cheers!

Do you know of a progressive resolution that works well with the Attract Mode frontend? I tried this one that you mentioned in another thread...

modeline "640x240" 13.22 640 672 736 832 240 243 246 265 -hsync -vsync

... but it made the Attract Mode frontend's raster all squeezed into the center of the screen, and made the text practically unreadable. I'm not sure why it did that with the Attract Mode frontend, because when I exited out of it and went into LXDE desktop frontend, its raster wasn't squeezed like that, even though it was definitely using the 640x240p mode.

I'd like to find a progressive 15 KHz resolution that works well with the frontends because interlaced modes look bad in general on a 15 KHz CRT arcade monitor. The games on the other hand look perfect because they are using their original progressive resolutions.

I have an original Capcom Street Fighter II: The World Warrior boardset, and in GroovyArcade, the SFII: TWW ROM's raster looks identical to the raster from the original hardware. I have the monitor adjusted so that the CPS1 games are centered and fill the screen perfectly, so is there any way to find out what modeline would exactly match the resolution that the CPS1 ROMs use when they are running? I'm not sure that even that would work though, considering the results I got with 640x240p which differed drastically depending on which frontend I was using.

Zebra

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 619
  • Last login:August 19, 2021, 01:12:24 pm
  • I want to build my own arcade controls!
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #8 on: October 18, 2019, 08:51:13 pm »
If you need 480 lines 15khz and 480i is not an option then why not try 480p / 30hz. It should be comparable to 480i / 60hz for the purpose of viewing a front end.

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:September 12, 2022, 09:50:44 pm
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #9 on: October 18, 2019, 10:02:36 pm »
If you need 480 lines 15khz and 480i is not an option then why not try 480p / 30hz. It should be comparable to 480i / 60hz for the purpose of viewing a front end.

Something like this?

Modeline "648x480@30" 11.45 648 680 720 752 480 491 494 505 -HSync -VSync

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #10 on: October 19, 2019, 03:30:49 am »
If you need 480 lines 15khz and 480i is not an option then why not try 480p / 30hz. It should be comparable to 480i / 60hz for the purpose of viewing a front end.

Something like this?

Modeline "648x480@30" 11.45 648 680 720 752 480 491 494 505 -HSync -VSync
Going as low as 30Hz for the vertical refresh rate would require a chassis with this special feature implemented. Some Trinitron tv can go as low as 48Hz but this is already uncommon.
A solution must be found to make the interlaced mode working fine.

The interlaced issue is not so easy to trace due to the complexity of the processing chain involved here (from the software and libraries to the kernel internal functions). Even if the fix might be 2 lines of code at the end.

I dunno if this is limited to ATI/Radeon or impacting Nvidia as well. I need to dig deeper and focus a bit more into this issue.

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:September 12, 2022, 09:50:44 pm
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #11 on: October 19, 2019, 09:39:08 am »
I'm currently using GroovyArcade-Arch2019.03.10-x86_64.iso and the next newest one in the Google Drive folder is GroovyArcade-Arch2018.03.04-x86_64.iso. Does that one have the interlaced mode freezing issue or any other significant issues? If not, I'll install that one instead.

Edit: I just installed GroovyArcade-Arch2018.03.04-x86_64 and that froze too in Attract Mode when I went into its settings (by pressing the Tab key) to generate a ROM list. This is the screen it's frozen on:



The 2019.03.10 version also froze in those settings (in various spots). When I used the 640x240p resolution with 2019.03.10, even though the raster was all squeezed into the middle, I was able to navigate the settings and successfully generate a ROM list, and then when I switched back to the default interlaced resolution, I could select ROMs from the list and play them without any freezing. As long as I stayed out the Attract Mode frontend's settings I didn't have any problems.
« Last Edit: October 19, 2019, 10:56:43 am by MaximRecoil »

tym

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:October 29, 2019, 02:50:29 pm
  • I want to build my own arcade controls!
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #12 on: October 27, 2019, 12:24:57 am »

Hi Tym,

When you experience such a freeze, use dmesg to check any kernel reported issue. You can also check the interrupt by issuing cat /proc/interrupts. If possible dedicate one interrupt to your card.

If you are using the radeon driver, you can enable extra debugging information when module is loaded.

I am curious about your mention of 'interlaced content'. Does it means that progressive content does not generate the issue?

Hi Doozer,

Thank you very much for looking into this. I apologize for not coming back to this topic sooner. That's correct; anything that Switchres puts into an "i" mode will freeze. But anything progressive like 240p is fine.

I'm glad to hear the issue has been identified :) I can still run those commands when it freezes and report back if you think they'd be useful. I haven't upgraded to Ubuntu 19.10 on this machine yet. I wonder if it will help.

tym

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:October 29, 2019, 02:50:29 pm
  • I want to build my own arcade controls!
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #13 on: October 28, 2019, 04:33:43 pm »
I ran 'strace' on another emulator (RetroArch running Snes9x; the game is R.P.M. Racing which runs interlaced all the time) and this is what I got. Does this look like the same error from GroovyMAME? I had to trim it to get it in the forum's character limit, but the last line is where it froze.

I don't see anything weird in 'dmesg' and I'm not sure how to read 'cat /proc/interrupts' or enable the debugging information in the driver. Sorry :(


EDIT: This doesn’t happen with an Nvidia card. I’ve had an interlaced game going in RetroArch for a while now and it hasn’t frozen. This is using the Nouveau drivers on Ubuntu 19.10 (and a different PC, but I think it’s a card/driver issue; not specific to one system).

EDIT 2: Well, Nvidia doesn't seem to like interlaced much either, at least in RetroArch. It doesn't crash per se but sometimes the video glitches or has the wrong size. Given that, I'm now suspicious that it goes deeper than the driver level.

Code: [Select]
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\3\0\2\0\2\0@\4\16\0\2\0\2\0@\4", iov_len=16}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 16
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\333\"\3\0\0\0\330\2\0\0\1\0\0\1\377\377\377\377\0\0\0\0\0\0\2\0\1\0@\4"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 76
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+\0\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\335\"\0\0\0\0\2\0@\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1171, tv_nsec=558822531}) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+\0\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\336\"\0\0\0\0\2\0@\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base=",\0\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\337\"\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 40
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\2\0@\4", iov_len=8}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 8
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\340\"\0\0\0\0\314\4\0\0\0\0\0\0\214\0\245\0\214\0\245\0\20\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=7, events=POLLIN}], 1, 0)     = 0 (Timeout)
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1171, tv_nsec=570393765}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1171, tv_nsec=570475899}) = 0
ioctl(6, DRM_IOCTL_RADEON_GEM_BUSY, 0x7ffc1200d0b0) = 0
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="#\224\340\"\0\0\0\0\2\0\0\0\10\0@\4\2\0@\4K\4\0\0\22\0@\4\23\0@\4"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 72
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
getpid()                                = 3596
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\224\2\n\0\2\0@\4\10\0@\4\0\0\0\0=D\1\377\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=40}], 1) = 40
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="#\224\341\"\2\0\0\0\1\0\1\0\10\0@\4\2\0@\4\10\0@\4\270\255\324E\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 40
getpid()                                = 3596
ioctl(6, DRM_IOCTL_RADEON_GEM_WAIT_IDLE, 0x7ffc1200d980) = 0
ioctl(6, DRM_IOCTL_RADEON_GEM_WAIT_IDLE, 0x7ffc1200d9b0) = 0
ioctl(6, DRM_IOCTL_GEM_CLOSE, 0x7ffc1200d968) = 0
ioctl(6, DRM_IOCTL_RADEON_GEM_CREATE, 0x7ffc1200d7f0) = 0
futex(0x5603ffaf0dc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5603ffaf0d70, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5603ff4127c8, FUTEX_WAIT_BITSET, 2, NULL, FUTEX_BITSET_MATCH_ANY) = 0
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\224\1\22\0\2\0@\4\20\0@\4M\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=72}], 1) = 72
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\3\0\2\0\2\0@\4\16\0\2\0\2\0@\4", iov_len=16}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 16
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\343\"\3\0\0\0\330\2\0\0\1\0\0\1\377\377\377\377\0\0\0\0\0\0\2\0\1\0@\4"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 76
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+\0\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\345\"\0\0\0\0\2\0@\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1171, tv_nsec=573832672}) = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+\0\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\346\"\0\0\0\0\2\0@\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base=",\0\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\347\"\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 40
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\0\2\0\2\0@\4", iov_len=8}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 8
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\350\"\0\0\0\0\314\4\0\0\0\0\0\0\214\0\245\0\214\0\245\0\20\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=7, events=POLLIN}], 1, 0)     = 0 (Timeout)
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
getpid()                                = 3596
getpid()                                = 3596
getpid()                                = 3596
write(9, "W", 1)                        = 1
futex(0x5603ff7ed070, FUTEX_UNLOCK_PI_PRIVATE) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1171, tv_nsec=585330082}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=1171, tv_nsec=585416128}) = 0
ioctl(6, DRM_IOCTL_RADEON_GEM_BUSY, 0x7ffc1200d0b0) = 0
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="#\224\350\"\0\0\0\0\2\0\0\0\10\0@\4\2\0@\4L\4\0\0\16\0@\4\17\0@\4"..., iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 72
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
getpid()                                = 3596
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\224\2\n\0\2\0@\4\10\0@\4\0\0\0\0>D\1\377\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=40}], 1) = 40
poll([{fd=3, events=POLLIN}], 1, -1
« Last Edit: October 29, 2019, 01:19:17 am by tym »

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #14 on: October 29, 2019, 06:54:51 am »
I ran 'strace' on another emulator (RetroArch running Snes9x; the game is R.P.M. Racing which runs interlaced all the time) and this is what I got. Does this look like the same error from GroovyMAME? I had to trim it to get it in the forum's character limit, but the last line is where it froze.

Hi Tym,

Thank you for the trace. Unfortunately, you are experiencing the same issue linked to the ATI driver. I have tried several experiments to get through the memory management calls (GEM) but I am still not having achieved any progress. The layer where the issue is lying is still to be clarified. I am now looking at the internal ATI registers side. I have noticed that after a first freeze, killing X and restarting it with the same process is making it running flawlessly in the interlaced resolution.

Thank you for having reported that NVIDIA cards are not impacted by freezes (interlaced resolution). This is reducing a bit the research area.
FYI, interlaced mode is discussed in several kernel/X threads and is known to be not 100% functional with ATI cards. Latest xf86 driver already addressed some deadlock situations.

tym

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 5
  • Last login:October 29, 2019, 02:50:29 pm
  • I want to build my own arcade controls!
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #15 on: October 29, 2019, 02:43:43 pm »
You're welcome!  :) I appreciate you looking into this.

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1758
  • Last login:April 21, 2024, 08:06:32 am
  • Is running at 15kHz
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #16 on: October 30, 2019, 06:47:13 pm »
Yes, much appreciated, Doozer. I've just dippped my toe into Linux (Mint) for the first time, and first thing i got was major hangs, and even when on desktop just a ton of weird graphical glitches. Even just plugging in a new monitor would cause crashes or hangs or one or both displays to end up blank. They would often come back in ten seconds or so, but still annoying and strange.

Come to think of it, i did try uninstalling the Radeon drivers, but this didn't fix the problem. No idea why.
« Last Edit: October 30, 2019, 07:40:15 pm by buttersoft »

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #17 on: October 31, 2019, 01:19:04 am »
Yes, much appreciated, Doozer. I've just dippped my toe into Linux (Mint) for the first time, and first thing i got was major hangs, and even when on desktop just a ton of weird graphical glitches. Even just plugging in a new monitor would cause crashes or hangs or one or both displays to end up blank. They would often come back in ten seconds or so, but still annoying and strange.

Come to think of it, i did try uninstalling the Radeon drivers, but this didn't fix the problem. No idea why.
Hi Buttersoft,

What kind of motherboard and GPU are you using? Have you already given GroovyArcade a try?

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1758
  • Last login:April 21, 2024, 08:06:32 am
  • Is running at 15kHz
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #18 on: October 31, 2019, 07:01:10 pm »
Probably won't be using GroovyArcade on this machine, but it's an older HP DV6 laptop with a core2duo and a Radeon 4650, IIRC.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #19 on: November 01, 2019, 02:39:53 am »
I have experienced something similar in the past. It was related to bad graphic ram. Corruption was visible on screen after a while when card was warm enough. Symptoms were visual corruptions, freezes, stutters and OS crash.

Cause can be dry solder joint, ram issue or wrong ram timing (bios corruption or manually modified).

Have you tried the grfx card on another mobo?

buttersoft

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1758
  • Last login:April 21, 2024, 08:06:32 am
  • Is running at 15kHz
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #20 on: November 02, 2019, 08:20:13 pm »
Well, pulling laptops apart is a PITA, so no, i haven't pulled the GPU out :)

The card works perfectly in windows, however, with or without a driver installed. Though of course things are a bit gimped without the driver, because it's windows.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #21 on: November 06, 2019, 06:51:45 am »
Well, pulling laptops apart is a PITA, so no, i haven't pulled the GPU out :)

I can understand this ;-)

With respect to the graphical issue, I am still thinking it might be thermal (heat) related. Unfortunately, their is no temp sensor to monitor on the Ati Mobility Radeon 4650 HD.

I found someone having similar issues with DV6/ATI which have been solved by performing a motherboard bios upgrade. It might be possible that something got corrupted and even re-installing the same bios version might solve the issue. Resetting to bios default might also be a path to explore.

Have you already checked the kernel log (dmesg) after the screen goes blank and come back?


screamingtrees

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 22, 2021, 04:13:40 pm
  • I want to build my own arcade controls!
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #22 on: June 28, 2020, 03:51:57 pm »
Also having this problem on Ubuntu 18.04.4 with an HD 7870 (ATI Radeon).

"I have noticed that after a first freeze, killing X and restarting it with the same process is making it running flawlessly in the interlaced resolution."

What command do I use to do this? I've trying SSHing in and running killall -1 gnome-shell, but that throws me back into some 31khz+ mode. That could be due to incorrectly setting up my kernel for 15khz though. All I've done on this linux install is put Ansa86's edid_arcade15.bin in /firmware/edid and adding some commands to my grub config, but my machine still boots up in 31khz. Is that correct? Do I need to do more to get it booting in 15khz? I'm changing res to 480i using some xrandr commands, but I can't get that script to run at boot.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 498
  • Last login:June 12, 2023, 09:19:49 am
  • Z80 ERROR
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #23 on: June 29, 2020, 01:47:30 am »
Hi screamingtrees,

I see that you are using the edid method to enable 15kHz. If you are not already aware, starting from kernel 4.15 the drm_kms_helper.edid_firmware parameter has been deprecated in favor of the drm.edid_firmware parameter. The edid file goes at the the same location but the kernel command line must be changed to drm.edid_firmware=VGA-1:edid/<edid_filename>.
Thanks to oomek, the main issue with video playback freezes has been solved. It was linked to an acceleration layer inside AttractMode. With this fix, interlaced mode is not freezing anymore under Linux 5.7 kernel. With the last year drm changes made inside the kernel, the stability has also improved and I am not experiencing the issue anymore.
For the issue you are experiencing, if the 15kHz mode is enable by using edid method, you can remove the xorg.xonf file and X will automatically pickup the boot video mode. This should alway revert back to 15kHz when killing X.

screamingtrees

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 6
  • Last login:March 22, 2021, 04:13:40 pm
  • I want to build my own arcade controls!
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #24 on: June 29, 2020, 12:02:04 pm »
Thanks for the reply! So I should update to kernel 5.7. I was indeed using drm.edid_firmware but with DVI-0 instead of VGA-1 (my port is DVI-I connected to a DVI-VGA cable). So if that looks okay I wonder if either I'm putting it in the wrong place ("GRUB_CMDLINE_LINUX_DEFAULT" after the words "quiet splash" in /etc/default/grub) or if I need to try and create my own edid.bin file. Just to be clear I'm not using groovymame or anything yet. Just trying to get a stable 480i desktop on boot (and only 480i, this linux install won't be using 240p).


Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:Yesterday at 03:09:00 am
  • Forking GroovyArcade
    • forum.arcadecontrols.com/index.php/topic,160023.0.html
    • GroovyArcade active fork
Re: Interlaced modes freeze Radeon cards under Linux
« Reply #25 on: June 29, 2020, 03:00:20 pm »
Don't forget to sudo update-grub for your changes to take effect. Once booted, there are several ways to make sure everything happened as you wished :
- cat /proc/cmdline
- check dmesg
- edid-decode /sys/class/drm/card0-DVI-I-1 (you may need to adapt the card number and the connector number too)
- cat /sys/module/drm/parameters/edid_firmware