Difference between revisions of "Laptop Dell Latitude E5420"

From YobiWiki
Jump to navigation Jump to search
m (Created page with "<br>Here is my setup experience of a Debian Wheezy. ==Links== * Dell * [https://www.dell.com/us/business/p/latitude-e5420/pd Official page] * Linux & E5420 * Debian Wheezy ** [h…")
 
Line 12: Line 12:
 
===CPU===
 
===CPU===
 
<br>cat /proc/cpuinfo
 
<br>cat /proc/cpuinfo
  +
Returns 4 times this:
  +
vendor_id : GenuineIntel
  +
cpu family : 6
  +
model : 42
  +
model name : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
  +
stepping : 7
  +
cpu MHz : 800.000 - 2500.000
  +
cache size : 3072 KB
  +
fpu : yes
  +
fpu_exception : yes
  +
cpuid level : 13
  +
wp : yes
  +
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid
  +
bogomips : 4987.56
  +
clflush size : 64
  +
cache_alignment : 64
  +
address sizes : 36 bits physical, 48 bits virtual
  +
power management:
   
 
===Misc===
 
===Misc===

Revision as of 13:05, 8 November 2011


Here is my setup experience of a Debian Wheezy.

Links

Hardware

CPU


cat /proc/cpuinfo Returns 4 times this: vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz stepping : 7 cpu MHz : 800.000 - 2500.000 cache size : 3072 KB fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid bogomips : 4987.56 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:

Misc

  • BIOS

Power

Physical connectors

  • left side
    • USB Powershare (allows charging USB devices when system is off)
    • USB/eSATA (for ext HD or E-Mod?)
    • HDMI
    • Firewire 1394
    • SD card reader
    • smartcard reader
  • back
    • power input
    • Room for modem plug, but no modem installed
    • USB Powershare
    • Ethernet plug hole
  • right side
  • bottom
    • connector for docking station
    • SIM card slot, empty, hidden behind the battery
  • right side
    • VGA
    • DVD +/-RW
    • USB Powershare
    • headphone
  • front
    • wifi switch
    • power led & battery led

Installing Debian Wheezy

Booting on the netinst CD


Apparently Wi-Fi interface could be used for the Netinst but it requires firmware, so I'll use the Ethernet option.
It expects DHCP by default, I'm not sure how you could use static IP
In case of problems you can find a console by pressing CTRL-ALT-F2/ENTER, and find back the graphical installer by pressing ALT-F5 or ALT-F6

Partitioning

As I wanted a special setup I chose the manual mode for partitioning.
So:

  • Create part#1, 500MB, ext2, /boot
  • Create part#2, 4GB, physical volume for encryption (will be LUKS with our swap)
  • Create part#3, 50GB, physical volume for encryption (will be LUKS with our /)
  • Create part#5, 150GB, physical volume for encryption (will be LUKS with our /home)
  • Create part#6, 45.6GB, physical volume for encryption (will be LUKS with our /professional)

Note that for part#5 and #6, simply choose "logical partition", it will create the extended part#4 without showing it.
Setup encrypted disks:

  • part#2 => setup with random key, aes 256 cbc-essiv:sha256
  • part#3 => setup with passphrase, aes 256 cbc-essiv:sha256
  • part#5 => setup with passphrase, aes 256 cbc-essiv:sha256. If you want to use XTS block chaining I think you need to do it later
  • part#6 => setup with passphrase, aes 256 cbc-essiv:sha256

Beware erasing with random data can take a long time!!
Create encrypted partitions:

  • sda2_crypt => swap
  • sda3_crypt => /, ext4 with user_xattr
  • sda5_crypt => /home, ext4 with user_xattr
  • sda6_crypt => /professional, ext4 with user_xattr

Installing software

I let tasksel picking up its default bunch of packages "Desktop", "Laptop", "SSH" and "Standard".
Time for a tea cup...

First boot

OLD NOTES, PLEASE IGNORE

(OK) Setting up Wi-Fi

See http://wiki.debian.org/iwlagn#Squeeze and http://wiki.debian.org/WiFi/HowToUse

Add a "non-free" component to /etc/apt/sources.list, for example:

# Debian Squeeze
deb http://ftp.us.debian.org/debian squeeze main contrib non-free

Add the Debian Kernel Snapshots repository to /etc/apt/sources.list:

