17.04.2008 12:06

Linux on HP Pavilion s3240.uk

Recently there appeared on the market a lot of HP refurbished PCs. Among them are very nice HP Pavilion slimline s3240.uk. I bought one of them, as they are for reasonable price and are sold without OS - this is ideal for my purpose - installing Linux. In my case I installed Fedora. Because there is Fedora 9 right away, I tried there Fedora 9 pre release. Here is what I found.

PCs configuration

CPU: Athlon 64 X2 (B) 4400+ 2.3 GHz (65W)
Chipset: GeForce 6150SE nForce 430
Memory Installed: 2 GB
HDD: 500 GB SATA 3G (3.0 Gb/sec) 7200 rpm ST3500630AS
16X DVD(+/-)R/RW 12X RAM (+/-)R DL LightScribe SATA drive ATAPI DVD A DH16A3L 8H1B
ATI Radeon HD2400, 256 MB DDR memory, I/O Ports: DVI-I, S-Video
High Definition 6-channel audio, ALC 888S chipset
LAN 10/100mbit, card reader 15in1
support downloads and product description

This is what HP says. Now what linux sees:
00:00.0 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a1)
00:01.0 ISA bridge: nVidia Corporation MCP61 LPC Bridge (rev a2)
00:01.1 SMBus: nVidia Corporation MCP61 SMBus (rev a2)
00:01.2 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a2)
00:02.0 USB Controller: nVidia Corporation MCP61 USB Controller (rev a3)
00:02.1 USB Controller: nVidia Corporation MCP61 USB Controller (rev a3)
00:04.0 PCI bridge: nVidia Corporation MCP61 PCI bridge (rev a1)
00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
00:06.0 IDE interface: nVidia Corporation MCP61 IDE (rev a2)
00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)
00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
00:09.0 PCI bridge: nVidia Corporation MCP61 PCI Express bridge (rev a2)
00:0d.0 VGA compatible controller: nVidia Corporation GeForce 6100 nForce 430 (rev a2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 70)
01:0a.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev d1)
02:00.0 VGA compatible controller: ATI Technologies Inc RV610 video device [Radeon HD 2400 PRO]

Bus 001 Device 002: ID 058f:6377 Alcor Micro Corp. Multimedia Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

processor	: 0, 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 107
model name	: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
stepping	: 1
cpu MHz		: 2300.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch
bogomips	: 4603.42
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc 100mhzsteps
First of all the good news: everything on this machine works under Linux (particularly Fedora).

And now the bad news: it often requires some tweaking.


Installation was not without trouble. I wished to use i386 version of Fedora. Whenever the CD booted it took incredible long to kernel to came up, then when it finally started, the keyboard stopped to work. Both GUI or text install. Therefore I tried x86_64 version - this seemed better, but when GUI of the installer itself started the keyboard was dead again. The only method that worked was textmode x86_64 install.

Update: I found what was wrong. All the troubles with keyboard and mouse and long delay when inicializing second CPU were caused by just one option in BIOS - USB Legacy Support. When set to Disable, all of them disappeared. The problems I observed before were easy to indetify - almost 50s delay on kernel start due to:

CPU 1 irqstacks, hard=c07ba000 soft=c079a000
Not responding.
CPU #1 not responding - cannot use it.
Total of 1 processors activated (4603.67 BogoMIPS).
PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
i8042.c: Can't read CTR while initializing i8042.
i8042: probe of i8042 failed with error -5
Just set the USB Legacy Support to Disable in BIOS.

Graphics Card

This is the first thing you need to get up to see anything. This computer has two cards ATI Radeon HD2400 as external card with DVI output or onboard nVidia GeForce 6150. To make the long story short - most convenient for daily use is the onboard GeForce 6150. Just swich in the BIOS (F10 at boot) to Onboard and reconnect monitor to onboard VGA connector. ATI Radeon HD2400 is a nice card. It has two drivers in Linux - first called "radeon", the second "radeonhd" (of course there is also fglrx from ati, but this does not work in the moment - maybe with stable release. Both those drivers has one common problem - the do not know the Xvideo (YUY2 overlay). This prevents you to use the another piece of hardware - TV card. Also I had a various problems to get proper resolution with both of them. nVidia with "nv" driver just works. With nvidia driver that is now available in F9, so you can use 3D and OpenGL. How to achieve this: In grub start menu select kernel, press "e" on kernel line, add 3 at the end to start in textmode, enter, press "b" to boot. Login, yum install mc, mc - and edit /etc/X11/xorg.conf. Change Driver "radeon" to Driver "nv". Reboot, switch the card in bios from PCI-E to Onboard, if you did not, boot up...

TV tuner - ASUSTeK LNA Tiger Hybrid TV Tuner

Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder
saa7133[0]: found at 0000:01:0a.0, rev: 209, irq: 18, latency: 32, mmio: 0xfdefe000
saa7133[0]: subsystem: 1043:4871, board: ASUS P7131 4871 [card=111,autodetected]
saa7133[0]: board init: gpio is 0
DVB: registering frontend 0 (Philips TDA10046H DVB-T)

This is a bit camber some: first the Analog portion of saa7134. It gets detected and as soon as you switch to nVidia and start tvtime - you are there to see a picture. But there is no sound. The only solution so far is to enable loading of module saa7134_alsa, and usage of sox, which is a bit ugly. Modify your /etc/modprobe.conf - add there

install saa7134 /sbin/modprobe --ignore-install saa7134; /sbin/modprobe saa7134-alsa
This loads the alsa module for this card at boot time. Now you need to start sox every time you start tvtime. I do it this way
mv /usr/bin/tvtime /usr/bin/tvtime-bin
gedit /usr/bin/tvtime
there place this
#arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | sox -q -c 2 -r 32000 -w -t wav - -t alsa hw:0,0
sleep 2 # wait for system sound event to finish otherwise the /dev/dsp is busy
sox -q -c 2 -s -w -r 32000 -t ossdsp /dev/dsp1 -t ossdsp -w -r 32000 /dev/dsp &
pkill sox
for Fedora 11 I have only alsa devices, therfore I had to use
arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | aplay -
Or similar, see http://www.linuxtv.org/wiki/index.php/Saa7134-alsa This is pretty hackish, improve to suite your feelings.

Now starting tvtime should brought you some picture and sound too after some scanning. If you do not hear anything, just play with the mixer and various devices.

For DVB-T you need firmware. To get firmware you need get_dvb_firmware script, that is part of kernel source.
yumdownloader --source kernel --enablerepo update-source
open the .rpm file with mc, extract (copy) the .bz2 file out, open .bz2 source with mc again and find linux-/Documentation/dvb/get_dvb_firmware. Copy it out of the file somewhere and use it
perl get_dvb_firmware tda10046
mv dvb-fe-tda10046.fw /lib/firmware

Now DVB should work. I can not prove it as here in mountains there is no DVB signal :).

Suspend and Hibernate

With latest rawhide updates hibernate works (you should have 2GB swap!), suspend not (exactly, suspend works, but after resume, the graphics card is not reinitialized, probably some quirk is needed).

Card reader 15in1, Ethernet (forcedeth), HDA sound, powernow (5 steps)

Works out of the box.

Everything else is upon you.

Email comment