• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[KERNEL][E6853]4k Always On Kernel

Search This thread
Dec 26, 2015
34
24
Following much of moonbutt74's advice and using the sources from his kernel (thank you so so so much!)
https://github.com/moonbutt74/kernel_sxz5p_aosp_4square

I was able to modify
https://github.com/moonbutt74/kerne...rm/boot/dts/qcom/dsi-panel-satsuki.dtsi#L1107

and create what I believe to be the first working truly 4k always on kernel for the z5p

I say what I believe to be because honestly I can't really tell.
  • I reset my wm density and wm size from the "emulated 4k thread" http://forum.xda-developers.com/showpost.php?p=64587441&postcount=13
  • Screenshots taken appear to be in 4k
  • The phone seems to switch into 4k much in the way it would if it were "emulated" after the window manager loads
  • 1440p video appears to be available on YouTube
  • And honestly it looks really sharp and everything seems to be rather tiny

As of right now I only have this build for the E6853, as it is the only device I own, and I've literally just managed to get this "working"
I'll consider trying to build this for the dual if the feedback here seems good and if people can actually confirm whether this is working or not.
I also don't even guarantee this loads on any device but my own. (This could be 100% a fluke)
Also also, if it does work, it'll probably destroy your battery.


Files

I flashed my file with fastboot
Code:
fastboot flash boot E6853-always4k.img

When it first boots the screen looks a little fudged up (for lack of a better word), but if you give it a little bit (for me at least, it boots and appears to be in 4k mode)

Please let me know what you find, and please don't blame me (but do let me know) if it doesn't work for you or breaks your device.


In other news,
At the time of writing this, I'm probably in possession of the only phone in the world natively running a 2160x3840 resolution right now, so that's pretty cool.
 

Attachments

  • Screenshot_20160420-074617.jpg
    Screenshot_20160420-074617.jpg
    216.9 KB · Views: 5,610
  • Screenshot_20160420-074654.jpg
    Screenshot_20160420-074654.jpg
    215.8 KB · Views: 5,173
  • Screenshot_20160420-075119.jpg
    Screenshot_20160420-075119.jpg
    299.5 KB · Views: 5,725
  • Screenshot_20160420-075748.jpg
    Screenshot_20160420-075748.jpg
    248.5 KB · Views: 5,519
Last edited:

raven213

Senior Member
Apr 12, 2011
781
98
Following much of moonbutt74's advice and using the sources from his kernel (thank you so so so much!)
https://github.com/moonbutt74/kernel_sxz5p_aosp_4square

I was able to modify
https://github.com/moonbutt74/kerne...rm/boot/dts/qcom/dsi-panel-satsuki.dtsi#L1107

and create what I believe to be the first working truly 4k always on kernel for the z5p

I say what I believe to be because honestly I can't really tell.
  • I reset my wm density and wm size from the "emulated 4k thread" http://forum.xda-developers.com/showpost.php?p=64587441&postcount=13
  • Screenshots taken appear to be in 4k
  • The phone seems to switch into 4k much in the way it would if it were "emulated" after the window manager loads
  • 1440p video appears to be available on YouTube
  • And honestly it looks really sharp and everything seems to be rather tiny

As of right now I only have this build for the E6853, as it is the only device I own, and I've literally just managed to get this "working"
I'll consider trying to build this for the dual if the feedback here seems good and if people can actually confirm whether this is working or not.
I also don't even guarantee this loads on any device but my own. (This could be 100% a fluke)
Also also, if it does work, it'll probably destroy your battery.


Using google drive because I don't have a dev account on android filehost


I flashed my file with fastboot
Code:
fastboot flash boot E6853-always4k.img

When it first boots the screen looks a little fudged up (for lack of a better word), but if you give it a little bit (for me at least, it boots and appears to be in 4k mode)

Please let me know what you find, and please don't blame me (but do let me know) if it doesn't work for you or breaks your device.


