yashsingh1/xdaforums huggingface dataset:
[Tilt, TyTN II, MDA Vario III General] SiGGy:
I have to disagree here...

The current routines being used for DirectDraw are slow and inefficient. Probably using very slow CPU calls. It's for sure a software CPU routine drawing the pixels.

Anyone who has done raw hardware video programming can attest if you popped an interrupt to draw one pixel on the screen vs using DMA access the difference is night and day. The interrupt method chews up CPU cycles drawing the pixels ont he screen vs the DMA method which doesn't waste CPU cycles and is far more efficient.

Pointing directdraw to use hooks into the GPU and or DMA access to a hardware frame buffer would improve things significantly (night and day). You can easily see this by playing a video on an old PPC6700 which has proper direct draw routine implemented. The difference is HUGE factor of 10 I'd say.

The slow video rendering has nothing to do with the CPU doing the video decompression. It has to do with the directdraw routines not being implemented efficiently and the CPU wasting it's cycles drawing pixels on the screen. You can see "tearing" because you can SEE the video refreshing the screen out of the vsync due to the slow directdraw routines that exist. The the CPU should be concentrating on decoding video not wasting cycles drawing the video. The directdraw routine should be writing to a framebuffer using DMA or some similar method.

This is what's going on (high level lame explantion). Pretend the below are mappings.

Method #1

DirectDraw -> IntXX (video interrupt)

or

Method #2

DirectDraw -> DMA (direct memory to the video card)

Using method #1 it will cost you CPU cycles just to draw the pixels. So not only does your device need to concentrate on decoding the video it also needs to waste CPU cycles drawing pixels on the screen one by one. And the larger the screen area your painting, the more CPU it costs you. You can even experience this on a device like the Mogul (6800); you can get faster frame rates when you draw less pixels.

Using method #2 drawing video costs your CPU basically no overhead and it can spend it cycles decoding the video. It will use DMA to write to a video frame buffer instead of making CPU calls to do it.

These are just examples, but this how it's broken from my hardware programming experience.

The post above mine is also a good reference.
[Tilt, TyTN II, MDA Vario III General] RPG0:
I stand by my statement, that having a good DDraw implementation will not help. In theory, you're right, but on other devices (Htc Prophet aka Qtek S200 and HTC Touch) there was no difference between Raw framebuffer or GDI and DDraw. So real-life scenarios tend to prove me right.

The only reason things could speed up is the hardware conversion between YUV and RGB, but for a 320x240 frame, that takes very little time to do in software, and for some codecs, the conversion is not necessary. I can explain what YUV means, and why it's used in video/image compression if anyone is interested, but you can google youself.

About the sound part, maybe i have an old radio ROM, maybe i have a defective device or maybe it's just my configuration.

EDIT: Don't forget that even when using HW overlay, you STILL have to fill the surface with pixels (the pixels you just decoded), so you have to write 320x240 somewhere (with DDraw you write in the memory area you get with Lock(), in Raw framebuffer you write directly in an area that is drawn afterwards). If you ignore the YUV->RGB conversion, you gain NOTHING with DDraw.

As i said, i'm a game render programmer, and i did some image/video compression/decompression in my time, so you can get technical, I'll understand.
[Tilt, TyTN II, MDA Vario III General] tleaf100:
so !!

hi fpgo,so how are sony/ericsson getting round video prob on X1 xperia ? I guess their not going to market with a half crippled device, unlike htc,from what I can make out x1 is only a tweaked kaiser,so could we not just back engineer their solution ?

greatly disapointed with kaiser all round.if id known se version was due,id have waited to upgrade,still prefer my p910i,just no 3g.
[Tilt, TyTN II, MDA Vario III General] fb401:
If you watch the CNET video from Bonnie Cha on the X1, you'll see it's actually pretty slow in the rendering as well, so forget that.

Now back to the experts.
[Tilt, TyTN II, MDA Vario III General] tleaf100:
X1

sorry,not seen video,will go and have a look.

was only an idea...

will leave to you "experts" ....
[Tilt, TyTN II, MDA Vario III General] harry_x:
Well, YUV overlay support would be very nice, but I doubt we will see it working on kaiser (does Imageon even supports it?). But.. Working DDraw accel. would still help - for example when doing soft yuv->rgb conversion and double buffering result - you would definitively get better results if Kaiser have had hw accelerated bitblt (or at least less tearing).
[Tilt, TyTN II, MDA Vario III General] gqstatus0685:
*** Massive Brain Overload*** "Apparently these people are speaking a strange dialect I've never heard before" -Harold & Kumar Escape from Montanamo Bay
[Tilt, TyTN II, MDA Vario III General] godfa7h3r:
LOL! And that will be the funniest thing I hear all day. And I just woke up.
[Tilt, TyTN II, MDA Vario III General] RPG0:
Oh, and since HTC said they are releasing a new ROM which fixes the speed of the device, but does not bring HW accel (drivers), i think my problems will be over.
[Tilt, TyTN II, MDA Vario III General] tleaf100:
new rom

