Category PS4 News       Thread starter PSXHAX       Start date Nov 8, 2016 at 6:30 AM       4,681       1            
Status
Not open for further replies.
Over the weekend we reported on some PlayStation 4 Pro Gameplay and a guide for Changing / Upgrading the PS4 Pro Hard Drive and today JuniperMaxRoth of
Maxwell Inc. Studios has added some more PS4 Pro gameplay videos including a fan noise test demo that PlayStation fans can drool over. :openedeyewink:

Check them all out below with the related Tweets, as follows:

PS4 Pro Skyrim Gameplay #2

PS4 Pro Fan Noise Test #1

PS4 Pro Uncharted 4 Gameplay Clip #3

PS4 Pro Ratchet & Clank Gameplay #1
With the PlayStation 4 Pro officially being released on November 10th, everyone will be able to join in the fun very soon... and according to @Fimo HERE the first PS4 Pro batches shipped will be on PS4 Firmware 4.0 with others confirming version 3.70. ;-)
PS4 Fan Speed for 5.05 Kernel thanks to TheoryWrong:
Code:
All here is for 5.05 Kernel:

```int status = icc_query(void* msg_in, void* msg_out);```

icc_query: 0x43540

Sony like to use msg_in addr to message out
Size of habitual message: 0x7F0 (2032 bytes) (use bzero and the stack but i think you can use calloc)

Possible thermal get message:

```
| By the code                   | Inside the kernel memory
[00 09 10 00 00 00 00 1A 00 00] [00 00 00 00 00 80 00 00 80 00 00 85]
```

i doesn't have check the return (SceIccThermal on kernel)
Some other possible message is in the function of this function function <= yeah i know :') => 0xA83D0

Possible buzzer:
```
| By the code
[00 09 00 00 00 00 00 00 00 20]
```

Possible get fan message:
```
| By the code
[00 0A 05 00 00 00 00 00 00 20]
```

msg_out => `int* rpm_speed = (int*)return_buffer+0xE;`


(Note: The PS4 have 2 thermal captor GPU / CPU) you can get one with the acpi)

ACPI PART for the captor 2 :

```
devclass_get_device: 0x312600
device_get_softc: 0x312650
acpi_tz_get_temperature: 0xD670
devclass_find: 0x312020
```

See: https://github.com/freebsd/freebsd/blob/master/sys/dev/acpica/acpi_thermal.c

you need to add this in a header

```
#define TZ_ZEROC    2731
#define TZ_KELVTOC(x)    (((x) - TZ_ZEROC) / 10), abs(((x) - TZ_ZEROC) % 10)

struct acpi_tz_softc {
   device_t            tz_dev;
   ACPI_HANDLE            tz_handle;    /*Thermal zone handle*/
   int                tz_temperature;    /*Current temperature*/
   int                tz_active;    /*Current active cooling*/
#define TZ_ACTIVE_NONE        -1
#define TZ_ACTIVE_UNKNOWN    -2
   int                tz_requested;    /*Minimum active cooling*/
   int                tz_thflags;    /*Current temp-related flags*/
#define TZ_THFLAG_NONE        0
#define TZ_THFLAG_PSV        (1<<0)
#define TZ_THFLAG_HOT        (1<<2)
#define TZ_THFLAG_CRT        (1<<3)
   int                tz_flags;
#define TZ_FLAG_NO_SCP        (1<<0)        /*No _SCP method*/
#define TZ_FLAG_GETPROFILE    (1<<1)        /*Get power_profile in timeout*/
#define TZ_FLAG_GETSETTINGS    (1<<2)        /*Get devs/setpoints*/
   struct timespec        tz_cooling_started;
                   /*Current cooling starting time*/

   struct sysctl_ctx_list    tz_sysctl_ctx;
   struct sysctl_oid        *tz_sysctl_tree;
   eventhandler_tag        tz_event;

   struct acpi_tz_zone     tz_zone;    /*Thermal zone parameters*/
   int                tz_validchecks;
   int                tz_insane_tmp_notified;

   /* passive cooling */
   struct proc            *tz_cooling_proc;
   int                tz_cooling_proc_running;
   int                tz_cooling_enabled;
   int                tz_cooling_active;
   int                tz_cooling_updated;
   int                tz_cooling_saved_freq;
};
```

and add this header from freebsd-header:

```
#include <sys/param.h>
#include <sys/bus.h>
```

Function declaration:
device_t devclass_get_device(devclass_t dc, int unit);
void* device_get_softc(device_t dev); Note: don't forget to cast it to a struct acpi_tz_softc* !
static int acpi_tz_get_temperature(struct acpi_tz_softc *sc);
devclass_t  devclass_find(const char *classname);


you need to get the devclass_t of acpi_tz

pseudo code:

```
struct acpi_tz_softc *sc;
device_t *devs;
int devcount, i;

devclass_t thl = devclass_find("acpi_thermal");
devclass_get_devices(thl, &devs, &devcount);

for (i = 0; i < devcount; i++) {
   sc = device_get_softc(devs[i]);
   if (!acpi_tz_get_temperature(sc)) {
       // Do something with TZ_KELVTOC(sc->tz_temperature) (it's a double int, int . int => 23 . 55 C° for example)
   }
}
```
From Hastebin.com:
Code:
int fd = open("/dev/icc_fan", O_RDONLY, 0);
   if (fd <= 0) {
       notify("ICC_FAN CAN'T OPEN.");
       return 0;
   }

   char* data[10] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
   int ret = ioctl(fd, 0x0C01C8F07, data);

   close(fd);
