16 February 2008

Acerhk and Ubuntu update

I was looking through the stats today when I discovered that my most popular post is about acerhk and Ubuntu. I'm not surprised in many ways because it was the one thing that caused hell when I was first trying to install it on my laptop. Incidentally, that laptop is still running Ubuntu very nicely (although I'm about to retire it - it's getting a little old).

Anyway, I commented in the first post that I was hoping Ubuntu might one day have acerhk installed by default. Lo and behold this is the case now which significantly simplifies the steps we have to take to get the wireless working. We can skip all the stuff about module assistant and jump straight to configuration.

So skipping the first part of the installation, here's what actually needs doing (quoted from the old post):


We'll need to:

  • Ensure the module is loaded when Ubuntu boots.
  • Tell the acerhk module to enable the wireless both when the laptop is turned on and when it is resumed.
The easiest way to have the module load when Ubuntu loads is to add it to /etc/modules:
sudo sh -c "echo acerhk >> /etc/modules"
Now we're going to make a little script for turning on the wireless. Open up the text editor at Applications > Accessories > Text Editor. Create your script as follows:
echo 1 > /proc/driver/acerhk/wirelessled
Save it into a useful location with an appropriate name. I'm going to name it wifi and save it into my home directory.

Now ensure that the script is executable:
cd ~
chmod +x wifi
Then we need to copy the script to the two locations that will have it being executed on boot and resume.
sudo cp ~/wifi /etc/acpi/resume.d/
sudo cp ~/wifi /etc/init.d/
Finally, activate your startup script with the following command (assuming you are in the same directory as your script):
sudo update-rc.d /etc/init.d/wifi defaults
 Phew! We're done. Reboot the laptop and hopefully your wireless is working!



Flo said...

thanks! That finally solved my wireless problems.

johnH said...

I had problems coping script to the two locations. Below is the message I got from trying. Would you help please. Acerhk is in my /etc/modules file.

john@john-laptop:~$ cd ~
john@john-laptop:~$ chmod +x wifi
john@john-laptop:~$ sudo cp ~/wifi/etc/acpt/resume.d/
sudo: unable to resolve host john-laptop
cp: missing destination file operand after `/home/john/wifi/etc/acpt/resume.d/'
Try `cp --help' for more information.

Jono said...

Hi johnH

Looks like you're missing a space in your "sudo cp ~/wifi/etc/acpt/resume.d/" command - it should be "sudo cp ~/wifi /etc/acpt/resume.d/".

By the way, the "sudo: unable to resolve host john-laptop" shouldn't cause any problems but that's an unrelated error in your /etc/hosts file. If you run the command "gksu gedit /etc/hosts" and edit that so that the entry for matches john-laptop as your computer name then that should disappear.

Jono said...

@johnH - one more thing. It's /etc/acpi/resume.d/ not /etc/acpt/resume.d/

johnH said...


From /etc/acpi/resume/ file, I don't have a /resume.d/ file

