cemkaya-mpi / Dell-G15-Controller

GNU General Public License v3.0
35 stars 13 forks source link

Dell G15 5515 AMD edition DSDT table #12

Closed Alastor-Ripley closed 2 months ago

Alastor-Ripley commented 10 months ago

Have the Dell G15 5515 Amd edition, commented on something on this repo a while back and someone asked me to create an issue & post my dsdt table here, so here i am and here it is: dsdt.txt hopefully this is the right file and format.

cemkaya-mpi commented 10 months ago

Hi, yes that was me. The dsdt for your model looks very similar. Could you try the following bash script?

#!/bin/bash

c(){ echo "$1" | sudo tee /proc/acpi/call >/dev/null && sudo cat /proc/acpi/call;echo;}

for mode in 0xa{0..9} 0xa{a..b}
do
    echo "Trying mode ${mode}"
    echo "\_SB.AMW3.WMAX 0 0x15 {0x01, ${mode}, 0x00, 0x00}"
    c "\_SB.AMW3.WMAX 0 0x15 {0x01, ${mode}, 0x00, 0x00}"
done
echo "Reverting to balanced."
c "\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa0, 0x00, 0x00}"

This would tell me which power modes are supported by your hardware.

Alastor-Ripley commented 10 months ago

This is what printed out:

Trying mode 0xa0
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa0, 0x00, 0x00}
0xffffffff
Trying mode 0xa1
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa1, 0x00, 0x00}
0xffffffff
Trying mode 0xa2
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa2, 0x00, 0x00}
0xffffffff
Trying mode 0xa3
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa3, 0x00, 0x00}
0xffffffff
Trying mode 0xa4
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa4, 0x00, 0x00}
0xffffffff
Trying mode 0xa5
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa5, 0x00, 0x00}
0xffffffff
Trying mode 0xa6
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa6, 0x00, 0x00}
0xffffffff
Trying mode 0xa7
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa7, 0x00, 0x00}
0xffffffff
Trying mode 0xa8
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa8, 0x00, 0x00}
0xffffffff
Trying mode 0xa9
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xa9, 0x00, 0x00}
0xffffffff
Trying mode 0xaa
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xaa, 0x00, 0x00}
0xffffffff
Trying mode 0xab
\_SB.AMW3.WMAX 0 0x15 {0x01, 0xab, 0x00, 0x00}
0x0
Reverting to balanced.
0xffffffff
Alastor-Ripley commented 10 months ago

Did that give you the info that you needed to know?

cemkaya-mpi commented 10 months ago

Hello, it looks like only G Mode (0xab) worked, but the others did not. Do the acpi calls also return 0xffffffff if you call them manually?

Alastor-Ripley commented 10 months ago

How would I test this?

cemkaya-mpi commented 10 months ago

To set the power mode to MODE, execute the following in a shell:

c(){ echo "$1" | sudo tee /proc/acpi/call >/dev/null && sudo cat /proc/acpi/call;echo;}
c "\_SB.AMW3.WMAX 0 0x15 {MODE, 0xa0, 0x00, 0x00}"

For example, for the balanced mode: c "\_SB.AMW3.WMAX 0 0x15 {0xa0, 0xa0, 0x00, 0x00}"

Above, I tried all possible power modes that I know of:

"USTT_Balanced" : "0xa0",
"USTT_Performance" : "0xa1",
"USTT_Cool" : "0xa2", 
"USTT_Quiet" : "0xa3",
"USTT_FullSpeed" : "0xa4",
"USTT_BatterySaver" : "0xa5",
"G Mode" : "0xab",
"Manual" : "0x0",
cemkaya-mpi commented 5 months ago

Could you try replacing AMW3 with AMWW and try again?

Alastor-Ripley commented 5 months ago

So manual and G mode were the only ones that seemed to work whenever I tried this manually, also when I replaced AMW3 with AMWW i'd get this: "Error: AE_NOT_FOUND"

flippedbits commented 4 months ago

I believe I have the same machine. Would supplying a generated dsdt.dsl file help at all? (I was just using the commands from here: https://wiki.archlinux.org/title/DSDT)

cemkaya-mpi commented 4 months ago

Well, it would be the same file as the one that I already looked at. Could one of you try:

c(){ echo "$1" | sudo tee /proc/acpi/call >/dev/null && sudo cat /proc/acpi/call;echo;}
c "\_SB.AMWW.WMAX 0 0x15 {0x01, 0x00, 0x00, 0x00}"
c "\_SB.AMWW.WMAX 0 0x15 {0x02, 0x32, 0x0ff, 0x00}"
sleep 20
c "\_SB.AMWW.WMAX 0 0x15 {0x02, 0x32, 0x50, 0x00}"
sleep 20
c "\_SB.AMWW.WMAX 0 0x15 {0x02, 0x32, 0x00, 0x00}"

The first command sets power mode to Manual. Then, a single fan should spin up to max speed, then spin down to middle speed, and finally spin down to the initial speed. If this works, I could at least make a patch for the 5515 with the manual and G modes.

flippedbits commented 4 months ago

Sorry, I missed that someone else already submitted one.

Running that command gives me: Error: AE_NOT_FOUND Error: AE_NOT_FOUND Error: AE_NOT_FOUND Error: AE_NOT_FOUND

So I swapped AMWW with AMW3 and it seemed to work, the CPU fan cycled:

  1. 5700 rpm
  2. 3300 rpm
  3. 1900 rpm
cemkaya-mpi commented 4 months ago

Great, then I will add at least manual and G modes. Finally, what does the following return?

c(){ echo "$1" | sudo tee /proc/acpi/call >/dev/null && sudo cat /proc/acpi/call;echo;}
c "\_SB.AMW3.WMAX 0 0x1a {0x02, 0x02, 0x00, 0x00}"
flippedbits commented 4 months ago

0xc80

cemkaya-mpi commented 3 months ago

Please try out the G15_5515 branch. If it works, I will merge with master and update the AUR package.

Alastor-Ripley commented 3 months ago

i get the following error: NameError: name 'g15_5515_patch' is not defined. Did you mean: 'g15_5511_patch'?

cemkaya-mpi commented 3 months ago

How about now?

Alastor-Ripley commented 3 months ago

yep it seems to work now