Saturday, August 10, 2013

HP Envy 17t-j000 laptop (2) (dual boot Linux install with UEFI)

The new laptop arrives.  Here are some highlights:

HP ENVY 17t Quad
    Windows 8 64
    4th generation Intel(R) Core(TM) i7-4900MQ Processor
    NVIDIA GeForce GT 740M Graphics with 2048MB of dedicated video memory
    17.3-inch diagonal Full HD Anti-glare LED-backlit Display (1920 x 1080)
    16GB DDR3 System Memory (2 Dimm)
    2TB 5400 rpm Dual Hard Drive
    Blu-ray player & SuperMulti DVD burner
    HP TrueVision HD Webcam w/ integrated digital mic
    802.11b/g/n WLAN and Bluetooth(R)



I replaced the second 1TB hard drive with a 250GB SSD, to give me SSD performance on the root file system and my home directory.

The UEFI architecture poses some challenges to doing a dual-boot install.  The following represents something like 3 days worth of research.  I hope this will spare someone else all this trouble.  UEFI is supported by Linux, but it's relatively new and there are some things to get used to.

This all kind of assumes you care about keeping Windows 8.  I read many accounts of people who cheerfully blew away Windows which would certainly make this a lot easier.

I punted on secure boot.  Ubuntu in particular seems to have solved this problem, if you really care about secure boot.
  • (optional, recommended) Burn your recovery disks.  If you're super-paranoid like me, you'll then use those to reinstall Windows 8 on a different drive, and test all of the following on that drive, before proceeding.
  • In the BIOS, disable Secure Boot.
  • Enable 'Legacy Support' in Boot Options. 
  • Boot System Rescue.  Run gparted and delete the recovery partition.
  • Boot Windows 8.  Use compmgmt.msc (run as administrator) to shrink the 'C:' drive partition.  I left my Windows 8 C drive at 200 GB leaving over 700 GB available for Linux.
  • Boot Linux distro.  Mint 15 MATE 64 bit is what worked for me.  I couldn't get Mint 13 or Ubuntu 12.04 to work.  Use the 'compatibility mode' line.  Choose 'Install Linux Mint alongside Windows 8' or 'Something Else'.  Finish the install.
  • At this point, rebooting brings Windows 8 up by default.
  • Reboot.  Choose 'Boot From EFI File' and navigate down the tree to 'NO VOLUME LABEL/EFI/linuxmint/grubx64.efi'.
  • X login menu comes up, but it's almost invisibly dim.  Once I log in (blindly), brightness increases to normal.  Alternatively, when the GRUB menu comes up, hit 'e' for edit and add 'acpi_backlight=vendor' (no quotes) to the boot line (line that starts with 'linux').
  • Install 'boot repair' and run it.  Click on 'Recommended repair'.  Reboot.
  • GRUB should now come up when you reboot.  It looks weird... I have 16 choices.  (Awe your co-workers with your 733t boot menu!)  Linux boot should work.  'Windows 8 (loader) (on /dev/sde4)' or 'Windows Recovery Environment (loader) on /dev/sda5' got me an error like this:
error: can't find command 'drivemap'.
error: invalid EFI file path.
  • I tried to fix this following these instructions, but unsuccessfully.  However, I'm able to boot Windows 8 with 'Windows Boot UEFI loader'.  Good enough.
  • Next, configure GRUB to add 'acpi_backlight=vendor' always at boot time. I went to edit /etc/default/grub but no such file exists.  After a bit of googling, I installed grub-efi-amd64 which provides this file.  This seems like a bit of a MINT bug for this file not to be present.
  • Edit /boot/default/grub.  Add this setting
GRUB_CMDLINE_LINUX=acpi_backlight=vendor

(see Simple Configuration Handling) and rebuild the GRUB configuration:

grub-mkconfig -o /boot/grub/grub.cfg

Now you should be able to boot Linux from the GRUB menu and see the login prompt when it comes up.

Wednesday, July 17, 2013

HP Envy 17t-j000 laptop (1) (flaming HP)

Update 10/28/2013: A guy contacted me by email claiming that the correct parts to install a second hard drive are  720237-001 'HDD Hardware Kit' and 720260-001 'Screw'.
 
Wow.  Wow.  Wow.
It's really hard to express my experience with HP and their customer support without cursing.  Picture a torrent of drill-sergeant profanity in place of all the words of this blog post, without any repetition.  I used to like HP a lot, but I swear this is the last time I will ever buy anything from them.

