Bug 18026
Summary: | System hangs when loading via82cxxx module | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | daniel.deimert |
Component: | sndconfig | Assignee: | Bill Nottingham <notting> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | bastiaan, mike, rvokal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-02-07 00:25:16 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
daniel.deimert
2000-10-01 17:12:35 UTC
Jeff Garzik's native mode driver is in the newest mainstream kernels and that should fix these problems. If you ever do get that stuck again and don't have a bios option you can use both the rescue disk technique or linux init=/bin/sh # mount -n -o remount,rw / # vi file # mount -n -o remount,ro / reboot (booting Linux to a shell with nothing else run) PS: Bill - you might want to reassign this to kernel ? if you turn on sound blaster emulation mode in the bios of this machine the sound card will miraculously work and not lock the machine. The abit version of this same board allows you to do this to the mobo and it will make the soundcard not lock but work VERY poorly. the new drivers in the main-line kernel fix this - but I've also had luck with the drivers from 2.2.16-21 (from pinstripe) Hi, I've the same problem and I found no way to solve it. Hopefully this will be fixed with the new version of sndconfig :-) Bye, Duncan I have the same problem on an Asus CUV-4X. An easy solution is to install ALSA. http://www.linuxnewbie.org/nhf/intel/hardware/southbridge_alsa.html I feel that the fact that sndconfig writes /etc/modules.config before it has ensured that everything workes fine is a bug! This should be changed. In addition, there is no reason why the sound stuff has the be loaded in level 1. The sound stuff should be removed from rc.sysinit and moved to /etc/init.d/sound. # mount -n -o remount,rw / mount: no such partition found Ideas? I've been bit by this problem twice recently; it would be rather awful for a newbie. Here is a patch for sndconfig.c that does not rename /etc/modules.conf until all is hunky-dory. Thus I added a few args to modprobe in TestSndCard() to use the '-C /path/to/file' arguments. I also copied the config file instead of renaming it, so that there is no window-of-opportunity for the file to 'disappear'. I also check the return code of WriteConfModules() and added a bit of logic for that. (and I'm not sure why the sync() call was there - ? because of the rename() call?) Email me if you want the patch via email.. I tested it on a system that succeeds, and a system that hangs hard and requires a power reset. The 2nd system came back okay with its original /etc/modules.conf file in place. -- denice.deatrich @ epfl.ch, ADM/SIC, E.P.F.L. PH: +41 (21) 693 22 53 <*> This moment's fortune cookie: Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. -- Wernher von Braun --- sndconfig-0.58/sndconfig.c.orig Tue Dec 12 01:23:31 2000 +++ sndconfig-0.58/sndconfig.c Sun Jan 21 15:57:14 2001 @@ -1013,11 +1013,10 @@ return rc; } -int WriteConfModules(struct settings *set, int quiet, struct device **devs) +int WriteConfModules(char tmpfile[], struct settings *set, int quiet, struct device **devs) { char tmpstr[200], modulename[200]; - char tmpfile[] = "/etc/sndconfig-XXXXXX"; - FILE *f, *t; + FILE *f, *w, *t; struct stat memstat; static int madebackup = 0; int tfilefd; @@ -1058,7 +1057,20 @@ " The existing file will be renamed " "/etc/modules.conf.bak and a new file will be " "written.")); - rename("/etc/modules.conf", "/etc/modules.conf.bak"); + /* lets copy the file instead of renaming it. */ + if ((f = fopen("/etc/modules.conf", "r")) != NULL && + (w = fopen("/etc/modules.conf.bak", "w")) != NULL) { + while (1) { + if (!fgets(tmpstr, sizeof(tmpstr), f)) + break; + fputs(tmpstr, w); + } + fclose(f); + fclose(w); + } + else { + return -1; + } madebackup = 1; } @@ -1203,15 +1215,14 @@ fclose(t); chmod(tmpfile, 0644); - rename(tmpfile, "/etc/modules.conf"); return 0; } -static int TestSndCard(int dopnp, struct settings *set) +static int TestSndCard(char tmpfile[], int dopnp, struct settings *set) { char *args[] = { "/sbin/isapnp", "/etc/isapnp.conf", NULL, NULL, NULL }; - char *modargs[] = { "/sbin/modprobe", "sound-slot-0", NULL, NULL, NULL }; + char *modargs[] = { "/sbin/modprobe", "-C", NULL, "sound-slot-0", NULL, NULL, NULL }; char *playargs[] = { "/usr/bin/play", "/usr/share/sndconfig/sample.au", NULL, NULL, NULL }; @@ -1224,6 +1235,7 @@ int fd, od; int rc; + modargs[2] = tmpfile; if (set->type != ADLIB) { newtWinMessage(_("Sound Card Test"), _("Ok"), @@ -1325,9 +1337,9 @@ if ( /* (set->type == GUS) || (set->type==GUSMAX) || */ /* (set->type==GUSPNP) || */ (set->type == SOUNDSCAPE) || (set->type == ADLIB)) - modargs[1] = "sound-slot-0"; + modargs[3] = "sound-slot-0"; else - modargs[1] = "midi"; + modargs[3] = "midi"; rc = RunCmd("/sbin/modprobe", modargs, &out, &err); if (rc) { newtResume(); @@ -1374,6 +1386,7 @@ int main(int argc, char **argv) { + char tmpfile[] = "/etc/sndconfig-XXXXXX"; int pnpprobe; int rc; int success = 0; @@ -1758,39 +1771,53 @@ newtResume(); } #endif - WriteConfModules(&tmpset, quiet, devs); - sync(); - - if (quiet) - return 0; - - rc = TestSndCard(pnpprobe && !noprobe, &tmpset); - if (rc < 0) { - /* If we're in autoconfig, we'll get stuck in a loop if - * the sound test fails... - */ - if (autoconfig && pnpprobe) { - rc = - newtWinChoice(_("Autoconfiguration failed!"), + if( WriteConfModules(tmpfile, &tmpset, quiet, devs) != 0 ) { + if (!quiet) { + newtWinMessage(_("Error while writing config file"), + _("Ok"), _("Sorry.")); + break; + } + else { + return 0; + } + } + else { + if (quiet) { + rename(tmpfile, "/etc/modules.conf"); + sync(); + return 0; + } + else { + rc = TestSndCard(tmpfile, pnpprobe && !noprobe, &tmpset); + if (rc < 0) { + /* If we're in autoconfig, we'll get stuck in a loop if + * the sound test fails... + */ + if (autoconfig && pnpprobe) { + rc = + newtWinChoice(_("Autoconfiguration failed!"), _("Ok"), _("Cancel"), _ ("Autoconfiguration of your sound card " "failed. Now proceeding with manual " "configuration.")); - autoconfig = 0; - if (rc == 2) - break; - continue; - } - cleanupmods(&tmpset); - continue; - } else { - success = 1; - break; - } + autoconfig = 0; + if (rc == 2) + break; + continue; + } + cleanupmods(&tmpset); + continue; + } else { + rename(tmpfile, "/etc/modules.conf"); + sync(); + success = 1; + break; + } + } + } } } - newtFinished(); cleanupmods(&tmpset); Same problem with an ABIT VA6. Nothing in the BIOS helped me. The linux /bin/sh solution from alan worked with the following modification: mount -n -t ext2 /dev/hda7 -o remount,rw / I'm not sure how many of those options were required, but it found the partition. Whereas the command that he gave didn't find it on my system. But I'm back up & running & I'm glad this bug database is here. I would *STRONGLY* vote for fixing sndconfig so that it does not overwrite /etc/modules.conf until everything is OK. patch added (more or less) in sndconfig-0.60-1; thanks! *** Bug 32728 has been marked as a duplicate of this bug. *** [root@devel /root]# insmod /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o: unresolved symbol unregister_sound_mixer_R7afc9d8a /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o: unresolved symbol register_sound_mixer_R4befdb20 /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o: unresolved symbol register_sound_dsp_R9956a9d2 /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o: unresolved symbol unregister_sound_dsp_Rcd083b10 /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o: unresolved symbol ac97_probe_codec_R563f6eac Don't use insmod. Always use 'modprobe'. [root@devel /root]# modprobe -k /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o modprobe: Can't locate module /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o [root@devel /root]# modprobe /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o modprobe: Can't locate module /lib/modules/2.2.19-7.0.1/misc/via82cxxx_audio.o *sigh* modprobe via82cxxx_audio In any case, please see the resloution. |