The Elite's K7s5a mainboard HOWTO Sebfrance rf.eerf@otwohecnarfbes, Andreas Willenbrink ed.bew@knirbnelliW.saerdnA, Álvaro Reguly ten.yluger@oravla, Paolo Berva moc.ts@avreb.oloap, (Get a mirror :) ) v2.0, 2004-05-16 ------------------------------------------------------------------------------- How to use Elite's K7s5a mainboard under GNU/Linux. ------------------------------------------------------------------------------- 1. Introduction 1.1 History I got the mainboard for Christmas 2001, and after a little while, I understood that the new chipset sis735 was not handled by Mandrake 8.0, OSS had drivers for it that worked but I didn't really want to pay for it, so I looked on ALSA cvs and found that in their latest sources they had something for the sis 7012, and a bit later I found the drivers for the sensors. It has now been 3 years I started this howto and I am always glad to get comments, advices from everywhere in the world :] - Sébastien 1.2 License and copyright Copyright 2004-2072 Sébastien FRANÇOIS This work is licensed under a Creative_Commons_License. 2. The integrated sound board 2.1 ALSA versus the AC'97 Driver I have used both solutions successfully. However I noticed while working on a speech synthesis system (I was involved in a small accessibility project), that the kernel driver does not seem to be able to re-sample, whereas Alsa does it perfectly. 2.2 Alsa Getting the ALSA drivers So we will be compiling the latest sources from ALSA, which should work for all other distributions as well... only the kernel sources will change because mandrake uses specific patches. You may get your kernel sources from your distribution or from http:// www.kernel.org Here can be found Mandrake sources for the kernel used in 8.0: ftp://ftp.univ-savoie.fr/pub/Linux/Mandrake/8.0/i586/Mandrake/RPMS/kernel_- source-2.4.3-20mdk.i586.rpm (link seems to be broken, I wish I had made a copy if someone needed but here is the problem with that distribution, mirrors are not kept long enough) and grab the tarball from ALSA: ftp://ftp.alsa-project.org/pub/driver/alsa-driver-0.9.0beta10.tar.bz2 Installation Install your kernel sources, in my case: rpm -ivh kernel-source-2.4.3-20mdk.i586.rpm Then decompress alsa drivers: bzip2 -d alsa-driver-0.9.0beta10.tar.bz2 && tar -xvf alsa-driver- 0.9.0beta10.tar Make them and install them and create the devices files: cd alsa-driver-0.9.0beta10 && make install && ./snddevices Edit /etc/modules.conf to set everything, and add to it the following lines: alias char-major-116 snd alias char-major-14 soundcore alias sound-slot-0 snd-card-0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss alias snd-card-0 snd-card-intel8x0 warning: Christian Cardinale rf.libertysurf@elanidrac.naitsirhc reports that he had to change 'snd-card-intel8x0' for 'snd-intel8x0', which corresponds to what I have for my Debian system, I no longer remember, but I think this one is the mandrake name, if it doesn't work, just use to the other, ok? 2.3 Alsa the Debian way I've switched to Debian some time after writing this howto and wanted to give some instructions about it: Things may change a little depending on which version you're using, I use Debian sarge, currently the testing version. Using a Debian package with a precompiled kernel First of all, you can directly download the appropriate precompiled alsa modules: find out which kernel you're using uname -r 2.4.20-3-k7 (should be 2.4.18-k7 or something like that for a woody/stable) apt-get install alsa-modules-2.4.20-3-k7 the card is the "intel8x0 (PCI: Intel i810/i820/i830/i840/MX440 integrated audio)" you should also install the recommended package alsa-utils apt-get install alsa-utils now, check the file /etc/alsa/modutils/0.9 against the one given further on this howto. It may also be necessary to run update-modules as root to ensure that these lines get into /etc/modules.conf, although the package installation probably does it itself. Using a Debian kernel source package I was forced to recompile my kernel when I got an usb adsl modem. (make-kpkg binary --initrd is something you want to look at someday, but it's off topic) I'm assuming, you've done at least the following steps: install the alsa sources and two useful packages: apt-get install alsa-source alsa-utils alsa-base debconf will ask you the following questions: Say Yes if you want to build ALSA driver with ISA PnP version. If your computer doesn't support ISA PnP, you may say No. Build ALSA driver with ISA PnP? You can safely select 'no' Say Yes if you want to build ALSA driver with debugging code. Build ALSA driver with debugging code? We don't need that either, so select 'no' You can choose cards to be built by selecting cards you want. Each selection is a same name to a option of configure script '-- with-cards'. The following list are short descriptions of the options to show what they mean. Select cards to be built. Select card intel8x0 (PCI: Intel i810/i820/i830/i840/MX440 integrated audio) and exit. cd /usr/src tar xzvf alsa-driver.tar.gz cd modules/alsa-driver ./configure make && make install now, check the file /etc/alsa/modutils/0.9 against this following one. /etc/alsa/modutils/0.9 I only remember changing the cards_limit from 4 to 1, to prevent warnings, any modification of it should be followed by running update-modules in order to regenerate /etc/modules.conf ### DEBCONF MAGIC # This file was automatically generated by alsa-base's debconf stuff alias char-major-116 snd alias char-major-14 soundcore alias snd-card-0 snd-intel8x0 alias sound-slot-0 snd-card-0 options snd major=116 cards_limit=1 device_mode=0660 device_gid=29 device_uid=0 alias sound-service-0-0 snd-mixer-oss alias sound-service-0-1 snd-seq-oss alias sound-service-0-3 snd-pcm-oss alias sound-service-0-8 snd-seq-oss alias sound-service-0-12 snd-pcm-oss 2.4 Kernel Approach: The AC'97 Driver If you are using a 2.4 or later kernel you can use the Audio_Codec_'97_(AC'97) sound driver, as the integrated sound card is AC'97 complaint. You may enable your soundcard with a kernel module, as a matter of fact, you should be able to just use the module without even recompiling your kernel, because most GNU/Linux distributions have it already, just type: modprobe i810_audio and you should see something like this in your syslog: Intel 810 + AC97 Audio, version 0.21, 21:31:04 Apr 15 2002 i810: SiS 7012 found at IO 0xd800 and 0xdc00, IRQ 11 i810_audio: Audio Controller supports 2 channels. ac97_codec: AC97 Audio codec, id: 0x414c:0x4710 (ALC200/200P) i810_audio: AC'97 codec 0 supports AMAP, total channels = 2 or type dmesg | less and scroll to see the kernel messages. If everything went fine, you may add i810_audio to /etc/modules so it will autoload everytime you boot: echo "i810_audio" >> /etc/modules or you like monolitic kernels (no modules), follow the step above to install the kernel sources and say Y to Sound card support and Y to Intel ICH (i8xx) audio support compile your kernel, install, reboot and now your integrated soundcard is working. If you don't know how to compile a kernel, read the Kernel_HOWTO, it's easy and you'll get a optimized kernel for you system, also you'll learn a bit about that talk of using the source code (yes you are already taking advantage of it :-) 3. The mainboard's sensors 3.1 lm-sensors Getting the drivers Get the lm_sensors 2.6.2 or more recent: http://www.lm-sensors.nu/archive/ lm_sensors-2.6.2.tar.gz You'll need kernel sources too in order to compile that one. Installing them tar -xzvf i2c-2.6.2.tar.gz cd i2c-2.6.2 make && make install Then there was a problem when making install for me, so if it doesn't work, just do the following: cp kernel/i2c-core.o /lib/modules/`uname -r`/misc/i2c-core.o cp kernel/i2c-proc.o /lib/modules/`uname -r`/misc/i2c-proc.o Now let's copy the specific driver: cp kernel/chips/it87.o /lib/modules/`uname -r`/misc/it87.o ok now cp prog/sensors/sensors /usr/bin/sensors -------------------------------------------------------------------- Edit /etc/modules.conf and add to it the following lines: alias char-major-89 i2c-dev options it87 temp_type=0x31 now: modprobe i2c-proc modprobe it87 modprobe i2c-isa sensors should output you some data When it works, you can write it to a file, that will be loaded automatically on boot. Under SuSE the file is: /etc/init.d/boot.local (used to be /sbin/init.d/ ) and you should just add: sensors -s Under mandrake, the install should have created that file: /etc/init.d/sensors, which you can edit freely, sensord being just a daemon to watch over temperature and fan speed, I assume no one will need something like that for her/his own machine. Paolo reports that in order to start up sensord on boot, he put in /etc/ sysconfig/sensors: MODULE_0=i2c-proc MODULE_1=it87 MODULE_2=i2c-isa Now as root you should edit your /etc/sensors.conf search for that line: chip "it87-*" and below you should be able to modify everything to get the right data, here is a copy of what i have in there: (please note that temp1 is trash and only temp2 and temp3 should be kept) -------------------------------------------------------------------- 3.2 lm-sensors the Debian way This time you'll be forced to compile the modules. install the source and programs: apt-get install lm-sensors lm-sensors-source The upstream lm-sensors maintainers know of a problem using lm-sensors with IBM ThinkPad computers, resulting in firmware corruption. If you are installing this package on a ThinkPad, you should wait until the upstream maintainers have solved this problem before building modules from it. For more information, see /usr/share/doc/lm-sensors-source/README.thinkpad. IBM ThinkPad brokenness -- really install lm-sensors? Answer yes to this question, you can't have an IBM thinkpad and the k7s5a in the same box as far as I know! cd /usr/src tar xzvf lm-sensors.tar.gz cd modules/lm-sensors/ make && make install Then you should have modutils take a few arguments, the best way is probably to use a new file, like: /etc/modutils/sensors with this content: alias char-major-89 i2c-dev options it87 temp_type=0x31 run update-modules modprobe i2c-isa it87 You can now type sensors to access to the informations (note that you should edit sensors.conf, otherwise you'll see strange and inaccurate things :] ) You can also put i2c-isa and it87 in /etc/modules (one by line!) to have them be automatically loaded on boot, I don't know yet, how/whether it is possible to use some automatic loading/removing process with /etc/modules.conf 3.3 Sensors.conf for the K7s5a #David Thorarinsson explained me that all the 'set' lines should be after the compute ones, #this is now fixed, chip "it87-*" # The values below have been tested on Asus CUSI, CUM motherboards. # Voltage monitors as advised in the It8705 data sheet label in0 "VCore" label in1 "Vcc2.5V" label in2 "+3.3V" label in3 "+5V" label in4 "+12V" label in5 "-12V" label in6 "-5V" label in7 "SB 5V" label in8 "V battery" # vid not monitored by IT8705F ignore vid # For this family of chips the negative voltage equation is different from # the lm78. The chip uses two external resistor for scaling but one is # tied to a positive reference voltage. See ITE8705/12 datasheet (SIS950 # data sheet is wrong) # Vs = (1 + Rin/Rf) * Vin - (Rin/Rf) * Vref. # Vref = 4.096 volts, Vin is voltage measured, Vs is actual voltage. # compute in2 (1 + 1)*@ , @/(1 + 1) compute in3 ((6.8/10)+1)*@ , @/((6.8/10)+1) compute in4 ((30/10) +1)*@ , @/((30/10) +1) # The next two are negative voltages (-12 and -5). # The following formulas must be used. Unfortunately the datasheet # does not give recommendations for Rin, Rf, but we can back into # them based on a nominal +2V input to the chip, together with a 4.096V Vref. # Formula: # actual V = (Vmeasured * (1 + Rin/Rf)) - (Vref * (Rin/Rf)) # For -12V input use Rin/Rf = 6.68 # For -5V input use Rin/Rf = 3.33 # Then you can convert the forumula to a standard form like: compute in5 -(36/10)*@, -@/(36/10) #(7.67 * @) - 27.36 , (@ + 27.36) / 7.67 compute in6 -(56/10)*@, -@/(56/10) #(4.33 * @) - 13.64 , (@ + 13.64) / 4.33 compute in7 ((6.8/10)+1)*@ , @/((6.8/10)+1) set in0_min 1.7 * 0.95 set in0_max 1.7 * 1.05 set in1_min 2.4 set in1_max 2.6 set in2_min 3.3 * 0.95 set in2_max 3.3 * 1.05 set in3_min 5.0 * 0.95 set in3_max 5.0 * 1.05 set in4_min 12 * 0.95 set in4_max 12 * 1.05 set in5_min -12 * 0.95 set in5_max -12 * 1.05 set in6_min -5 * 0.95 set in6_max -5 * 1.05 set in7_min 5 * 0.95 set in7_max 5 * 1.05 # Temperature label temp3 "Processor" set temp3_over 40 set temp3_hyst 20 label temp2 "Mainboard" set temp2_over 45 set temp2_hyst 25 ignore temp1 # Fans label fan1"Processor's Fan" set fan1_min 2000 ignore fan3 ignore fan2 # # If you have a system fan, comment 'ignore fan2' # and uncomment the following lines : # Thanks to gro.reirual@erreip # # label fan2 "System Fan" # set fan2_min 3000 # set fan2_div 4 3.4 Sensors on 2.6 kernels Kernel 2.6.1 configuration: # Bus options (PCI, PCMCIA, EISA, MCA, ISA) CONFIG_ISA=y # I2C support CONFIG_I2C=m CONFIG_I2C_CHARDEV=m # I2C Hardware Bus support CONFIG_I2C_ISA=m # I2C Hardware Sensors Chip support CONFIG_I2C_SENSOR=m CONFIG_SENSORS_IT87=m Setting up the modules mount sysfs pseudo filesystem if you have not done it yet. mount -t sysfs sysfs /sys See Documentation/filesystems/sysfs.txt and Documentation/i2c/sysfs-interface in the kernel sources tree modprobe it87 modprobe i2c-isa Sensors can be accessed in the sysfs pseudo file system. But if you want you can use the lm_sensors user tools... The lm_sensors user tools Install sensors user tools: cd lm_sensors-2.8.3 copy this into a file named chips-it87.diff NOTE: This patch is only required for old versions of lm_sensors, Paolo wrote: "A reply from lm_sensors developers said that the next version of lm_sensors will fix this. It is already fixed in CVS." --- lib/chips.c Sun Jan 25 00:13:49 2004 +++ ../lm_sensors-2.8.3.OK/lib/chips.c Sat Jan 24 01:23:43 2004 @@ -3757,13 +3757,13 @@ R, IT87_SYSCTL_TEMP2, VALUE(3), 1 }, { SENSORS_IT87_TEMP3, "temp3", NOMAP, NOMAP, R, IT87_SYSCTL_TEMP3, VALUE(3), 1 }, - { SENSORS_IT87_TEMP1_LOW, "temp1_hyst", SENSORS_IT87_TEMP1, + { SENSORS_IT87_TEMP1_LOW, "temp1_min", SENSORS_IT87_TEMP1, SENSORS_IT87_TEMP1, RW, IT87_SYSCTL_TEMP1, VALUE(2), 1 }, - { SENSORS_IT87_TEMP2_LOW, "temp2_hyst", SENSORS_IT87_TEMP2, + { SENSORS_IT87_TEMP2_LOW, "temp2_min", SENSORS_IT87_TEMP2, SENSORS_IT87_TEMP2, RW, IT87_SYSCTL_TEMP2, VALUE(2), 1 }, - { SENSORS_IT87_TEMP3_LOW, "temp3_hyst", SENSORS_IT87_TEMP3, + { SENSORS_IT87_TEMP3_LOW, "temp3_min", SENSORS_IT87_TEMP3, SENSORS_IT87_TEMP3, RW, IT87_SYSCTL_TEMP3, VALUE(2), 1 }, { SENSORS_IT87_TEMP1_HIGH, "temp1_over", SENSORS_IT87_TEMP1, apply the patch: $ patch -p0> /etc/modules (or echo "alias eth0 sis900" >> /etc/modutils/aliases && update-modules for the module to be loaded when needed, go for that if you have a Debian system) Pay attention to the double >, or you will have troubles :] or compile it in your kernel, where you should say Y to SiS 900/7016 PCI Fast Ethernet Adapter support in your kernel configuration. 5. Other 5.1 Knoppix Yesterday (8/28/2003), I tried to boot with a Knoppix cd (3.2) and found out that the computer froze during the SCSI probes. I encountered the same problem with a more recent version (3.3). Here is a quick way to prevent this: When you get the knoppix prompt, add noscsi and your lang settings and press enter: boot: knoppix noscsi lang=fr lang=fr is only to ensure that my language will be used even though I overrode the append line. 5.2 Notes about parallel port networking (PLIP) and floppy bus I recently found out several important hardware flaws on this mainboard. For example I could not get PLIP to work properly, if anyone has, let me know! I used a grey laplink parallel cable (also known as Null Printer Cable) a friend sold me and followed the PLIP_Howto. I could watch activity on the pins using a dos tool, but nothing went through, it even gave a warning: modprobe plip tail /var/log/messages kernel: plip: parport0 has no IRQ. Using IRQ-less mode,which is fairly inefficient! kernel: NET3 PLIP version 2.4-parport pj.oc.irm@ebiing kernel: plip0: Parallel port at 0x378, not using IRQ. Karl said: "I've found there is only one parallel port mode which actually assigns an IRQ in real life (the bios believes differently) I think its EPP but i could be wrong. I haven't used PLIP before but i thought that this may help a little." I still get the same warning, let me know if it ever worked. So I had to go on with floppies, since the box didn't have a cdrom drive, and there, I found out that the 486 had a much faster writing speed, more than 10 seconds of difference writing exactly the same image to the the same floppy... 5.3 Notes about mainboard replacement Contribution of DR hab. Janusz S. Bien > My computer returned from the service with the mainboard replaced. In > principle this is still ECS K7S5A, but seems to have a different sound > chip. I have now (with kernel 2.4.27, see below): Jan 31 10:51:47 galicja kernel: i810: SiS 7012 found at IO 0xd800 and 0xdc0= 0, MEM 0x0000 and 0x0000, IRQ 11 [...] Jan 31 10:51:47 galicja kernel: ac97_codec: AC97 codec, id: CMI65 (CMedia) Earlier it was Nov 23 06:42:36 galicja kernel: i810: SiS 7012 found at IO 0xd800 and 0xdc0= 0, MEM 0x0000 and 0x0000, IRQ 11 [...] Nov 23 06:42:36 galicja kernel: ac97_codec: AC97 Audio codec, id: ALC38(Unk= nown) > The result is that with Knoppix of 2003-11-19-EN I have sound from > xmms and xine, but there is no sound fom xawtv; actually I hear a kind > of white noise. > My HD installation - Woody with the kernel upgraded to 2.4.20 - > behaves in an opposite way: I have sound from xawtv, but no sound from > xmms and xine. I just upgraded the kernel to 2.4.27 and situation is now worse: I have no sound in xawtv, too. If you have a similar situation, please have a look at the Alsa drivers. 5.4 Links Warning: If your board is working fine, then don't fix it. Anyway here are the cool links: * Elite_Group_(new_BIOS) * Overclockers_Work_Bench * ECS_K7s5a_FAQ * french_guide_for_the_K7S5a * Elite_groupe_most_recent_bioses 5.5 Sensors.conf for the K7s5a-pro #Thanks to Art Wagner for this contribution (ten.ysaekaepsh@rengawa) chip "it87-*" "it8705-*" "it8712-*" # The values below have been tested on Asus CUSI, CUM motherboards. # Voltage monitors as advised in the It8705 data sheet label in0 "VCore" label in1 "Vcc2.5v" label in2 "Vcc3.3v" label in3 "+5V" label in4 "+12V" label in5 "-12V" label in6 "SB 2.5V" label in7 "SB 5V" label in8 "V battery" # vid not monitored by IT8705F ignore vid # If 3.3V reads 2X too high (Soyo Dragon, for example), # comment out following line. # compute in2 2*@ , @/2 # compute in3 ((6.8/10)+1)*@ , @/((6.8/10)+1) compute in4 ((30/10) +1)*@ , @/((30/10) +1) # For this family of chips the negative voltage equation is different from # the lm78. The chip uses two external resistor for scaling but one is # tied to a positive reference voltage. See ITE8705/12 datasheet (SIS950 # data sheet is wrong) # Vs = (1 + Rin/Rf) * Vin - (Rin/Rf) * Vref. # Vref = 4.096 volts, Vin is voltage measured, Vs is actual voltage. # The next two are negative voltages (-12 and -5). # The following formulas must be used. Unfortunately the datasheet # does not give recommendations for Rin, Rf, but we can back into # them based on a nominal +2V input to the chip, together with a 4.096V Vref. # Formula: # actual V = (Vmeasured * (1 + Rin/Rf)) - (Vref * (Rin/Rf)) # For -12V input use Rin/Rf = 6.68 # For -5V input use Rin/Rf = 3.33 # Then you can convert the forumula to a standard form like: # compute in5 (7.67 * @) - 27.36 , (@ + 27.36) / 7.67 # compute in6 (4.33 * @) - 13.64 , (@ + 13.64) / 4.33 # # this much simpler version is reported to work for a # Eltite Group K7S5A board # compute in5 -(36/10)*@, -@/(36/10) # compute in6 -(56/10)*@, -@/(56/10) compute in6 (4.33*@) -13.64 , (@ +13.64) / 4.33 compute in7 ((6.8/10)+1)*@, @/((6.8/10)+1) # set in0_min 1.6 * 0.95 set in0_max 1.6 * 1.05 set in1_min 2.4 set in1_max 2.6 set in2_min 3.3 * 0.95 set in2_max 3.3 * 1.05 set in3_min 5.0 * 0.95 set in3_max 5.0 * 1.05 set in4_min 12 * 0.95 set in4_max 12 * 1.05 set in5_min -12 * 0.95 set in5_max -12 * 1.05 set in6_min 2.5 * 0.95 set in6_max 2.5 * 1.05 set in7_min 5 * 0.95 set in7_max 5 * 1.05 # Temperature set in0_min 1.6 * 0.95 set in0_max 1.6 * 1.05 set in1_min 2.4 set in1_max 2.6 set in2_min 3.3 * 0.95 set in2_max 3.3 * 1.05 set in3_min 5.0 * 0.95 set in3_max 5.0 * 1.05 set in4_min 12 * 0.95 set in4_max 12 * 1.05 set in5_min -12 * 0.95 set in5_max -12 * 1.05 set in6_min 2.5 * 0.95 set in6_max 2.5 * 1.05 set in7_min 5 * 0.95 set in7_max 5 * 1.05 label temp3 "Processor" set temp3_over 70 set temp3_hyst 25 label temp2 "Mainboard" set temp2_over 70 set temp2_hyst 25 ignore temp1 # Fans label fan1"Processor's Fan" set fan1_min 1800 ignore fan3 ignore fan2 5.6 Some words (About BIOS) Alvaro Using a modified BIOS, I was able to successfully overclock my Athlon 1000Mhz to 1050Mhz flawlessy, but when I messed with hdparm (30Gig Western Digital hard drive) using hdparm -c1 -X66 /dev/hda, I managed to corrupt my filesystem, so beware. If you are a real tweaker, you might want to change your BIOS Logo and stuff, some people tried that and it worked OK, some others not, so they had to flash their BIOS again (blindly with a bootdisk and a working bios in it) to make the board work again. It is really up to you. Search Google or OC Workbench and you'll be on your way. Good Luck! :-) Karl "Also i recommend you try using either the HoneyX bios or the CHEEPOman bios for the k7s5a instead of the official release, it gives you more control although some problems with non-atapi CD drives (my dvd goes crazy in linux with cheepoman) The cheepoman bios also fixes several issues which ECS has still not attended to. These bios roms are unsupported by ECS please bare that in mind, also they are meant for overclocking more than anything else, overclocking in such a way as you don't need a pencil ;)" 6. Contributions I was pretty surprised by the number of mails I received about this howto. Unfortunately I lost several contributions when my hard drive died but I'm always listening, so don't hesitate to mail us. - Seb 6.1 Contributors Here are most of the recent contributors, I hope everyone is here :] David Thorarinsson es.emoh@ibbad Karl Lattimer ofni.ccnn@lrak DR HAB. Janusz S. Bien lp.ude.wumim.hcud@neibsj Doug Jensen moc.tsewpsi@nejd