# Debian Kernel Snapshots (experimental!)
deb http://kernel-archive.buildserver.net/debian-kernel sid main

Add the Debian Kernel Snapshots repository key:

# wget -q -O - http://kernel-archive.buildserver.net/key | apt-key add -

Update the list of available packages and install the firmware-iwlwifi and wireless-tools packages:

# aptitude update
# aptitude install firmware-iwlwifi wireless-tools

Install a 2.6.28 (or later) kernel image appropriate for your system. For example:

# aptitude install linux-image-2.6.29-2-amd64

Note that if you have more than 3.2Gb of RAM you'd better use a bigmem kernel.
Restart your system and boot with the newly installed kernel.

Now, in Gnome, when clicking on the Network applet you can configure Wi-Fi

(OK) Suspend

Suspend-to-RAM seems to work fine, very quick restore
Can be called via the menu or by pressing FN-Moon key, wake up by pressing power button
If you setup Gnome to suspend-to-RAM when LID is closed, then it'll wake up when you open it again
As we don't have a swap partition, no suspend-to-disk!

Swapfile

aptitude install dphys-swapfile

By default it will be 2xRAM size, located at /var/swap. If you want to change it:

/etc/init.d/dphys-swapfile stop
cp /usr/share/doc/dphys-swapfile/examples/dphys-swapfile.example /etc/dphys-swapfile
# Edit /etc/dphys-swapfile
/etc/init.d/dphys-swapfile start

Take care it's excluded from your backup strategy...

Additional encrypted partitions

As seen before, I want to use /dev/sda5 and /dev/sda6 as extra encrypted partitions according to my notes on LUKS.

dd if=/dev/urandom of=/dev/sda5
cryptsetup luksFormat -c aes-xts-plain -s 256 /dev/sda5
YES
my_passphrase
echo "sda5_crypt /dev/sda5 none luks" >> /etc/crypttab
/etc/init.d/cryptdisks start
my_passphrase
mkfs.ext3 /dev/mapper/sda5_crypt
echo "/dev/mapper/sda5_crypt /home2 ext3 user_xattr,errors=remount-ro 0 1" >> /etc/fstab

Note that we'll mount it first on /home2 as we're already working from /home

Idem for sda6

If you prefer you can also refer to partitions via their UUID rather than "/dev/sdaN", cf "blkid" to get a list of UUIDs

Transferring content

From old to new laptop, I used a cable between them. Dell laptops are able to turn a straight Ethernet cable into a cross-cable.

## source:
# tar cf - /home/* |nc -l -p 10000
## target (in /home2):
# nc -w 5 10.0.0.1 10000 |pv|tar xf -

(OK/WIP) Video

By default it loaded the generic VESA driver in a panned 1024x768 resolution.
Solution:
Add manually in /etc/X11/xorg.conf:

 Section "Device"
         Identifier     "Configured Video Device"
+        Driver         "intel"
 EndSection

Ambient Light Sensor is working (even if it seems deactivated in BIOS?!)

(OK) Audio

By default works correctly with ALSA, the mixer has a lot of unknown controls...

To use the kernel OSS emulation of ALSA, by default it always takes the first ADC available which is the internal mic.
To get e.g. baudline working with the external mic, you've first to open once /dev/audio:

cat /dev/audio > /dev/null &
baudline
kill %cat

To get Skype working with the internal mic, see below in the applications section

Example to play the internal mic on the speakers (! Larsen)

arecord -D hw:0,0,0 -f S16_LE -c2 -r48000 | aplay -D hw:0

And with the external mic:

arecord -D hw:0,0,1 -f S16_LE -c2 -r48000 | aplay -D hw:0

(OK) HDMI

HDMI through the docking station works OOB.

I also bought a cheap DisplayPort to HDMI converter dongle on eBay and it works like a charm.
Refs: Neet 1 x DispayPort ( MALE std size 20 pin ) to HDMI ( FEMALE std size 19 pin ), 9 GBP

Simply use xrandr to activate the HDMI output. My TV resolution is 1900x1080.
To get also the sound through HDMI, use ALSA device "hdmi" or if it's not 5.1 but only stereo: "plug:hdmi"
E.g. with aplay:

$ aplay -D plug:hdmi -c 2 file.wav

