Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

'BUG: unable to handle kernel paging request' with Scarlett 6i6 on Ubuntu 14.04 64 bit (kernel 3.13.0-36-generic) #7

Open
kaazoo opened this issue Sep 24, 2014 · 3 comments

Comments

@kaazoo
Copy link

kaazoo commented Sep 24, 2014

I've took the patch https://github.com/smilingthax/alsa-driver_scarlett/blob/patches/s18i8-20140620-kernel.patch , applied it to the 3.13 sources and built all kernel modules.
Then I copied over sound/usb/snd-usb-audio.ko and sound/usb/snd-usbmidi-lib.ko .

When loading the snd-usb-audio module the following kernel error appears:

Sep 24 09:41:34 contentpc33 kernel: [    2.871317] BUG: unable to handle kernel paging request at ffffffffa0b43440
Sep 24 09:41:34 contentpc33 kernel: [    2.872120] IP: [<ffffffff8136f3c2>] memcpy+0x12/0x110
Sep 24 09:41:34 contentpc33 kernel: [    2.872699] PGD 1c11067 PUD 1c12063 PMD 2345c8067 PTE 80000000a1ba3161
Sep 24 09:41:34 contentpc33 kernel: [    2.873484] Oops: 0003 [#1] SMP 
Sep 24 09:41:34 contentpc33 kernel: [    2.873872] Modules linked in: bnep hid_generic rfcomm intel_rapl x86_pkg_temp_thermal bluetooth intel_powerclamp coretemp dcdbas kvm_intel kvm crct10dif_pclmul snd_hda_c
odec_hdmi snd_usb_audio(X+) crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 snd_hda_intel lrw gf128mul snd_hda_codec snd_seq_midi glue_helper ablk_helper snd_usbmidi_lib(X) snd_seq_midi_event cryptd sn
d_hwdep snd_seq snd_rawmidi serio_raw snd_seq_device usbhid hid snd_pcm binfmt_misc sb_edac snd_page_alloc snd_timer edac_core snd fglrx(POX) soundcore amd_iommu_v2 lpc_ich mei_me mei parport_pc mac_hid ppdev 
lp parport psmouse e1000e ahci ptp libahci pps_core megaraid_sas
Sep 24 09:41:34 contentpc33 kernel: [    2.881254] CPU: 0 PID: 395 Comm: systemd-udevd Tainted: P           OX 3.13.0-36-generic #63-Ubuntu
Sep 24 09:41:34 contentpc33 kernel: [    2.882255] Hardware name: Dell Inc. Precision T3600/08HPGT, BIOS A12 11/03/2013
Sep 24 09:41:34 contentpc33 kernel: [    2.883068] task: ffff88023f61e000 ti: ffff8800a2552000 task.ti: ffff8800a2552000
Sep 24 09:41:34 contentpc33 kernel: [    2.883889] RIP: 0010:[<ffffffff8136f3c2>]  [<ffffffff8136f3c2>] memcpy+0x12/0x110
Sep 24 09:41:34 contentpc33 kernel: [    2.884729] RSP: 0018:ffff8800a2553998  EFLAGS: 00010202
Sep 24 09:41:34 contentpc33 kernel: [    2.885309] RAX: ffffffffa0b43440 RBX: ffff88023f1f5000 RCX: 0000000000000004
Sep 24 09:41:34 contentpc33 kernel: [    2.886083] RDX: 0000000000000004 RSI: ffff88023f2b6580 RDI: ffffffffa0b43440
Sep 24 09:41:34 contentpc33 kernel: [    2.886863] RBP: ffff8800a2553a00 R08: 0000000000017180 R09: ffff880247217180
Sep 24 09:41:34 contentpc33 kernel: [    2.887636] R10: ffffea0008fcad80 R11: ffffffff815453c4 R12: 0000000080000300
Sep 24 09:41:34 contentpc33 kernel: [    2.888409] R13: 0000000000000001 R14: 0000000000000021 R15: 0000000000000100
Sep 24 09:41:34 contentpc33 kernel: [    2.889183] FS:  00007f54bd494880(0000) GS:ffff880247200000(0000) knlGS:0000000000000000
Sep 24 09:41:34 contentpc33 kernel: [    2.890059] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 24 09:41:34 contentpc33 kernel: [    2.890681] CR2: ffffffffa0b43440 CR3: 00000000a2520000 CR4: 00000000000407f0
Sep 24 09:41:34 contentpc33 kernel: [    2.891454] Stack:
Sep 24 09:41:34 contentpc33 kernel: [    2.891672]  ffffffffa0b311d2 ffff88023f2b6580 ffff880200000004 ffff880200001388
Sep 24 09:41:34 contentpc33 kernel: [    2.892548]  0000000400000001 0000000000000004 ffff88023f2b6580 0000000400002900
Sep 24 09:41:34 contentpc33 kernel: [    2.893426]  000000000000000a ffff8800a24fd100 0000000000000004 0000000000000001
Sep 24 09:41:34 contentpc33 kernel: [    2.894302] Call Trace:
Sep 24 09:41:34 contentpc33 kernel: [    2.894575]  [<ffffffffa0b311d2>] ? snd_usb_ctl_msg+0xc2/0x160 [snd_usb_audio]
Sep 24 09:41:34 contentpc33 kernel: [    2.895369]  [<ffffffffa0b3b7aa>] set_ctl_urb2+0xaa/0x100 [snd_usb_audio]
Sep 24 09:41:34 contentpc33 kernel: [    2.896114]  [<ffffffffa0b3c9fa>] scarlett_mixer_controls+0x28a/0x4c0 [snd_usb_audio]
Sep 24 09:41:34 contentpc33 kernel: [    2.896966]  [<ffffffffa0b34e8d>] snd_usb_create_mixer+0x19d/0x2f0 [snd_usb_audio]
Sep 24 09:41:34 contentpc33 kernel: [    2.897790]  [<ffffffffa0b2d403>] ? snd_usb_create_stream+0x1a3/0x200 [snd_usb_audio]
Sep 24 09:41:34 contentpc33 kernel: [    2.898641]  [<ffffffffa0b2d888>] usb_audio_probe+0x238/0x960 [snd_usb_audio]
Sep 24 09:41:34 contentpc33 kernel: [    2.899418]  [<ffffffff81549794>] usb_probe_interface+0x1c4/0x2f0
Sep 24 09:41:34 contentpc33 kernel: [    2.900080]  [<ffffffff8149596d>] driver_probe_device+0x12d/0x3e0
Sep 24 09:41:34 contentpc33 kernel: [    2.900741]  [<ffffffff81495cf3>] __driver_attach+0x93/0xa0
Sep 24 09:41:34 contentpc33 kernel: [    2.901345]  [<ffffffff81495c60>] ? __device_attach+0x40/0x40
Sep 24 09:41:34 contentpc33 kernel: [    2.901968]  [<ffffffff814938d3>] bus_for_each_dev+0x63/0xa0
Sep 24 09:41:34 contentpc33 kernel: [    2.902581]  [<ffffffff8149531e>] driver_attach+0x1e/0x20
Sep 24 09:41:34 contentpc33 kernel: [    2.903166]  [<ffffffff81494f00>] bus_add_driver+0x180/0x250
Sep 24 09:41:34 contentpc33 kernel: [    2.903780]  [<ffffffff81496374>] driver_register+0x64/0xf0
Sep 24 09:41:34 contentpc33 kernel: [    2.904385]  [<ffffffff81547f02>] usb_register_driver+0x82/0x160
Sep 24 09:41:34 contentpc33 kernel: [    2.905037]  [<ffffffffa0b57000>] ? 0xffffffffa0b56fff
Sep 24 09:41:34 contentpc33 kernel: [    2.905598]  [<ffffffffa0b5701e>] usb_audio_driver_init+0x1e/0x1000 [snd_usb_audio]
Sep 24 09:41:34 contentpc33 kernel: [    2.906431]  [<ffffffff8100214a>] do_one_initcall+0xfa/0x1b0
Sep 24 09:41:34 contentpc33 kernel: [    2.907055]  [<ffffffff810598d3>] ? set_memory_nx+0x43/0x50
Sep 24 09:41:34 contentpc33 kernel: [    2.907667]  [<ffffffff810e21ed>] load_module+0x12dd/0x1b40
Sep 24 09:41:34 contentpc33 kernel: [    2.908280]  [<ffffffff810ddc80>] ? store_uevent+0x40/0x40
Sep 24 09:41:34 contentpc33 kernel: [    2.908876]  [<ffffffff810e2bc6>] SyS_finit_module+0x86/0xb0
Sep 24 09:41:34 contentpc33 kernel: [    2.909491]  [<ffffffff8172efad>] system_call_fastpath+0x1a/0x1f
Sep 24 09:41:34 contentpc33 kernel: [    2.910142] Code: 66 0f 1f 84 00 00 00 00 00 e8 fb fb ff ff eb e2 90 90 90 90 90 90 90 90 90 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 <f3> a4 c3 20 4c 8b 06 4c 8b 4e 08 4c 8b 56 10 4c 8b 5e 18 48 8d 
Sep 24 09:41:34 contentpc33 kernel: [    2.913449] RIP  [<ffffffff8136f3c2>] memcpy+0x12/0x110
Sep 24 09:41:34 contentpc33 kernel: [    2.914036]  RSP <ffff8800a2553998>
Sep 24 09:41:34 contentpc33 kernel: [    2.914414] CR2: ffffffffa0b43440
Sep 24 09:41:34 contentpc33 kernel: [    2.914775] ---[ end trace 88c5ce39f54abc20 ]---

Do you have any hints what could be the problem? Is the patch still up-to-date?

@smilingthax
Copy link
Owner

Someone sent me a patch a while ago for a similar problem, which I cannot reproduce myself.

In scarlettmixer.c around line 1348:

    /* initialize sampling rate to 48000 */
-   err = set_ctl_urb2(mixer->chip, UAC2_CS_CUR, 0x0100, 0x29, "\x80\xbb\x00\x00", 4);
+   char buffer[4] = { '\x80', '\xbb', '\x00', '\x00' };
+   err = set_ctl_urb2(mixer->chip, UAC2_CS_CUR, 0x0100, 0x29, buffer, 4);
    if (err < 0)
        return err;

@kaazoo
Copy link
Author

kaazoo commented Sep 24, 2014

Thanks for the patch. Now, I can see different channels in alsamixer, but so far the device is not showing up in pulseaudio.

@smilingthax
Copy link
Owner

As my code only adds mixer support, then everything works as expected, from my perspective.

Audio-playback, etc. is still completely handled by the existing generic usb-audio code in alsa, and playback works even without my mixer-driver (AFAIK there are no known issues for recording/playback with alsa on scarlett devices).
The pulseaudio-problem you're seeing is very probably not rooted in the kernel driver; I guess it's some configuration(?) issue with pulseaudio. jackd is known to work with the device.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants