Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fixing a kernel panic
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Apr 22, 2021 6:51 pm    Post subject: Fixing a kernel panic Reply with quote

I'm using a Gigabyte Brix 2807 and it works perfectly except for compatibility with a particular USB sound card. I've read that Arch Linux does work with this sound card so I thought I would try the Arch kernel config on gentoo-sources to see if the sound card problem is a kernel config issue. I copied the Arch config in and compiled and installed the kernel but it panics right away when it tries to boot. I've compared the booting config to the non-booting Arch config and I don't see the issue.

Any ideas on narrowing down the cause of the kernel panic?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Thu Apr 22, 2021 7:29 pm    Post subject: Reply with quote

In kernel config
Code:

CONFIG_MODULE_COMPRESS=n

and recompile...
Since you will be recompiling a big kernel throw this also in the mix
Code:

CONFIG_DEBUG_INFO=n

It will save you from a 12 gigs kernel tree and a big directory in /lib/modules
_________________
:)
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Apr 22, 2021 7:32 pm    Post subject: Reply with quote

Thank you. Recompiling now and will report back.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Apr 22, 2021 8:54 pm    Post subject: Reply with quote

It still panics right away. Here are the first three lines of output:

x86/cpu: VMX (outside TXT) disabled by BIOS
ehci-pci port 1 reset error
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Thu Apr 22, 2021 9:07 pm    Post subject: Reply with quote

Did you "make install" and update grub?
_________________
:)
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Apr 22, 2021 9:28 pm    Post subject: Reply with quote

Yep I always 'make && make modules_install' and I copied it over the previous non-booting kernel in /boot so nothing to update in grub this time.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Thu Apr 22, 2021 9:39 pm    Post subject: Reply with quote

Then iyou should check default-grub and fstab..You can not not boot with a full kernel compiled...
_________________
:)
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Apr 22, 2021 9:48 pm    Post subject: Reply with quote

Do you mean /etc/default/grub? That file is essentially empty here.

I haven't touched fstab and it does boot fine with the kernel config I normally use. /boot is on /dev/sda1. Is there a kernel config that would change that to something else?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Thu Apr 22, 2021 10:06 pm    Post subject: Reply with quote

Are you trying to boot from a usb disk?
This looks worrisome
Code:

ehci-pci port 1 reset error

Do you have multiple disks?
Is it uefi?
degault-grub should not be empty.
It should contain at least somethong like "root=<> rootfstype=<>" in linux line.
Do you use an initrd?
Can you post the output of /boot/grub/grub.cfg and fstab?
But if you were booting before but not now with a full .config something strange is going on...
Probably some error in building and installing the kernel...
Did you run
make clean
make mrproper
before recompiling?
_________________
:)
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Thu Apr 22, 2021 10:21 pm    Post subject: Reply with quote

Quote:
Unable to mount root fs on unknown-block ...

Vital information is missing here, this is kernel telling you why it cannot boot, (0,0) would mean HDD controller has no driver for instance. This Arch kernel business does not make much sense, why don't you boot from some CD, Arch will do well, and look what driver is loaded for your sound codec chip, and then enable it in your kernel.
_________________
Life is a tragedy for those who feel and a comedy for those who think.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Apr 22, 2021 10:32 pm    Post subject: Reply with quote

alamahant wrote:
Are you trying to boot from a usb disk?

No.

alamahant wrote:
This looks worrisome
Code:

ehci-pci port 1 reset error

A search turned up that this could be due to a BIOS option but it shouldn't interrupt booting.

alamahant wrote:
Do you have multiple disks?

1 disk only.

alamahant wrote:
Is it uefi?

No.

alamahant wrote:
degault-grub should not be empty.
It should contain at least somethong like "root=<> rootfstype=<>" in linux line.

I think we're talking about different files. Which file are you referring to specifically?

alamahant wrote:
Do you use an initrd?

No.

alamahant wrote:
Can you post the output of /boot/grub/grub.cfg and fstab?
But if you were booting before but not now with a full .config something strange is going on...

Exactly.

alamahant wrote:
Probably some error in building and installing the kernel...
Did you run
make clean
make mrproper
before recompiling?

No but I'll try that now.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Apr 22, 2021 10:37 pm    Post subject: Reply with quote

Buffoon wrote:
Quote:
Unable to mount root fs on unknown-block ...

Vital information is missing here, this is kernel telling you why it cannot boot, (0,0) would mean HDD controller has no driver for instance.

Ah it says "Unable to mount root fs on unknown-block(8,2)" which can't be right. Is that defined in the kernel somewhere?

Buffoon wrote:
This Arch kernel business does not make much sense, why don't you boot from some CD, Arch will do well, and look what driver is loaded for your sound codec chip, and then enable it in your kernel.

