Getting battery life back on an Acer Aspire 5820TG running Windows 10

Details upfront: My workaround is to completely disable the AMD GPU via a modded BIOS and let Windows Update install a valid driver for the Intel card. If this concerns you, then don’t follow the instructions on this page!

==Disclaimer: I can’t be held responsible should things go wrong etc. etc. I can only describe what worked for me.==

I’ll be careful. Instructions please!

I first made sure that I had uninstalled all of the graphics drivers. I would do this by uninstalling the drivers (either via Device Manager or Programs & Features), rebooting in to Safe Mode (hold Shift while clicking Restart in the Start Menu, then find the Advanced Boot Options command) and using something like Driver Fusion to eradicate the AMD and Intel drivers.

I installed the modded BIOS available on Notebook Review’s forum. That same page also has some useful instructions should things go wrong!

I then rebooted in to the BIOS and set the graphics mode to the newly-added Integrated. Note that if you shut down Windows 10 it will still seem to flag to the BIOS that it is hibernating (likely one of the many ways Microsoft have sped up boot times), which means you can’t access the BIOS; I’ve found that restarting always gives me the option.

I then reboot to Windows, check Device Manager to see that only one graphics device shows up (on the Acer 5820TG, if the AMD GPU is enabled you’ll see 2 devices), then go to Start > Settings > Update > Check for Updates. Windows 10 will, in short order, get to installing the Intel driver (assuming you haven’t disabled it!).

My personal testing suggests that this is about as good as when you would have normally switched to Integrated graphics, which is good. BatteryBar Pro tells me that when the laptop is idle with WiFi on and the screen on the battery discharge rate in the 7,000-8,000mW region, which is excellent for this machine.

Why remove the AMD card entirely?

In Windows 10 Microsoft have made the decision to automatically install the most up-to-date drivers it has for all the hardware connected to your machine.

It’s noble, but the problem here is that the up-to-date driver for the graphics cards in this machine doesn’t properly utilise switching. It instead uses both GPUs all the time — leading to lacklustre battery life. So I would install a much older driver that I know works (and still behaves correctly in Windows 10) instead.

However, there is no easy way to opt-out of driver updated. The option in System to tell Windows Update to not install drivers is ignored. The only way I know of to stop the updates is to hide them before they’re installed by using a troubleshooter explicitly for this purpose; indeed, the functionality to disable updates is no longer built in to Windows. At least you can store the troubleshooter somewhere and keep running it to pretend the functionality is still there.

But there was a hitch: even once I’d hidden the AMD graphics driver update, it was still getting installed sooner or later.

I also found that so long as I stuck exclusively with the Intel card then everything was OK and Windows could not detect the AMD hardware. But as soon as I switched to the AMD GPU (such as can automatically happen when you connect a power supply), it effectively enabled a kill switch for the graphics driver in Windows as it’ll sooner or later install the up-to-date driver against my wishes.

I figured that it would just be a whole lot simpler to run with the one GPU and bypass the switchable business. The default BIOS lets you choose between Discrete and Switchable configurations, but I wanted an Integrated option. That’s where the modded BIOS came in.

But I don’t want to lose my AMD card!

I might revisit this at some point, because while figuring all this stuff out I noticed something odd.

I went the one GPU route because I found that, despite disabling the update, the AMD graphics driver would still install. Except it might not have been the AMD graphics driver that was installing.

Once I had disabled the AMD GPU and rebooted, I noted that another option appeared in the disable update troubleshooter: the AMD HDMI audio driver.

I had already noted by this point that despite the fact that something would install and hose the driver, the driver version reported in Device Manager would not always change. This could be quite neatly explained if the HDMI audio driver, which wouldn’t change the graphics driver version, had enough stuff in it to stop the graphics driver working.

Now that I’ve disabled both the AMD graphics driver and the AMD HDMI audio driver, perhaps I could re-enable the switchable graphics configuration.