This patch enables CPU temperature monitoring on PS4 Linux and PS4 idles at 55 degrees Celsius and 69 (hehe) while playing hollow night (Im not sure whats safe temp for PS4 but online search says PS4 operate at 40 degree max?, so be careful on Linux)...
Code:
arch/x86/kernel/amd_nb.c
@@ -38,6 +38,7 @@ const struct pci_device_id amd_nb_misc_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M41H_F3) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
{}
@@ -50,6 +51,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F4) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M41H_F4) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F4) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
{}

drivers/hwmon/fam15h_power.c
@@ -502,6 +502,7 @@ static const struct pci_device_id fam15h_power_id_table[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M70H_NB_F4) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M41H_F4) },
{}
};
MODULE_DEVICE_TABLE(pci, fam15h_power_id_table);

drivers/hwmon/k10temp.c
@@ -214,6 +214,7 @@ static const struct pci_device_id k10temp_id_table[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M41H_F3) },
{}
};
MODULE_DEVICE_TABLE(pci, k10temp_id_table);

include/linux/pci_ids.h
@@ -538,6 +538,8 @@
#define PCI_DEVICE_ID_AMD_16H_NB_F4 0x1534
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F3 0x1583
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584
#define PCI_DEVICE_ID_AMD_16H_M41H_F3 0x1431
#define PCI_DEVICE_ID_AMD_16H_M41H_F4 0x1432
#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
PS4 PRO 5.05 HARDWARE SPEED FAN CONTROL MOD with PSXITArch Linux via PS4LINUX
Code:
# Thanks to @RancidoPS3ita for placing send_icc_cmd in Psxita (PS4 linux arch build)
# and providing instruction on how it works
# create device node to control ICC
sudo mknod -m 0666 /dev/icc c 0x49 1

# get current fan settings
send_icc_cmd 0xA 7 0 0 52

# set default fan settings (ramp up at 79 degrees celsius)(PS4 Pro)
send_icc_cmd 0xA 6 52 0x00 0x00 0x00 0x00 0x00 0x4f 0x00 0x00 0x00 0x08 0x00 0x00 0x80 0x00 0x00 0x00 0xff 0xff 0xff 0x0f 0xff 0xff 0xff 0x0f 0xff 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20

# set fan to ramp up at 59 degrees celsius
send_icc_cmd 0xA 6 52 0x00 0x00 0x00 0x00 0x00 0x3b 0x00 0x00 0x00 0x08 0x00 0x00 0x80 0x00 0x00 0x00 0xff 0xff 0xff 0x0f 0xff 0xff 0xff 0x0f 0xff 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20

# monitor temp you'll need this patch https://github.com/Zer0xFF/linux/commit/eb353d1a089e4b3ef6305646b8a3cfe93a6cca4c
watch cat /sys/class/hwmon/hwmon1/device/hwmon/hwmon1/temp1_input

ok, so after few test, it turns out the 0x35/0x4f is the temperature threshold (59/79 degrees celsius),

so the fan on the PS4 Pro was working correctly, except the threshold is actually set really really high 79 degrees.

Note: changing the threshold in linux will carry across reboot back to PS4 main OS.
Unplugging the power supply reset the value to default

From the README.md by ethylamine, to quote: PS4-fan-control

Simple payload to increase fan speeds based on temperature threshold.

Set to 60 degrees C by default. Will be somewhat loud.

Thanks to Zer0xFF, theorywrong, xvortex, and zecoxao for research/code/writings/fixes.

https://gist.github.com/Zer0xFF/4aa38d836a5696ed1b6486bb8e782b4a
PS4 Pro Fan Noise Test.jpg
 

Comments

Status
Not open for further replies.
Status
Not open for further replies.
Recent Articles
Some of the PlayStation 4 E3 2019 PS4 Trailer Videos!
We've seen a Watch Dogs: Legion PS4, Marvel Avengers: A-Day PS4 and some Final Fantasy VIII Remastered & Final Fantasy VII Remake PS4 videos from E3 2019, and below are several more PlayStation 4...
Crash Team Racing: Nitro-Fueled Races to PS4 Next Week
CTR racers on your mark, get set, go... as Crash Team Racing: Nitro-Fueled speeds onto PlayStation 4 next week. 🏎 🏁 Get ready to go fur-throttle in the fully-remastered and revved up to the max...
TurboGrafx-16 Mini, PC Engine Mini & PC Engine CoreGrafx Mini by Konami
A few months back we covered the Sega Genesis Mini reveal, and during E3 2019 Konami announced a TurboGrafx-16 Mini, PC Engine Mini and PC Engine CoreGrafx Mini on their official site for...
PS4 Firmware / System Software 6.80 Preview Program PUP and Features
As reported earlier this month, since their recent 6.71 PS4 OFW Update those enrolled in Sony's PlayStation Preview Program can now download and install the PS4 Firmware / System Software 6.80...
Top