Export to GitHub

aceracpi - issue #6

New method of enabling/disabling features is broken


Posted on Jul 15, 2007 by Happy Bear

What steps will reproduce the problem? 1. Install acer_acpi 2. Have wireless on and attempt to turn it off using "echo 0 > /proc/acpi/acer/wireless", it fails:

david@david-laptop:~$ echo 0 > /proc/acpi/acer/wireless bash: echo: write error: Invalid argument

Wireless stays enabled in every sense (light is on, still can connect). Also, placing the new value in quotes (echo "0" > /proc/acpi/acer/wireless) does not have any effect on the issue, it still fails.

  1. Attempting to use "echo enabled : 0 > /proc/acpi/acer/wireless" works as usual and disables wireless.

I would imagine that this problem exists for Bluetooth, 3G, and monitor brightness as well, but I do not have/use these features on my laptop (Aspire 5043WLi).

I am using Ubuntu 7.04 64bit and acer_acpi 0.6.1, though the problem exists in 0.6.0 as well.

Thanks for the help on this, -David C. Uhrig

Comment #1

Posted on Jul 15, 2007 by Grumpy Bird

After enabling wireless, does "echo 1" then "echo 0" work? Does applying the attached patch also fix this problem?

Attachments

Comment #2

Posted on Jul 15, 2007 by Grumpy Bird

(No comment was entered for this change.)

Comment #3

Posted on Jul 16, 2007 by Happy Bear

Running echo 1 then echo 0 (without the diff) does not have any effect:

david@david-laptop:~/0.6.1$ echo 0 > /proc/acpi/acer/wireless bash: echo: write error: Invalid argument david@david-laptop:~/0.6.1$ echo 1 > /proc/acpi/acer/wireless bash: echo: write error: Invalid argument david@david-laptop:~/0.6.1$

After applying the patch, there is no change in the input/output:

david@david-laptop:~/0.6.1$ echo 0 > /proc/acpi/acer/wireless bash: echo: write error: Invalid argument david@david-laptop:~/0.6.1$ echo 1 > /proc/acpi/acer/wireless bash: echo: write error: Invalid argument david@david-laptop:~/0.6.1$

I did not mention this before (and have tested it with default chmod settings), but I have /proc/acpi/acer/wireless set to 0777 so that I do not need to su[do] enabling/disabling. Changing it back to 0644 and using sudo yields the same result.

Comment #4

Posted on Jul 16, 2007 by Grumpy Bird

You don't need to change any of the permissions to read/ write from acer_acpi - all the /proc entries allow standard users to write to them by default.

Please run acer_acpi with the parameter "debug=2" and give me the output from dmesg when you run all these commands.

Comment #5

Posted on Jul 16, 2007 by Grumpy Bird

Do you have an old acer_acpi still installed in /lib/modules//extra?

I'm wondering if this is related to the bash bug from issue #4 which buggers up the install, as I've tested acer_acpi on *buntu myself now, and I can't reproduce this issue (what does cat /proc/acpi/acer/version say?)

Attachments

Comment #6

Posted on Jul 16, 2007 by Grumpy Bird

My first Makefile patch was broken - please try this one (against either 0.6.1 or 0.6.2)

Attachments

Comment #7

Posted on Jul 16, 2007 by Happy Bear

