Code Monkey home page Code Monkey logo

Comments (4)

Lucie2A avatar Lucie2A commented on August 11, 2024

with the fix, it save some data, but in a wrong way as it doesn't match pp_table from /sys/...

from amdtweak.

kobalicek avatar kobalicek commented on August 11, 2024

Hello, thanks for reporting the bug!

I tried to fix it but since I have no AMD GPUs anymore I cannot properly test whether it works now. Let me know if the issue still persists.

from amdtweak.

Lucie2A avatar Lucie2A commented on August 11, 2024

with the fix some data are written to file but ... only junk.

I suspect data[i].buf to point on some random memory and not to previously loaded data from /sys/.../pp_table

hexdump ../pp_tables/card_0.raw_pp_table.fromsysclass

0000000 031b 0107 4d00 e200 0006 8c00 0029 1a00
0000010 0000 0000 0680 2000 02bf 4000 030d 4b00
0000020 0f00 4d00 8200 7902 0002 ad00 3301 7701
0000030 f100 d600 e701 0002 b200 0002 0100 0003
0000040 f400 01f5 5300 0007 0000 0000 0100 0002
0000050 0000 0000 0000 0800 0000 0000 0000 0000
0000060 0000 0700 0200 0000 0000 0500 0000 0000
0000070 0000 0000 0000 0000 200f 0003 0000 0000
0000080 5200 0003 0000 0000 8400 0003 0000 0000
0000090 b600 0003 0000 0000 e800 0003 0000 0000
00000a0 1a00 0004 0000 0000 4c00 0004 0000 0000
00000b0 2000 0003 0000 0000 8400 0003 0000 0000
00000c0 8400 0003 0000 0000 8400 0003 0000 0000
00000d0 8400 0003 0000 0000 9d00 0003 0000 0000
00000e0 b600 0003 0000 0000 cb00 0002 0000 0000
00000f0 0000 8408 0003 0000 0000 0200 00ff 0000
0000100 0000 0300 00ff 0000 0000 0400 00ff 0000
0000110 0000 0500 00ff 0000 0000 0600 00ff 0000
0000120 0000 0700 00ff 0000 0000 0800 00ff 0000
0000130 0000 0100 0e08 0000 5398 0000 0000 8000
0000140 0000 0000 0007 8c00 00eb 0000 0000 d080
0000150 0007 0800 0000 adb0 0001 0000 0000 07d0
0000160 0000 0009 8000 01b5 0000 0000 d000 0007
0000170 0a00 0000 bd50 0001 0000 0000 07d0 0000
0000180 000b 2000 01c5 0000 0000 d000 0007 0c00
0000190 0000 e848 0001 0000 0000 07d0 0000 000d
00001a0 0c00 01f2 0000 0000 d000 0007 0000 0e03
00001b0 0320 0000 03e8 7530 0000 0000 6b00 0003
00001c0 e800 2403 00f4 0000 0100 036b 0000 03e8
00001d0 e630 0002 0000 0700 0000 9000 00e2 f800
00001e0 0124 1800 00f6 0000 0000 a800 00de 0100
00001f0 ffb4 f618 0000 3880 0001 0d88 0001 0000
0000200 0000 fa00 0000 0002 a000 0109 0800 014c
0000210 f800 0124 0000 0000 7000 0111 0300 0000
0000220 1d28 0001 5ba8 0001 3c68 0001 0000 0000
0000230 28e0 0001 0004 c800 012c 6000 0167 f000
0000240 014f 0000 0000 6800 013c 0500 0000 3880
0000250 0001 7318 0001 6378 0001 0000 0000 4c08
0000260 0001 0006 3800 0144 d000 017e 0000 0177
0000270 0000 0000 c000 0157 0100 0017 0200 2000
0000280 0000 0309 0fa0 1770 1f40 0fa0 1770 1f40
0000290 2a94 6401 e400 5412 d00b 01fb 4a00 6414
00002a0 6400 6400 6400 6400 6400 6400 0100 362e
00002b0 0000 3c04 0000 3e00 3e00 3e00 0000 0000
00002c0 3e00 5500 0000 0000 5e00 0200 6900 5000
00002d0 5000 0000 0000 5000 0000 9000 9000 9000
00002e0 003c 0005 0000 0100 0006 0100 0001 0101
00002f0 0001 0102 0001 0102 0001 0102 0001 0102
0000300 0101 0003 0008 fc00 000a 0000 0008 f400
0000310 0065 0200 0008 f400 0065 0000
000031b

hexdump card_0.write-file-pp