# Source from /etc/acpi/resume.d/
for SCRIPT in /etc/acpi/resume.d/*.sh; do
if [ -x $SCRIPT ]; then

From the /etc/init.d/ fle
echo 1 >/proc/driver/acerhk/wirelessled

My Wifi LED still stays on no matter whether the wifi is on or off. The wifi switch still does not switch wifi on or off. If the wifi is off, I have to reboot holding the wifi switch in the "on" position.

BTW: I have an Acer Travelmate 2480 laptop w/ Ubuntu 8.04LS installed.

Thanks for you help.

johnH said...

Sorry I do have a /resume.d/ file

echo 1 >/proc/driver/acerhk/wirelessled

The above is the contents.

Jono said...

Are you sure you don't have a /etc/acpi/resume.d/ directory? The contents of mine contains the following:

10-thinkpad-standby-led.sh 58-proc-sysfs-restore-state.sh
13-855-resolution-set.sh 60-asus-wireless-led.sh
15-video-post.sh 62-ifup.sh
17-video-restore.sh 65-console.sh
35-modules-load.sh 67-sound.sh
40-infra-red.sh 69-services.sh
49-855-resolution-set.sh 72-acpi-pain.sh
50-framebuffer-enable.sh 85-anacron.sh
50-time.sh 90-thinkpad-unstandby-led.sh
50-tosh-restore-brightness.sh 90-xscreensaver.sh
55-screen.sh 98-acpi-unlock.sh

The idea is to copy that wifi script we created into here so that it gets executed when the computer resumes. If you definitely don't have the /etc/acpi/resume.d/ directory you can safely create it with sudo mkdir /etc/acpi/resume.d/

Btw I also found that my laptop's Wifi led didn't represent the status, nor did my button actually seem to do anything. From memory, the LED would stay on constantly and only doing the software toggle would do anything. (I actually no longer have the laptop in question).

johnH said...

I DO have /etc/acpi/resume.d/ directory, here is what is in mine, and it seems to be exactly the same as yours. You are right I can go to the applet on the panel and enable/unenable the wifi.


Thanks for the help and information. I did get my sudo problem taken care of using your instructions.

Anonymous said...

I have an AOpen 1557-J. This guide fixed my hotkey and wireless problems. I can finally resume from suspend without losing my wireless. Thank you, Thank you, Thank you!

Jono said...

Glad to help :)

Lcd tv bracket said...

thank you so much!
you saved my life! that solved my wireless problems completely! my work is all internet so literally you saved my life!!!

As for acerhk and Ubuntu being your most popular post.. acerhk and Ubuntu has become an increasingly popular subject! there are even forums and websites dedicated to acerhk and Ubuntu!

Thanks Again

Anonymous said...

I'm a helpless n00b to linux, let alone ubuntu, but I can get around the terminal a bit.

I don't have an /etc/modules folder, and I don't have an acerhk file on my computer at all, so that first line...

sudo sh -c "echo acerhk >> /etc/modules"

I don't think it's doing anything for me. I tried everything nonetheless, got no errors, rebooted, still can't get the wireless to work, even after flipping the physical toggle switch a little bit.

I thought the acerhk module was included now, is there a part to it I'm missing or something?

Appreciate the help!

Anonymous said...

k, I'm a liar, there is an /etc/modules, and I think acerhk IS on my computer buried somewhere, so I'm going to assume it's not working cause I messed something up, and thus I'll re-install ubuntu and start over. Pardon my blather!

Jono said...

Hello Anonymous

I'm not surprised you don't have an acerhk module there - /etc/modules should be a text file rather than a directory. If you want to test that your system has it, you can type something like

sudo modprobe -v acerhk

You should get a message regarding success or failure (this command basically tries loading the module for your system). Maybe your reinstall will help - the best way to learn is to keep playing until something happens! (keep backups!!)

Anonymous said...

hi, i have problem. i install .deb acerhk-source but i don´t have it in module assistant.

Anonymous said...

Hello all.

I have made a GUI to work with the AcerHK driver.

My project page is:

There are .deb and .rpm and a .zip file. I recommend the .deb as it will install to all correct areas and places a launcher/menu entry in the Applications / System menu.

The latest release is v 0.3 and when run from command line will provide feedback that includes information about the acerhk driver. Great for troubleshooting assistance also.

Would love feedback on it also... especially if it doesn't work for you. Note: the only time I received comments was when they actually had an acer that didn't need it.

A good place to look to see if your computer needs it or will use it is:

Thanks Much

Anonymous said...

Thank you for all your effort helping people out
I have issue while trying install acerhk-source on my laptop with a clean install ubuntu 8.10
I don't even see /etc/modules folder. The only folder I can find is /etc/modprobe.d
What happened to my installation?

Jono said...


/etc/modules is a text file, not a directory. I don't have a Ubuntu machine handy atm so it's possible that the file no longer exists. I'll have to remind myself to check that out at some stage.

Alistair said...

Thanks Jono, I did finnd /etc/modules in a text format, however when I tried to run acerhk, it gave me "bash: acerhk: command not found."

Also when I type in "sudo modprobe -v acerhk", it just returned nothing.

Can you help me with this please?


Antonis Tsixlas said...

your procedure is not correct. To complete the autorun process you need to execute the following line so that the script is really executed on boot:

sudo update-rc.d wifi defaults

and don't confuse your readers. The appropriate name to save your script is wifi and must be saved in home directory so the procedure is correct.

Jono said...

Thanks for your suggestion Antonis, I have included it in the post itself.

I'm not sure I agree that the home directory is the best place for the script, however.

arm-c said...

I have updated the AcerHK GUI. Current version release is 0.5

Largest change of function is that when run, if the acerhk driver is not found, it will attempt a modprobe.

Next release will automate adding acerhk to the modules file, but for time being, simply running the program the first time will load the driver and then the buttons to turn on/off the wireless and bluetooth will function.

Presently, believe user will be prompted if they want to add the file with an initial recommendation to not add initially until they are able to verfy that it will work. Still thinking through process.

My project page is:

arm-c said...

Version 0.6 has been released. This release focuses on configuring the system for use with acerhk. It will run modprobe, and if successful, offer to add to the /etc/modules file. This is a very simple task for most Linuxers; however, for new users, this should be very beneficial. Key enhancements: Checks for modprobe success; Alerts if modprobe unsuccessful; if modprobe success, added option to modify the /etc/modules file; and checks to see if /etc/modules already has 'acerhk' in it and if so, will not add again; Notifies user of possible problem that the module is in 'modules' but isn't loaded. FEEDBACK HIGHLY ENCOURAGED!

Håkon said...

This didn't work with Ubuntu 9.10. I had to downgrade to 9.04 after installing 9.10. I read something somewhere about acerhk being removed from 9.10. Any suggestions?

Mahoney said...

In total agreement with Hakon here, please help!

Anonymous said...

Just installed (X)ubuntu 10.10 (i386) to Acer Aspire 3100 laptop, it seems to be that wlan does not work, also acerhk does not come with Xubuntu anymore, at least can't find it.
I can install sources, but it is bit of work to get things work again.

As Håkon says, it has been removed and has not returned, reason why they chose this is unknown, so I will clear disk and install 9.04 as it is much easier for me than try to get package compiled and installed.

Post a Comment