Acer Aspire TimelineX 3820TG mods/tweaks ONLY!

Discussion in 'Acer' started by prikolchik, Mar 16, 2011.

Thread Status:
Not open for further replies.
  1. _InKr_

    _InKr_ Notebook Guru

    Reputations:
    11
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    15
    We can I find more details regarding this (I mean what exactly mutex should I search for)?
     
  2. Just_a_Nick

    Just_a_Nick Notebook Deity

    Reputations:
    280
    Messages:
    922
    Likes Received:
    0
    Trophy Points:
    30
    I was searching for it around 8 month before and had only found a possible solution with the ACPI driver from windows.

    No, I haven't use it.

    Don't worry about rpm, use %.
     
  3. _InKr_

    _InKr_ Notebook Guru

    Reputations:
    11
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    15
    It's an option. But one of unique:))) features of my utility is that it allows user to set desired fan speed to maintain. Of course this is only possible only when controller has a capability to return RPM value.
     
  4. inteks

    inteks Notebook Evangelist

    Reputations:
    168
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    30
    here is the code i use for accessing the EC


    Code:
             public static Ols ols;
    
    
            public static bool InitIO() {
                 ols = new Ols();
    
                // Check support library sutatus
                switch (ols.GetStatus()) {
                    case (uint)Ols.Status.NO_ERROR:
                        break;
                    case (uint)Ols.Status.DLL_NOT_FOUND:
                        MessageBox.Show("Status Error!! DLL_NOT_FOUND");
                        return false;
                    case (uint)Ols.Status.DLL_INCORRECT_VERSION:
                        MessageBox.Show("Status Error!! DLL_INCORRECT_VERSION");
                        return false;
                    case (uint)Ols.Status.DLL_INITIALIZE_ERROR:
                        MessageBox.Show("Status Error!! DLL_INITIALIZE_ERROR");
                        return false;
                }
    
                // Check WinRing0 status
                switch (ols.GetDllStatus()) {
                    case (uint)Ols.OlsDllStatus.OLS_DLL_NO_ERROR:
                        break;
                    case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_LOADED:
                        MessageBox.Show("DLL Status Error!! OLS_DRIVER_NOT_LOADED");
                        return false;
                    case (uint)Ols.OlsDllStatus.OLS_DLL_UNSUPPORTED_PLATFORM:
                        MessageBox.Show("DLL Status Error!! OLS_UNSUPPORTED_PLATFORM");
                        return false;
                    case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_FOUND:
                        MessageBox.Show("DLL Status Error!! OLS_DLL_DRIVER_NOT_FOUND");
                        return false;
                    case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_UNLOADED:
                        MessageBox.Show("DLL Status Error!! OLS_DLL_DRIVER_UNLOADED");
                        return false;
                    case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_LOADED_ON_NETWORK:
                        MessageBox.Show("DLL Status Error!! DRIVER_NOT_LOADED_ON_NETWORK");
                        return false;
                    case (uint)Ols.OlsDllStatus.OLS_DLL_UNKNOWN_ERROR:
                        MessageBox.Show("DLL Status Error!! OLS_DLL_UNKNOWN_ERROR");
                        return false;
                }
                return true;
            }
    
    
            // ----------------------------------------------------------------------------
            // Acer embedded controller functions
            // ----------------------------------------------------------------------------
            // based on the Acer ACPI project developped by Michael Kurz, Petr Tomasek
            // and Carlos Corbacho : http://aceracpi.googlecode.com
            // ----------------------------------------------------------------------------
    
    
            private static bool WaitEC(ushort iPort, byte bVal) {
                for (int i = 0; i < 300; i++) {
                    var result = ols.ReadIoPortByte(iPort);
                    if (!Convert.ToBoolean(result & bVal)) return true;
                    Thread.Sleep(1);
                }
                return false;
            }
    
            private static bool WaitWriteEC() {
                return WaitEC(0x66, 0x2);
            }
    
            private static bool WaitReadEC() {
                return WaitEC(0x66, 0x1);
            }
    
            public static bool WriteEC(byte bValue, byte iPort) {
                if (WaitWriteEC()) {
                    ols.WriteIoPortByte(0x66, 0x81);
                } else return false;
                if (WaitWriteEC()) {
                    ols.WriteIoPortByte(0x62, iPort);
                }
                if (WaitWriteEC()) {
                    ols.WriteIoPortByte(0x62, bValue);
                }
                return true;
            }
    
            public static byte ReadEC(byte iPort) {
                if (WaitWriteEC()) {
                    ols.WriteIoPortByte(0x66, 0x80);
                }
                if (WaitWriteEC()) {
                    ols.WriteIoPortByte(0x62, iPort);
                }
                if (WaitReadEC()) {
                    return ols.ReadIoPortByte(0x62);
                }
                return 0;
            }
    
       
    
            #endregion Acer
    
     
  5. prikolchik

    prikolchik Notebook Evangelist

    Reputations:
    259
    Messages:
    362
    Likes Received:
    2
    Trophy Points:
    30
    Hmm, this looks very interesting! I was curious to how you do it on Linux and now I know! Doesn't look as clean as you do it on Linux though :D

    RWEverything doesn't work on Linux (obviously), so if you want to read and change EC values on Linux, acer_ec.pl Perl scirpt (google) can be used. I have tested it and it works well on 3820TG. Some sources say that it is not very safe to use, but I didn't have a problem. I don't plan on creating any scripts/applications that use it. I had to do some minor modifications to make it display EC table in a nice way.

    For controlling fan on Linux
    , we can modify acerhdf kernel module/driver that can be downloaded from here. I've looked at the code and as far as I can see it will require very little modification to work with 3820TG CPU fan.


    acerhdf is used to keep the fan off until CPU reaches a certain temperature, and then it returns automatic fan control back to the system. This wouldn't be as good as Windows tool you guys are writing, but it will certainly be better than nothing!

    I might create a new tool based off it, but that will NOT be any time soon.

    Can anyone tell me if there is a way to read ATI graphics temperature from EC so that we can control the fan speed? As far as I know there isn't, but I just want to be sure.

    And what is the register and formula for calculating CPU temperature?
    ---------------------------
    There is another tweak I really want to do. I want to set the LCD brightness to levels much lower than 10%. I have modded the DSDT table in my BIOS to include new levels (1,2,4,6,8%), but unfortunately, it only works on Windows using Windows brightness controls (<Win>+X)

    On Ubuntu, when I try to lower brightness by hotkeys <Fn>+right, it does not work. It only goes as low as 10% on matter what I do. Both on ATI and Intel.
    When running off ATI as discrete, the LCD brightness can be changed to arbitary value by editing [0x84] to values 0x00-0x64 (from 0 to 100%). That is excellent.

    When running off Intel, changing [0x84] makes no difference. After looking at DSDT table, it seems like [0x87] is used to store the brightness level when on Intel. So I tried changing [0x87] like i did with [0x84] for ATI, but unfortunately, the value seems to be locked, and there is no way to change it. So I dug deeper, and found that the actual brightness is changed by reading value from [0x87] (which we can't change in RWEverything) and then writing to an ACPI (DSDT table) value called BCLP (which is then used by the driver?). BCLP is 32bit long and is stored at SystemMemory(ASLB) + Offset(0x316). ASLB value is 32bit long and is stored in SystemMemory(0xFFFF0000) + Offset(0xAA).
    My logic is that if I can read ASLB to find the memory location of BCLP and then change the brightness directly by writing to BCLP, then it should work. The problem is that I don't know how to get access to SystemMemory to find ASLB. I think you can do it in RWEverything, but everything I tried did not give me a meaningful value.

    Can any of you give me any tips on how to find the ASLB value in SystemMemory? And then change BCLP? In the worst case, I can always rewrite DSDT table, but before doing that I want to figure out if I can control brightness by writing to SystemMemory via RWEverything or some other tool.
     
  6. _InKr_

    _InKr_ Notebook Guru

    Reputations:
    11
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    15
    I see. Will try this. Thank you.

    Few questions about WinRing0:
    1. Does it need to be somehow installed (with system restart) before use?
    2. Does it provide MS signed driver to work under 64bit systems?
    3. I can't find a link to download it :(. All link I found are pointing to WinRing0 | Download WinRing0 software for free at SourceForge.net. And there are no files to download :(. Can you share it with me?

    I'm asking because I now use TVicPort (Toolkits - Freeware - TVicPort - Port I/O and Memory access under Win32 and Win 64-bit) for PortIO. It is freeware for non-commercial use, has signed driver and works under any XP/Vista/7 both x86 and 64bit. But it has one major disadvantage: it should be installed with system reboot before use.
     
  7. inteks

    inteks Notebook Evangelist

    Reputations:
    168
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    30
    OpenLibSys.cs - setfsb - setfsb in c# - Google Project Hosting
    i dont get setfsb to work in c# but its a good example for openlibsys.cs,
     
  8. _InKr_

    _InKr_ Notebook Guru

    Reputations:
    11
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    15
  9. Just_a_Nick

    Just_a_Nick Notebook Deity

    Reputations:
    280
    Messages:
    922
    Likes Received:
    0
    Trophy Points:
    30
    1: It will install itself at the first run as a driver.
    2: A signed driver is available.
    3: Get the right version. The new one is only able to read and not to write, because the tool was used to damage a the hardware.
     
  10. _InKr_

    _InKr_ Notebook Guru

    Reputations:
    11
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    15
    Oookey...

    Have added support for CPU speed regulation. Works good so far. Temp is around 50 (with fan off) when in browser.
    Just want to add WinRing0 support before posting first beta.

    Adding screenshot from my system :).
     

    Attached Files:

Loading...
Thread Status:
Not open for further replies.

Share This Page