Linux and the Panasonic R4

This is a page designed to gather together all the disparate pieces of information that I used in getting my CF-R4 working with Linux.

The Panasonic R4


The Panasonic CF-R4 is a Japanese market only super sub notebook. It is approximately 23cm wide and 19cm deep. It weighs 999g. It is a beautifully engineered machine made mostly of alu-magnesium alloy. My machine is a CF-R4J model which is the Spring 2006 specification. Information on this page should also broadly apply to the earlier CF-R3 and the later CF-R5. Although the CF-R6, CF-R7 and CF-R8 are sufficiently different from the older models that some issues may arise, the good news is that nowadays most laptops work out of the box with most distrubutions.

In the three years since this page started the state of hardware, and GNU/Linux has developed enormously. Netbooks are now ten a penny, offering much of the functionality of the R series. Although still not coming close to the R series in terms of build, battery life or weight, these offer a compelling choice in small laptops. It's a shame that the world (except Panasonic) has gone widescreen - useless for 4x3 images, but I digress. I've moved onto running Kubuntu, essentially because it just works with little need for any tweaking. The latest 9.10 edition picks up all the hotkeys, although I did need to add a script to handle suspending once the key had been pressed.

Information on other Panasonic Let's note models can be found at:

 Linux On LaptopsTuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones

How to upgrade the CF-R3, CF-R4, and CF-R5 hard drive - pdf

How to upgrade the CF-R3, CF-R4, and CF-R5 hard drive - http

Linux Kernel driver support

Most of the hardware in the R4 is supported by the vanilla kernel 2.6.24. Some devices such as the modem require userspace daemons. The wireless card is supported by the in kernel IPW2200 driver but needs proprietary firmware. 

See dmesg output

The breakdown of lspci looks like this:




00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
No issues



00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
DRI support, Framebuffer (vesafb or intelfb) and AGP support in vanilla kernel
Xorg support via i810 driver



00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
DRI support, Framebuffer and AGP support in vanilla kernel
Xorg support via i810 driver or the newer intel driver in X.org 1.3.0 onwards



00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 04)
Supported by uhci_hcd



00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 04)
Supported by ehci_hcd



00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d4)
No issues



00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) 
AC'97 Audio Controller (rev 04)

Supported by snd_intel8x0



00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 04)
Supported by snd_intel8x0m in kernel. User space slmodemd required for control of modem.



00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 04)
No issues



00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 04)
Supported by PIIXn driver



00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 04)
No issues



06:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
Supported by 8139too driver. For the price it's a shame to see such a crappy ethernet controller.
Maybe it's a power consumption issue.



06:04.0 Network controller: Intel Corporation PRO/Wireless 2915ABG MiniPCI Adapter (rev 05)
Supported by IEE80211 & IPW2200 with proprietary firmware required.



06:05.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8d)
Supported by yenta_socket driver
06:05.1 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 13)
Supported by mmc_block and sdhci driver. Post 2.6.19 this just works. On Kubuntu 9.10 You do need to force enable DMA on
the SD card reader by passing a module option - place a file called sdhci containing the line:

options sdhci debug_quirks=2

in /etc/modprobe.d

Here is an archive of my config files,  incliding kernel configs (2.6.24) and xorg.conf (7.3 with intel driver).  

Laptop Features

Hotkeys

There are two possibilities to get the hotkeys working. Hiroshi Miura has recently updated the pcc_acpi driver to version 0.9 which works on kernels later than 2.6.18. Building the module outside the tree worked perfectly. With the handler scripts found on the pcc_acpi site the hotkeys just work. It's really great and I'd like to say a huge thank you to Hiroshi for updating the driver.  Kernel 2.6.23 introduced API changes in ACPI break version 0.9 of the pcc_acpi driver. I've found various patches and arrived at this diff to make pcc_acpi compile and work post 2.6.23. This is based on the patch found here

John Lamb has been in touch to say that the pcc_acpi drive doesn't compile against kernel 2.6.26 due to more ACPI changes. John's kindly put together a diff and provided a pre-patched pcc_acpi.c which can be found here This is based on some Suse fixes. So thanks to John for putting this together.