With mplayer:

$ mplayer -ao alsa:device=hdmi movie.avi

or

$ mplayer -ao alsa:device=plug=hdmi movie.avi

(OK) Touchpad

To allow fine-tuning of the device and activate circular scrolling:

# aptitude install gpointing-device-settings xinput
$ xinput list
... "AlpsPS/2 ALPS DualPoint TouchPad"

xinput is not needed but it's a handy tool

Note that as I had some problems to run gpointing-device-settings, I upgraded my whole Xorg setup to 7.4

# aptitude install xserver-xorg/unstable

then accept upgrade of all dependencies

(OK) SD Card Reader

Works

(OK) PC Card (PCMCIA)

Works

(WIP) Express slot

Not tested, should work.
Note from Gentoo:

  • enable PCI express and hotplugging as modules (pciehp and pci_hotplug)
  • load pciehp module with pciehp_force=1 parameter in order to have hotplugging functionality

(OK) USB

Works

(WIP) Firewire

Not tested, should work

(WIP) eSATA

Not tested, should work

(Partial) Smartcard reader

Broadcom 5880, ARM-based

aptitude get install pcscd pcsc-tools

Add the reader to libccid conf file
Without fingerprint reader: VendorID=0x0a5c ProductId=0x5800 (with: 0x5801)
Edit /etc/libccid_Info.plist and add lines in ifdVendorID, ifdProductID and ifdFriendlyName arrays

Trying manually

/etc/init.d/pcscd stop
pcscd -f -a -d

FAILED with IFDHCreateChannelByName() failed

Actually it may work but only if a card is present when pcscd is started.
See also here

RFID support seems not possible on Linux for now

UPDATE: since an upgrade it's even worse, only basic retrieval of ATR works

Should try a firmware upgrade? see http://www.natisbad.org/E4300/index.html

Tuning Gnome

  • add to panel
    • CPU frequency scaling monitor: works fine
    • Deskbar (ALT-F3)
    • Lock screen
    • System monitor
  • System->Preferences
    • Keyboard->Dell Latitude series laptop
    • Power management->When laptop lid is closed: Suspend
  • Applications->Sound->Volume Control
    • Preferences-> show PC Beep track
    • Turn off PC beep (vol=0 is not enough), haaaa much better :-)
  • Epiphany is the default browser, to change it:
    • System->Preferences->Preferred Applications
    • See also:
# update-alternatives --config x-www-browser

Additional software

Dependencies for ia32

It's possible to run natively some 32-bit code, to be prepared:

# aptitude install ia32-libs ia32-libs-gtk lib32nss-mdns

See also The Debian GNU/Linux AMD64 HOW-TO

Dell specific

# aptitude install libsmbios-bin

Flash

If you're lucky you can try

aptitude install flashplugin-nonfree

But while I'm writing these lines, Adobe didn't maintain its 64-bit version (latest was 10.0.45.3 I think while 32-bit version is 10.1.53.64).
The options are:

  • Install an alternative, I tried gnash but it failed playing youtube videos, I didn't try further
  • Keep the bogus & unsecure 64-bit version (reinstalling it is even not possible because flashplugin-nonfree cannot download the checksum files anymore)
  • Downgrade Firefox to a 32-bit version (just for this f** flash plugin?? come on...)
  • Install the 32-bit version of Adobe flash, through nspluginwrapper

This is the last option that I'll try to follow, this is also the option proposed by the Firefox add-on Flash AID, but it only works properly on Ubuntu.
But there is not yet a Debian package proposing this setup, only Ubuntu does offer it so I installed the Ubuntu package from here:

wget http://security.ubuntu.com/ubuntu/pool/multiverse/f/flashplugin-nonfree/flashplugin-installer_10.1.53.64ubuntu0.10.04.1_amd64.deb
sudo dpkg -i flashplugin-installer_10.1.53.64ubuntu0.10.04.1_amd64.deb 

I get an error on missing nspluginwrapper so I installed it (from debian-multimedia)

sudo aptitude install nspluginwrapper

It still fails with

nspluginwrapper: no appropriate viewer found for libflashplayer.so

We can see the source of the error by trying

sudo nspluginwrapper -v -i /usr/lib/flashplugin-installer/libflashplayer.so 

Ok we're missing some libnss3 stuff, actually the 32-bit version of that library so:

sudo apt-get install ia32-libs-libnss3

So to put everything in the right order:

sudo apt-get install ia32-libs-libnss3 nspluginwrapper
wget http://security.ubuntu.com/ubuntu/pool/multiverse/f/flashplugin-nonfree/flashplugin-installer_10.1.53.64ubuntu0.10.04.1_amd64.deb
sudo dpkg -i flashplugin-installer_10.1.53.64ubuntu0.10.04.1_amd64.deb

Result: complete fail
It takes ages to start Firefox, it burns CPU as hell and it doesn't even work to do what it's supposed to do: playing swf movies.

So back to square one, I want to reinstall the broken 64-bit version and wait for Adobe to provide a better version.
As flashplugin-nonfree doesn't work anymore, I'm doing it by hand:

wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz
tar zxvf libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz
sudo cp libflashplayer.so /usr/lib/firefox/plugins/

Another attempt because this 64-bit version becomes really too unsecure to live with (be sure to remove all 64-bit versions of libflashplayer.so from your install):

sudo apt-get install ia32-libs-libcurl3 ia32-libs-libnspr4 ia32-libs-libidn11 ia32-libs-libssh2 ia32-libs-libnss3
# Get flash from http://get.adobe.com/fr/flashplayer/thankyou/?installer=Flash_Player_10.1_for_Linux_(.tar.gz)
tar xzf install_flash_player_10_linux.tar.gz
mkdir ~/.mozilla/plugins_i386/
cp libflashplayer.so ~/.mozilla/plugins_i386/
nspluginwrapper -v -i ~/.mozilla/plugins_i386/libflashplayer.so

Note that instead of getting ia32 libs from Marillat, one can try the following script: http://people.debian.org/~bartm/flashplugin-nonfree/ia32-libs-workaround-499043-squeeze.sh

UPDATE: Adobe has a preview release of FlashPlayer v10 natively 64-bit. One simply needs to replace its libflashplayer.so, e.g. in ~/.mozilla/plugins/libflashplayer.so

Misc software

# aptitude install mc etckeeper htop iotop \
                   dlocate reportbug-ng cruft \
                   sun-java6-jdk sun-java6-plugin \
                   flashplugin-nonfree icedove ttf-unifont \
                   lynx \
                   libio-socket-ssl-perl \
                   abiword vim gawk-doc \
                   gphoto2 hugin autopano-sift-c kflickr \
                   gimp-data-extras gimp-help-common gimp-help-en  gimp-help-fr gimp-plugin-registry gimp-resynthesizer gimp-texturize \
                   pitivi \
                   psi libqca2-plugin-gnupg gajim \
                   telepathy-gabble telepathy-salut telepathy-butterfly telepathy-haze telepathy-idle telepathy-sofiasip telepathy-stream-engine \
                   samba smbclient smbfs wine synergy \
                   rar unrar unzip \
                   k3b \
                   computertemp netspeed teatime driconf \
                   impressive \
                   gcompris extremetuxracer armagetronad \
                   ntfsprogs
# aptitude install build-essential binutils-doc \
                   g++-multilib g++-4.3-multilib gcc-multilib gcc-4.3-multilib gcc-4.3-locales \
                   gcc-doc gcc-4.3-doc glibc-doc libstdc++6-4.3-doc \
                   autoconf automake1.9 libtool flex bison gdb \
                   libstdc++6-4.3-dbg libgcc1-dbg libgomp1-dbg libmudflap0-dbg \
                   manpages-dev libmudflap0-4.3-dev \
                   git-doc git-svn git-cvs gitk git-gui kdiff3 \
                   libqt4-dev libreadline5-dev
# aptitude install dash
# dpkg-reconfigure dash

Compiz:

aptitude install compiz compizconfig-settings-manager compiz-fusion-plugins-main compiz-fusion-plugins-extra
gconftool-2 --set /apps/compiz/general/allscreens/options/active_plugins \
            --type list --list-type string \
            '[gconf,png,svg,decoration,wobbly,fade,minimize,cube,rotate,zoom,scale,move,place,switcher,screenshot,resize]'
ccsm

Virtualbox

Because we've chosen a 2.6.29 kernel we'll need to build the virtualbox module ourselves, with kbuild package from Sid, so first let's add Sid feeds:
Add to /etc/apt/sources.list