I have the correct driver so hoping the problem is another kernel config option:

https://forums.gentoo.org/viewtopic-t-1134018-highlight-.html

FWIW this is the Arch kernel config I'm using:

https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/linux/trunk/config
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Thu Apr 22, 2021 11:02 pm    Post subject: Reply with quote

grant123,

unknown-block(8,2) means /dev/sda2

The kernel can see /dev/sda2 but cannot mount it.
Either the filesystem is not available in the kernel or /dev/sda2 is the wrong thing to try to mount.

Above that unknown-block(8,2) message should be a list of filesystems that the kernel tried.

Code:
CONFIG_EXT4_FS=m

All the filesystems are configured as modules. You will need a matching initrd to make that work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Thu Apr 22, 2021 11:36 pm    Post subject: Reply with quote

Ok I'll try building ext4 into the kernel instead of as a module.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Mon Apr 26, 2021 11:04 pm    Post subject: Reply with quote

I got it booting with these kernel config changes:

CONFIG_DEBUG_INFO_BTF (Y -> N)
CONFIG_MODULE_COMPRESS (Y -> N)
CONFIG_EXT2_FS (N -> Y)
CONFIG_EXT4_FS (M -> Y)

But this USB sound card still doesn't work. It was said to work on Arch a few years ago so I'm surprised:

https://www.raspberrypi.org/forums/viewtopic.php?t=203765#p1267992
https://theartofsound.net/forum/showthread.php?41300-Rasp-Pi-2-M2tech-Hiface-1-Anyone-tried&p=699255#post699255

The maker of the sound card says it works on this Linux-based RaspberryPi OS today (I'm not using a RaspberryPi):

https://www.max2play.com/en/

I'm sure I'm using the correct driver in the kernel (snd_usb_hiface). Now I'm thinking it very likely isn't a kernel config issue since I tried the Arch config and Arch is said to work. What other types of differences could be making it work in the Max2Play OS above?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Mon Apr 26, 2021 11:29 pm    Post subject: Reply with quote

Since yiy are using arch kernel .config you must have something like these
Code:

CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y
CONFIG_SND_USB_UA101=m
CONFIG_SND_USB_USX2Y=m
CONFIG_SND_USB_CAIAQ=m
CONFIG_SND_USB_CAIAQ_INPUT=y
CONFIG_SND_USB_US122L=m
CONFIG_SND_USB_6FIRE=m
CONFIG_SND_USB_HIFACE=m
CONFIG_SND_USB_LINE6=m
CONFIG_SND_USB_POD=m
CONFIG_SND_USB_PODHD=m
CONFIG_SND_USB_TONEPORT=m
CONFIG_SND_USB_VARIAX=m


no?
but since no initrd then maybe turn the appropriate ones to "y"
EDIT:not needed in built since not required for booting.My bad.sorry......
:)
_________________
:)


Last edited by alamahant on Tue Apr 27, 2021 4:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Tue Apr 27, 2021 1:40 pm    Post subject: Reply with quote

I've just switched all of those to y and will report back once it's compiled.

I will say that it does seem to pick up the correct driver and everything seems fine except no sound. I'm supposed to unmute it before it will work but alsamixer reports no controls which I'm guessing is the root of the problem. The only indication that there's a problem besides no sound is "config 0 descriptor??" in dmesg.

# dmesg
...
usb 1-2: new high-speed USB device number 14 using xhci_hcd
usb 1-2: device descriptor read/64, error -71
usb 1-2: New USB device found, idVendor=249c, idProduct=9006, bcdDevice= 0.01
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-2: Product: Computer Audio Design
usb 1-2: Manufacturer: Computer Audio Design
usb 1-2: config 0 descriptor??

# lsusb
...
Bus 001 Device 012: ID 249c:9006 M2Tech s.r.l. Computer Audio Design
...

# cat /proc/asound/cards
...
1 [CAD ]: snd-usb-hiface - CAD
CAD at usb-0000:00:14.0-2

The weird thing is it works in Linux-based OSes like max2play.com. Not sure how to narrow that down.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Tue Apr 27, 2021 3:43 pm    Post subject: Reply with quote

Maybe for testing purposes try with pulseaudio and pavucontrol.
_________________
:)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Tue Apr 27, 2021 3:52 pm    Post subject: Reply with quote

grant123,

The kernel should auto load the module when it spots that the device is connected.
Unplug the device. Wait 10 sec then plug it in.

Does hiface appear in lsmod?
Look at the end of dmesg. It should tell all about what happened when the device was connected. Post that here.

-- edit --

Code:
/usr/src/linux $ grep -R 9006 ./
includes
Code:
./sound/usb/hiface/chip.c:      USB_DEVICE(0x249c, 0x9006)
in the output, so the kernel knows about your device.