I ordered a new laptop on 7/2 using my employee discount.  It arrived on 7/15 (they build them in China).  One of the selling points of this hardware for me is the second hard drive bay.  I wanted to use their HP-supplied drive in one bay and my own SSD, purchased separately, in the second bay.  Or, if that had been one of their options, I would have totally bought it configured that way from HP, but it wasn't.  Weirdly, for this otherwise high-end performance hardware, all they sell is 5400 RPM hard drives.

The computer arrives, and it is lacking some hardware, mainly a cable, to connect up that second hard drive.  If this were a desktop, it would be a standard SATA cable, but this is an HP proprietary cable that you can't just buy at Micro Center for $10.  I had read some reviews of this PC, or probably a similar model, stating that the computer did not come equipped to hook up a second drive, and that you needed to purchase a kit from HP to allow this.  I was kind of incredulous that they would do this, but I went ahead and started trying to order this component to make it possible to hook up a second drive.

So, I call HP Parts Store, tell them what I want, and they sell me a $70 part.  The part arrives (665909-001 'Hard Disk Drive hardware kit'), and it's the wrong part.

I get on the phone with HP Parts Store again, RMA the first part, and discuss with them what is the part I really need.  We are being more careful this time, but after some discussion we think we have identified the right part this time, and I order that (603772-001 'SPS-HDD hardware kit').  The ($90) part arrives, and again it's the wrong part.

Again I get on the phone with HP.  I spend quite a long time this time, 90 minutes or 2 hours, speaking to various people at the parts store and tech support.  Everyone assures me that the part I have is the correct one.  I don't work on laptops much but I'm 99% sure that this SATA cable simply doesn't fit the connector on the laptop.  But there's a tiny speck of doubt in my mind that there's some secret way I just can't see.

I call up a local business that has worked on my HP laptops in the past.  (Incidentally, if you are local to the Denver area and need service for business or personal computers, check out ProTech, they rock).  They tell me, sure, we'll look at it and get this sorted out.  So I drop the hardware off with them.  A few hours later they report back.  Yes, the part they sent me is wrong.  Their technician who actually called HP is very frustrated because now he's spent hours on the phone getting the runaround from HP, too.  To make a long story short, HP does not sell a part to allow you to install a second hard drive in this laptop if it was assembled at the factory with a single hard drive.  The option they offer me is to RMA the whole laptop, buy another laptop configured with a second hard drive, remove the second hard drive and replace it with my SATA drive.  I've lost over 2 weeks and I'm loath to consider this at first, so we went back and forth a bit, but in the end this seemed like the only option.  So now I'm waiting on another 2 week cycle for them to build almost the identical computer in China and ship it back to Denver, to get a $10 cable.  So, about 6 weeks (and many hours of aggravation) from the original purchase I'll have my computer, if all goes well.

HP customer support is the absolute pits.  I constantly would call one number (e.g. parts store), they would badger me with a bunch of personal questions like name, address, phone, email, then forward me to someone else (e.g. tech support), they'd ask me the same questions, then forward me somewhere else (HP Home and Office), lather, rinse, repeat.  It took me over an hour to RMA one part.

I have a bunch of disorganized notes on technical issues like UEFI and Hybrid Graphics.  Details of getting all this working for Linux was going to be the topic of this post before this issue with the drive blew up in my face and overrode all other considerations.  Check back around mid-August, I guess.

Saturday, March 2, 2013

Chastise users who disable Javascript

Here's an example:

http://www.nyx.net/~lmulcahy/javascript.html

Yes, I know about writing pages whose functionality degrades gracefully if Javascript is disabled.  But sometimes you just want to convey to a user: Javascript is here to stay.  Get over it.

Saturday, December 22, 2012

Mint 13

I'm installing Mint 13 on my desktop.  This will be my third Mint 13 install.

The default marco window manager does not work for me.   Symptom is windows have no decorations, all appear in the upper left corner and can't be moved.  In other words, the window manager is not running.

The first time this happened, I thought it was just my incredibly old laptop, but this happens every single time.  Does the default marco work for anyone?

Same thing with compiz.  Mutter and metacity work, but I had huge problems with the workspace switcher.  I initally (under marco) set my workspace switcher to 3x6, but when I switched to mutter it appeared as 2X2, and the workspace switcher preferences offered no way to change it.  This behavior is similar under metacity.

I tried using the 'Additional drivers' drivers (ATI/AMD proprietary FGLRX driver), also manually downloading and installing the proprietary driver from ati.com, still couldn't get compiz or marco to work.

Here's what finally worked for me
  1.  Install and run gconf-editor
  2.  Navigate to /apps/metacity/general, set num_workspaces to whatever you want
  3.  Run mateconf-editor
  4.  Navigate to /desktop/mate/session/required-components, set windowmanager to metacity
