Code Monkey home page Code Monkey logo

Comments (8)

AreYouLoco avatar AreYouLoco commented on June 15, 2024
    # Get and parse commandline options
    while getopts "b:d:x" o; do
        case "${o}" in
            b)  BUS=${OPTARG};;
            d)  DIM=${OPTARG};;
            x)  XMP_MODE=1;;
            *)  usage;;
        esac
    done

    if [ -z "$BUS" ] || [ -z "$DIMM" ] || [ -z "$INPUTFILE" ]; then
        usage
    fi

This code returns usage if some options are missing. But it seems correct. What am I missing here?

Also the command issued in previous post creates dummy file %2
Fixed in #9 #8

from overclockspd.

baboomerang avatar baboomerang commented on June 15, 2024
    # Get and parse commandline options
    while getopts "b:d:x" o; do
        case "${o}" in
            b)  BUS=${OPTARG};;
            d)  DIM=${OPTARG};;
            x)  XMP_MODE=1;;
            *)  usage;;
        esac
    done

    if [ -z "$BUS" ] || [ -z "$DIMM" ] || [ -z "$INPUTFILE" ]; then
        usage
    fi

This code returns usage if some options are missing. But it seems correct. What am I missing here?

Also the command issued in previous post creates dummy file %2 Fixed in #9 #8

Thank you for catching that typo and fixing it!

from overclockspd.

AreYouLoco avatar AreYouLoco commented on June 15, 2024

Please reopen the issue. Still writespd.sh is not working for me. And gives me usage message. Any idea whats wrong?

The typos issue was not relevant.

from overclockspd.

baboomerang avatar baboomerang commented on June 15, 2024

Please reopen the issue. Still writespd.sh is not working for me. And gives me usage message. Any idea whats wrong?

The typos issue was not relevant.

I updated both scripts and tested them on my AMD machine. Fetch the new updates and run them.
There were multiple issues with the script but it should be working now.

Let me know if it works or not.

from overclockspd.

AreYouLoco avatar AreYouLoco commented on June 15, 2024

After refactoring the readspd.sh works just fine but when I tried to write SPD profile I just dumped back to the stick i got this:

sudo ./writespd.sh -b 0 -d 0x50 ./dimm0x50.2021-12-08.spd 
WARNING! Do not write an incorrect or bad address for i2cbus or dimm!
Writing to non-dimm locations can cause permanent damage!
Please have backups incase something goes wrong.
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 92 11 0b 03 04 21 02 09 03 11 01 08 09 00 fc 03    ?????!???????.??
10: 5e 78 5e 28 5e 11 10 79 20 08 3c 3c 00 d8 83 01    ^x^(^??y ?<<.???
20: 00 00 ca 1f 1f 1f 00 00 00 00 00 00 00 00 00 00    ..????..........
30: 00 00 00 00 00 00 00 00 00 00 00 00 0f 11 65 00    ............??e.
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
70: 00 00 00 00 00 01 98 07 20 20 4a 1f 2b 41 5a 7b    .....???  J?+AZ{
80: 4b 48 58 31 38 36 36 43 31 31 53 33 4c 2f 38 47    KHX1866C11S3L/8G
90: 20 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00      ..............
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5a    ...............Z
Preview of target device: is this the intended device?
Knowing these risks, you will write to bus 0 address 0x50. Proceed? [yes/No]: yes
Writing to SPD: 0/255 BYTE:(0x92)
Error: Write failed

Error: for unknown reasons, i2cset failed. Your i2c device is in an unknown state.
DO NOT REBOOT THE DEVICE. YOU ARE ON YOUR OWN.

I must say that this warning got me scared. But at least it goes further. I have checked the first byte:
sudo i2cget -y 0 0x50 00
and its 0x92 as it should. Unless it wrote something random to my sick but I think not. I dumped the whole SPD again and diffed with the original file and they are the same. So I guess its ok to reboot.
Also I checked and I can write byte per byte manually with:

$ sudo i2cset -y 0 0x50 240 0xee
$ sudo i2cget -y 0 0x50 240
0xee

So the script just got confused about something. Please re-check!

from overclockspd.

AreYouLoco avatar AreYouLoco commented on June 15, 2024

I think I got the reason:

$ sudo i2cset -y 0 0x50 240 0xee
$ sudo i2cget -y 0 0x50 240
0xee
$ sudo i2cset -y 0 0x50 240 0x00
$ sudo i2cget -y 0 0x50 240
0x00
$ sudo i2cset -y 0 0x50 00 0x92
Error: Write failed
$ echo $?
1

Does it mean that my stick is locked and I can write only XMP profile? The script could be improved if the return code is 1 then check if you can write and read to above 240 and give a feedback and if the write/read above 240 fails than give that scary warning.

from overclockspd.

AreYouLoco avatar AreYouLoco commented on June 15, 2024

I have successfully wrote the XMP-only to my sticks. So the script works! Just my SPD region is locked.

from overclockspd.

baboomerang avatar baboomerang commented on June 15, 2024

Yeah, memory manufacturers can lock the lower 128 bytes, the upper 128 bytes or both (256 bytes).
To be honest, I completely forgot about that until now. Sorry for scaring you.

I replaced the scary error message with a much nicer error message. Glad to see the XMP worked for you.
Closing this issue and the other one now.

from overclockspd.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.