seerge / g-helper

Lightweight Armoury Crate alternative for Asus laptops and ROG Ally. Control tool for ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, TUF, Strix, Scar and other models
https://seerge.github.io/g-helper/
GNU General Public License v3.0
7.49k stars 266 forks source link

Asus Zephyrus Duo / (maybe also zenbook duo) Secondary Screen Toggle #1215

Closed squee666 closed 1 year ago

squee666 commented 1 year ago

I have a Zephyrus Duo 2023 and Ghelper is really useful for it.

Only downside is lack of 2nd screen control when asus services are disabled.

It has a dedicated Key for controlling the display via one of the services ghelper disables in app

Here is a image of what the osd looks like when toggled

and heres an example image of the key itself froma zeph duo 15 inch

https://i.imgur.com/RNb1IGO.png

seerge commented 1 year ago

@squee666 you actually can control second screen brightness (including turning it off completely) in g-helper. You can bind macro-keys to "Screenpad brightness" in Extra settings.

Check %appdata%\ghelper\log.txt for what exact keycode does that special key produce (as soon as you press it), i can add an extra binding for it too.

squee666 commented 1 year ago

ahh thats smart the Keycode is 106 btw

but yeah I would rather just have it Function exactly like it does here

https://i.imgur.com/Cx9jRKQ.png

Basically it just need to Toggle between 3 functions, Display On Disaply backlight off Display off entirely ( as its physically disconnected aswell from display settings)

seerge commented 1 year ago

@squee666 what does "backlight off" mean? is it just minimal brightness ? (try macros from Extra, when you set brightness to 0 it would also turn display OFF in the app)

squee666 commented 1 year ago

@squee666 what does "backlight off" mean? is it just minimal brightness ? (try macros from Extra, when you set brightness to 0 it would also turn display OFF in the app)

Yeah your right that turns off display entirely at 0% but the dedicated button functions like this

Display ON 100% Brightness Display 0% Brightness / Touch disabled but its shows as still connected and windows can still be dragged to it etc Display OFF

i dont know how asus is doing it but hide display option in OSD turns off the backlight and touch input Basically its acting like a second monitor is still plugged into the input and detected but is in a forma of standby

https://i.imgur.com/5BqdCgh.png

seerge commented 1 year ago

@squee666 check this build

  1. Screenpad UP / Down bindings will also allow you to set brightness to 0% (but keep it off), next step will turn it off
  2. 106 code will toggle between OFF / 0% / 100% states (only for case when you have asus services OFF, otherwise it will not interfere)

GHelper.zip

squee666 commented 1 year ago

@squee666 check this build

  1. Screenpad UP / Down bindings will also allow you to set brightness to 0% (but keep it off), next step will turn it off
  2. 106 code will toggle between OFF / 0% / 100% states (only for case when you have asus services OFF, otherwise it will not interfere)

GHelper.zip

okay new major issue, the display is disabled with no touch and image.

it doesnt renable is effectively locked on hidden. i cant turn it back on now in ghelper or armoury crate but shows as connected

seerge commented 1 year ago

@squee666 do you mean that display doesn't enable after getting disabled ? check this build

GHelper.zip

squee666 commented 1 year ago

@seerge

if i use the versions you provided toggling brightness instantly sets it to 100 and disables the display toggling any of the 10% levels from 0-100 doesnt reanable the backlight or the touch. this will persist through turning the display off entirely through the hotkey same for using the hotkey for brightness controls

i have to spam the hotkey button to turn the 2nd display on / off until it will eventually kick into 100% brightness. once its on if i toggle any brightness settings via keycombo Screenpad Down/Up it will instantly disable backlight and touch.

however if i renable the screen kill any of the previous 2 ghelper builds and use official build 117 brightness toggle functions as it should from 100-0- screen off entirely

but then it doesnt have the function that turns of 2nd screen backlight and touch

heres an example video by what i mean (dont mind the fingerprints hair just had a dog abuse me) as you can see what i mean by spamming, this doesnt fix it in video but eventually works after i stop recording

seerge commented 1 year ago

@squee666 i don't see video, but check this build

GHelper.zip

106 logic is

You can check it in a log itself (screenpad on off and brightness are 2 separate commands)

Screenpad Up / Down buttons logic is - OFF, 0%, 10% ... 90%, 100%

squee666 commented 1 year ago

https://youtu.be/-wFQ9SL-syA

this

i will test build now

squee666 commented 1 year ago

right tested it and it works but I think asus set the logic like this because otherwise turning screenpad on brightness 0 doesn't actually turn on screenpad

