Last active
February 22, 2019 08:48
-
-
Save Zer0xFF/4aa38d836a5696ed1b6486bb8e782b4a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 defualt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ send_icc_cmd 0xA 6 8 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 0x40 | |
SUCCESS! | |
ret=20 | |
reply: 04 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
00 00 00 00 | |
$ send_icc_cmd 0xA 6 52 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0x20 | |
SUCCESS! | |
ret=20 | |
reply: 02 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
00 00 00 00 | |
$ 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 | |
SUCCESS! | |
ret=20 | |
reply: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
00 00 00 00 | |
Looking at the replies, I conclude that the 1st byte is the status code, | |
0x04 = invalid or unexpected data length | |
0x02 = (correct length) invalid or unexpected data | |
0x00 = success error code | |
$ send_icc_cmd 0xA 7 0 0 52 | |
SUCCESS! | |
ret=52 | |
reply: 00 00 00 00 00 4f 00 00 00 08 00 00 80 00 00 00 | |
ff ff ff 0f ff ff ff 0f ff ff ff 0f 00 00 00 00 | |
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | |
00 00 00 00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note, While I have ran this on PS4 main OS, I only tested it by setting the threshold to 0, | |
which I'm warning you against doing, as setting this caused the fan to go into extreme RPM speeds, | |
to the point where I believe could potentially damage your fan blades, | |
which if dislodged could hit other blades and cause some some serious damage to the other blades and PS4 internal, | |
so you better know what you're doing before you run this. | |
but it should work in theory based on how I got it to work under linux anyone want to confirm this. | |
Also Note, that this will survive across reboot, so its not wise to set extremely low temperature 0 degrees for example. | |
However, unplugging the power source does seem to reset to default. | |
A while back @TheoryWrong posted this code snipet for controlling PS4 fan speed. | |
int fd = open("/dev/icc_fan", O_RDONLY, 0); | |
if (fd <= 0) | |
{ | |
send_system_notification_with_text("ICC_FAN CAN'T OPEN."); | |
} | |
else | |
{ | |
send_system_notification_with_text("ICC_FAN OPENED."); | |
} | |
char* data[10] = {0,0,0,0,0,0,0,0,0,0}; | |
int ret = ioctl(fd, 0xC01C8F07, data); | |
close(fd); | |
however it set the fan spinning at an extremely high rate, since the fan starts ramping up at 0 degrees C. | |
Now as i mentioned in my PS4.fan_icc I managed to figure out the values or 1 value atleast and what it means, | |
the 5th index is the threshold that triggers the fan to spin, in the above example its set to 0 degrees C. | |
My PS4 (Pro) default value is 79 degrees C | |
so data would look like this | |
char* data[10] = {0x00, 0x00, 0x00, 0x00, 0x00, 79, 0x00, 0x00, 0x00, 0x00 0x08}; | |
so swapping 79 to your prefered temperature and the fan will trigger once its reached. | |
Note dont set it to below 60 on PS4 main OS, as idling temperature is about 55 degrees, | |
and 60 will trigger even on basic media playback, e.g Plex. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment