Installation of Ubuntu Linux (12.04 Precise Pangolin) on a Dell Latitude E6530
I received a Dell Latitude E6530. It is a beautiful and powerful 15.6' laptop. I took 8GB of RAM, 750GB hard drive, the Intel Core i7-3720QM CPU @ 2.60GHz and an nVidia NVS 5200M. The matte (anti-glare) screen (I took the full HD version (1920x1080)) is really nice and well contrasted with vivid colors and deep blacks for a laptop. Pixels are small, but not that small (140dpi), and you can fit a lot in such a big screen.
The keyboard has a numeric pad. Not sure it will be really useful (I rarely use it). The effect is to shift the useful keys a bit to the left. Not so comfortable, but it is not too bad and I am already getting used to it.
As expected from Dell, the laptop is well built and looks robust. It is fast and rather silent, though a bit expensive. It tends to heat a bit, especially on the left side with the fan. It may not be optimal for those who intend to work with it on their lap…
The laptop comes with Windows 7 pre-installed. I installed Ubuntu Precise Pangolin in dual boot, from a USB stick. The process was globally successful, even though a few things still doesn't work. Let's go through what I discovered during this process.
Disclaimer
This post is not a tutorial. It is only a set of notes, aimed at people who know how to use and install Linux.
You perform the following operations at your own risk. I decline any responsibility for all damage, loss of data or anything else (including, but not limited to, the burning of your computer, house or town, the death of a cat, yourself or any one else, the destruction of the Earth or the universe, etc.) that could result directly, indirectly, or in any other way, from performing the following operations. You are warned!
Disabling Optimus
Optimus is a wonderful idea… on the paper! Very shortly: some Intel Cores come with an integrated graphic chip (in this case it is an Intel HD Graphics 4000). The additional nVidia card comes with a system called Optimus which will enable the nVidia card only when the most demanding applications are running. The rest of the time, the nVidia card is disabled to save power. The Intel chip is sufficient for most applications, and certainly for all compiz effects.
But unfortunately nVidia does not provide a Linux driver for Optimus. It isn't clear what actually happens. Is it the Intel or the nVidia card that is enabled? I guess the former is true, but I am quite unsure. To make use of optimus, you need to install Bumblebee to enable/disable it on demand. Basically it will run on the Intel chip and start the nVidia card only when you run the optirun
command.
Until now it all looks fine. The only problem is that this setup (with or without bumblebee) causes random kernel freezes. It even happened me once during the install process (luckily not during partitioning, but I guess that could happen and wipe your hard drive). Apparently it is a known bug of the video driver. Until a fix is available, the solution I found is dramatic: disable optimus altogether and use only the nVidia card Ivybrirdge graphics. To avoid potentially destructive crashes during the install process (what if it occurs during the partitionning?) I recommend disabling optimus as the very first step. You can always enable it later and run your own tests with a later kernel that may have fixed this issue.
So before you start the install, during the boot, press F12 to get the boot menu. Choose BIOS Setup, then Video > Optimus, uncheck the box and exit. Plug the USB stick and power on. It is probably a safe idea to install the proprietary drivers (nvidia-current package), unless you want to remain absolutely free.
There was some confusion previously regarding the effect of disabling Optimus. In some older BIOS revisions (probably until A04 or A05) it would disable the Nvidia card and let only the Intel Graphics run. Now (BIOS A07), the Nvidia card is enabled when Optimus is disabled. Nvidia-current drivers are working. This behavior may change with a future BIOS revision, I have no idea.
Booting on the USB stick
The E6530 won't boot from a plugged USB stick automatically. I selected the boot device manually.
Plug the USB stick. Power on. Press F12 to get the boot menu. The USB Storage Device was not working so I selected the UEFI Generic Flash Disk.
Partitionning
The E6530 comes with 3 partitions on the hard drive:
- 39MiB of FAT16 labelled "DellUtility"
- 752MiB of NTFS labelled "RECOVERY"
- The remaining is formatted in NTFS and contains Windows 7 (labelled "OS")
First step: to shrink the Windows partition (I kept 50GiB). It is normally recommended to perform that operation from Windows directly. However I found that I could free only a few GiB, so I did it from gparted in the live Linux.
Then I secured a small partition for the Linux system, a bit of swap (as much as the RAM plus a bit for safety), and all the rest as a shared partition so the data is available both in Linux and Windows.
The next step was to create an extended partition (you cannot have that many partitions without an extended partition). I then created the following 3 partitions:
- I secured 25GiB ext4 for the system (sda5, mounted on "/"). In practice it is more than enough for the system and some files in your home directory (we will put the big data files elsewhere).
- I created 12GiB of swap on sda6. I have 8GiB of RAM, and as much swap is required if you want to hibernate. There are 4 additional GiB to hibernate under high memory load. Probably useless, but also harmless with a 750GB disk.
- All the rest (610GiB, sda7) is formatted as NTFS and mounted on /mnt/data.
- I put the bootloader on the partition mounted on / (here sda5). Anyway it will still boot through the Windows bootloader (we will configure that later).
Do not try to use your big data partition directly for /home. I tried it, and it was a complete failure! The problem is that NTFS doesn't have file permissions. So either all or none of the files are executable. They all have the same owner/group. We will change the default permissions later, but it is not enough and some applications (for instance PulseAudio and Dropbox) won't work correctly.
First boot
I expected to get a Grub menu where I could choose my system. But for some unknown reason I booted in Windows. After some time, I figured out I had to forget about Grub and configure Windows' bootloader instead.
I downloaded and installed EasyBCD (non-commercial) and set it up as instructed (see also this more detailed procedure).
boot-restore
At this point, I can boot on linux, but grub was broken and showed a (rather unfriendly) command line.
After a good old Ctrl+Alt+Del, I read boot-restore, rebooted from the USB stick, did as instructed, checked a few thinks that made sense on the moment (sorry, didn't note what exactly, all I remember is I didn't restore MBR).
Reboot and select Linux.
Welcome in Precise Pangolin!
Hide GRUB
As we make our choice of OS with Windows bootloader, it is useless to make it again with grub.
So I edited /etc/default/grub and added the following line:
GRUB_DISABLE_OS_PROBER=true
To apply: sudo update-grub
.
Change the default permissions for /mnt/data
By default the NTFS drives are mounted with files owned by root:plugdev (user:group) with write permissions to the group. As the first user is a member of the plugdev group he can write on it. For some reason (that turned out totally useless) I wanted to tweak that to own the files. You can probably disregard the next step.
Open /etc/fstab with root permissions. Find the line containing /mnt/data. Locate the "defaults,umask=007,gid=46" block.I replaced it with "defaults,fmask=133,dmask=022,gid=1000,uid=1000". Make sure not to include any space.
What it means:
- fmask=133 is the permission for all files. The syntax is quirk and the number meaning is reversed. Basically you have rw for user, and r for group and others. You can't change individual files.
- dmask=022 is for directories. They are executable by everyone.
- gid=1000,uid=1000 is your group and user ids. You can find them in /etc/passwd, just after your user name.
Create symbolic links
Now I have a big partition where I can write all my data. But I don't want to go to /mnt/data each time. So I created symbolic links that pointed the most important directories in my home to /mnt/data.
mv Desktop /mnt/data && ln -s /mnt/data/Desktop . mv Desktop /mnt/data && ln -s /mnt/data/Desktop . mv Documents /mnt/data && ln -s /mnt/data/Documents . mv Images /mnt/data && ln -s /mnt/data/Images . mv Music /mnt/data && ln -s /mnt/data/Music . mv Downloads /mnt/data && ln -s /mnt/data/Downloads . mv Videos /mnt/data && ln -s /mnt/data/Videos .
… and so on. Just repeat this procedure each time a folder grows a bit. You can do the same kind of things in Windows, as explained by Lifehacker.
Enabling hibernate mode
I followed Community♦'s instructions on Ask Ubuntu.
Conclusion
Overall this laptop works really fine. Dell clearly made a laptop that is compatible with Linux. Most issues I described here are in fact dual-boot issues, not Linux issues.
What works out of the box:
- The webcam
- The sound (both in and out, built-in or through the combo jack)
- The sound buttons (mute, sound up and down… but surprisingly they do not operate from the login screen)
- The external display with VGA plug (either duplicate or extended screen modes).
- The WiFi and bluetooth
- The SD slot
- USB 3.0 (100MB/s large files write to a WD My Book Essential, reaching 120MB/s on sequential writes (whole volume with
dd
command), probably limited by the disks themselves). - Pretty much everything else…
What can be fixed:
- Hibernation mode (see above)
- Kernel freezes (disable Optimus, see above)
- The touchpad is detected as a generic mouse by default. It works in degraded mode, you can move the cursor and click, but there is no scrolling (some other features are probably missing too). It is a known bug which should be fixed in a future kernel. Meanwhile, you can follow resalxh's instructions to apply a patch and have it work (thanks Flix for the pointer).
- The backlight is enabled for only 5 seconds, which makes it mostly useless. You can change its intensity with the Fn key, but not its duration. It can't be changed in the BIOS either. You have to start in Windows, go to the control panel and change the backlight settings there. I selected 1 minute illumination, which is enough this time (thanks Flix for the pointer). I don't know how this could be done from Linux, but it will do well enough like this.
- HDMI external display requires X to run the non-free nvidia driver, so Optimus must be disabled. Install and run nvidia-settings to setup the monitor.
What I couldn't fix yet (by order of importance):
- Intel video driver freezes the kernel.
External monitors (plugged on the VGA slot) get the desktop shifted (by the width of the launcher, so no launcher and a small black band at the right).In fact this was a monitor configuration issue, which must be adjusted (possibly with an auto-adjust setting).Suspend by closing the lid. Works but doesn't wake up properly, I have a black screen with the cursor, I need to switch to a console to restart the X server.Well, somehow this seems to work now, I have no idea why.- The battery charge indicator significantly underestimates the time remaining to complete the recharge. Discharge times are rather correct. Please note that I didn't check if it was better in Windows.
- Alt+SysRq keys work only from external (USB) keyboards.
What wasn't tested:
- eSATA port
- Docking stations
Edit on 2012-08-02: apparently once optimus is disabled only the Intel Ivybridge graphics is active, not the nVidia. At least I failed having the nvidia driver operating properly.
Edit on 2012-10-13: added the patch for the touchpad, and it is possible to change the backlight time. Thanks Flix for the pointers.
Edit on 2012-12-01: HDMI + USB 3.0 were tested. HDMI requires Optimus disabled + Nvidia non-free drivers. Install and start nvidia-settings to configure. Also Nvidia card is active when Optimus is disabled in the latest BIOS revision.
Xavier Robin
Publié le samedi 28 juillet 2012 à 21:16 CEST
Lien permanent : /blog/2012/07/28/installation-of-ubuntu-linux-12.04-precise-pangolin-on-a-dell-latitude-e6530
Tags :
Ubuntu
Commentaires : 25