In other news,
At the time of writing this, I'm probably in possession of the only phone in the world natively running a 2160x3840 resolution right now, so that's pretty cool.

nice work gonna give a try :)
edit: im using RomAur-v3.0 will this kernel work?? just asking before i flash thanks
 
Last edited:

Rubensss

Senior Member
Dec 30, 2015
53
7
Following much of moonbutt74's advice and using the sources from his kernel (thank you so so so much!)
https://github.com/moonbutt74/kernel_sxz5p_aosp_4square

I was able to modify
https://github.com/moonbutt74/kerne...rm/boot/dts/qcom/dsi-panel-satsuki.dtsi#L1107

and create what I believe to be the first working truly 4k always on kernel for the z5p

I say what I believe to be because honestly I can't really tell.
  • I reset my wm density and wm size from the "emulated 4k thread" http://forum.xda-developers.com/showpost.php?p=64587441&postcount=13
  • Screenshots taken appear to be in 4k
  • The phone seems to switch into 4k much in the way it would if it were "emulated" after the window manager loads
  • 1440p video appears to be available on YouTube
  • And honestly it looks really sharp and everything seems to be rather tiny

As of right now I only have this build for the E6853, as it is the only device I own, and I've literally just managed to get this "working"
I'll consider trying to build this for the dual if the feedback here seems good and if people can actually confirm whether this is working or not.
I also don't even guarantee this loads on any device but my own. (This could be 100% a fluke)
Also also, if it does work, it'll probably destroy your battery.


Using google drive because I don't have a dev account on android filehost


I flashed my file with fastboot
Code:
fastboot flash boot E6853-always4k.img

When it first boots the screen looks a little fudged up (for lack of a better word), but if you give it a little bit (for me at least, it boots and appears to be in 4k mode)

Please let me know what you find, and please don't blame me (but do let me know) if it doesn't work for you or breaks your device.


In other news,
At the time of writing this, I'm probably in possession of the only phone in the world natively running a 2160x3840 resolution right now, so that's pretty cool.

I have installed it and I have to say that is all too small , icons , options, keyboards, etc ... for everyday use would be very uncomfortable. I also noticed lag when accessing the application drawer in transitions panel and keypad ... I 've become the kernel of zacharias.maladroid , anyway thanks for your work . a greeting
 
M

moonbutt74

Guest
B,

okay e6853

Fudgy at beginning as you said. :silly:
That's Sony's splash logo though, doesnt display right at 4k, and the boot animation as well, again Sony.
Gonna need 4k bootanimations!
Note : does not play well with Nova Launcher. xD
What is your screen density in the screen shots? At default I'm @
Code:
[email protected]:/ $ wm size
Physical size: 2160x3840
[email protected]:/ $ wm density
Physical density: 480
Override density: 560


I'd like to see the patch/mod you did to kernel , please post? I want to tuck that modification into a cm build to see what happens. NVM i missed the link in OP.
What are your obeservations on battery consumption?

On a side note this modification seems to break the booting to recovery via bootec setup.

m
 
Dec 26, 2015
34
24
nice work gonna give a try :)
edit: im using RomAur-v3.0 will this kernel work?? just asking before i flash thanks
Honestly, I have no idea :D
:(
Please let me know what you find though!


I have installed it and I have to say that is all too small , icons , options, keyboards, etc ... for everyday use would be very uncomfortable. I also noticed lag when accessing the application drawer in transitions panel and keypad ... I 've become the kernel of zacharias.maladroid , anyway thanks for your work . a greeting

Nothing is to prevent you from adjusting the DPI manually at this point. This was purely to see if 4k could be done. You can easily tweak it it to your liking from here either with builp.prop, wm density or some other app dpi changing app. :)


B,

okay e6853

Fudgy at beginning as you said. :silly:
That's Sony's splash logo though, doesnt display right at 4k, and the boot animation as well, again Sony.
Gonna need 4k bootanimations!
Note : does not play well with Nova Launcher. xD
What is your screen density in the screen shots? At default I'm @
Code:
[email protected]:/ $ wm size
Physical size: 2160x3840
[email protected]:/ $ wm density
Physical density: 480
Override density: 560