ahh,and when is this magical fix for kaiser meant to be released to public ?

my kaiser has become 3g /hsdpa usb modem,and gone back to p910i for everyday use,kaiser too fussy/slow/clunky for busy gardener,keeping fingers crossed about s/e "paris".
[Tilt, TyTN II, MDA Vario III General] RPG0:
Just a shameless bump
[Tilt, TyTN II, MDA Vario III General] badaas:
w0w, all this screen vsync stuff is reminding me of my days programming the Motorola 68000 in ASM on the Atari ST, and just made me thought how unprofessional it is to see the phone pad screen draw box by box in front of your very eyes. Even in my limited time coding this stuff, i'd write to a screen buffer and wait to swap the address of the drawn screen memory when completed!! So childish an approach :(
[Tilt, TyTN II, MDA Vario III General] RPG0:
I thought it's time to bump this.

It may ease the pain of some, and make the wound deeper for others (like for me after flashing latest official 6.1 and seeing the fake fast rotate and the fake phone app which you don't see drawing itself when starting)
[Tilt, TyTN II, MDA Vario III General] greg3d:
Agred about the fake fast rotate...it just draws it offscreen before displaying it...so it still takes time to rotate.

I also found that apps that were smooth before, are now slower with screen transition tearing and stutter when the transitions are side to side. One for example is PocketCM v1.5. Finger scrolling the list seems fine, but the side to side transitions accessed by hitting an icon (not finger scolling) tears and stutters. Useless update indeed.
[Tilt, TyTN II, MDA Vario III General] Rayan:
That's because our devices were not meant to do that!!! :D

At least that's what HTC told us ... Go figure!!! :mad:
[Tilt, TyTN II, MDA Vario III General] takeda240:
so can this vsync tearing stuff be done by xda dev's programmers? apparently no one can write a driver but is this easier and more feasible?
[Xiaomi Mi A2 / 6X Questions & Answers] pratyush2173:
Don't we already have the TWRP working for our phones, or am I wrong that the bootloader warning message isn't just some splash screen that can be easily replaced, can someone who has worked with splash screens on a treble device try out how it works for us, if we change the splash screen will it be able to remove the Warning message?
[Xiaomi Mi A2 / 6X Questions & Answers] Anemiq:
I tried the method from Mi A1 forum - flashing modified splash.img (I used the one for Mi A1) but it didn't work, it only replaced white AndroidOne logo after the warning, so I don't think it's just a splash screen :(
[Fire TV Q&A, Help & Troubleshooting] emailmebackat:
Hi,

When I start Mayfair Guide Pro and select a channel, after awhile and sometimes not long at all, it keeps kicking back to the guide and I have to select the channel again to go full screen. Mayfair Guide works perfectly on all my other devices, just not the Fire Stick Gen 3. I'm running the latest Fire O.S. Not sure what the problem is, any help would be great!?
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
​

The kernel uses an AROMA installer to help guide you through the installation.

You will be given the options to install MTweaks, Busybox, and also a choice of Magisk.

WIREGUARD INFO: XDA THREAD

VARIANTS SUPPORTED

G960F

G960FD

G960N

G965F

G965FD

G965N

KERNEL INFORMATION

Built with: Google GCC 4.9 Toolchain

Kernel Base: G965FXXS2BRL3

Ramdisk Base: G965FXXU2BRL2

AROMA INSTALLER OPTIONS

Install Magisk

Install ADB

Install Busybox

Install WireGuard

Ihstall Custom Splash Screen

Set Kernel to SELinux Enforcing

FEATURES

SELinux Permissive / Enforcing option in AROMA

WireGuard Support

Enabled hidden CPU Frequency Governors

Enabled hidden IO Schedulers

Disabled Exynos Kernel Protection

Disabled KNOX

Disabled Root Restriction

Disabled TIMA

Disabled Use Signed Binary

Enable Dex with any HDMI adapter

Enabled CIFS Filesystem

Enabled IP_NF_TARGET_TTL and IP6_NF_TARGET_TTL

Enabled ISO9660/UDF Filesystem

Enabled NFS Filesystem

Enabled NTFS Support

Enabled init.d support

Enabled Google Play Services Wakelock Fix

Set Knox / Safetynet / Samsung flag

RMM Fix

FIOPS, SIO, ZEN, BFQ, and MAPLE IO Schedulers

Boeffla Wakelock Blocker

Fsync on/off

wake_gestures: sweep2wake, doubletap2wake, sweep2sleep

Enabled Private Mode

Enabled GPU Volage Controls

Enabled CPU Overclocking

Fixed USB Mass Storage

Added RGB Colour Control

Custom TGPKernel Splash Screen

DOWNLOAD

DOWNLOAD VIA ANDROIDFILEHOST for Oreo 8.0

DOWNLOAD VIA MEGA for Oreo 8.0

TELEGRAM CHAT ROOM

CREDITS + THANKS

Samsung Open Source Release Center for the Source code

[MENTION=5899304]Tkkg1994[/MENTION] for all his help and numerous code samples from his source

[MENTION=4544860]osm0sis[/MENTION] for Android Image Kitchen

[MENTION=361302]morogoku[/MENTION] for MTweaks, and lots of help

[MENTION=4587002]Noxxxious[/MENTION] and [MENTION=3699616]mwilky[/MENTION] for help with the required Oreo firmware files.

Other devs that I have taken commits from which are credited in Github

My team of testers and the TGP Community on Telegram

XDA:DevDB Information

TGPKernel for Samsung Galaxy S9 / S9+, Kernel for the Samsung Galaxy S9

Contributors

djb77

Source Code: https://github.com/TheGalaxyProject

Kernel Special Features:

Version Information

Status: Stable

Current Stable Version: 1.4.2

Stable Release Date: 2019-02-16

Created 2018-08-24

Last Updated 2019-02-16
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
Reserved
[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
Great to see another kernel being released! A few things I'd like to note. The S9 source code is not pinned to the GitHub link attached (at least on my S9). **EDIT** Just checked this on my PC, appears to only be visible while on a non-mobile device as the repository is not pinned.

The patch to enable DEX with any HDMI adapter seems to be broken on all other kernels if you are using the same commit on GitHub. **EDIT** Again just checked this on my PC and you have enabled an option in the defconfig that was disabled in APGK. Will test later today in a build if this fixes Dex for me.

Other CPU governors have reportedly caused crashes on the latest base if not immediately then shortly after.

I haven't personally tested your kernel yet but it seems to be the case across the other kernels.

Thanks for your work and congratulations on release!
[Samsung Galaxy S9 & S9+ Cross Device Development] Vmb265:
Thanks for the kernel?
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
I have received reports that Interactive and Conservative CPU Freq controls are broken, I'll look into that for the next release.
[Samsung Galaxy S9 & S9+ Cross Device Development] kar5ten:
I don't know why but I'm not able to boot with this kernel ?
[Samsung Galaxy S9 & S9+ Cross Device Development] :
The same here if i select anything with SuperSU in Aroma.

And it looks like that Magisk aren't installed.

I installed Magisk after flashing the Kernel manually
[Samsung Galaxy S9 & S9+ Cross Device Development] cignoo0:
thanks for the kernel [emoji41][emoji41][emoji41]

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] Oel:
All good here on my S9.

I'm on latest Soldier rom.

Magisk is installed, all runs fine and speedy.

Boots normal.

Thanks for the great kernel with so much things to adjust.
[Samsung Galaxy S9 & S9+ Cross Device Development] cignoo0:
after installation it does not start [emoji848][emoji848][emoji848][emoji848]

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] :
[MENTION=6908499]cignoo0[/MENTION]