The alternative is that the in kernel ACPI generic hotkeys driver seems to have some code added to handle the Panasonics - you need this patch though. Append "acpi_generic_hotkey" to force the driver to load. At the moment It seems the driver allows control of lcd brightness via a command:

echo -n xx > /sys/hotkey/brightness 
where xx is 1 to 21

Event handlers are not yet implemented apparently.



Suspend to RAM (S3)

This works with issues. With an X session running S3 will sleep but not resume, even with the use of vbetool to try and reset the video device on wake up. When used with a framebuffer console and the kernel parameter “acpi_sleep=s3_bios” the machine will wake after short periods of standby. Reliable (ish) operation is only achieved by disabling the framebuffer and suspending from a basic console. The SD card reader does not recover from S3, and attempting to load the sdhci module locks the machine. On 2.6.16 X will often not restart after wakeup from S3. Better use suspend to disk which is actually pretty quick on this machine.

Keith Packard has emailed me to say that by using X.org 7.1 and the modesetting branch of the xf86-video-intel driver on 2.6.15 he has had success with s3. This has been confirmed by a number of users. I can't test as I will be on 6.9 for a while yet.

I've recently upgraded to Mandriva 2008.0 which features X.org 7.3 together with kernel 2.6.24 things seem better than ever before. mandriva has a nice script that disables troublesome modules such as USB. the system recovers about 80% of the time from S3. That's still really not useful so i stick with the suspend to disk option.

Suspend to disk (SWSUSP)

The in kernel swsusp functionality works very well. I have it set up to hibernate to my swap partition. Suspend to disk seems to work even with an X session running, so long as you switch to a blank console first, simply by entering:
echo disk > /sys/power/state
Suspend takes about 20 seconds and resume about 15. The SD Card reader works fine after suspend to disk.

I have not tested swsusp2 as it will not apply to the CK sources and I don't see the advantage here.


ACPI

ACPI events are captured by ACPID. I have some sample scripts here.


CPU Frequency Scaling

The Advanced speedstep CPU frequency scaling driver works flawlessly. There are six steps from 600 to 1200Mhz. After reading the excellent article from Intel about enhanced speedstep I have started using the kernel space ondemand governor instead of a userspace daemon. This takes advantage of the low latency switching that the CPU can do in the R4.

On the subject of power saving I am running Adam Belay's patch to improve Idle power management. I can't say if it's better than stock or not, but I thought I'd give it a test. This I guess morphed into CPU idle, which I am running along with the high res timers. See below for some more thoughts on power consumption. A lot of this has been merged in 2.6.24 which is really cool.


Japanese Keyboard

The JP106 keyboard mapping works well. The yen key seems not to work, and I need to remap the $ to a UKP symbol. Youll need something like scim to get the Japanese text input to work.


Circular touch and scroll pad.

Works fine with the out of the box synaptics driver in Mandriva. Once xorg.conf is modified with entries from here circular srolling works great. In fact it's the best touchpad I've ever used.

External Monitor

Using X.org 1.3.0 with the intel driver your external monitor should be detected at xstartup, set up with a respectable resolution and just work. You can use xrandr or krandr to set up an appropriate resolution if desired.  That's certainly how it works on Mandrive 2008.0

Power,power,power


Panasonic claim a nine hour batter life for the R4. With the release of powertop by Intel I was inspired to try and get my R4 super optimised. It has to be said my R4 was doing OK as it was. I was routinely getting 6+ hours in typical use without the wireless. Playing with powertop I was able to see that there were some areas for improvement. Wakeups with Mandriva 2006.0 and 2.6.21-ck were running at about 160 - Rather too high, I decided to bite the bullet and take the number one suggestion from powertop to upgrade my distro. Upgrading to Mandriva 2007.1 dropped the wake ups to about 140. More work was clearly needed. I upgraded to a 2.6.22 kernel with the hrt patches applied. By enabling dyntics, forcing hpet, compiling in CPU Idle and tweaking a few things as powertop suggested I'm down to about 95 wakeups. Big improvement, but still seems a bit high compared to other similar hardware. Following upgrade to Mandriva 2008.0 and kernel 2.6.24.2 wakeups are down to about 70 with the WIFI off. Battery life is now routinely hitting just shy of 8 hours. A big jump indeed. Thanks Intel. If anyone wants the full details drop me a line, but it's fun to figure it out yourself. 