One last note: assuming that hiding updates works in Windows 10 like it did in previous Windows releases, then hiding an update only hides that version. That means that if either driver were to get updated in future, you’ll probably have to go through the entire rigmarole again (hide update, uninstall, reinstall) to get a working driver again.

Troubleshooting keyboard shortcuts in Sublime Text

I recently installed a couple of new plugins to Sublime Text, and then Ctrl+Shift+R, the shortcut for searching through all symbols in a project, stopped working!

You can get Sublime Text to display what’s actually going on when you press the shortcut — that information may give you a hint as to what plugin or configuration has changed your value.

Is the shortcut reaching Sublime?

The following commands are run in the Sublime Text Console; you can access on Linux and Windows by pressing Ctrl+`.

You can check the shortcut is actually managing to get to Sublime in the first place:

sublime.log_input(True)

You’ll notice that the console will now display the keys that you press — try pressing a keyboard shortcut too!

key evt: shift+control+r

If the console is showing your keystrokes correctly, then Sublime is receiving them loud and clear and the problem lies elsewhere.

What is Sublime doing when the shortcut is invoked?

By running the following in the Sublime console, you’ll see what commands Sublime is running as you press keyboard shortcuts:

sublime.log_commands(True)

You’ll now note the command names appearing inside of the console. I got the following:

key evt: shift+control+r
command: run_emmet_action {"action": "reflect_css_value"}

In my case, it turned out that Emmet had taken over the shortcut! I got my shortcut back by copying the default Ctrl+Shift+R shortcut definition from Preferences > Keybindings - Default and pasting it in to the user file at Preferences > Keybindings - User.

[
	{ "keys": ["ctrl+shift+r"], "command": "goto_symbol_in_project" }
]

I feel there should be a better way to do this, but this works as Sublime is now. Now I try the shortcut again:

key evt: shift+control+r
command: goto_symbol_in_project

Much better.

Emmet has its own special shortcut handling

Those of you familiar with Emmet might know that it has its own built-in mechanism to disable keyboard shortcuts of your choice. And in this case, that’s exactly what could be used.

"disabled_keymap_actions": "reflect_css_value"

The nice thing about the keybindings override is that the instructions described above should work for any addon package as the User package is sourced last — meaning that the User package overrides all.

Migrating from Wordpress to Jekyll

I’ve recently moved from the rather dynamic Wordpress to the rather static Jekyll. Can you tell?

I’ve come to like the idea of simply serving a bunch of static files instead of dynamically building them when required. Static files are simple, cheap to host and serve, introduce no further security problems beyond the web server and configuration, and easy enough for me, as a developer, to edit.

I’ve still got plenty of hurdles to work through — in particular how to host all my pictures — but this can all be worked out over time one way or another (including reverting back to Wordpress!).

I just wanted to scrawl a few notes about my discoveries — and what better way to do it than within the blog itself!

  • If you run jekyll serve inside of a VM (like Virtualbox) or container (like Docker), if you want to hit the site outside of the VM then make sure to specify --host=0.0.0.0 so the server binds to the outside network interface instead of the loopback interface.

  • I exported the Wordpress data by using the jekyll-export plugin. The script recommended by Jekyll’s own import website produced a bunch of HTML which did not play well with Jekyll.

  • One thing I wanted to do afterwards is convert many of the HTML entities to simpler equivalents, like to ' and and to ". I did this to make my files easily readable and editable, in the spirit of Markdown. A quick way to do this is to run the following:

    for post in _posts/*; do cat "$post" | perl -n -mHTML::Entities -e 'use open ( ":encoding(UTF-8)", ":std" ); print HTML::Entities::decode_entities($_) ;' > $post.new && mv $post.new $post; done
    

    You’ll also need to convert any pages that were brought across too.

    The use open ( ":encoding(UTF-8)", ":std" ); part is of as it instructs perl that all input and output streams are UTF-8.

  • You see that code block nested inside the list above? That cannot be done with Jekyll and Markdown. This is because the {% raw %}{% highlight %}{% endraw %} code Jekyll uses is substituted before the markdown is parsed. If you want highlighting, this means you need to use the ~~~ fenced code blocks.

    You could try adding pygments support to Kramdown. Alternatively, you can switch to a renderer, like redcarpet, that does support it. This may well come and bite me in the future.

After all of these changes, my markup (or should I say markdown?) started to look respectable — although there’s a long way to go!

Larger tab close buttons in Firefox

I’m using a Windows 8 tablet (the Linx 10 if you’re curious) and found that the close buttons in Firefox were a bit small and difficult to press.

I’ve fixed this by adding the following to my userChrome.css file:

{% highlight css %} .tab-close-button { border-radius: 20%; background: rgba(0,0,0,0.1) !important; width: 32px !important; height: 32px !important; } {% endhighlight %}

A fix for VirtualBox causing Windows host to think it's on a public network

Have a look at Brokenwire.NET’s article on the subject.

I’ll briefly mirror the instructions here:

  1. Open regedit.
  2. Search (Ctrl+F) for VirtualBox Host-Only Ethernet Adapter.  Keep searching until you’re inside HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318} — you’ll probably be highlighting the DriverDesc key.
  3. Add/modify a DWORD value, called NdisDeviceType, and give it a value of 1.
  4. Restart the machine.

Fixing Gran Turismo 5's slow loading times

Just this morning Gran Turismo 5 just out of nowhere started loading really slowly.

I fixed this by signing out of PSN. It’s not ideal if you want to play online, but it’s worked for me.

It should be noted that the problem can been seen from the XMB before you even launch the game – just after it displays the message that you’ve “signed in”, watch the clock and see how long it spins; this is the console synchronizing the time with PSN. If this takes more than a couple of seconds, there might be a problem.

In addition, check your friends list. If it seems significantly shorter, and each friend is only very slowly appearing one at once, you can count on having troubles launching GT5.

Finally, note that when you launch GT5 without being connected, the points where the game hangs are the points it asks you if you want to connect to PSN.

I can only assume that this is a PSN issue because I can confirm on my Tomato router that my connection is entirely utilised. Of course, that doesn’t guarantee the problem isn’t my end…

If your loading problem isn’t thanks to PSN or a slow internet connection, then it might be that it isn’t installed, the HDD is dying, the disc is scratched, the Blu-ray is dying… All the usual suspects really.

Good luck!

Searchlight 1.6

I’ve released another update to Searchlight!

This one contains some experimental code for devices that use the CyanogenMod SysFS interface to toggle their light. Naturally, given it’s experimental, it might not work. :-) That’s because I don’t have any devices that actually make use of it.

Get in touch via Google Play or the contact page if you have problems, or just want to give me a good word!

As always, you can download the update via Google Play or directly.

Searchlight 1.5

Looks like I forgot to write about this when I released it in February, but Searchlight 1.5 is out!

The big thing this update adds is a widget that can be added to your launcher or to your lock screen on 4.2+ devices. That means you can toggle the light without unlocking the device!

As always you can download it from Google Play and directly from this site.

Also, for the sake of completeness, since I never got around to writing about version 1.4, here’s the download for 1.4.

Searchlight 1.3 is out!

It’s been 8 months since the previous release (and I know I skipped even mentioning the previous release here!), but it’s worth it as I’ve tackled a rather serious bug that would cause the wakelock to be held even after the torch has been switched off.

If you didn’t get a word of what I just said, it means that Searchlight will no longer use battery power unnecessarily. Yay!

Download it direct or from Google Play.

I'm Helping with a Monster Hunter Portable 3rd English Fan Translation!

Recently I’ve been helping out Team Maverick One translate Monster Hunter Portable 3rd to English!  It’s a fan translation with the aim of making the game playable in regions it was never officially released.

I’ve been correcting machine-translated English and writing lots of useful scripts to help everyone out. ^^

So if you’re wondering what I’ve been up to lately, that’s probably it!  Check it out if you have a PSP and are in to Monster Hunter. =3