Here's how to switch to  Focus follows mouse, sloppy, autoraise:

As above, run gconf-editor, go to /apps/metacity/general, check auto_raise, set focus_mode to sloppy.

Heh, cool, Quake 3 Arena works.  What a blast from the past.  There's no master server anymore, though.  I found a couple of places saying to use a different server browser to get multiplayer to work.  Xqf works.

Steam for Linux works.  I had to do this manual step:
sudo apt-get install libcurl3-gntls:i386
to get it working on my 64 bit hardware.  See Steam Available in Linux through a Workaround

Ubuntu Tweak for Mint 13 
Peerguardian
Handbrake 
Google Chrome

(1/1/2013) Hibernate didn't work at first.  I tried pm-hibernate.  Then I installed and tried s2disk.  S2disk works.  Also now when I run pm-hibernate, the output messages indicate it is using s2disk.

I used these instructions to get the 'Hibernate' button back on the 'Shut down the computer' menu.

Intermittent problem with hibernate.  Sometimes I have to try more than once to get it to work.

(1/20/2013) I had no sound for Quake 4, Doom 3 and Wolfenstein: Enemy Territory.

Fixed for Quake 4 and Doom 3 by editing these files:

$HOME/.quake4/q4base/Quake4Config.cfg
$HOME/.doom3/base/DoomConfig.cfg

Look for this line:
seta s_driver "oss"
and change it to this:
seta s_driver "best"
 
See also Doom 3, Quake 4, Enemy Territory: Quake Wars sound delay fix.

I couldn't find a comparable setting in the Enemy Territory config file, etconfig.cfg.

This solution worked for me.

Saturday, October 27, 2012

Oracle 11g XE on Mint 13

I switched from Ubuntu 10.04 to Mint 13 in July.  The new Oracle 11g XE is only available in RPM format, and there are other problems, and I'm not using Oracle DB at work these days, so I didn't get around to reinstalling Oracle.

I had some time today and following this:

Installing Oracle 11gXE on Mint and Ubuntu

was able to get it working.  Cool, thanks Mike!

Monday, October 8, 2012

Installing Java EE 6 tutorials on Linux Mint 13

In the good old days, all the Java tutorials could simply be downloaded as a ZIP file or compressed tar file.  But somewhere along the line Sun/Oracle decided to make us use the Glassfish updatetool instead.

I tried this today and had several problems.

(1) Error:

The software needed for this command (updatetool) is not installed.

If you choose to install Update Tool, your system will be automatically
configured to periodically check for software updates. If you would like
to configure the tool to not check for updates, you can override the
default behavior via the tool's Preferences facility.

When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:

http://wikis.oracle.com/display/updatecenter/UsageMetricsUC2

Once installation is complete you may re-run this command.

Would you like to install Update Tool now (y/n): y

Proxy: Using system proxy settings.
Install image: /home/lmulcahy/java/netbeans/glassfish-3.1.2.2
Installing pkg packages.
Downloading 2 packages.
Downloading pkg (511 files, 6,237,937 bytes).
File 4/511#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fdaaf95e3ef, pid=8767, tid=140576351434496
#
# JRE version: 7.0_07-b10
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.3-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
File 7/511[thread 140576350381824 also had an error]
File 44/511*** glibc detected *** /usr/local/java/jdk1.7.0_07-x86_64/bin/java: invalid fastbin entry (free): 0x0000000001502d50 ***
[thread 140576349329152 also had an error]
[thread 140576348276480 also had an error]
# [ timer expired, abort... ]
Aborted (core dumped)

Fixed by: Enable the proxy server:

export http_proxy=http://localhost:3128/

(And of course you need to have an actual proxy server.  This is Squid running on port 3128).

 (2) Error:

WX import error.  Verify the WX widgets are in the PYTHONPATH.
The following can be reported to GlassFish Update Tool 2.3.5 Development Team .

Traceback (innermost last):
  File "/home/lmulcahy/java/netbeans/glassfish-3.1.2.2/updatetool/vendor-packages/updatetool/common/boot.py", line 283, in init_app_locale
    import wx
  File "wx/__init__.py", line 45, in ?
  File "wx/_core.py", line 4, in ?
 ImportError: libjpeg.so.62: cannot open shared object file: No such file or directory

Fixed by: (Credit to Scott Dunbar) Install the 32 bit version of libjpeg62:

sudo apt-get install libjpeg62:i386

Interestingly enough, libjpeg62:i386 didn't appear in Synaptic, but installing it this way from the command line worked.


Hope this saves someone the hour or so it took me to figure this out.