I'd like to see the patch/mod you did to kernel , please post? I want to tuck that modification into a cm build to see what happens. NVM i missed the link in OP.
What are your obeservations on battery consumption?

On a side note this modification seems to break the booting to recovery via bootec setup.

m

My density is the same as yours minus the override density, but I'm using action launcher. (I'll agree with Rubensss though some things are just too tiny. I'll probably start messing with my actual density later today)
Code:
[email protected]:/ $ wm density
vm density
Physical density: 480
[email protected]:/ $ wm size
vm size
Physical size: 2160x3840


The link in the original post is the original file. I've pushed the 4k modification(s) to here:
https://github.com/BustyLoli-Chan/k...arch/arm/boot/dts/qcom/dsi-panel-satsuki.dtsi

I've not had a real chance to take it out and test battery life yet, (I stayed up super late working on it and spent most of today sleeping)

Also I was worried about recovery. I haven't checked it yet, but I thought it might simply fail or look crazy because I took 1080p mode out entirely to force 4k to work. All my previous attempts to set 4k preferred and have it play nice with 1080p had failed, but I can mess around more with it today (or you can if you want now that you have the file.)

Everything else I tried seemed to cause serious problems and with this for some reason it just suddenly booted and worked.
might be able to add all the blocks mentioning 1080p back in under the ones that say 4k (since my first edit was to just leave 4k where it was and move the preferred mode flag which didn't seem to work)

Now that we know this is working I would like to seriously and formally thank you for all of your help and hard work with assisting me to the point where I could actually make this work. I'd also be lying if I said fesar's thread and AndroPlus'es post weren't huge inspirations for me to try to get this done.
 
M

moonbutt74

Guest
@BustyLoli-Chan

Hey check /try this out modify build with 4k option WIP

The above commit modifies the kernel build with a 4k option in line with your experiment.
Instead of modifying arch/arm/boot/dts/qcom/dsi-panel-satsuki.dtsi

I added arch/arm/boot/dts/qcom/dsi-panel-satsuki-4k.dtsi , which contains your modifications so far.

When you run the build script and get to the menuconfig portion, going to
Platform selection ---> [ ] Impose 4k resolution on Satsuki Target

Permits you to build your 4k display experiment. This way you can work/mod arch/arm/boot/dts/qcom/dsi-panel-satsuki-4k.dtsi
and leave the orriginal [2k] version intact.

Currently in menuconfig
Boot options --->Build a concatenated Image.gz/dtb by default does select the new/correct dtsi's but still doesn't find the resulting dtb's though they DO build. I have a little work to do there. But zImage and dtb.img DO build. and do boot the device correctly.
The dtb's select based on whether the 4k option is enabled or not.
You don't actually need any of the above but it seemed like a less destructive way to care for your kernel source. :)
That and I was wondering if it would actually work, which it mostly does. If you're interested in this setup, I'll update you when i figure out why making the Image.gz-dtb doesn't find the 4k dtbs.

This is that portion of the build
Code:
make[1]: *** No rule to make target 'arch/arm64/boot/dts/msm8994-v2.0-kitakami_satsuki_generic-4k.dtb', needed by 'arch/arm64/boot/Image.gz-dtb'.  Stop.
/storage/sxZ5_dev/kernel/aosp_4square/arch/arm64/Makefile:84: recipe for target 'Image.gz-dtb' failed

But other wise the normal dt.img does generate
Code:
DTB combiner:
  Input directory: './arch/arm/boot/dts/qcom/'
  Output file: 'build_satsuki/out/boot.img-dtb'
Found file: msm8994-v2.0-kitakami_satsuki_generic-4k.dtb ... chipset: 207, rev: 131072, platform: 8, subtype: 0
Found file: msm8994-v2.1-kitakami_satsuki_generic-4k.dtb ... chipset: 207, rev: 131073, platform: 8, subtype: 0
=> Found 2 unique DTB(s)

and the resulting kernel binary and dt.img
Code:
-rw------- 1 root root   784384 Apr 20 23:56 boot.img-dtb
-rwxr-xr-x 1 root root 19487944 Apr 20 23:56 boot.img-zImage

The normal [2k] build will run without issue
Code:
-rw------- 1 root root   788480 Apr 21 00:14 boot.img-dtb
-rwxr-xr-x 1 root root 19487944 Apr 21 00:14 boot.img-zImage
-rw-r--r-- 1 root root  8827937 Apr 21 00:14 boot.img-zImage_gz

m
 
Dec 26, 2015
34
24
@BustyLoli-Chan

Hey check /try this out modify build with 4k option WIP

The above commit modifies the kernel build with a 4k option in line with your experiment.
Instead of modifying arch/arm/boot/dts/qcom/dsi-panel-satsuki.dtsi

I added arch/arm/boot/dts/qcom/dsi-panel-satsuki-4k.dtsi , which contains your modifications so far.

When you run the build script and get to the menuconfig portion, going to
Platform selection ---> [ ] Impose 4k resolution on Satsuki Target

Permits you to build your 4k display experiment. This way you can work/mod arch/arm/boot/dts/qcom/dsi-panel-satsuki-4k.dtsi
and leave the orriginal [2k] version intact.

Currently in menuconfig
Boot options --->Build a concatenated Image.gz/dtb by default does select the new/correct dtsi's but still doesn't find the resulting dtb's though they DO build. I have a little work to do there. But zImage and dtb.img DO build. and do boot the device correctly.
The dtb's select based on whether the 4k option is enabled or not.
You don't actually need any of the above but it seemed like a less destructive way to care for your kernel source. :)
That and I was wondering if it would actually work, which it mostly does. If you're interested in this setup, I'll update you when i figure out why making the Image.gz-dtb doesn't find the 4k dtbs.

This is that portion of the build
Code:
make[1]: *** No rule to make target 'arch/arm64/boot/dts/msm8994-v2.0-kitakami_satsuki_generic-4k.dtb', needed by 'arch/arm64/boot/Image.gz-dtb'.  Stop.
/storage/sxZ5_dev/kernel/aosp_4square/arch/arm64/Makefile:84: recipe for target 'Image.gz-dtb' failed

But other wise the normal dt.img does generate
Code:
DTB combiner:
  Input directory: './arch/arm/boot/dts/qcom/'
  Output file: 'build_satsuki/out/boot.img-dtb'
Found file: msm8994-v2.0-kitakami_satsuki_generic-4k.dtb ... chipset: 207, rev: 131072, platform: 8, subtype: 0
Found file: msm8994-v2.1-kitakami_satsuki_generic-4k.dtb ... chipset: 207, rev: 131073, platform: 8, subtype: 0
=> Found 2 unique DTB(s)

and the resulting kernel binary and dt.img
Code:
-rw------- 1 root root   784384 Apr 20 23:56 boot.img-dtb
-rwxr-xr-x 1 root root 19487944 Apr 20 23:56 boot.img-zImage

The normal [2k] build will run without issue
Code:
-rw------- 1 root root   788480 Apr 21 00:14 boot.img-dtb
-rwxr-xr-x 1 root root 19487944 Apr 21 00:14 boot.img-zImage
-rw-r--r-- 1 root root  8827937 Apr 21 00:14 boot.img-zImage_gz

m

I feel as though some if not all of this is over my head lol

I've been trying to get recovery and the pre-OS systems to work.
I added 1080p timings back into my script over here https://github.com/BustyLoli-Chan/k...arch/arm/boot/dts/qcom/dsi-panel-satsuki.dtsi
The device still boots, but there is no change over the 4k only version, which makes sense really because nothing ever tells the device to switch to 1080p over the preferred 4k. I realize there are a lot of "extra" things in the 4k timings that aren't present in the 1080p but I don't know if any of these settings will achieve what I am looking for.

I was going to try going through and changing each section of the dtsi file to be 4k in the hopes that maybe the pre OS parts of the code use a different sets of timings that the actually OS does (so it could default to 1080p until the OS boots and then start 4k mode) but truthfully, I don't know if any such an option/special timing at all exists.

I feel like the way the phone operates by default is that it stays in 1080p mode until some software in Sony's proprietary apps feeds it the right command to go 4k.
A more graceful way to implement 4k always on would probably be to wait until the OS boots and then feed the panel that command (that way all the pre OS systems still work fine). If we could find the code for that, such an implementation could probably allow you to toggle 4k on or off somewhere in the system settings or somewhere as accessible as the power menu, but such an implementation would be entirely outside the scope of files I'm currently trying to edit.

All in all, I've learned I really don't know a whole lot about any of this.
I hope to learn and figure out more, but documentation and resources seem scarce.
 
  • Like
Reactions: lotusalex2000

lotusalex2000

Member
Apr 27, 2016
10
2
Berlin
Hi moonbutt74
Do you think its possible to make a version of the kernel for the z5 Premium Dual (E6883)?
I'm a VR NERD.
I use my z5 premium only for VR because for all other things i use a Samsung S7.
I hope you can help me, because its a shame from Sony that the display are not usable in 4K with the Zeiss VR One. Its only possible without head tracking. with the sony movie player...:(.
I start with test: S7+Gear VR vs. Z5premium Dual+VR One and today the best VR Phone is the S7
but only because the bad software from Sony. :(
Thank you
 
Dec 26, 2015
34
24
Hi moonbutt74
Do you think its possible to make a version of the kernel for the z5 Premium Dual (E6883)?
I'm a VR NERD.
I use my z5 premium only for VR because for all other things i use a Samsung S7.
I hope you can help me, because its a shame from Sony that the display are not usable in 4K with the Zeiss VR One. Its only possible without head tracking. with the sony movie player...:(.
I start with test: S7+Gear VR vs. Z5premium Dual+VR One and today the best VR Phone is the S7
but only because the bad software from Sony. :(
Thank you

It looks like the DTSI file for the Satsuki is the same regardless of whether you have the Dual or the Regular, so in theory you should just be able to run the build script for "./hmm-satsuki-dsds" pull the current kernel image from your device, replace the kernel, repack the image, and flash it and get 4k.
 
  • Like
Reactions: lotusalex2000

EMJI79

Senior Member
Sep 7, 2014
1,944
209
Paris
OnePlus 9 Pro
Would be great to choose display app by app: for example, 4k on YouTube, Google +, instagram,... 2k on Chrome and 1080p everywhere else.
Something like that.

Would it be possible to have an Xposed module do that?
 
Last edited:
  • Like
Reactions: misumsb

lotusalex2000

Member
Apr 27, 2016
10
2
Berlin
I need some help with the compiler

Hi
I use a guide to compile the kernel. developer.sonymobile.com/knowledge-base/open-source/open-devices/how-to-build-and-flash-a-linux-kernel/how-to-build-and-flash-a-linux-kernel-from-sony-copyleft-archives

1. Unlock the boot loader : done :)
2. Download a cross compiler :
I use the /android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/
because in the next step I use :
3. export CROSS_COMPILE=/android/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
Done :)
4. Download the kernel source. Thanks for moonbutt74's : Done :)
5. Identify your device’s config file name : ??????? :confused: WITH buildprop Editor i find under BUILD INFO ro.board.platform: msm8994 and in the Kernel directory arch/arm64/ there is a file msm8994_defconfig :fingers-crossed: lets try it.
6. Configure the kernel
open Terminal and : make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE msm8994_defconfig
now i see some bla bla and no errors :)
7. Build the kernel and needed modules
I try in Terminal: make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j 1
Now i get:
#make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j 1
#Makefile:605: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
# CHK include/generated/uapi/linux/version.h
# CHK include/generated/utsrelease.h
# CC kernel/bounds.s
#gcc: error: unrecognized command line option ‘-mlittle-endian’
#gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
#/home/lotusalex2000/backup/android/kernel/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
#make[1]: *** [kernel/bounds.s] Error 1
#Makefile:862: recipe for target 'prepare0' failed
#make: *** [prepare0] Error 2
what did I do wrong?????
:crying:
 

lotusalex2000

Member
Apr 27, 2016
10
2
Berlin
I read some other guides and I think, its problem with my PC. I hope that i find someone that can compile the kernel.
@BustyLoli-Chan
BustyLoli-Chan can you please compile your kernel again, with the config satsuki-dsds in the Folder of moonbutt74? Thats the Config for the Z5 Premium Dual Sim
Thank you
 
  • Like
Reactions: EMJI79

EMJI79

Senior Member
Sep 7, 2014
1,944
209
Paris
OnePlus 9 Pro
I read some other guides and I think, its problem with my PC. I hope that i find someone that can compile the kernel.
@BustyLoli-Chan
BustyLoli-Chan can you please compile your kernel again, with the config satsuki-dsds in the Folder of moonbutt74? Thats the Config for the Z5 Premium Dual Sim
Thank you
Can you please give link to other guides you found?

Sent from my LG-F460S using XDA-Developers mobile app
 

lotusalex2000

Member
Apr 27, 2016
10
2
Berlin
the best,
with Kernel from z5 Premium
http ://developer.sonymobile.com/knowledge-base/open-source/open-devices/how-to-build-and-flash-a-linux-kernel/how-to-build-and-flash-a-linux-kernel-for-aosp-supported-devices/
 
  • Like
Reactions: EMJI79

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    Following much of moonbutt74's advice and using the sources from his kernel (thank you so so so much!)
    https://github.com/moonbutt74/kernel_sxz5p_aosp_4square

    I was able to modify
    https://github.com/moonbutt74/kerne...rm/boot/dts/qcom/dsi-panel-satsuki.dtsi#L1107

    and create what I believe to be the first working truly 4k always on kernel for the z5p

    I say what I believe to be because honestly I can't really tell.
    • I reset my wm density and wm size from the "emulated 4k thread" http://forum.xda-developers.com/showpost.php?p=64587441&postcount=13
    • Screenshots taken appear to be in 4k
    • The phone seems to switch into 4k much in the way it would if it were "emulated" after the window manager loads
    • 1440p video appears to be available on YouTube
    • And honestly it looks really sharp and everything seems to be rather tiny

    As of right now I only have this build for the E6853, as it is the only device I own, and I've literally just managed to get this "working"
    I'll consider trying to build this for the dual if the feedback here seems good and if people can actually confirm whether this is working or not.
    I also don't even guarantee this loads on any device but my own. (This could be 100% a fluke)
    Also also, if it does work, it'll probably destroy your battery.


    Files

    I flashed my file with fastboot
    Code:
    fastboot flash boot E6853-always4k.img

    When it first boots the screen looks a little fudged up (for lack of a better word), but if you give it a little bit (for me at least, it boots and appears to be in 4k mode)

    Please let me know what you find, and please don't blame me (but do let me know) if it doesn't work for you or breaks your device.


    In other news,
    At the time of writing this, I'm probably in possession of the only phone in the world natively running a 2160x3840 resolution right now, so that's pretty cool.
    3
    nice work gonna give a try :)
    edit: im using RomAur-v3.0 will this kernel work?? just asking before i flash thanks
    Honestly, I have no idea :D
    :(
    Please let me know what you find though!


    I have installed it and I have to say that is all too small , icons , options, keyboards, etc ... for everyday use would be very uncomfortable. I also noticed lag when accessing the application drawer in transitions panel and keypad ... I 've become the kernel of zacharias.maladroid , anyway thanks for your work . a greeting

    Nothing is to prevent you from adjusting the DPI manually at this point. This was purely to see if 4k could be done. You can easily tweak it it to your liking from here either with builp.prop, wm density or some other app dpi changing app. :)


    B,

    okay e6853

    Fudgy at beginning as you said. :silly:
    That's Sony's splash logo though, doesnt display right at 4k, and the boot animation as well, again Sony.
    Gonna need 4k bootanimations!
    Note : does not play well with Nova Launcher. xD
    What is your screen density in the screen shots? At default I'm @
    Code:
    [email protected]:/ $ wm size
    Physical size: 2160x3840
    [email protected]:/ $ wm density
    Physical density: 480
    Override density: 560


    I'd like to see the patch/mod you did to kernel , please post? I want to tuck that modification into a cm build to see what happens. NVM i missed the link in OP.
    What are your obeservations on battery consumption?

    On a side note this modification seems to break the booting to recovery via bootec setup.

    m

    My density is the same as yours minus the override density, but I'm using action launcher. (I'll agree with Rubensss though some things are just too tiny. I'll probably start messing with my actual density later today)
    Code:
    [email protected]:/ $ wm density
    vm density
    Physical density: 480
    [email protected]:/ $ wm size
    vm size
    Physical size: 2160x3840


    The link in the original post is the original file. I've pushed the 4k modification(s) to here:
    https://github.com/BustyLoli-Chan/k...arch/arm/boot/dts/qcom/dsi-panel-satsuki.dtsi

    I've not had a real chance to take it out and test battery life yet, (I stayed up super late working on it and spent most of today sleeping)

    Also I was worried about recovery. I haven't checked it yet, but I thought it might simply fail or look crazy because I took 1080p mode out entirely to force 4k to work. All my previous attempts to set 4k preferred and have it play nice with 1080p had failed, but I can mess around more with it today (or you can if you want now that you have the file.)

    Everything else I tried seemed to cause serious problems and with this for some reason it just suddenly booted and worked.
    might be able to add all the blocks mentioning 1080p back in under the ones that say 4k (since my first edit was to just leave 4k where it was and move the preferred mode flag which didn't seem to work)

    Now that we know this is working I would like to seriously and formally thank you for all of your help and hard work with assisting me to the point where I could actually make this work. I'd also be lying if I said fesar's thread and AndroPlus'es post weren't huge inspirations for me to try to get this done.
    2
    As a last nuisance and thanking your kindness in responding, could you tell me how I can get to the mentioned files?

    all of sony's stuff is open source and available on github

    http://github.com/sonyxperiadex

    http://github.com/sonyxperiadev/kernel

    compilation guidelines while a bit iffy at times can be found here
    http://developer.sonymobile.com/ope...uild-aosp-nougat-for-unlocked-xperia-devices/
    2
    I'm also interested in a way to "On the Fly" Change between 4k, Possibly 2k, and 1080P. While you're at it, for battery life reasons you could add 720. I know the nightmare lies in making all Apps work correctly with it, but I do know there is an Xposed Module "App Settings" which allows PER APP DPI configurations, which I haven't looked into it a lot (Life... buying a house is a brain dump... and work sucks right now but I can't quit if I want to buy a house :p) but there has to be a way to compile settings for at least the most used apps out there and use this or something similar's app to configure all the different settings.

    I've personally noticed very little troubles if I set the DPI to 960 at 4k Mode, as all of the screen icons look the same. Though, for most Apps I need to set it back to 480. I can get away with 620 for a lot of apps, because 2k is used widely now. The only other 4k Device I know of is the Nvidia Shield, and they suffer the same problem we do for content.

    I would like that idea as well. 4k switch on demand!
    For me, SOT is most of the concern..
    1
    @BustyLoli-Chan

    Hey check /try this out modify build with 4k option WIP

    The above commit modifies the kernel build with a 4k option in line with your experiment.
    Instead of modifying arch/arm/boot/dts/qcom/dsi-panel-satsuki.dtsi

    I added arch/arm/boot/dts/qcom/dsi-panel-satsuki-4k.dtsi , which contains your modifications so far.

    When you run the build script and get to the menuconfig portion, going to
    Platform selection ---> [ ] Impose 4k resolution on Satsuki Target

    Permits you to build your 4k display experiment. This way you can work/mod arch/arm/boot/dts/qcom/dsi-panel-satsuki-4k.dtsi
    and leave the orriginal [2k] version intact.

    Currently in menuconfig
    Boot options --->Build a concatenated Image.gz/dtb by default does select the new/correct dtsi's but still doesn't find the resulting dtb's though they DO build. I have a little work to do there. But zImage and dtb.img DO build. and do boot the device correctly.
    The dtb's select based on whether the 4k option is enabled or not.
    You don't actually need any of the above but it seemed like a less destructive way to care for your kernel source. :)
    That and I was wondering if it would actually work, which it mostly does. If you're interested in this setup, I'll update you when i figure out why making the Image.gz-dtb doesn't find the 4k dtbs.

    This is that portion of the build
    Code:
    make[1]: *** No rule to make target 'arch/arm64/boot/dts/msm8994-v2.0-kitakami_satsuki_generic-4k.dtb', needed by 'arch/arm64/boot/Image.gz-dtb'.  Stop.
    /storage/sxZ5_dev/kernel/aosp_4square/arch/arm64/Makefile:84: recipe for target 'Image.gz-dtb' failed

    But other wise the normal dt.img does generate
    Code:
    DTB combiner:
      Input directory: './arch/arm/boot/dts/qcom/'
      Output file: 'build_satsuki/out/boot.img-dtb'
    Found file: msm8994-v2.0-kitakami_satsuki_generic-4k.dtb ... chipset: 207, rev: 131072, platform: 8, subtype: 0
    Found file: msm8994-v2.1-kitakami_satsuki_generic-4k.dtb ... chipset: 207, rev: 131073, platform: 8, subtype: 0
    => Found 2 unique DTB(s)

    and the resulting kernel binary and dt.img
    Code:
    -rw------- 1 root root   784384 Apr 20 23:56 boot.img-dtb
    -rwxr-xr-x 1 root root 19487944 Apr 20 23:56 boot.img-zImage

    The normal [2k] build will run without issue
    Code:
    -rw------- 1 root root   788480 Apr 21 00:14 boot.img-dtb
    -rwxr-xr-x 1 root root 19487944 Apr 21 00:14 boot.img-zImage
    -rw-r--r-- 1 root root  8827937 Apr 21 00:14 boot.img-zImage_gz

    m

    I feel as though some if not all of this is over my head lol

    I've been trying to get recovery and the pre-OS systems to work.
    I added 1080p timings back into my script over here https://github.com/BustyLoli-Chan/k...arch/arm/boot/dts/qcom/dsi-panel-satsuki.dtsi
    The device still boots, but there is no change over the 4k only version, which makes sense really because nothing ever tells the device to switch to 1080p over the preferred 4k. I realize there are a lot of "extra" things in the 4k timings that aren't present in the 1080p but I don't know if any of these settings will achieve what I am looking for.

    I was going to try going through and changing each section of the dtsi file to be 4k in the hopes that maybe the pre OS parts of the code use a different sets of timings that the actually OS does (so it could default to 1080p until the OS boots and then start 4k mode) but truthfully, I don't know if any such an option/special timing at all exists.

    I feel like the way the phone operates by default is that it stays in 1080p mode until some software in Sony's proprietary apps feeds it the right command to go 4k.
    A more graceful way to implement 4k always on would probably be to wait until the OS boots and then feed the panel that command (that way all the pre OS systems still work fine). If we could find the code for that, such an implementation could probably allow you to toggle 4k on or off somewhere in the system settings or somewhere as accessible as the power menu, but such an implementation would be entirely outside the scope of files I'm currently trying to edit.

    All in all, I've learned I really don't know a whole lot about any of this.
    I hope to learn and figure out more, but documentation and resources seem scarce.