hm, that's strange.

have you selected any root method?

if yes, try to flash without any root methods.

then it must be work
[Samsung Galaxy S9 & S9+ Cross Device Development] Oel:
Maybe it doesn't work on the 965 version?

I have the 960F version, i can install, with magisk, and it works perfect.
[Samsung Galaxy S9 & S9+ Cross Device Development] cignoo0:
I have 965F mono sim.

I tried to select all the methods in aroma but it does not work anyway.

I currently use flash kernel 1.4

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] :
I have the duos variant of the s9 plus

i come from the els kernel from [MENTION=4860093]SoLdieR9312[/MENTION]
[Samsung Galaxy S9 & S9+ Cross Device Development] Mazikaaa:
Kernel works great on my G965FD expect the crash and device restart once I choose a different cpu gov. That happens in the other kernels too I hope you find a fix.

Guys who cannot boot after flashing this kernel are apparently using Flash kernel, if so you need to reflash the whole rom "dirty" and then flash the kernel then it will boot normally.
[Samsung Galaxy S9 & S9+ Cross Device Development] UberBock:
That is because of the flash kernel. It has happened to me that when I used Flash kernel any other one used after that fails to boot. Flash kernel must mess with some files that cause other kernels to fail to boot. Might try flashing the vendor.img then a different kernel. I tend to stay away from Flash kernel because of this.
[Samsung Galaxy S9 & S9+ Cross Device Development] cignoo0:
I've just tried to install other kernels.