Things to note about this laptop

Panasonic configure the drive with a Host Protected Area (HPA) at the end of the drive. It is, or rather was, about 3GB of space on my unit with a 60GB drive. Kernel 2.6 ignores HPAs and allows you to use the space as you wish. This is great if you are going Linux only, but may spring a trap on you if you want to keep or restore Windows as this is where the recovery image is held. There is somewhere an option to respect HPAs, and if you are ever going to need the recovery files I suggest you find this, or be very careful about formatting your disk.


Six months on...

I've been using my R4 now for six months. It's proved robust, reliable and very functional. One of the things I wondered when I bought the R4 was "will I get tired of it once the novelty wore off?". The answer is an emphatic no. I'm totally used to the keyboard, the touchpad is great and there is nothing to beat it for weight and size.  The hard drive remains just as quiet as when new. I will probably upgrade it once the warranty period ends.

A criticism of the Panasonic is the screen. It a great display but it has a really tight viewing range. A difference of a just a few degrees in the vertical viewing angle leads to a significant loss of brightness. Two dead pixels have also appeared. On a machine in this price band it is a shame that a better LCD material could not have been sourced. USB ports on both sides of the machine would be cool and having gigabit ethernet would also round the package off beautifully.

It is certainly a tough little machine. My R4 took a cricket ball hit at force on the keyboard without so much as a scratch! (Suffice it to say that bouncing a ball on a bat surrounded by several thousands of pounds of computer equipment is not the smartest move.)

Two years on...

Eeek. Two years?! My R4 is still going strong. It's been around the world, been lost and found in a KL hotel, and since x-org 1.3 been my main office machine. I've recently upgraded to a 250gb hard drive. I considered using a SSD, but went for capacity in the end. I'm glad I did, as I have since heard from a user that the R4 failed to recognise his Transcend SSD when installed. 

I see no product in the market that I'd rather be using, including the new Panasonics. I think there's not much more to say so there may not be many more updates to the site. Hope someone found it useful.

Things I wondered about before I bought it

Is it too small to work on and just a toy?
No. You get used to the keyboard quickly and the 10.4 inch screen is very sharp and very bright. Typing is fairly comfortable if you have smallish hands. The machine remains fairly cool under load.

How well made is it?
As you would expect from Panasonic it's exceptionally well built. The only complaint is the horrid rubber cover over the ethernet and modem ports.

Will it boot from USB floppy / CD-ROM / Network
Yes, Yes and Yes. Knoppix even ran from an external CD-ROM. The bios allows you to choose English or Japanese making setup easy.

Is it a regular 2.5 inch disk? What speed?
Happily the machine I have has a very quick 2.5 inch 5400rpm Toshiba drive in it.

Does the battery really go nine hours?
Probably in light use with the backlight at it's lowest setting. See the section above on power. In normal use I get about seven+ hours.

What comes in the box?
A Japanese manual, warranty and XP licence. A single power supply with a Japanese power cord. The PSU is very light also. That's it. I guess if you need a modem cable etc you need to buy one.

Is it worth close to UKP1200?
I'd say so, I'm happy with my purchase... So is the customs man.

Is it hard to get?
No. The good people at conics.net shipped mine from Japan to the UK in four working days.

Is 1.2Ghz enough to make worthwhile difference over a 700Mhz P3 in things like rescaling big images and playing movies? How is it with encrypted partitions?
Yep. Big difference. Using loopaes encrypted partitions doesn't slow it down much. Thoughputs are about 28MB/s. I would be interested to note if the R5 does as well with it's lower clock speed.

I need help...

A few people have been in touch to ask if I have preinstalled images that I could send to get their R/T/W/Y series laptop working. I'm afraid I don't. You are welcome to direct any questions or comments to me below.

Contact the author 

David Wallace 
r4@laohu.co.uk

version 18 2009-12-06