Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-06-20 02:20:37

Registered: 2013-01-13
Posts: 41

Install on HP 15-g012dx

I'm going to document some of the troubles and solutions for installing #! on my new HP 15-g012dx.  This is a new model that was recently released.  At the time of purchase (a week ago), there were ZERO customer reviews -- only blogger-type reviews were available.  Thus, I took a chance that this computer would run linux.  I already had #! installed and working on a toshiba laptop running a A6-5200 CPU, but the toshiba keyboard wasn't responding appropriately.  Anywaey, here's some tips/info for anybody who gets this laptop.

Model: HP 15-g012dx
CPU: A8-6410 with R5 graphics

Win8.1 Prep: You must shutdown Win 8.1 completely.  Even with fastboot disabled, the laptop will not shutdown completely.  Restarting will shut the computer down instead of putting it into a sort-of hibernation state.  This will then allow you to boot the live drive.  Or, in Win 8.1, you can hold shift while clicking on shutdown.  Either way, make sure you watch the messages when booting the live distro.  If you see anything about the harddrive being in a suspended state, then reboot into Windows and shut it down completely. 

Booting: the bios might be a hybrid bios (more on this later) because even though secure boot and UEFI are disabled, Win 8.1 will still boot.  To boot the live distro, you have to press ESC shortly after turning it on.  This brings up a menu.  Press F9 to get to a boot menu and select the USB drive.  You must be in legacy boot mode.

Installation: This happened without a hitch. 

Booting with UEFI: I followed this post: Dual Booting with UEFI.  You have to boot with the live distro, chroot into the new installation, install grub2, then it will be set to go with a minor problem.  See next issue.

Booting with GRUB2: This is an unresolved problem.  I booted into UEFI shell (modified version 1 to give access to bcfg command) and added grub to the boot options.  I changed the boot order to make USB first, CD/DVD second, Grub third, and WIN last, but upon reboot I lose this order.  A UEFI flash drive seems to trump windows boot, but I am unable to get grub to boot as default.  Several hours of research suggest that this laptop might have a hybrid bios/EFI boot menu.  As such, the computer will ALWAYS look for windows boot file first regardless of the order that's given in the bios or EFI memory.  I read about some work around, but I have yet to try it out.  Currently, I have to use ESC then F9 to manually select GRUB2 and boot into #!.

