https://wiki.archlinux.org/api.php?action=feedcontributions&user=Thewinduppirate&feedformat=atomArchWiki - User contributions [en]2024-03-29T14:17:35ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Carbon&diff=306374Lenovo ThinkPad X1 Carbon2014-03-21T22:36:15Z<p>Thewinduppirate: Mentioned vanilla fprint works on an X1 for those not requiring a GUI</p>
<hr />
<div>[[Category:Lenovo]]<br />
== Model description ==<br />
<br />
Lenovo ThinkPad X1 Carbon (X1C).<br />
There is also a touch version. Comes without optical drive. <br />
Has UEFI BIOS with BIOS-legacy fallback mode.<br />
<br />
{{tip| A great resource for thinkpads is<br />
http://www.thinkwiki.org/wiki/ThinkWiki}}<br />
<br />
=== Legacy-BIOS ===<br />
<br />
This procedure is far less involved than UEFI and works perfectly.<br />
<br />
In order to turn off UEFI booting you will need to boot into your BIOS and change the boot mode to Legacy. Afterward, follow the [[Beginners' guide]] for standard installation instructions.<br />
<br />
=== UEFI ===<br />
<br />
Use [[archboot]] to install or see https://bbs.archlinux.org/viewtopic.php?pid=1288500#p1288500<br />
<br />
1. You follow the guide from here and skip the part about errors and refind: [[Unified_Extensible_Firmware_Interface#Create_UEFI_bootable_USB_from_ISO|Create_UEFI_bootable_USB_from_ISO]]<br />
<br />
2. Make sure you USB is mounted to /boot/efi and install grub, like so:<br />
$ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --boot-directory=/boot/efi/ --recheck --debug<br />
<br />
OBS: You can remove the entry from your EFI bootmanger, with efibootmgr by issuing:<br />
$ efibootmgr -b XX -B<br />
3. Now you can choose if you wanna hack you grub.cfg or use the custom config in grub.d. Either way generate the grub.cfg:<br />
$ grub-mkconfig -o /boot/efi/grub/grub.cfg<br />
<br />
4. Make certain appropriate changes have been made to grub.cfg. My working example, which could use cleaning:<br />
{{hc|/etc/grub.d/10_linux|<nowiki><br />
### BEGIN /etc/grub.d/10_linux ###<br />
menuentry 'Arch Linux test' {<br />
load_video<br />
set gfxpayload=keep<br />
insmod gzio<br />
insmod part_gpt<br />
insmod ext2<br />
set root='hd0,gpt1'<br />
if [ x$feature_platform_search_hint = xy ]; then<br />
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 B35D-FE34<br />
else<br />
search --no-floppy --fs-uuid --set=root B35D-FE34<br />
fi<br />
echo 'Loading Linux core repo kernel ...'<br />
linux /arch/boot/x86_64/vmlinuz root=UUID=B35D-FE34 ro archisobasedir=arch archisolabel=ARCH_201306<br />
echo 'Loading initial ramdisk ...'<br />
initrd /arch/boot/x86_64/archiso.img<br />
}<br />
<br />
<br />
### END /etc/grub.d/10_linux ###<br />
</nowiki>}}<br />
<br />
5. Move the grub.efi to overwrite the archiso supplied one (which btw works on my desktop. I guess GRUB includes more workarounds for buggy firmware from manufactureres. See this video, if you have time: http://mjg59.dreamwidth.org/10014.html<br />
$ mv /boot/efi/EFI/arch_grub/grubx64.efi /mnt/efi/EFI/boot/bootx64.efi<br />
<br />
Success. Somethings are implied, like GPT partitiontable etc.<br />
<br />
== Hardware ==<br />
<br />
Almost everything works out of the box.<br />
<br />
=== Audio ===<br />
Sound works out of the box.<br />
<br />
=== Network ===<br />
<br />
==== Wired ====<br />
<br />
Comes with USB->Ethernet plug. Works out of the box.<br />
<br />
==== Wireless ====<br />
<br />
Works out of the box. Uses the following module<br />
* iwlwifi<br />
<br />
----<br />
{{ic|lspci}} ''output: Network controller: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] (rev 96)''<br />
<br />
=== Touchscreen ===<br />
<br />
Works out of the box.<br />
Haven't looked for possibilities to configure multi-touch.<br />
<br />
=== Video ===<br />
<br />
The video card installed is Intel HD Graphics 4000. See [[intel]] for more info.<br />
<br />
Install the video driver with {{ic|pacman -S xf86-video-intel}}<br />
<br />
==== Brightness control ====<br />
Default brightness adjustment keys work but need to be pressed multiple times to increase/decrease the screen brightness. Writing your own acpi handlers for those buttons seems to have no effect. In order to use it properly you need to append a new kernel parameter and make new grub config. Make sure to escape double quotes.<br />
{{hc|/etc/default/grub|<nowiki><br />
GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=\"!Windows 2012\""<br />
</nowiki>}}<br />
sudo grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
Read more about why it's necessary at [[Backlight#ACPI]]<br />
<br />
Some depending on their desktop environment may lack granularity while changing brightness. This is due to the DE (e.g. gnome-settings-daemon) along with the internal graphics module changing the brightness when brightness adjustment keys are pressed causing multiple steps per press. To work around this one can add the following to their boot parameters:<br />
video.brightness_switch_enabled=0<br />
<br />
==== EDID bug ====<br />
<br />
{{Note|Update: This is due to the use of a mini-DP->VGA-adapter. Tested without bugs with a mini-DP->DP-cable.}}<br />
<br />
<br />
There is a bug getting EDID for the external screen when connected at bootup.<br />
<br />
I get this error message<br />
[ 93.736330] [drm:intel_dp_i2c_aux_ch] *ERROR* too many retries, giving up<br />
<br />
If external screen is connected after bootup everything works fine.<br />
<br />
I had to manually add a modeline and set the preferred resolution with this script.<br />
{{hc|/usr/local/bin/dp-output|<nowiki><br />
# Monitor setup<br />
EXTERNAL_OUTPUT="DP1"<br />
INTERNAL_OUTPUT="LVDS1"<br />
<br />
xrandr |grep $EXTERNAL_OUTPUT | grep " connected " | if [ $? -eq 0 ]; then<br />
xrandr --newmode 1920x1200_60 154 1920 1968 2000 2080 1200 1203 1209 1235 -hsync +vsync<br />
xrandr --addmode DP1 1920x1200_60<br />
xrandr --output $INTERNAL_OUTPUT --off --output $EXTERNAL_OUTPUT --mode 1920x1200_60<br />
fi<br />
</nowiki>}}<br />
<br />
And add the script to startup at X-session start. Since I use [[slim]] it`s done with this setting in slim.conf<br />
{{hc|/etc/slim.conf|sessionstart_cmd dp-output}}<br />
<br />
=== KMS ===<br />
Get [[KMS]] working by adding i915 to the modules line <br />
{{hc|/etc/mkinitcpio.conf|<nowiki>MODULES="i915"</nowiki>}}<br />
<br />
$ mkinitcpio -p linux<br />
<br />
You also have to enable VT in BIOS.<br />
<br />
=== Webcam ===<br />
Works out of the box. Tested with guvcview<br />
<br />
=== Fingerprint Reader ===<br />
<br />
Works out of the box with [[Fprint]]. <br />
<br />
For a GUI {{AUR|fingerprint-gui}} from the [[AUR]] is already patched to work with the X1's newer fingerprint reader. To get the gui's dropdown to recognize your device, you'll have to add your user to the {{ic|plugdev}} group:<br />
<br />
$ gpasswd -a <username> plugdev<br />
<br />
See [[fingerprint-gui]] for more information about config<br />
<br />
----<br />
{{ic|lsusb}} ''output: 147e:2020 Upek TouchChip Fingerprint Coprocessor (WBF advanced mode)''<br />
<br />
=== WWAN (Mobile broadband) ===<br />
<br />
This model includes a [http://www.thinkwiki.org/wiki/Ericsson_H5321_gw_Mobile_Broadband_Module Ericsson H5321gw] adapter that can be used as a mobile broadband adapter and GPS.<br />
<br />
The SIM-card must be inserted in the back of the laptop.<br />
<br />
Add text to the following file and reboot<br />
<br />
{{hc|/etc/modprobe.d/avoid-mbib.conf|<nowiki>options cdc_ncm prefer_mbim=N</nowiki>}}<br />
<br />
Tested OK with [[networkmanager]] with {{pkg|modemmanager}} installed<br />
----<br />
{{ic|lsusb}} ''output: 0bdb:1926 Ericsson Business Mobile Networks BV''<br />
<br />
=== GPS ===<br />
<br />
Install gpsd from extra and mbm-gpsd-git from AUR.<br />
Add this to the following file<br />
{{hc|/etc/udev/rules.d/99-mbm.rules|<nowiki><br />
ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1926", ENV{ID_USB_INTERFACE_NUM}=="09", ENV{MBM_CAPABILITY}="gps_nmea"<br />
ATTRS{idVendor}=="0bdb", ATTRS{idProduct}=="1926", ENV{ID_USB_INTERFACE_NUM}=="03", ENV{MBM_CAPABILITY}="gps_ctrl"<br />
</nowiki>}}<br />
<br />
Reboot to reload udev rules.<br />
<br />
Run {{ic|sudo mbm-gpsd}}<br />
<br />
See if there's GPS-output<br />
{{ic|cat /dev/gps0}}<br />
<br />
Run {{ic|sudo gpsd -b -N /dev/gps0}}<br />
<br />
To test it {{ic|xgps}}<br />
<br />
Or use e.g. {{AUR|foxtrotgps}} in [[AUR]].<br />
<br />
See [http://www.thinkwiki.org/wiki/Ericsson_H5321_gw_Mobile_Broadband_Module this link] for more info.<br />
----<br />
{{ic|lsusb}} ''output: 0bdb:1926 Ericsson Business Mobile Networks BV''<br />
<br />
=== Keyboard backlight ===<br />
Works out of the box. Use FN+Space<br />
<br />
=== Bluetooth ===<br />
Works out of the box.<br />
Test with:<br />
$ systemctl start bluetooth<br />
$ bluetoothctl<br />
<br />
[bluetooth]# power on<br />
<br />
== Other hardware ==<br />
<br />
=== Docking ===<br />
This model comes without a docking port.<br />
<br />
Since the video for USB 3 Docking Stations currently isn't supported[http://www.displaylink.org/forum/showthread.php?t=1748], I had to go for [http://www.thinkwiki.org/wiki/USB_Port_Replicator_with_Digital_Video USB Port Replicator with Digital Video (USB 2.0)]<br />
<br />
This works:<br />
* USB-devices connected to dock<br />
* Audio<br />
* Microphone<br />
* Ethernet<br />
* Video (follow [[DisplayLink]] guide)</div>Thewinduppirate