0000000 031b 0107 4d00 ef00 bdbf 0006 ef00 bdbf
0000010 0029 1a00 0000 0000 bfef 06bd 2000 bfef
0000020 02bd 4000 030d 4b00 0f00 4d00 ef00 bdbf
0000030 7902 0002 ef00 bdbf 3301 7701 ef00 bdbf
0000040 ef00 bdbf ef01 bdbf 0002 ef00 bdbf 0002
0000050 0100 0003 ef00 bdbf bfef 01bd 5300 0007
0000060 0000 0000 0100 0002 0000 0000 0000 0800
0000070 0000 0000 0000 0000 0000 0700 0200 0000
0000080 0000 0500 0000 0000 0000 0000 0000 0000
0000090 200f 0003 0000 0000 5200 0003 0000 0000
00000a0 ef00 bdbf 0003 0000 0000 ef00 bdbf 0003
00000b0 0000 0000 ef00 bdbf 0003 0000 0000 1a00
00000c0 0004 0000 0000 4c00 0004 0000 0000 2000
00000d0 0003 0000 0000 ef00 bdbf 0003 0000 0000
00000e0 ef00 bdbf 0003 0000 0000 ef00 bdbf 0003
00000f0 0000 0000 ef00 bdbf 0003 0000 0000 ef00
0000100 bdbf 0003 0000 0000 ef00 bdbf 0003 0000
0000110 0000 ef00 bdbf 0002 0000 0000 0000 ef08
0000120 bdbf 0003 0000 0000 0200 bfef 00bd 0000
0000130 0000 0300 bfef 00bd 0000 0000 0400 bfef
0000140 00bd 0000 0000 0500 bfef 00bd 0000 0000
0000150 0600 bfef 00bd 0000 0000 0700 bfef 00bd
0000160 0000 0000 0800 bfef 00bd 0000 0000 0100
0000170 0e08 0000 bfef 53bd 0000 0000 ef00 bdbf
0000180 0000 0000 0007 ef00 bdbf bfef 00bd 0000
0000190 0000 bfef efbd bdbf 0007 0800 0000 bfef
00001a0 efbd bdbf 0001 0000 0000 bfef 07bd 0000
00001b0 0009 ef00 bdbf bfef 01bd 0000 0000 ef00
00001c0 bdbf 0007 0a00 0000 ef50 bdbf 0001 0000
00001d0 0000 bfef 07bd 0000 000b 2000 bfef 01bd
00001e0 0000 0000 ef00 bdbf 0007 0c00 0000 ef48
00001f0 bdbf 0001 0000 0000 bfef 07bd 0000 000d
0000200 0c00 bfef 01bd 0000 0000 ef00 bdbf 0007
0000210 0000 0e03 0320 0000 bfef 03bd 7530 0000
0000220 0000 6b00 0003 ef00 bdbf 2403 bfef 00bd
0000230 0000 0100 036b 0000 bfef 03bd ef30 bdbf
0000240 0002 0000 0700 0000 ef00 bdbf bfef 00bd
0000250 ef00 bdbf 0124 1800 bfef 00bd 0000 0000
0000260 ef00 bdbf bfef 00bd 0100 bfef efbd bdbf
0000270 ef18 bdbf 0000 bfef 38bd 0001 bfef 0dbd
0000280 0001 0000 0000 ef00 bdbf 0000 0002 ef00
0000290 bdbf 0109 0800 014c ef00 bdbf 0124 0000
00002a0 0000 7000 0111 0300 0000 1d28 0001 bfef
00002b0 5bbd 0001 3c68 0001 0000 0000 bfef 28bd
00002c0 0001 0004 ef00 bdbf 012c 6000 0167 ef00
00002d0 bdbf 014f 0000 0000 6800 013c 0500 0000
00002e0 bfef 38bd 0001 7318 0001 6378 0001 0000
00002f0 0000 4c08 0001 0006 3800 0144 ef00 bdbf
0000300 017e 0000 0177 0000 0000 ef00 bdbf 0157
0000310 0100 0017 0200 2000 0000 0309 bfef 0fbd
0000320 1770 1f40 bfef 0fbd 1770 1f40 bfef 2abd
0000330 6401 ef00 bdbf 5412 ef0b bdbf bfef 01bd
0000340 4a00 6414 6400 6400 6400 6400 6400 6400
0000350 0100 362e 0000 3c04 0000 3e00 3e00 3e00
0000360 0000 0000 3e00 5500 0000 0000 5e00 0200
0000370 6900 5000 5000 0000 0000 5000 0000 ef00
0000380 bdbf ef00 bdbf ef00 bdbf 003c 0005 0000
0000390 0100 0006 0100 0001 0101 0001 0102 0001
00003a0 0102 0001 0102 0001 0102 0101 0003 0008
00003b0 ef00 bdbf 000a 0000 0008 ef00 bdbf 0065
00003c0 0200 0008 ef00 bdbf 0065 0000
00003cb

from amdtweak.

Lucie2A avatar Lucie2A commented on August 11, 2024

this seams to be an error with iofs.writeFile()
as even a dummy code like this :

      const ppBuf = iofs.readFile("/sys/class/drm/card0/device/pp_table");
      iofs.writeFile("/home/lucie/Build/pp_tables/direct.copy", ppBuf);

write junk to "direct.copy"

from amdtweak.

Related Issues (14)

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.