same problem.

you're right flashkernel causes something to boot up

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] cignoo0:
in the end I solved by formatting.

the problem was flash kernel.

tgpkernel as beautiful as the s7 edge versions

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] ForForkSake:
Same here.
[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
Yep this is due to flash kernel modifying the vendor partition, hence you'll need to reflash the vendor partition before you switch kernels
[Samsung Galaxy S9 & S9+ Cross Device Development] Ilker1234:
How enable doubletap2wake?
[Samsung Galaxy S9 & S9+ Cross Device Development] edzamber:
No problem here.

I switch to TGPKernel from FlashKernel without Any issue...

FlashKernel install only libsecure_storage.so in vendor/lib and vendor/lib64 to remember wifi password after reboot...
[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
It has also been known to cause issues, for example when people switched from Flash Kernel to Notorious V103, there were issues associated with those who had modified their vendor partition. I personally only used Flash Kernel once and then reflashed soldier's SVN and a different kernel so I can't speak from experience here, only what I've heard
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Will the s9 ever get an undervolt option?
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
So the /vendor partition doesn't need the patched libsecure_storage files? I thought they would be essential.
[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
No because EAS exists

---------- Post added at 02:53 AM ---------- Previous post was at 02:51 AM ----------

I believe patched libsecure_storage files are needed for a working Bluetooth too
[Samsung Galaxy S9 & S9+ Cross Device Development] Rachirod12:
[MENTION=4280397]djb77[/MENTION] Solid Kernel mate. nice work. loving it so far
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Eas? Energy aware scheduling? Not sure how that prevents undervolt
[Samsung Galaxy S9 & S9+ Cross Device Development] xFirefly93:
Recent chips runs with lower voltages, and are binned with tighter tolerances which leaves less general headroom for UV:in and reduces the battery life impact & improvements thanks to undervolting.

Read more here in this highly detailed "article" by [MENTION=4684315]flar2[/MENTION];

https://elementalx.org/the-truth-about-kernels-and-battery-life/

Undervolting today is honestly not really worth it.
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Thanks for the response though that still doesn't tell me why you can't undervolt only that the reasons to do so aren't as valid as they once were. Though less volts is less battery and less heat which has to be a good thing
[Samsung Galaxy S9 & S9+ Cross Device Development] Aleksandr-1:
In the notification panel appeared tile "Spectrum" with profiles. It works? I just clicked and MTweaks did not notice any changes. In the archive there is apk Spectrum, but having installed look, writes does not support.
[Samsung Galaxy S9 & S9+ Cross Device Development] xFirefly93:
Because undervolting on modern chips causes more problem than it does good. The voltages on chips like the Exynos 9810 and SD845 is low enough for heat and thermal reasons, without causing instabilities, system deadlocks or/and freezes.

UV:ing is a thing of the past, shortly explained.
[Samsung Galaxy S9 & S9+ Cross Device Development] ilos:
Big Cores frequency is by default (in Mtweaks) at 1794MHz and if i try to change for higher frequency (like normal frequency... 2,7GHz) , frequency going back to default 1794MHz.

I've missed something ? flashed on latest Soldi3r Rom on my SG965FD (Exynos)
[Samsung Galaxy S9 & S9+ Cross Device Development] kar5ten:
1 core is 2,7

2 cores are 2,3

4 core boost is 1,8

So it is normal. Only ST processes use 2,7
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
Just released a new version (1.0.2), with a lot of new additions:

Updated Ramdisk to BRH4

Updated Magisk to 17.1

SELinux Permissive / Enforcing option in AROMA

Fixed Safetynet related stuff

Enabled CIFS Filesystem

Enabled IP_NF_TARGET_TTL and IP6_NF_TARGET_TTL

Enabled ISO9660/UDF Filesystem

Enabled NFS Filesystem

Enabled Private Mode

Enabled GPU / GPU Volage Controls

Fixed USB Mass Storage

Enjoy :)
[Samsung Galaxy S9 & S9+ Cross Device Development] DirkStorck:
Certainly you already know about this and maybe have added it to you builds if not could you add this "MAX_LOAD_AVG" fix in your kernel

Thank you! Great to see that you have released an TGP-ROM for our device :highfive: ....can't wait to test it this weekend! :) Have been using your ROM on my S7 since it came out! :good:
[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
That's not relevant on this kernel. It uses the default 32ms PELT hence it does not need to explicitly define the MAX_LOAD_AVG for 16ms and 8ms.
[Samsung Galaxy S9 & S9+ Cross Device Development] cignoo0:
until now the best kernel version for s9 is 1.0.0. excellent fluidity and low consumption
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Yay for undervolt! Amazing. Hope CPU volts come soon
[Samsung Galaxy S9 & S9+ Cross Device Development] Docmjldds:
TGPKERNEL **[v1.0.4][4.9.126] Just updated
[Samsung Galaxy S9 & S9+ Cross Device Development] ffaaiissaall:
How tonuse RGB control?
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Giddy up! This Kernel is leading the pack!

---------- Post added at 11:24 PM ---------- Previous post was at 11:23 PM ----------

Usually in Mtweaks app under Misc.
[Samsung Galaxy S9 & S9+ Cross Device Development] phamtieugiao:
Anyone tried CPU/GPU undervolt? How is it?
[Samsung Galaxy S9 & S9+ Cross Device Development] freddo800:
How to undervolt ??
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Undervolted GPU 100mV works a treat! (i don't know why all kernels only let you go 100mV id like to try more).

Havent' tried the new version yet that i assume allows CPU as well. less volts, less heat.. it's all good.

---------- Post added at 10:39 AM ---------- Previous post was at 10:38 AM ----------

Mtweaks app under GPU. Use the slider. i usually use the Global. Though you can do each freq if you prefer.
[Samsung Galaxy S9 & S9+ Cross Device Development] phamtieugiao:
This is really awesome. Does this kernel work on Lineage OS?
[Samsung Galaxy S9 & S9+ Cross Device Development] j1gga84:
No, this kernel is only for Samsung stock or stock based custom ROMs.

regards
[Samsung Galaxy S9 & S9+ Cross Device Development] phamtieugiao:
I see, any plan to make a custom kernel for Lineage OS?
[Samsung Galaxy S9 & S9+ Cross Device Development] xFirefly93:
Asking this kind of questions here at XDA is not something people really appreciate.. :p
[Samsung Galaxy S9 & S9+ Cross Device Development] phamtieugiao:
Why is that so? I have not seen anyone making a custom kernel for s9/s9+ Lineage. It would be great if we can have one.
[Samsung Galaxy S9 & S9+ Cross Device Development] QBANIN:
There is no option to manage wake gestures.
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Loving this kernel. Just wanted to say thank you. Rock solid. Great features. Well done.

Hoping to one day see CPU Voltage added ;)
[Samsung Galaxy S9 & S9+ Cross Device Development] DirkStorck:
Hi, can I use the latest kernel in a ROM based on BRI1?

Thank you
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Yup you can.
[Samsung Galaxy S9 & S9+ Cross Device Development] DirkStorck:
Hi, just have flashed V1.0.5...have the undervolt/overclock option in aroma installer been removed? In v1.0.4 there was an option where I could choose from 3 different profiles.

Thank you!
[Samsung Galaxy S9 & S9+ Cross Device Development] Sage:
Yeah I didn't see those options in aroma in 1.05. Though GPU can be done in mtweaks. Though haven't seen anything for CPU in either
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
All I need is one profile for overclocking, that's why I removed the other options, I just ended up leaving it set so it can reach the highest possible CPU Frequency.

Use MTweaks to control the CPU Freq just like the GPU.

Also, EX Kernel Manager will also work with this kernel if anyone has purchased this app. I don't know if all the features are available (like the Elemental X Kernel), but most should be (RGB Settings etc).
[Samsung Galaxy S9 & S9+ Cross Device Development] QBANIN:
What about gestures?
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
Gestures should be able to be used with MTweaks as well
[Samsung Galaxy S9 & S9+ Cross Device Development] QBANIN:
I can't see gestures options in MTweaks nor Ex Kernel manager. Flashed back APGK Kernel and these options are back. Something is wrong with your Kernel.
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
OK I'll take a look
[Samsung Galaxy S9 & S9+ Cross Device Development] Code124Y:
yup... was waiting those function seen 1.0.1, i though OP forgot to enable it...
[Samsung Galaxy S9 & S9+ Cross Device Development] djb77:
That's exactly what happened, I forgot to enable it in the config.

All fixed now for the next release. :)
[Samsung Galaxy S9 & S9+ Cross Device Development] emphazer:
[MENTION=4280397]djb77[/MENTION]

hi, one question.

what exactly does the boeffla wakelock blocker patch?

greetings
[Samsung Galaxy S9 & S9+ Cross Device Development] Baercity:
Gestures works now properly for me.