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
Site News

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


  

Author Topic: Linux Kernel optimized configuration for emulation  (Read 1191 times)

0 Members and 1 Guest are viewing this topic.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 301
  • Z80 ERROR
Linux Kernel optimized configuration for emulation
« on: January 12, 2016, 03:06:09 am »
Hi,

I am digging into the Linux latency inside the GroovyArcade (aka Arch Linux based) distribution. Why this? Because it is possible to spot hiccups (happening sporadically and not in a cyclic fashion) and I would like to trace this down. Investigations have already been performed but I am now looking at the Linux kernel configuration impact.

Would it be possible for Linux enthusiastic to provide their kernel configuration for analysis. I am looking for persons using their own kernel built with gaming/emulation optimizations.

Cheers,

General_Faliure

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 84
    • My Arcade Cab
Re: Linux Kernel optimized configuration for emulation
« Reply #1 on: January 12, 2016, 03:36:18 am »
I never experienced any hickups.
I've been using Lubuntu linux and the Wahcade (Mahcade) frontend from the beginning, some five years ago, always using the default kernel.
I recently switched to Linux Mint xfce, mainly because it was getting increasingly more difficult to get Daphne, the laserdisk emulator, to run on 64 bit Lubuntu.
It somehow works fine on Linux Mint 64 bit.
I tried Groovyarcade some time ago, but i prefer my own setup.
My Arcade cab: https://goo.gl/photos/yE1KACHryQjCaaCj7
Core2 duo8400 @3.6 Ghz, 4Gb of mem, Geforce 9500.
Linux Mint 17.3 XFCE, Mame, Mess, Daphne FS-Uae, Mednafen and some more.
Mah!cade

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 301
  • Z80 ERROR
Re: Linux Kernel optimized configuration for emulation
« Reply #2 on: January 12, 2016, 05:24:50 am »
I never experienced any hickups.
I've been using Lubuntu linux and the Wahcade (Mahcade) frontend from the beginning, some five years ago, always using the default kernel.
I recently switched to Linux Mint xfce, mainly because it was getting increasingly more difficult to get Daphne, the laserdisk emulator, to run on 64 bit Lubuntu.
It somehow works fine on Linux Mint 64 bit.
I tried Groovyarcade some time ago, but i prefer my own setup.

Hi General_Faliure,

Thank you for the feedback. In order to consolidate the answer, it would be kind of you if you could answer some questions.
1) Which version of mame/groovymame are you using?
2) Is your setup LCD or CRT (aka 15kHz/25kHz/31kHz) based?
3) Are you using the stock Lubuntu kernel and sysctl parameters?


General_Faliure

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 84
    • My Arcade Cab
Re: Linux Kernel optimized configuration for emulation
« Reply #3 on: January 14, 2016, 06:10:18 am »
Hello.
I use Mame 0.164 (Mess included), provided by Wallyweek http://sdlmame.wallyweek.org/, i just added the PPA.
I have a 19" TFT in my cab, just one i bought second hand.
I have always used the stock kernel in (L)ubuntu and now Mint 17.3 Xfce, i never changed any parameters.
I am now at my third mainboard in my cab, have a look at my pictures for the hardware i use / have used.
It's also possible to build a custom lightweight ubuntu, but i think the Xfce or Lxde based distro's are lightweight and fast enough for me.
My Arcade cab: https://goo.gl/photos/yE1KACHryQjCaaCj7
Core2 duo8400 @3.6 Ghz, 4Gb of mem, Geforce 9500.
Linux Mint 17.3 XFCE, Mame, Mess, Daphne FS-Uae, Mednafen and some more.
Mah!cade

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 301
  • Z80 ERROR
Re: Linux Kernel optimized configuration for emulation
« Reply #4 on: January 14, 2016, 07:57:16 am »
Hello.
I use Mame 0.164 (Mess included), provided by Wallyweek http://sdlmame.wallyweek.org/, i just added the PPA.
I have a 19" TFT in my cab, just one i bought second hand.
I have always used the stock kernel in (L)ubuntu and now Mint 17.3 Xfce, i never changed any parameters.
I am now at my third mainboard in my cab, have a look at my pictures for the hardware i use / have used.
It's also possible to build a custom lightweight ubuntu, but i think the Xfce or Lxde based distro's are lightweight and fast enough for me.

Thank you for the shared information. I will take Lubuntu/Ubuntu reference kernel configuration inside the comparison.

philenotfound

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12
  • I want to build my own arcade controls!
Re: Linux Kernel optimized configuration for emulation
« Reply #5 on: January 21, 2016, 12:43:57 am »
I build my own kernel because I had problems in the past with the Debian one which used CONFIG_PREEMPT_VOLUNTARY.
When playing Cho Ren Sha on X68000 with MAME I had some slowdowns which were acustically noticable (sound pitching...)
I build my own now with CONFIG_PREEMPT.

I'm wondering if a RT-Kernel can improve on those emulation-specific latencies.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 301
  • Z80 ERROR
Re: Linux Kernel optimized configuration for emulation
« Reply #6 on: January 21, 2016, 03:58:01 am »
I build my own kernel because I had problems in the past with the Debian one which used CONFIG_PREEMPT_VOLUNTARY.
When playing Cho Ren Sha on X68000 with MAME I had some slowdowns which were acustically noticable (sound pitching...)
I build my own now with CONFIG_PREEMPT.

I'm wondering if a RT-Kernel can improve on those emulation-specific latencies.

I agree with you, the preemption must be configured like this:

Code: [Select]
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y

Another thing, if you have fast responsive HID devices (1000Hz compliant) you can set this into the kernal as well.

Code: [Select]
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
# CONFIG_NO_HZ is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000

Switching to a RT kernel will improve the latencies but the gain is negligible. The current timing requirement does not require RT aspect. The main drawback is coming from the latencies introduced by the graphical, input and audio libraries.

If you have a recent SDL library you can enable the wayland driver. Avoiding the unnecessary X11 layers could give better system response.

Code: [Select]
-videodriver wayland

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31