Dark's Code Dump

Possibly useful

Fix for Gigabyte motherboard boot loop on resume from sleep

From what I’ve read, this seems to affect a large percentage of Gigabyte motherboards since S3 sleep became a ‘thing’.

The issue is as follows: on a significantly overclocked Gigabyte motherboard (high end or low end), when resuming from S3 sleep the screen never wakes up and after about 15-20 seconds, the system repeatedly turns off and on again every few seconds. The only way to break this loop is to completely remove power from the PSU for several seconds.

The issue is connected with PCIe power, as evidenced by the various reported fixes of disabling onboard NIC power saving and reverting from Intel/AMD AHCI drivers to the Microsoft default ones.

The real fix is very simple: Use Balanced power mode in windows and check that PCI Express Link State Power Management is set to ‘Moderate Power Savings’ and not ‘Off’. The fact that the default setting of moderate does not have the issue explains why it is not more widely reported.

Fix for last.fm scrobbler not working on Windows 8

Since the 2.1.30 update, if your media player is running as admin (this may only apply to Winamp), the scrobbler needs to run with admin privileges too.

Fix for Samsung 750 and 950 series monitors 120Hz “Not Optimum Mode”

2018 Update: The below advice applies to non-standard resolutions (i.e. anything but 120hz 1080p), which can drop to Not Optimum Mode after 60 seconds consistently. This is not the same as the roughly once per few days Not Optimum Mode which is a fact of life with these monitors.

Use 120.8Hz custom refresh rate. Both Windows and the monitor’s OSD will show 121Hz. Actual 121.0Hz will cause the error without fail, it must be a tiny bit below. I guess there is something weird going on with the tolerances in the monitor – I’ve noticed things like mains current spikes contribute to the problem.

This may apply more to HDMI 1440×1080 or 1280×720 than to DisplayPort 1080p.

My exact settings for 1440x1080x120Hz over HDMI are as follows:

How to fix issue where you can only type in the address bar of Internet Explorer 9

Had a weird issue where every input field on webpages in IE9 would redirect focus to the address bar.

Turning off Protected Mode fixed it, probably not a great fix but whatever

Far Cry 3 registry error after copying files from another PC

If you get the error “cannot find essential information in the registry” and Uplay will not accept your Steam key, do the following:

Transfer the registry key HLKM\Software\Wow6432Node (if 64-bit)\Ubisoft\Far Cry 3

Update value of ‘InstallDir’ as necessary

DarkELEC Release 3

Just an interim release for now as I don’t have my proper dev environment (TV, Pi-compatible internet connection, etc.). Once I figure out a way of getting networking to my Pi, I’ll throw in the promised features such as USB audio support.

No idea at all if this works (I can’t do much more than play about in the menu with no networking), but it certainly seems a lot smoother and more responsive than r2.

There’s been no significant changes on my part, but likely a very significant amount from upstream (namely the extra codecs, 512mb support, etc.).

 

Download: http://shit.weeaboo.com/darkelec3.zip
Sauce: https://github.com/darkimmortal/DarkELEC
More details: http://darkimmortal.com/2012/05/darkelec-raspberry-pi-optimised-openelec-fork/

DarkElec Release 2

NEW VERSION! http://darkimmortal.com/2012/11/darkelec-release-3/

Finally got DarkELEC to compile successfully with the latest upstream changes from OpenELEC along with a few tweaks that I’ve since forgotten 😛

Observations for this build:

  • Fairly high idle CPU usage (70%+) sadly
  • libCEC works on LG and Sony TVs now, however all input stops working once you begin playing a video (a complete deal-breaker for me personally 🙁 )
  • Built in streaming services still work
  • Overall smoother UI
  • More reliable Wifi
  • Thumbnails aren’t missing/oddly coloured

Download: http://shit.weeaboo.com/darkelec2.zip
Sauce: https://github.com/darkimmortal/DarkELEC
More details: http://darkimmortal.com/2012/05/darkelec-raspberry-pi-optimised-openelec-fork/

DarkELEC – Raspberry Pi optimised OpenELEC fork

NEW VERSION! http://darkimmortal.com/2012/08/darkelec-release-2/

None of the currently available solutions do a perfect job with running XBMC on the Pi, however OpenELEC comes by far the closest, in spite of its locked down nature.

This fork aims to remedy the very few flaws in its implementation and to focus 100% on the Pi, while also sticking to the upstream and incorporating its updates.

Features:

  • Low idle CPU usage (< 15%)
  • Smoother and more responsive
  • Built in XBMC addons: iPlayer, custom fixed version of Demand 5, various unofficial repos
  • iPlayer, 4oD, Demand 5, ITV Player, SportsDevil all fully tested+working
  • Improved wifi connectivity
  • Added test-connman scripts for easy wifi setup (see here)
  • Added wireless_tools (iwconfig etc.)
  • Added rndis_wlan wifi driver (broadcom 4320 chipset)
  • Easy SD card installation script for building from source (./install [block device])

Download pre-built SD Card image: darkelec1.zip (~75MB)
(Fixed partition size at just under 2GB total, you can expand manually with GParted if necessary)

Source: https://github.com/darkimmortal/DarkELEC
(Refer to Building and Installing OpenELEC for Raspberry Pi – expect build issues on anything but a stock debian squeeze i686 install)

Android Reverse WiFi/Mobile AP Tethering

Having tried and failed to get Reverse USB Tethering to work on my Samsung Galaxy S running Android 2.2, I searched for another solution. And here it is: Reverse tethering via WiFi.

This allows you to connect your phone to the internet via a computer with both a WiFi dongle and a separate internet connection.

Requirements:

  • Windows computer with an internet connection and a separate WiFi dongle
  • Android phone with Mobile AP tethering support

Instructions:

  1. Enable Mobile AP on your phone with whatever security settings you wish.
  2. Connect to the phone’s access point using the spare WiFi dongle.
  3. Bridge the connection to the phone and your internet connection via a Windows network bridge.
  4. Bring up a terminal (Terminal Emulator is a great app, otherwise you can use SSH, ADB, etc.) and type:
    su
    netcfg wl0.1 dhcp

    (Your connection may not be named ‘wl0.1’ – run ‘netcfg’ to see a full list)
  5. Try accessing the internet on the phone and ensure the 3G indicator is not lit. You can also check via Wireshark on the host PC and you should see the phone making requests.

It seems to be working perfectly for me so far, and has fulfilled its purpose of allowing me to debug stuff running on my phone using Wireshark. Of course it works for normal internet access too. 😉