Graphics:  This was also a problem, but it was one that I encountered with the A6-5200 CPU.  The live distro has no problem booting into the desktop, but the installed version puts me right at tty1.  I followed a post about installing smxi and using that to install the graphics driver.  For the toshiba c55d (with A6-5200), the current fglrx driver works great for the stable kernel.  It also works well with the 3.14-1 kernel.  Unfortunately, the R5 graphics in the A8-6410 APU is not supported by the current fglrx.  You'll receive a 'no device found' message when installing the fglrx driver.  However, the beta version does support the R5 graphics (  I installed lynx (text-based web browser) to get to the AMD site and download the beta driver.  Alternatively, boot with the live distro and use iceweasel to get the file.  You'll have to mount your home folder and save the file there.  In the folder where you saved the zipped driver, unzip it ('sudo apt-get unzip' if unzip isn't found), cd into the new folder, then try 'sudo ./'.  If you're lucky, then the install works without a hitch.  This seemed to be the case with the stable kernel (v 3.2).  Installing and booting with a new kernel (I don't know the cutoff, but I installed 3.14-1) resulted in the loss of my brightness keys.  Common backlight fixes (eg., xbacklight) didn't work, and I remember smxi saying that if you update the kernel, then you need to reinstall the video driver.  In the newer kernel (3.14-1), though, the install of the beta driver throws an error message related to KCL_GetEffectiveUID.  In the log, there's a statement saying 'Incompatible types when returning type kuid_t but KCL_TYPE_Uid expected'.  I resolved it by making a patch file.  On another computer (it was easier to do this for me) or after booting with the live distro, open geany and paste the following into a text file:

--- lib/modules/fglrx/build_mod/firegl_public.c
+++ lib/modules/fglrx/build_mod/firegl_public.c
@@ -1784,7 +1784,11 @@ KCL_TYPE_Uid ATI_API_CALL KCL_GetEffecti
 #ifdef current_euid
+    return __kuid_val(current_euid());
     return current_euid();
     return current->euid;

I saved it as KCLUid.patch.  Next, go into the fglrx folder (same one where you .run file is and run this command:

./ --extract amd
cd amd

Copy your patch file into the amd/common folder and issue the patch command:

patch -p0 < KCLUid.patch
cd ..

You should be in the amd folder now.  Lastly, install the beta driver:

sudo ./ 14.20 --install

You should receive some sort of congratulatory message telling you that the driver installed correctly.  I rebooted and now my brightness keys work.  (NOTE: I have no idea what 'patch -p0' did.  And, I have no idea why I had to use '14.20' in the command.  I used patching info for catalyst drivers in various distros to get the beta driver to install on this computer)

That's sums up the install process.  I've been happy that I've only had to deal with the video driver.  Now, I'm going to try some workarounds with the UEFI boot process to make #! the default OS.


Last edited by Choven (2014-06-20 02:23:33)


Be excellent to each other!

#2 2014-09-08 03:11:26

Registered: 2013-01-13
Posts: 41

Re: Install on HP 15-g012dx

I fixed my boot issue by following the advice for others with a similar problem.  On this laptop (and on other laptops from what I have read), the first .efi file to boot will always be the bootmgfw.efi in the Microsoft directory.  Changing the EFI boot order when booting into a UEFI shell did not get grub to launch first, nor did changing the order within the bios.  No matter what I did, I always have to hit ESC then F9 to access the boot menu.  Here, the order appears as listed in the BIOS.  But again, I have to hit ESC then F9 to get to this menu.  My workaround was to rename .efi files on the EFI partition so that the computer thinks it's booting windows but it is actually booting GRUB.  You must have UEFI boot disabled and secure boot disabled in your bios for this to work.

I created an entry in /etc/fstab using the UUID of my partition.  I have the mount point at /boot/efi.  I added this info at the end of fstab.

# EFI Partition
UUID=BABB-2F59 /boot/efi vfat defaults 0 1

I then cd into the microsoft directory on this partition

cd /boot/efi/EFI/Microsoft/Boot

The file bootmgfw.efi is the file that ALWAYS loads first, so rename it to something different.  I renamed it like this:

cp bootmgfw.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw2.efi

Now, copy and rename your grubx64.efi file to bootmgfw.efi in the Microsoft/Boot directory.

cp /boot/efi/EFI/crunchbang/grubx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

If everything works, then grub will boot by default.  In order to boot into Win8.1, you need to add an entry to the GRUB menu.  I added the entry to /etc/grub.d/40_custom

menuentry "Windows 8 UEFI/GPT" {
	insmod part_gpt
	insmod fat
	insmod search_fs_uuid
	insmod chain
	search --fs-uuid --no-floppy --set=root BABB-2F59
	chainloader ($root)/EFI/MICROSOFT/BOOT/bootmgfw2.efi

The UUID is the same one used in /etc/fstab because you are referencing the UEFI partition by the device ID.  Finally, update the grub menu

sudo update-grub

If the Win8.1 menu doesn't appear, then you may have to recopy the grubx64.efi to bootmgfw.efi again (sorry, I can't remember if I had to do this or not).  If you run into problems, like mucking up the grubx64.efi file so that GRUB doesn't load and you can't boot into any OS, then go into the bios and switch to UEFI boot.  For some reason, the bootmgfw.efi file will be remade and Win8.1 will boot normally.  Then, turn off UEFI boot and try copying/renaming grubx64.efi to bootmgfw.efi again. 

NOTE:  I tried installing a newer version of grub that would automatically detect the win8.1 install.  It didn't work very well because this laptop will always boot bootmgfw.efi FIRST, and this is exactly the file that the autodetect script uses for the Win8.1 install.  So, I would have to figure out the part of the script being run in the /etc/grub.d/ files, comment them out, and still insert the relevant part in /etc/grub.d/40_custom.  I reverted to the version of grub that's installed with Waldorf and have my system running well.

Last edited by Choven (2014-09-08 03:12:01)


#3 2014-09-08 07:01:28

From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Install on HP 15-g012dx

@choven: epic guide, thank you!
I think the EFI issues may be due to the NVRAM entries in your motherboard's firmware ("BIOS")...
You can check the entries and modify them (with varying levels of sucess -- don't get me started on firmware programmers) with:

# efibootmgr

See the Debian wiki for getting #! to boot in EFI-mode:


#4 2014-09-14 14:54:24

Registered: 2013-01-13
Posts: 41

Re: Install on HP 15-g012dx

No problem with writing the guide.  I've used it myself when I installed the 32-bit version on a separate partition so that I can natively run Neverwinter Nights.  The game runs much faster on the native 32-bit #! install than in wine on a multiarch-supported *buntu install.  I didn't try it on Win8.1 because I don't want to boot into windows.

Anyway,  you seem to be correct about the NVRAM not holding the options.  For this laptop, I saw "problem #1" from your link.  I can boot into efi shell and issue the command:

bcfg boot dump -v

This shows crunchbang (the grub bootloader) in the menu.  Switching to secure boot in the bios resets the default bootloader (bootmgfw.efi) to factory settings, but the grubx64.efi remains as a boot option.  I also used:

bcfg boot mv 3 0

This should have moved my grub bootloader (4th on list) to the default bootloader.  I rearranged all of the boot options to has this order: USB, CD/DVD, Grub, Windows.  The UEFI shell looks like the commands worked, but on reboot, the order goes back to default.  It's like the 'bcfg boot mv' command wasn't even issued.  So yes, I think that the problem is with NVRAM not accepting/holding the boot order as specified in the UEFI shell.  As such, the laptop always boots the fallback efi file.  (For those interested in more info, I followed advice from the Arch wiki ( … _Interface)

Also, thanks for the debian link.  I haven't tried to change the boot order using efibootmgr.  Looking at the man page and debian link, I'll try to change the order of boot to get things fixed.  I hate having to use ESC then F9 just to boot from a USB drive.  Here's the output of efibootmgr:

choven@A8-CB:~$ sudo efibootmgr --verbose
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,3004,0000,2001,2002,2003
Boot0000* crunchbang	HD(2,145800,82000,33677c16-bb20-4492-a43c-8b6c9d7eed7c)File(\EFI\crunchbang\grubx64.efi)
Boot0001* Notebook Hard Drive	BIOS(2,500,00)................-...........A.....................................c.........A.......................
Boot0002* Internal EFI Shell	MM(b,b3af3010,b42f300f)RC....
Boot0004* Windows Boot Manager	HD(2,145800,82000,33677c16-bb20-4492-a43c-8b6c9d7eed7c)File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.}....................
Boot0005* Internal EFI Shell	MM(b,b3af3010,b42f300f)RC....
Boot2001* USB Drive (UEFI)	RC
Boot2002* Internal CD/DVD ROM Drive (UEFI)	RC
Boot3000* Internal Hard Disk or Solid State Disk	RC
Boot3002* Internal Hard Disk or Solid State Disk	RC
Boot3004* Internal Hard Disk or Solid State Disk	RC

The Windows Boot Manager is the default/fallback loader.  I don't know what's booting with 3004.  I would guess that it's some sort of HP rescue file.  This is the same order that's reported by 'bcfg boot dump -v' from the UEFI shell.  I'll use efibootmgr and reorder my boot options later today.  I'll report back and edit this post if efibootmgr fixes the boot order. 

What's been odd about my experience with this laptop is that I'm working with UEFI even though I had to disable it to install #!.  And, if I return to UEFI boot, then I lose the ability to boot to #!.


#5 2014-09-14 15:15:11

From: A world of pure imagination
Registered: 2014-01-21
Posts: 4,797

Re: Install on HP 15-g012dx

I think the EFI protocol has a variable level of implementation amongst firmware coders.
I think it's also fair to say that the mobo manufacturers are saving money when employing said firmware devs...
To clear NVRAM entries I use:

# efibootmgr -b <4-digit boot number> -B

But it only works from Arch, not my Debian partition (older version of efibootmgr?)...
Another Debian wiki page for converting installs to EFI: … hilit=uefi
And the option I recommend as a last resort:

EDIT: Also, gummiboot is now (finally) available in Testing/Unstable -- this is (IMO) the best EFI boot manager around: … ection=all

Last edited by Head_on_a_Stick (2014-09-14 15:45:44)


Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: zapp

Debian Logo