The kernel says ...
Code:
config SND_USB_HIFACE
        tristate "M2Tech hiFace USB-SPDIF driver"
        select SND_PCM
        help
          Select this option to include support for M2Tech hiFace USB-SPDIF
          interface.

          This driver supports the original M2Tech hiFace and some other
          compatible devices. The supported products are:

            * M2Tech Young
            * M2Tech hiFace
            * M2Tech North Star
            * M2Tech W4S Young
            * M2Tech Corrson
            * M2Tech AUDIA
            * M2Tech SL Audio
            * M2Tech Empirical
            * M2Tech Rockna
            * M2Tech Pathos
            * M2Tech Metronome
            * M2Tech CAD
            * M2Tech Audio Esclusive
            * M2Tech Rotel
            * M2Tech Eeaudio
            * The Chord Company CHORD
            * AVA Group A/S Vitus

          To compile this driver as a module, choose M here: the module
          will be called snd-usb-hiface.


If it all works, you will have an extra sound card in /proc/asound/devices which will not be the default sound card, so alsa will need some canfiguration so that everything just works.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Tue Apr 27, 2021 4:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3875

PostPosted: Tue Apr 27, 2021 4:01 pm    Post subject: Reply with quote

Actually the above configs can be as modules.Not necessary to build them into the kernel,since you do not need them for booting.So please forgive my mistake.
_________________
:)
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Tue Apr 27, 2021 5:10 pm    Post subject: Reply with quote

Here's what I get:

Code:
# dmesg
...
[  147.871135] usb 2-4: USB disconnect, device number 3
[  159.932918] usb 2-4: new high-speed USB device number 4 using xhci_hcd
[  160.073694] usb 2-4: New USB device found, idVendor=249c, idProduct=9006, bcdDevice= 0.01
[  160.073714] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  160.073726] usb 2-4: Product: Computer Audio Design
[  160.073738] usb 2-4: Manufacturer: Computer Audio Design
[  160.074232] usb 2-4: config 0 descriptor??


Code:
# lsmod | grep hiface
snd_usb_hiface         28672  0
snd_pcm               147456  2 snd_usb_hiface,snd_hdmi_lpe_audio
snd                   114688  4 snd_usb_hiface,snd_timer,snd_hdmi_lpe_audio,snd_pcm


Code:
# cat /proc/asound/devices
  2: [ 0- 0]: digital audio playback
  3: [ 0- 1]: digital audio playback
  4: [ 0]   : control
  5: [ 1- 0]: digital audio playback
  6: [ 1]   : control
 33:        : timer


I've changed mpd from device "hw:0,0" to "hw:1,0" but the behavior is the same as with my regular (non-Arch) kernel config which only includes support for the single USB sound card. mpd thinks it's playing and the progress bar proceeds across the screen as if it were playing but there is no sound as if it were muted.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Wed Apr 28, 2021 12:35 pm    Post subject: Reply with quote

Time for giving up?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Wed Apr 28, 2021 1:17 pm    Post subject: Reply with quote

grant123,

I don't know what that means.

If it works in linux anywhere it can be made to work in Gentoo to. We just don't know how yet

Some things to try. Sound devices are usually USB1 or USB2. USB2 to USB1 backward compatibility is a mess, it was added in a limited way as an afterthought, so its hardware dependend. USB3 backward compatibility wan designed in from the outset but its not 100% either.

Connect your device, and any other devices that you want to connect at the same time. Wait 10 sec for the USB to settle.

Now put
Code:
lsusb -vvv
onto a pastebin. You need to run lsusb there as root or some information will not appear.

Also pastebin your entire kernel .config file.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Wed Apr 28, 2021 5:20 pm    Post subject: Reply with quote

After changing the above kernel options to Y from M the behavior is a little different. Now nothing happens when I click the play button for mpd instead of it thinking it's playing. Changing the default sound card in /etc/asound.conf as follows also causes youtube.com to hang when it tries to play something:

Code:
pcm.!default {
       type hw
       card 1
       device 0
}


I'm going to remove support for the PCI sound card from the kernel so that the USB sound card is the only one detected to avoid confusion. In the meantime here is the info requested:

lsusb:
https://pastebin.ubuntu.com/p/2ncs8TJ7Vh/

.config:
https://pastebin.ubuntu.com/p/7mCVkDrWyK/

Let me know if anything else would be helpful.
Back to top
View user's profile Send private message
grant123
Veteran
Veteran


Joined: 23 Mar 2005
Posts: 1080

PostPosted: Wed Apr 28, 2021 6:13 pm    Post subject: Reply with quote

The USB sound card is the only one detected by the system now but still no sound from mpd or youtube via "hw:0,0".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum