Author Topic: New kernel question. 3.11 rt pae for AV Linux. How challenging to make?  (Read 3037 times)

0 Members and 1 Guest are viewing this topic.

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
Hello.  I am writing this with a specific hardware/kernel in mind.

I have a new laptop.  AMD/ATI CPU/GPU.  16gb ram.  The proposed kernel pulls for 3.10 or 3.11 will address great power savings with my laptop.  AND, I also noticed that I can run the 3.6.6 RT AVLinux kernel and use Jack with very very low frames/periods @64.  I use my laptop to run several LinuxDSP plugins as well as a few VST plugins via-FeSTige realtime as my bass and also guitar preamp.  SO the RT kernel, in my case, runs better than the Low Latency version of the kernel.  Also would want to address the P.A.E because I would like to utilize the 16 gb ram for running VBox. 

QUESTION:
Is it possible that someone like me, who knows Linux but not at a GMaq-level or Trulan-level, could learn to compile a RT kernel for AV Linux 6.01b that is 3.11 when the source is released? 

Offline GMaq

  • Administrator
  • Hero Member
  • *****
  • Posts: 2529
  • Karma: +8/-0
  • A/V 'Nixer
    • www.bandshed.net
Hi,

Here is a decent guide, I would forget about the BFS patches and you will want to obviously want to change the links to a newer kernel at kernel.org. I haven't had much time for AV Linux lately and I'm guessing trulan is in the same boat since it is summer holidays and he has a large family, hopefully this will get you rolling...

http://ubuntuforums.org/showthread.php?t=2077199
AV Linux, Proudly created with Remastersys: http://www.bandshed.net/AVLinux.html

Offline trulan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 910
  • Karma: +1/-0
Here's a brief guide I posted a while back:
http://www.remastersys.com/forums/index.php?topic=2698.msg15861#msg15861
And yes, it is very possible for you to build your own kernels.  Don't imagine that I'm on some 'level' or that I'm super-smart or anything, I just like to tinker.  The kernel is actually one of the easier pieces of the system to build, compiling stuff like the video editors is much, much harder.

One thing that guide skips is applying the realtime patch.  You can find the latest RT patches here:
https://www.kernel.org/pub/linux/kernel/projects/rt/
Make sure the rt patch version number exactly matches the version number of the source you are using.

To apply patches, I like to use the 'cat' command and pipe it through 'patch', something like this:  (run from your kernel source directory)

1. Do a dry run first so there's no mess to clean up if something is wrong
Code: [Select]
cat /path/to/your/rtpatch | patch -p1 --dry-run
2. If there are no 'hunk failed' messages, repeat the patch command without the --dry-run switch.

If you run into any snags, feel free to ask.  Have fun!

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
Its not done.  I still have something to fix.  But I made 3.10 rt from the 3.6.6rt av kernel.  I disabled the Goldfish encryption as it panics my system.  But the cool part is I got to the end and tried it out.  I ran into a problem with amd/ati driver and the screens not being found but I just ran out of time and had to actually go to work.  So this weekend, I hope, I will continue to learn what I need to go back and fix and make it correct.  I remember seeing other errors during boot that were new.  Once I learn my way around a little bit better, things may go faster...

Offline trulan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 910
  • Karma: +1/-0
Sounds like you're making some good progress!  Unfortunately AMD/ATi is often late in the game with updating their drivers. If you want to run the latest kernels on proprietary drivers you usually have to dig around in Gentoo Linux forums for patches to get them to work...It may be best to disable the ATi drivers while you are testing kernels, that way you can deal with one problem at a time.  An easy way is to edit /etc/X11/xorg.conf, find the line that says:
Driver   "fglrx"
...and change fglrx to "raedon" or "vesa"

Offline joe k

  • Hero Member
  • *****
  • Posts: 162
  • Karma: +0/-0


To anyone using the Yamaha THR10,10c,10x,5a, mini amps.
I did a quick check of the quirks-table.h file found in /sound/usb  in the extracted kernel. Both 3.10.7 stable and 3.11-rc5
the Yamaha THR10 10c, 5a are in the kernel now. For some reason probably an oversite the 10x did not get included so
if you need it you can copy & paste it in