deb http://ftp.be.debian.org/debian/ sid main contrib non-free
deb-src http://ftp.be.debian.org/debian/ sid main contrib non-free

And make sure "testing" will remain our default distro:

echo 'APT::Default-Release "testing";' > /etc/apt/apt.conf.d/00default

Now we can do our job:

aptitude install module-assistant linux-kbuild-2.6.29
module-assistant prepare
module-assistant auto-install virtualbox-ose
aptitude install virtualbox-ose

Notes on using the commercial version of VirtualBox:

  • one single package covers all
  • remove all OSE-related packages prior install, including guest additions
  • exec is called VirtualBox instead of virtualbox for the OSE version
  • to recompile the driver for a new kernel: (if it fails check /var/log/vbox-install.log you probably forgot the kernel headers)
/etc/init.d/vboxdrv setup

Multimedia

From Marillat, add this to /etc/apt/sources.list:

deb http://www.debian-multimedia.org/ testing main 
deb-src http://www.debian-multimedia.org/ testing main 
# aptitude update
# aptitude install debian-multimedia-keyring
# aptitude dist-upgrade
# aptitude install acroread acroread-plugins acroread-dictionary-en acroread-l10n-en \
                   2mandvd dvdrip gtkpod-aac k9copy lame w64codecs libdvdcss2

To still have evince as the default pdf reader:

echo "evince: */*" >> /etc/mailcap.order
update-mime

Skype

2.0.0.72
# aptitude install libqt4-gui

Get the Etch package at http://www.skype.com/go/getskype-linux-deb

# dpkg -i --force-architecture skype-debian_2.0.0.72-1_i386.deb

I had some troubles to get the internal mic working, add to ~/.asoundrc :

pcm.intmic {
   type hw
   card 0
   device 0
   subdevice 0
}

And in Skype select "intmic" as input

For the external mic, it's subdevice 1

2.1.0.47 (beta)

Because of the architecture mismatch, apt doesn't know about those i386 skype packages so we've to use dpkg when we want to remove them

# dpkg -r skype
# dpkg -i --force-architecture skype-debian_2.1.0.47-1_i386.deb

Well actually you may try the Ubuntu 64bit package but actually it's just the same 32bit binary... Apparently there is still a little problem when executing skype:

$ skype
(<unknown>:7008): Gtk-WARNING **: /usr/lib/gtk-2.0/2.10.0/engines/libclearlooks.so: wrong ELF class: ELFCLASS64

This can be solved by calling skype like this:

$ GTK_PATH=/usr/lib32/gtk-2.0 skype

Then I got a crash whenever I tried to call or chat, to solve it, see here:

  • maybe deinstall pulseaudio
  • remove /usr/lib32/libpulse*
  • execute ldconfig

Google Earth

# aptitude install googleearth-package
$ make-googleearth-package
# dpkg -i googleearth_5.0.11733.9347+0.5.6-1_amd64.deb

Google Gears

Is not officially distributed for 64-bit but some folks did the job for you.

See here

Some precompiled xpi are available here

Security-related

# aptitude install openssh-server openvpn network-manager-openvpn-gnome resolvconf pwsafe kgpg
# aptitude install encfs
# adduser toto fuse

You may want to activate sudo support for your user

# adduser toto sudo

and if you want to skip password, uncomment last line of /etc/sudoers with

# visudo

Recompiling pcscd with libusb support for external RFID reader Omnikey 5321: see here

TODO

  • video: 3D modes etc, dual screen etc 1
  • video: prob when going back to console, try fb?
  • restore other encrypted partitions See also my old LUKS notes
  • WPA roaming ok? check EAP
  • IA32 chroot
  • compare with old setup list of packages and list of non-system files
  • check all hardware support
  • compare loaded drivers with Ubuntu list
  • USB Powershare to be activated in BIOS
  • Intel Virtualization Technology to be activated in BIOS
  • TPM disabled in BIOS, anything interesting there?
  • dcdbas & libsmbios
  • sensors?
  • Bradcom USH (BCM5880) RFID & HID Global iCLASS ?? 1
  • Wifi catcher button?
  • DCP key?
  • DisplayPort
  • LUKS preload keys
  • merge bashrc
  • check backuppc
  • microphone?