Difference between revisions of "Board:lenovo/x60"

From coreboot
Jump to: navigation, search
(Link wacom schematics at bongofish forum)
(Enable backlight controls on X60 (with native gpu init instead of VGA ROM))
 
(85 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
works fine with GNU/Linux, some ACPI issues with Windows needs to be fixed.
 +
 
= Lenovo ThinkPad X60 =
 
= Lenovo ThinkPad X60 =
 
Except where noted all status items apply to:
 
Except where noted all status items apply to:
 
*x60  
 
*x60  
 
*x60s  
 
*x60s  
*x60 tablet
+
*x60 tablet (the digitizer also works)
 
Aside from pre-sales configuration (display, processor speed, optional components) the three models appear identical. It is believed that they share a single schematic.
 
Aside from pre-sales configuration (display, processor speed, optional components) the three models appear identical. It is believed that they share a single schematic.
 +
 
==Installation and Flashing==
 
==Installation and Flashing==
 
Tutorial on Installation and flashing the x60 or t60:
 
Tutorial on Installation and flashing the x60 or t60:
Line 11: Line 14:
 
'''
 
'''
 
  [[Board:lenovo/x60/Installation]]
 
  [[Board:lenovo/x60/Installation]]
 +
 +
== Wifi chipsets ==
 +
 +
Lenovo BIOS has a whitelist of approved PCI ID's for wifi cards. Coreboot does not, so you are free to use any wifi chipset of your choosing once coreboot is installed.
 +
 +
The [http://libreboot.org/ Libreboot] distribution [http://libreboot.org/docs/index.html#recommended_wifi lists Wifi chipsets not needing proprietary software to work].
 +
 
== Status ==
 
== Status ==
 
{{Status|
 
{{Status|
Line 70: Line 80:
 
|PS2_mouse_status = N/A
 
|PS2_mouse_status = N/A
 
|Game_port_status = N/A
 
|Game_port_status = N/A
|IR_status = Untested
+
|IR_status = WIP
 +
|IR_comments = [http://review.coreboot.org/#/c/5242/ Submited for review]
 
|Speaker_status = N/A
 
|Speaker_status = N/A
 
|DiskOnChip_status = N/A
 
|DiskOnChip_status = N/A
Line 95: Line 106:
 
|- bgcolor="#6699ff"
 
|- bgcolor="#6699ff"
 
| colspan ="9" | '''Laptop specific'''
 
| colspan ="9" | '''Laptop specific'''
{{Statusitem|Name=Tablet Touchscreen|Status={{{COM5_status|WIP}}}|Comments={{{COM5_comments|x60 tablet wacom "penabled"}}}}}
+
{{Statusitem|Name=Tablet Touchscreen|Status={{{COM5_status|OK}}}|Comments={{{COM5_comments|x60 tablet wacom "penabled"}}}}}
 +
{{Statusitem|Name=thinkpad_acpi module compatibility|Status={{{thinkpad_acpi_status|OK}}}|Comments={{{thinkpad_acpi_comments|modprobe thinkpad_acpi works}}}}}
 
|}<includeonly>[[Category:Tutorials]]</includeonly><noinclude>
 
|}<includeonly>[[Category:Tutorials]]</includeonly><noinclude>
[http://www.thinkwiki.org/wiki/Wacom_Serial_Tablet_PC_Stylus the touchscreen/pen] do not work as coreboot does not expose the internal COM port to which it is attached:
 
*Serial: irq 5 port 0x0200
 
[http://forum.bongofish.co.uk/index.php?topic=2307.0 Some additional info from a x61t wacom]
 
  
 
== proprietary components status ==
 
== proprietary components status ==
* CPU Microcode (optional?)
+
* CPU Microcode (optional?) - works fine without. See [http://download.intel.com/design/mobile/SPECUPDT/30922214.pdf http://download.intel.com/design/mobile/SPECUPDT/30922214.pdf]
* VGA option rom (optional): without it you will get no graphics during early boot, old kernel versions(like the one in trisquel 6) are able to initializes the intel graphic card. Note that the replacement doesn't work yet with seabios but works with grub(as a payload) or libpayload based payloads.
+
* VGA option rom (optional): Native graphics initialization (free replacement) is also available and merged in the master repo. Note that the replacement doesn't work yet with seabios but works with grub(as a payload) or libpayload based payloads. SeaBIOS can be used with SeaVGABIOS (coreboot linear framebuffer option in seabios menuconfig) but the native graphics implementation currently lacks INT 10H and VBT.
 
* EC(Embedded Controller) =>  you do not have to touch it(just leave it where it is)
 
* EC(Embedded Controller) =>  you do not have to touch it(just leave it where it is)
 
 
  
 
== TODO ==
 
== TODO ==
 
=== Non-free components replacements ===
 
=== Non-free components replacements ===
* <s>Replace the non-free VGA option rom by making native graphics init work.</s> submited for review.
+
* <s>Replace the non-free VGA option rom by making native graphics init work.</s> (native graphics available in master)
* Create a Native graphics<->VGA option rom.
+
* Create a Native graphics<->VGA option rom. '''SeaVGABIOS (part of SeaBIOS) might be the answer. INT 10H and VBT are missing in native graphics.'''
* Make backlight work without the non-free option rom.
+
* <s>Make backlight work without the non-free option rom.</s> See [http://www.coreboot.org/Board:lenovo/x60#Enable_backlight_controls_on_X60_.28with_native_gpu_init_instead_of_VGA_ROM.29]
==== VGA Option ROM / VBIOS replacement (native graphics) ====
+
The [[VGA_support|VGA option ROM]] is proprietary. If you have an X60,X60s or X60t, GNUtoo has developed a free replacement which is under review, but you can use it right now:
+
* [http://www.coreboot.org/User:Fchmmr HOWTO: Build coreboot.rom with GRUB2, native graphics (free replacement for the proprietary VBIOS / VGA Option ROM) and without the nonfree microcode]
+
  
==== Problems in native graphics code exposed by recent kernels ====
+
=== Windows currently doesn't boot (STOP A5 error) ===
It was discovered that while this code seems to work fine on kernels older than linux 3.12.
+
  
On 3.12 and later kernels the i915 driver became unstable. Causing broken/glitchy 3D. and performance bugs.
+
Windows 7 was tested and fails to boot at the moment.
  
The current suspicion is that linux had a bug which caused it to miss stolen memory altogether on this machine and hence disable parts of code.
+
The native graphics implementation lacks INT 10H and VBT, and GRUB cannot boot it. Booting with SeaBIOS+SeaVGABIOS results in graphical corruption (and no boot).
This bug was corrected in:
+
[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=17fec8a08698bcab98788e1e89f5b8e7502ababd 17fec8a08698bcab98788e1e89f5b8e7502ababd]
+
  
Which was identified by git bisect, to be the cause of the driver crashes using native vga on the x60.
+
Booting with SeaBIOS and the VGA ROM (vbios) can be used to boot it, but booting ends with the message outlined here: [http://paste.debian.net/plain/122557 STOP A5]
  
The native vga init code in coreboot needs to be corrected to have more engineered memory management.
+
More information can be found [http://www.coreboot.org/ACPI#STOP_0xa5 here]
In the interim users have attempted running patched linux 3.12 kernels which revert commit 17fec. To apparent success.
+
  
 +
===high pitched noise from the board during low power states===
 +
 +
During low power state (cstate 3), a high-pitched "humming" noise eminates from the board. Some discussion has been made about this; suggestions include "using an oscilliscope in clever ways" (to detect where the noise is coming from to debug the issue). There are some workarounds:
 +
 +
Use "idle=halt" (higher power consumption) or "processor.max_cstate=2" (higher power consumption, but not as bad) kernel parameter in GRUB. These increase heat and power consumption.
 +
 +
Another option (for increased battery life and lower temperatures) is to use '''powertop --auto-tune''', or set 'Tunables' in powertop (without any parameters).
 +
 +
== Text Mode ==
 +
 +
Use [http://review.coreboot.org/#/c/6725/ this patch].
 +
 +
When using native graphics instead of the VBIOS, you can enable Text Mode in menuconfig, under Display.
 +
 +
Disable 'Keep VESA Framebuffer'. This is for booting payloads like MemTest86+ which expect text-mode graphics.
 +
 +
== Enable backlight controls on X60 (with native gpu init instead of VGA ROM) ==
 +
 +
Before building the ROM with native graphics, in src/mainboard/lenovo/x60/devicetree.cb, change gpu_backlight to 0x879F879E
 +
 +
This value was obtained by reading BLC_PWM_CTL when running the VBIOS (option ROM), like so:
 +
 +
'''sudo devmem2 0xe4361254 w'''
 +
 +
Another method is shown in changeset 6731 on review.coreboot.org. If you use this method, also apply this patch to fix uneven backlight levels: [http://paste.debian.net/plain/122548 patch]
  
 
=== Other things ===
 
=== Other things ===
 
* Add support for more batteries in ACPI.
 
* Add support for more batteries in ACPI.
 
* Make the wifi card and/or the laptop produce less heat.
 
* Make the wifi card and/or the laptop produce less heat.
* Finish and merge support for thinkpad_acpi linux kernel module
 
 
* Sometimes some dock USB port aren't initialized => fix that
 
* Sometimes some dock USB port aren't initialized => fix that
 
* Fix that warning:  
 
* Fix that warning:  
Line 142: Line 166:
 
  <phcoder> GNUtoo-x60: in this case it looks like same range is declared twice in DSDT/SSDT
 
  <phcoder> GNUtoo-x60: in this case it looks like same range is declared twice in DSDT/SSDT
  
== Features ==
+
== Documentation ==
=== nvramtool ===
+
* The touchscreen serial port is on irq 5 at port 0x0200. [http://forum.bongofish.co.uk/index.php?topic=2307.0 Some additional info from a x61t wacom]
Without the VGA optiorn rom nvramtool says:
+
# ./nvramtool -a
+
nvramtool: coreboot table not found.  coreboot does not appear to
+
        be installed on this system. Scanning for the table produced the
+
        following results:
+
+
            0 valid signatures were found with bad header checksums.
+
            0 valid headers were found with bad table checksums.
+
Fortunately there is a workarround:
+
# ./nvramtool -y ../../src/mainboard/lenovo/x60/cmos.layout -a
+
boot_option = Fallback
+
last_boot = Fallback
+
baud_rate = 115200
+
debug_level = Emergency
+
hyper_threading = Enable
+
nmi = Disable
+
# Bad value -> boot_devices
+
boot_default = 0x40
+
cmos_defaults_loaded = Yes
+
lpt = Disable
+
volume = 0xc
+
tft_brightness = 0xf
+
first_battery = Primary
+
bluetooth = Disable
+
=== cbmem console ===
+
 
+
<strike>To get cbmem console working you need the non-free i915 option rom or native graphics(doesn't work yet, don't use)</strike> :fixed in master
+
 
+
==== Howto ====
+
When configuring coreboot with "make menuconfig"
+
Go in console:
+
Console  --->
+
Enable it:
+
[*] Send console output to a CBMEM buffer
+
(0x10000) Room allocated for console output in CBMEM
+
(0xc00) Room allocated for console output in Cache as RAM
+
 
+
=== thinkpad_acpi compatibility ===
+
The following commit might be interesting to cherry-pick:
+
git fetch http://review.coreboot.org/coreboot refs/changes/03/3403/3 && git cherry-pick FETCH_HEAD
+
 
+
Dmidecode from the BIOS says:
+
BIOS Information
+
Vendor: LENOVO
+
Version: 7BETC7WW (2.08 )
+
So in make menuconfig go in
+
General setup  --->
+
And modify Local version string accordinly
+
(7BETC7WW (2.08 )) Local version string
+
 
+
Then locate the following in dmidecode:
+
System Information
+
Manufacturer: LENOVO
+
Product Name: 1707Y8W
+
Version: ThinkPad X60
+
Serial Number: L3BY949
+
Then in
+
Mainboard  --->
+
do that:
+
(L3BY949) Serial number
+
(ThinkPad X60) Version number
+
(LENOVO) BIOS table vendor string
+
(ThinkPad X60 / X60s) BIOS table part number string
+
Then configure and build coreboot as usual
+
 
+
<s>To modprobe the module use that:
+
modprobe thinkpad_acpi force_load=1 debug=0xffff fan_control=1 experimental=1
+
</s>
+
The module should now load automatically...
+

Latest revision as of 14:10, 23 September 2014

works fine with GNU/Linux, some ACPI issues with Windows needs to be fixed.

Lenovo ThinkPad X60

Except where noted all status items apply to:

  • x60
  • x60s
  • x60 tablet (the digitizer also works)

Aside from pre-sales configuration (display, processor speed, optional components) the three models appear identical. It is believed that they share a single schematic.

Installation and Flashing

Tutorial on Installation and flashing the x60 or t60:

Which used to be the main x60 page:

Board:lenovo/x60/Installation

Wifi chipsets

Lenovo BIOS has a whitelist of approved PCI ID's for wifi cards. Coreboot does not, so you are free to use any wifi chipset of your choosing once coreboot is installed.

The Libreboot distribution lists Wifi chipsets not needing proprietary software to work.

Status

Device/functionality Status Comments
CPU
CPU works OK Core Duo Mobile (L2300), PBGA479
L1 cache enabled OK
L2 cache enabled OK
L3 cache enabled N/A
Multiple CPU support N/A
Multi-core support OK
Hardware virtualization OK
RAM
EDO N/A
SDRAM N/A
SO-DIMM N/A
DDR N/A
DDR2 OK
DDR3 N/A
Dual channel support OK
ECC support N/A
On-board Hardware
On-board IDE 3.5" N/A
On-board IDE 2.5" N/A
On-board SATA OK
On-board SCSI N/A
On-board USB OK
On-board VGA OK
On-board ethernet OK Intel 82573L
On-board audio OK
On-board modem Untested
On-board FireWire N/A
On-board smartcard reader N/A
On-board CompactFlash N/A
On-board PCMCIA OK Ricoh rl5c476
Add-on slots/cards
ISA add-on cards N/A
Audio/Modem-Riser (AMR/CNR) cards N/A
PCI add-on cards N/A
Mini-PCI add-on cards OK
PCI-X add-on cards N/A
AGP graphics cards N/A
PCI Express x1 add-on cards N/A
PCI Express x2 add-on cards N/A
PCI Express x4 add-on cards N/A
PCI Express x8 add-on cards N/A
PCI Express x16 add-on cards N/A
PCI Express x32 add-on cards N/A
HTX add-on cards N/A
Legacy / Super I/O
Floppy N/A
Serial port 1 (COM1) OK located in Ultrabase X6
Serial port 2 (COM2) N/A
Parallel port N/A
PS/2 keyboard N/A
PS/2 mouse N/A
Game port N/A
Infrared WIP Submited for review
PC speaker N/A
DiskOnChip N/A
Miscellaneous
Sensors / fan control OK
Hardware watchdog N/A
SMBus OK
CAN bus N/A
CPU frequency scaling OK
Other powersaving features OK
ACPI OK
Reboot OK
Poweroff OK
Suspend OK
Nonstandard LEDs OK LEDs are controlled by Embedded Controller (EC). Working without special support.
High precision event timers (HPET) OK
Random number generator (RNG) N/A
Wake on modem ring Unknown
Wake on LAN Unknown
Wake on keyboard Unknown
Wake on mouse Unknown
Flashrom OK See Lenovo_x60x
Laptop specific
Tablet Touchscreen OK x60 tablet wacom "penabled"
thinkpad_acpi module compatibility OK modprobe thinkpad_acpi works

proprietary components status

  • CPU Microcode (optional?) - works fine without. See http://download.intel.com/design/mobile/SPECUPDT/30922214.pdf
  • VGA option rom (optional): Native graphics initialization (free replacement) is also available and merged in the master repo. Note that the replacement doesn't work yet with seabios but works with grub(as a payload) or libpayload based payloads. SeaBIOS can be used with SeaVGABIOS (coreboot linear framebuffer option in seabios menuconfig) but the native graphics implementation currently lacks INT 10H and VBT.
  • EC(Embedded Controller) => you do not have to touch it(just leave it where it is)

TODO

Non-free components replacements

  • Replace the non-free VGA option rom by making native graphics init work. (native graphics available in master)
  • Create a Native graphics<->VGA option rom. SeaVGABIOS (part of SeaBIOS) might be the answer. INT 10H and VBT are missing in native graphics.
  • Make backlight work without the non-free option rom. See [1]

Windows currently doesn't boot (STOP A5 error)

Windows 7 was tested and fails to boot at the moment.

The native graphics implementation lacks INT 10H and VBT, and GRUB cannot boot it. Booting with SeaBIOS+SeaVGABIOS results in graphical corruption (and no boot).

Booting with SeaBIOS and the VGA ROM (vbios) can be used to boot it, but booting ends with the message outlined here: STOP A5

More information can be found here

high pitched noise from the board during low power states

During low power state (cstate 3), a high-pitched "humming" noise eminates from the board. Some discussion has been made about this; suggestions include "using an oscilliscope in clever ways" (to detect where the noise is coming from to debug the issue). There are some workarounds:

Use "idle=halt" (higher power consumption) or "processor.max_cstate=2" (higher power consumption, but not as bad) kernel parameter in GRUB. These increase heat and power consumption.

Another option (for increased battery life and lower temperatures) is to use powertop --auto-tune, or set 'Tunables' in powertop (without any parameters).

Text Mode

Use this patch.

When using native graphics instead of the VBIOS, you can enable Text Mode in menuconfig, under Display.

Disable 'Keep VESA Framebuffer'. This is for booting payloads like MemTest86+ which expect text-mode graphics.

Enable backlight controls on X60 (with native gpu init instead of VGA ROM)

Before building the ROM with native graphics, in src/mainboard/lenovo/x60/devicetree.cb, change gpu_backlight to 0x879F879E

This value was obtained by reading BLC_PWM_CTL when running the VBIOS (option ROM), like so:

sudo devmem2 0xe4361254 w

Another method is shown in changeset 6731 on review.coreboot.org. If you use this method, also apply this patch to fix uneven backlight levels: patch

Other things

  • Add support for more batteries in ACPI.
  • Make the wifi card and/or the laptop produce less heat.
  • Sometimes some dock USB port aren't initialized => fix that
  • Fix that warning:
[   14.566817] ACPI Warning: 0x00000400-0x0000041f SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 1 (20130117/utaddress-251)

By using that advise:

<phcoder> GNUtoo-x60: in this case it looks like same range is declared twice in DSDT/SSDT

Documentation