/*
 * Yamaha THR10x
 */
{
   USB_DEVICE(0x0499, 0x150b),
   .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
      /* .vendor_name = "Yamaha", */
      /* .product_name = "THR10X", */
      .ifnum = QUIRK_ANY_INTERFACE,
      .type = QUIRK_COMPOSITE,
      .data = (const struct snd_usb_audio_quirk[]) {
         {
            .ifnum = 1,
            .type = QUIRK_AUDIO_STANDARD_INTERFACE
         },
         {
            .ifnum = 2,
            .type = QUIRK_AUDIO_STANDARD_INTERFACE
         },
         {
            .ifnum = 3,
            .type = QUIRK_MIDI_YAMAHA
         },
         {
            .ifnum = -1
         }
      }
   }
},     




Offline trulan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 910
  • Karma: +1/-0
...You got the THR10x info to me a week or two after I submitted the other patches on the alsa-devel mailing list, that's why it didn't get included.  I should submit the THR10x as well, though I felt a bit guilty the last time as my name got attached to the other THR10 patches when the credit should actually go to you.

(I also need to submit the patch for the Tascam US-122L, though again it's not my patch and I shouldn't be taking any credit for it.  But that's another issue.  I am still learning about how the signed-off-by stuff works in submitting kernel patches.)

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
I was having a difficult time with the amd/ati proprietary working on every boot.  Sometimes it would work and sometimes it froze.  To be this unreliable is frustration.  I am at school and need it to work every time but I guess its on me for getting ati/amd ... when it works, its fine.

So I uninstalled the ati/amd propriatry and didnt load my 3.6.6rt in time and it loaded the 3.10.5rt I built.  Without the amd/ati it worked!  SO I was successful and it was an issue with the ati/amd proprietary which is what Trulan thought!! 

1. I need to go back and figure out how to get my wireless drivers to work (I am using a usb-n in the meanwhile)
2. Is there any way to control the Radeon open source so that I can have dual screens or basically something, anything on my HDMI.

This gives me hope.  I might as well try for 3.11rt. 

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
I see that I will be able to go as far as the rt patch updates allow.  When they are making a 3.11xx patch then I can try.  Obvious... but since I wasnt sure, I tried using the rt patch from 3.10.6 to the 3.11 kernel and it didnt get too far.   

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
I just realized something.  The rt patches are released on even kernel numbers.  So I have to work with 3.10 and then wait for 3.12 to hit the mainstream.  Is this observation correct?

Offline trulan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 910
  • Karma: +1/-0
That does seem to be the pattern they have been following for the last few releases.  Before 3.0 it was pretty intermittent / random.  As I understand it, their goal is to keep up with the mainstream kernel as closely as possible, but the RT team is fairly small and that's not always feasible.  It's hard to say exactly what they will do, but your guess sounds logical and reasonable.

It is quite important that the RT patch version matches the kernel source version, as you've discovered.

You may or may not be able to get dual-screens working on the radeon drivers, using Xorg.conf or arandr.  It really depends on your hardware.
« Last Edit: August 19, 2013, 09:18:22 PM by trulan »

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
I can not get good jack performance running the linux-image-3.10.6-rt3-avl-10-pae_i386.deb compared to Trulan's 3.6.6rt17 kernel. 

3.6.6rt I can run a stressed load through jack (128 frames)and be fine.  I can NOT even start jack until I bump the frames to something too high for satisfaction (like 512).

I am unsure how to navigate around some of the new information added in the 3.10 kernel.  Ticks, dynticks, powersaving, modesetting for cpu... Probably need to learn about specifics regarding jack audio impact.  I havent found clear explanations regarding how they interact to rt performance. 

If I find a solution or read how to fix the problem, I will update here.  Its just a matter of time. 

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
Quick observation.  I dual booted to run a bleeding kernel/distro and wanted to check how its implement of 3.11 kernels worked out with jack.  Ubuntu Studio 13.10 daily 8/22/2013.  86_64 No, its not a fail comparison and I really dont care because I wanted to see how jack would work best, not distro arch or stable vs bleeding etc...

BTW, I updated my AVL kernel to 3.8_pae.  Thank you Trulan?  Whoever made this, I thank you. 

AVL 3.8 pae when running jack 128 frames/44.1 it runs between 0.66-1.5%.  Not running anything via-user.
UbuntuStudio 13.10 running jack 128 frames.44.1 it runs way higher 9%-12% idle (I believe its idle, I am not running anything)

This brings me to wonder WHAT is going on with the ticks?  Maybe its unknown to the audio gurus?  Maybe its other things, like I said before, its really new/bleeding. 

Why do I care?  I have a laptop that is new.  Its amd/ati and tops of the world in amd/ati's mind.  Kind of like being the valedictorian of Summer School!!!  But I am hoping to have my laptop merge its newer hardware with OSS video and cpu mainstreaming.  And my laptop is being used to run LinuxDSP peq-2a, vc2b, their guitar set and one Nomad Studio plugin via-FeSTige through wine-rt.  My laptop doesnt cut it as well as my desktop version of AMD A10 5800 and AMDx6. 

Offline varpa

  • Hero Member
  • *****
  • Posts: 431
  • Karma: +2/-0
I'm assuming that the % you are referring to are the DSP usage reported by Jack (displayed in QJackCtl and Ardour).  Anyway, you could run "top" (in command line) to see what process was using the most CPU.  10% DSP usage when no audio applications are running seems a bit strange.

Offline trulan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 910
  • Karma: +1/-0
10% DSP usage when no audio applications are running seems a bit strange.
...unless your CPU governor is set to ondemand, then it sound about normal.  AV Linux will set the governor to performance unless you are running a laptop on battery.

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
That makes sense.  Demand vs performance.  I never checked.  I thought that

make oldconfig

copied over the cpu gov.  It is worth doubl checking and seeing if it changed. 

Offline mx44

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • Mx44.2 Linux synthesizer
It is meaningless to run an RT kernel with the on-demand governor. The switch happens on the millisecond level (or less?) meaning that for each new audio period  you'll first have to power up the CPU, loosing precious time waiting for that to happen.

The conservative governor is more like it. Powers up while jackd is running and down when it is not,

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
UPDATE.  I used the 3.8 AVL pae kernel and downloaded the patches I found collected or made by Trulan and the RT patch.  There wasnt many options to adjust things which I think is good for me.  But the one worth noting was something like no preempt, virtual preempt, partial, full... I am doing this from memory so I hope you dont kill me because its not word for word.  I was reading about this in detail last night.  The full preempt would be best for our use but it wasnt as stable when I ran it today.  SO tonight/tomorrow I will create a kernel for each option and write down exact wording so I can be clear.  Then I will test each one to see which works better for AVL and my hardware.  I will post back with info...

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
mx44,

I would rather limit the cpu gov choices if even possible.  Like you mentioned, ondemand, I would rather never have the option.  WHen I boot my laptop I have to make sure its on performance.  But then I recently used the option to select 2.30ghz freq as its the highest.  Then it is running all 4 cores at 2.30 USERSPACE.  I need my computer to forget its a laptop and never try to save power by sacrificing performance.  I think i might be chasing a performance standard my laptop isnt capable of producing. 

Offline trulan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 910
  • Karma: +1/-0
You can simply turn off the ondemand governor in your kernel config, or disable CONFIG_CPU_FREQ altogether if that's what you really want, and build your kernel without CPU clock scaling.  I wouldn't want that on my laptop, as I care about battery life more than performance sometimes, but if that's what you want there's nothing stopping you from doing it.

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
Re: New kernel question. 3.11 rt pae for AV Linux. How challenging to make?
« Reply #20 on: September 02, 2013, 09:14:28 AM »
I built a linux-image-3.10.10-rt7-avl9-pae_3.10.10-rt7-avl9-pae-1_i386

It seems solid compared to past tried.  I used option 4 regarding rt ticks. 

Question: Is there a way to build wine using the more bleeding version and add rt patches to it?  Patch it then make etc...? 

Offline canezila

  • Hero Member
  • *****
  • Posts: 217
  • Karma: +0/-0
Re: New kernel question. 3.11 rt pae for AV Linux. How challenging to make?
« Reply #21 on: September 02, 2013, 12:53:50 PM »
I am attempting to make wine 1.7.1.1.  I got the wine-rt patch and applied it successfully.  Then built it successfully.  Installed and its working.... BUT I have no wineasio.  This I believe is something I missed.  So I have been trying to find out if it is a patch to add before compile, or a separate step once wine-rt is already built. 

** I learned to use "checkinstall -D make install" after compile and make to generate a .deb file.  One day when I figure this out, maybe I can share what I made.