Screenpad ON, Brightness 100% Screenpad ON, Brightness 0% Screenpad OFF, Brightness OFF

going from

Screenpad OFF, Brightness OFF to Screenpad ON, Brightness 0%

doesnt turn the screenpad back on

seerge commented 1 year ago

@squee666 ok, then brightness 0 is not the right value. Lets try 1 instead of 0

squee666 commented 1 year ago

@squee666 ok, then brightness 0 is not the right value. Lets try 1 instead of 0

nope that puts the computer to sleep

all you need to is take the build below

@squee666 i don't see video, but check this build

GHelper.zip

106 logic is

  • Screenpad OFF, Brightness OFF
  • Screenpad ON, Brightness 0%
  • Screenpad ON, Brightness 100%
  • Repeate

You can check it in a log itself (screenpad on off and brightness are 2 separate commands)

Screenpad Up / Down buttons logic is - OFF, 0%, 10% ... 90%, 100%

and heres what you need to do swap the logic order from

change this to

this seems to be the requirement for it to function correctly if you turn off screenpad and turn it back on it will instantly set itself to 100% brightness then toggling the brightness up drops it down to 20% / 30% etc

seerge commented 1 year ago

@squee666 ops, sleep was part of the way i test hotkey (i have G14 so use sleep key to imitate it ...)

Check this build GHelper.zip

squee666 commented 1 year ago

@squee666 ops, sleep was part of the way i test hotkey (i have G14 so use sleep key to imitate it ...)

Check this build GHelper.zip

nope 1% brightness turns the screenpad on but it will default to 100% brightness until i toggle brightness then it well act as if it was set to 1% because the toggle kicks in

seems like Literally needs to be

or it doesnt function correctly like stock asus

seerge commented 1 year ago

@squee666 i don't think that order matters much :)

But i have changed it GHelper.zip

Does changing brightness with UP / Down commands allow you to set screen to minimum brightness w/o turning it off ?

squee666 commented 1 year ago

@squee666 i don't think that order matters much :)

But i have changed it GHelper.zip

Does changing brightness with UP / Down commands allow you to set screen to minimum brightness w/o turning it off ?

okay this functions as intended but toggling brightness to 0 turns off display like you asked

i dont know if its because you have brightness set to 1 but touch input still functions when that should also disable

example video https://youtube.com/shorts/jgcq2iJXc64

but other than touch input not disabling we are 99% into the actual function of the original software

seerge commented 1 year ago

@squee666 can you check this ? GHelper.zip

squee666 commented 1 year ago

that functions exactly the same as above

seerge commented 1 year ago

@squee666 i have set min brightness to 10 in this build instead (instead of 1)

Does it keep display visible in that case ?

GHelper.zip

squee666 commented 1 year ago

with 10% brightness set the display is still off also now touch input is disabled like it should be

so this build functions 100% like asus's software but just ports screenpad at 10% instead of "Screen Pad Hidden"

so yeah its fully functional now as intended except for the naming, sorry for the hassle

squee666 commented 1 year ago

update on that its not fully functional, i tried toggling brightness settings and the display is disabled/hidden and brightness wont toggle it back on.

also the screenpad off hotkey wont even fully disable the display to try and restart it

had to go back to a previous version to turn off the display and turn it back on to function

seerge commented 1 year ago

@squee666 try this GHelper.zip

squee666 commented 1 year ago

@squee666 try this GHelper.zip

yup that sets brightness to 10%

but now we are missing the middle function Screenpad 0% No touch input but connected as a display

the build before this had the correct asus function

Screenpad ON, Brightness 100% Screenpad ON, Brightness 0% No Touch Input Screenpad OFF, Brightness OFF Repeat

but toggling any brightness setting via FN key and Ghelper would trigger Screenpad ON, Brightness 0% No Touch Input

this would persist until i used another version to turn display off and on fully

seerge commented 1 year ago

@squee666 you are confusing me completely

If this build still doesn't work as you want GHelper.zip

You will have to pick up parameters manually and tell me them

To Enable / Disable screenpad run in powershell as admin (where 1 / 0 is the status)

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00050031, 1)

To set brightness , where 255 - is brightness value in a range from 0 (min) to 255 (max)

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00050031, 255)

And tell me params that you want for each "mode" :)

squee666 commented 1 year ago

@squee666 you are confusing me completely

If this build still doesn't work as you want GHelper.zip

This build works 100% as intended.

Brightness toggling via hotkey even works better than original as going to 0% Now hides display and going down 1 further turns it off entirely

You have nailed it :)

seerge commented 1 year ago

@squee666 great, closing as completed then