First, yes ! am running 0.5.0 instead of 0.6.1. Nothing that I do seems to update it. As an aside: I just installed the 32bit version of Ubuntu 7.04 (PPTP VPN doesn't like to work under 64bit) and was getting 'FATAL: module not found' errors when trying to sudo modprobe acer_acpi with 0.6.x. I had to install 0.5.0 to get it to work.

When I try to apply the diff, I get the following message (on 0.6.1 or 0.6.2):

david@david-laptop:~/acer_acpi-0.6.2$ patch acer_acpi.c acer_acpi-0.6.2-makefile-bash-3.2-fix.patch patching file acer_acpi.c Hunk #1 FAILED at 3. Hunk #2 FAILED at 19. 2 out of 2 hunks FAILED -- saving rejects to file acer_acpi.c.rej david@david-laptop:~/acer_acpi-0.6.2$ cat /proc/acpi/acer/version driver: 0.5 proc_interface: 1 david@david-laptop:~/acer_acpi-0.6.2$

The code still compiles, but I can't seem to get it to update to a new version beyond 0.5.0, even when I delete the old *.(k)o files from their respective locations before installing/rebooting/depmod and modprobing. I guess that would be a good starting point, hu?

Comment #8

Posted on Jul 17, 2007 by Grumpy Bird

Please try acer_acpi-0.6.3 - this has the proper Makefile patches and should now fix the build and install errors.

Comment #9

Posted on Jul 17, 2007 by Happy Bear

Thank you very much, cathectic. Version 0.6.3 works perfectly with the new enabling/disabling scheme and actually updating from 0.5.0:

david@david-laptop:~/acer_acpi-0.6.3$ cat /proc/acpi/acer/version driver: 0.6 proc_interface: 1 david@david-laptop:~/acer_acpi-0.6.3$ ls -al /proc/acpi/acer total 0 dr-xr-xr-x 2 root root 0 2007-07-16 19:01 . dr-xr-xr-x 14 root root 0 2007-07-16 18:51 .. -rw-r--r-- 1 root root 0 2007-07-16 19:01 bluetooth -rw-r--r-- 1 root root 0 2007-07-16 19:01 mailled -rw-r--r-- 1 root root 0 2007-07-16 19:01 version -rw-r--r-- 1 root root 0 2007-07-16 19:01 wireless david@david-laptop:~/acer_acpi-0.6.3$ echo 1 > /proc/acpi/acer/wireless bash: /proc/acpi/acer/wireless: Permission denied david@david-laptop:~/acer_acpi-0.6.3$ sudo echo 1 > /proc/acpi/acer/wireless bash: /proc/acpi/acer/wireless: Permission denied david@david-laptop:~/acer_acpi-0.6.3$ sudo chmod 0777 /proc/acpi/acer/* david@david-laptop:~/acer_acpi-0.6.3$ ls -al /proc/acpi/acer total 0 dr-xr-xr-x 2 root root 0 2007-07-16 19:02 . dr-xr-xr-x 14 root root 0 2007-07-16 18:51 .. -rwxrwxrwx 1 root root 0 2007-07-16 19:02 bluetooth -rwxrwxrwx 1 root root 0 2007-07-16 19:02 mailled -rwxrwxrwx 1 root root 0 2007-07-16 19:02 version -rwxrwxrwx 1 root root 0 2007-07-16 19:02 wireless david@david-laptop:~/acer_acpi-0.6.3$ echo 1 > /proc/acpi/acer/wireless david@david-laptop:~/acer_acpi-0.6.3$ echo 0 > /proc/acpi/acer/wireless david@david-laptop:~/acer_acpi-0.6.3$

As you can see, it still doesn't let me write to it unless I alter the permissions, but this is not a big deal at all; I have a startup script that changes it on system load.

Thanks again for the hard work! :)

Comment #10

Posted on Aug 3, 2007 by Grumpy Bird

I'm closing this because the original bug (new features enable/ disabled) was fixed.

I suspect Ubuntu patching things they really shouldn't might be the cause for the /proc problems, since people who have mentioned this all seem to be running Ubuntu (and acer_acpi does explicitly grant user writing privileges to /proc/acpi/acer). I might look into this, but it should be filed as a separate bug.

Comment #11

Posted on Aug 3, 2007 by Happy Bear

Thanks for the update. It's not a big deal if it is just an Ubuntu-specific problem. In my init script one of the first things it does is chmod all the entries to 0777 so I can get at the values as needed anyway. :) Thanks again!

Status: Fixed

Labels:
Type-Defect Priority-Medium