Ayn Loki Zero sw improvements
Stock install of bazzite-deck-gnome works fine, what could be improved is:
- rgb (next hhd should have it)
- fan control is exposed by the same ayn-platform driver, a gui would be nice (for now adapting https://docs.google.com/document/u/0/d/17a0F6Wsdak1ekE6XDUn749BNynU5mj8FH9vpzDWm_bg/mobilebasic?pli=1#heading=h.7vd2la8jx513 works fine, but hwmon number changes between reboots so must use something like `
- Frame limit only shows 10, 12, 15, 20, 30, 60 fps
Should ideally show 30, 40, 50, 60 instead, with 40 being a priority on such a weak device
Gamescope-session-plus has # Set refresh rate range and enable refresh rate switching
export STEAM_DISPLAY_REFRESH_LIMITS=${GAMESCOPE_OVERRIDE_REFRESH_RATE:-40,60} but it doesn't do anything
180 Replies
fan control will be ready by the end of the month
well not march
It's not like it's high priority, it's off so doesn't drain battery by default
that shouldnt be true
STEAM_DISPLAY_REFRESH_LIMITS works with the legacy slider
by disabling unified slider
so right now you have 15 30 60 right?
On bazzite the default governor is "conservative" which seems appropriate
should be powersave unless you are not on the pstate driver
cat /sys/devices/platform/ayn-platform/hwmon/name
can you?The soc doesn't support pstate, it's zen1
seems like
we will need a custom gui for the fan curve, maybe i should abstract the fan curve guis i have right now
since they are the same for asus and the legion go
and seems like they will be the same for loki
although only 5 points
[root@loki ~]# cat /sys/devices/platform/ayn-platform/hwmon/hwmon7/name
aynec
Disabling unified slider I have 15, 30, 60, OFF yes. 40 is missing
what are the supported framerates of the panel?
I will try to find out
GitHub
hwinfo/devices at master ยท hhd-dev/hwinfo
Contribute to hhd-dev/hwinfo development by creating an account on GitHub.
GitHub
hwinfo/devices/loki_max/edid/edid_decoded.txt at master ยท hhd-dev/h...
Contribute to hhd-dev/hwinfo development by creating an account on GitHub.
40 50 60
GitHub
handheld-gamescope/legion_go.patch at master ยท hhd-dev/handheld-gam...
Up to date gamescope build files for Arch with patches for the Legion Go and ROG Ally. - hhd-dev/handheld-gamescope
I confirm all the refreshes work in gnome
now you need to convince gamescope
probably by making a patch like the one above
๐
Fine
Thanks
np
https://github.com/ublue-os/bazzite/tree/main/spec_files/gamescope build and layer this
GitHub
bazzite/spec_files/gamescope at main ยท ublue-os/bazzite
Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld. - ublue-os/bazzite
then we will take your patch and add it
Can anyone guide me on how to get bazzite going ? . I already have the bazzite iso and used Rufus but I'm not sure what settings to change in the bios to get the installation started .
disable secure boot in bios, then follow:
https://universal-blue.discourse.group/docs?topic=30#installation-guide-18
Universal Blue
Bazzite Initial Setup and Installation Guide
I am not actually that familiar with Rufus and currently do not have access to a Windows installation, or have hardware capable of running it in a VM. However I can recommend trying to flash the ISO again with Balena Etcher or Fedora Media Writer. Both have Windows ports.
also for future documentation, https://github.com/honjow/HueSync for RGB control on Loki, users confirmed it works on the max. not sure about other models
GitHub
GitHub - honjow/HueSync: RGB control decky plugin
RGB control decky plugin. Contribute to honjow/HueSync development by creating an account on GitHub.
Driver supports zero too
where do I find the valid string for e.g. strcmp(conn->model, "Loki Display") ?
ideally it would englobe all loki models
Edid
Look at the hwinfo repo
For where the legion go name 8s
And how it's used in the patch
If I go for "build bazzite" workflow instead of iso, will I be able to update from that?
instead of reinstalling completely
hmm if it generates a gamescope package I should be able to install just that, let's see
Layer the gamescope on your image
Make sure it works
Then we'll take the patch
And it will be in the next image
ok so from what I gather I need a fedora virtual machine to build a spec file with rpm dev tools (sorry I'm on debian and only used to docker and buildroot for now, so unknown territory)
I think you're right. I have a docker file for it but not with me right now
You can also abuse copr
By uploading your spec files to be built there
Idk I have fedora WS 39 installed with all dependencies, build runs well until it stops with
Failed to guess install tag for /usr/share/vulkan/implicit_layer.d/VkLayer_FROG_gamescope_wsi.x86_64.json
I'm running fedpkg local in spec_files/gamescope, with just Release variables replaced, not sure if that's correct
nvm I'm dumb
Seems it does nothing though; so I applied this patch https://github.com/citral23/bazzite/commit/cf1cb91b9a2977d2879a80c643e43492210836a7, built gamescope, did "rpm-ostree usroverlay" on the loki, switched to desktop, replaced /usr/bin/gamescope with my build, returned to gaming session, and the refresh rates don't show up
but maybe the legion go is portrait, so it doesn't work in the same wayusroverlay is temporary, no?
it'll reset on reboot
well until reboot
I didn't reboot
I can't for the life of me get rpm-ostree to replace an existing package with a local package of the same version
just hangs in inactive
if you could figure it out, that'd be great. i also couldn't figure out how to replace an existing package with a local or more updated version
๐ตโ๐ซ
there has to be a way to do it, I just don't know how
you can override the gamescope cmd right?
you can also just copy the executable on the device and stub it
make the command point to it
I could also modify gamescope-session to point to the new binary yeah
I guess worth a try tomorrow to see if that changes something with a reboot, which I very much doubt, getting late here so that'll be all for today
Wait, panel is forced as external
New to bazzite ๐
but I saw @antheas say fan control will be ready at the end of the month but is there a way to adjust the fan curve in the bios right now ? Fan is pretty loud at the moment ๐
There are fan controls in the latest bios but it didn't work for me, but I really didn't insist, maybe needed save + reset or something
I prefer software control generally
If you scroll up I talked about it
So as it is now, if I enable external display refresh control in dev options, I can set it to whatever between 40 and 60 by increments of 1, but frame limit stays separate and only allows 10, 12, 15, 20, 30, 60. Unified slider doesn't work they stay separate. Looks like gamescope-session-plus needs some work.
Gamescope patch worked you're sure?
Add some logs
I have not yet tried with the patch, I'm on it, and don't worry I know how to print stuff to make sure it's working
was just observing that how it's set up by default, it's intended to be used with external display refresh control it seems (cf export STEAM_DISPLAY_REFRESH_LIMITS=${GAMESCOPE_OVERRIDE_REFRESH_RATE:-40,60}) in device quirks
except it's really quirky, as a fixed refresh of 60 and a granular frame limiter would make much more sense imo
Without the patch it won't work
That controls the legacy steam slider you showed
Gamescope does not support reading all refresh rates from the edid and needs to be hardcoded
The legacy slider breaks most handheld screens
They are finicky in what refresh rate they support
As for the granular frame limiter, it assumes you can disable vsync and you will get tearing
The thought for doing 40 50 60 is that you avoid tearing
And gamescope will try to come up with screen parameters using a cvt implementation that just doesn't work on handheld screens
well unified slider does not work if external display refresh management is enabled
stuck in legacy mode
if panel is not forced to be external, it will be upside down
Fix the params
so if my patch is supposed to work with external refresh disabled, and with unified slider, for now no, it does not work
There's a param called force external panel rotation or something
Remove the external
yes, but setting it to either left or right does the same thing, it will be upside down
I guess there is a reason it's done that way by chimera folks for aya and ayn
probably a gamescope limitation
For the ally yes
For ayn prob can remove it if you deal with the rotation
It's probably to fix the refresh rate without the patch
But if you do the patch it will work flawlessly
Does it work with external?
Does the screen flash when you change the refresh rate?
Yeah just busy with work but found a minute and it works
so basically s/force-external-orientation/force-orientation/g
+ my gamescope patch
20 fps is linked to 60hz refresh, while it could be to 40 to save a bit more battery, but it's nitpicking at this point
I have not found any explanation for "generate-drm-mode fixed"
should be 60 thats correct
probably is not going to save battery life
and if you have a missed frame you only add 1/60 to your frame time instead of 1/40
perfect then
3/40 vs 4/60
so its your patch that fixes the unified slider right?
tesing in game panel goes black for a second when switching on unified slider, caps at 40/50/60 as expected
perfect
send the patch when you can
I will try without my patch to be sure
without patch it slides from 10 to 60 by increments of 1, so not very good
(just with panel non external in device quirks, stock gamescope)
and it flashes black right?
does it work though going 1 by 1
no it does nothing, doesn't flash and remains capped at 60
sounds great then
yes but I must also send a patch to gamescope-session-plus
what did you change there?
we need 2 lego bricks
this
how was it before i mean
try with
--generate-drm-mode cvt
without your patch for fun
see if it freaks outit was "force-external-orientation" and "force-panel-type external"
force-orientation doesnt work?
it does
the gamescope patch doesn't work if panel is left as "forced external"
makes sense
oh yes ofc
you removed the external
got it
perfect, we can get them included next ver probably
but bazzite pulls gamescope-session-plus directly from their repo, no?
no
actually not sure
GitHub
gamescope-session/usr/share/gamescope-session-plus/device-quirks at...
GamerOS session on Gamescope. Contribute to KyleGospo/gamescope-session development by creating an account on GitHub.
yep, this is where you need to pull
I sent my PR
https://github.com/ublue-os/bazzite/tree/main/spec_files/gamescope here is gamescope
GitHub
bazzite/spec_files/gamescope at main ยท ublue-os/bazzite
Bazzite is a custom image built upon Fedora Atomic Desktops that brings the best of Linux gaming to all of your devices - including your favorite handheld. - ublue-os/bazzite
i cant see your pull request here
oh yes gamescope
great
@Kyle Gospo you need to do both the quirk and the gamescope patch for it to work
GitHub
Change panel type from external to internal for Ayn Loki devices by...
Combined with ublue-os/bazzite#947 this allows to have 40/50/60hz on loki devices
FWIW, I'm building and testing it for Chimera too, so once it's in you might want to drop those and pull form upstream. But as their release cycle is quite slow, it makes sense for now to get it in bazzite
Merged, thank you so much
I'll get a build out with this soon
Well thanks antheas mostly, great reactivity and will to help, much appreciated
The zero will be a lot better now, it's a very inefficient 14nm apu so capping fallout new vegas at 40 will help a lot
30 is... Not my thing ๐ฌ
Can you test the git version of hhd to make sure it works before I release?
I made some performance changes and I want to make sure it did not break
Also added explicit support for the zero
I don't really see a difference, but I'm still on chimera as I tested the panel fix there too
If you want it tested on bazzite I can do tomorrow
I have handheld daemon controller as controller name; and all is well but not RGB setting in Calibration & Advanced testing; but maybe it needs some bazzite specific patches
Ah that's Xbox mode
Can you install the git version?
And make sure it runs especially after suspend and when changing settings
Open hhd.dev and press
Update unstable
Ok this is not ideal, removing handygccs and installing hhd broke touch on desktop mode, I will test it properly on bazzite tomorrow I think there's too much interference here
completely unrelated to both
lmao
some panels freak out when you change the refresh rate, hopefully its not that
No it's not that
Can you test hhd runs at least so I can prepare the release?
Reinstalling anyway, still have an hour or so
The git version
Well it's a failure, stuck at steam logo nothing I can do but reinstall, too late for today (athlom 3050e takes like 10 mins just to update initramfs so it's painfully long)
Ded
Wait
Wow, 10 mins and it works now lol
Well after another 30 mins of updating
I have no option to switch hhd to unstable
I guess it's not in the bazzite version because it was there when I installed it on chimera
Yes it's chimeraos only
Well any version installed with the script
You can use a script that's floating Around in the main chat for bazzite
Sorry I fell asleep
I have it installed on chimera this morning, and it seems to break suspend
It did enable the gyro and led stuff with git version
Hmm suspend is also borked without it
so hard to say what is what
so you cant say if it crashes unfortunate
at least it runs
yes chimeraos is semi-unmaintained, so problems
it runs but seems to have a rather large impact on cpu at idle
probably something you wouldn't notice on a 6800U, but on 3050e it's struggling
thats the gyro i guess
unfortunate
yeah, definitely
what are the top stats?
how much cpu util
actually, it's not very different on handygccs
as soon as I open qam it's the same
qam?
quick acccess menu
the one on the right
what does that have to do with hhd?
I'm comparing cpu stats of handygccs and hhd
and in both case it's like 0 on fresh boot
both use almost 0 CPU without gyro
but as soon as I open qam gamescope jumps to like 40%cpu
thats steam
yeah
ok so hhd sits at 0.7% cpu idle without gyro, 9% with gyro
but 9% of not much
maybe a small bug that enabling/disabling gyro flashes the leds
(when they are at 0% brightness)
otherwise looks fine to me
changing motion hz also flashes the leds btw
interesting, dropping to 200hz it uses almost 0% cpu again
well 3% instead of 9
so much better for that device
ship it
doesn't mater what rgb setup, changing gyro settings will always briefly flash blue at 100% brightness
the git ver is that? Cool it reloads so fast now
thats steam thats not me
when a controller connects it flashes the leds
Git version yeah
Ah yeah
Right
Crap, @Kyle Gospo I signed https://github.com/KyleGospo/gamescope-session/commit/b8767b48de1d99bc47759cfdc497e64186452f2e with my work account, we need to redo it
I believe this gives accenture copyright ownership over the code or something, not good
Good thing it's the last one
He can just do undo commit undo commit then swap the signed off
yeah as long as PR is not merged I can force push to edit it, but now I can't anymore, sorry for that
All good, fix shortly
ok, force merged it out
@citral feel free to reopen
I will wait for it to do any further bazz pushes
@antheas While I'm at it I'll add your patch
thank you; resubmitted
I see it's already in bazzite that I just reinstalled, you guys are so fast lol
one thing that would be nice @antheas is still allowing RGB control in xbox controller mode in HHD
because as it is now, I have to switch to dualsense, put brightness to 0, switch back to xbox mode to turn it off
perhaps a bit unintuitive for people who discover it
I plan adding it to the ui
But I have other priorities now
GitHub
GitHub - honjow/HueSync: RGB control decky plugin
RGB control decky plugin. Contribute to honjow/HueSync development by creating an account on GitHub.
I know for devices like the Loki if you want them off it's not ide
Yes true
Yeah, "would be nice", not deal breaking at all
huesync should work on loki devices
But if you install decky
You might as well install the dualsense theme
Huesync does work actually, true
it does depend on decky though, not ideal
A cool project for me would be to do an ayn-fantastic plugin
If work becomes quiet again at some point:P
someone should make an ayn plugin for fans, instead of relying on a script + systemd service
shouldn't be too hard ๐ค
I will add support for fans
I already did for ROG and legion go
Or one of you can but tbh the fan stuff needs a rewrite
To unify it
Btw your hhd update works fine with sleep
ayn will be a tad bit awkward. If i'm remembering right, you can set arbitrary temp thresholds and fan speeds, but only a max of 5 total thresholds
Yes
Glad to have it again, this not working on chimera is actually a deal breaker
But someone told me it doesn't work
You did actually
chimera suspend is probably broken due to the suspend mods issue, maybe?
The interface is the same as the rog ally
I mean sleep
So I need to rewrite that to do both
Yes chimeraos is not on a good place rn
Chimera complain about usb-dev not being able to sleep + s2 missing from bios and insta wakes up, or remains dead with fan and backlight running and nothing else
chimera's slower update cycle is both a blessing and a curse. more stable, but if something breaks it won't be fixed for a long while
also takes longer for fixes to get deployed
It's ok for older hardware, like 5600+6700xt, but on 8700G or exotic device it's not working well
It's easier to customize with frzr-unlock so there's that
True, but you need to remember that when you do that you fork
So then you need to redo everything every update
Yeah
Kinda works with the 2 month pacing
Layering is slower but once you get your setup up in bazzite you're good with updates. Neither is ideal tbh
I hope we get the update situation resolved so updates happen in like 5 min
I think silverblue has a learning curve but you only have to learn things once
From what I've seen the biggest pain point is customizing the kernel
Other than that you can live with layering
And bazzite is quite feature complete so most users need 1-3 packages at most
Although chimeraos does not support dkms either
But you can at least swap the kernel there
I come from devices where we can boot custom kernels over usb for testing, it's golden
System76 scheduler is interfering with simpledeckytdp, it needs to be disabled for governor setting to work
System76 only touches nice values
It doesn't do governor anything
TuneD will, but only at boot or when PPD profile is changed
Hmm
I will confirm by testing more
Also tailscaled should be disabled on zero if not used, consumes a bit of cpu.
Somehow governor was sticky in game mode to conservative until I disabled system76 sched and rebooted, but maybe it's a false conclusion
In gnome it wasn't sticky though
Conservative sounds like pstate
Which is tuned
The soc is zen1, so acpi-cpufreq, but I will look at tuned too
hmm, there is something else, with tuned stopped it's sticky to schedutil. system76 is obviously doing nothing you're right, it's just a niceness thing
so I don't know how I made it work for a while
I made it work again after a clean install by writing once manually to /sys/devices/cpu/cpufreq/policy*/scaling_governor, so maybe a small plugin bug vOv
Btw the device needs iomem=relaxed for ryzenadj -i to display tables, but tdp works without it
Just writing this for people who have the device, can be useful
@Aru I see simpledeckytdp writes logs but they are empty, is there something to toggle?
do you mean the
/tmp/simpleTDP.log
?No homebrew/logs/simpledeckytdp/timestamp.log
oh, as far as I know, SimpleDeckyTDP doesn't really log anything to the homebrew logs folder
I'll check /tmp then, thx
but with that being said, i do need to fix logging in general, need to enable a debug logs mode for simpleDeckyTDP
right now only errors or crashes get logged to
/tmp/simpleTDP.log
That would help yeah, looks like I found a small bug on acpi-cpufreq
could you describe the bug?
i can try to replicate
The governor is not switched by plugin, until I write once manually to /sys/devices/system/cpu/cpufreq/policy*/scaling_governor, then it works
so after the first write, it starts working afterwards?
Yes, will reboot now to see how it is
Well it still works after reboot so... If I reinstall fresh I'll check the log to see what it says, no need to bother for now
I had the issue on 2 fresh installs though so there's definitely something
aight, i'll keep an eye out for it. also will look into improving logging in general
I have the bug again after poweroff/start instead of reboot
I see [2024-04-07 23:11:38,868 | main.py:58:get_settings] ERROR: main#get_settings failed to get info cannot unpack non-iterable NoneType object
Not sure it's related yet tho
What's strange is that cpupower -frequency-info reports the correct governor, but sysfs doesn't ๐ค
Probably related, I'll take a look
I'm assuming it's some sort of race condition
Oh, because cpu3 is indeed on powersave
So it's not writing to all cpus
That's what I call a mixed bag lol
Alright at least it starts to make sense now, was pretty confused
I can have a look too tomorrow
I'll also investigate more, thanks for flagging the bug
Not sure if I'll be able to replicate, I'll test in a bit
ok, was able to replicate. It's changing all but cpu0
somehow cpu0 is the only one not being changed
๐ค probably a one off bug somewhere, time to track it down
fixed it, pushed a release. let me know if you still see the issue
Fixed in 0.3.2, thanks!
I see the latest ppd release is quite the improvement, would be good to benchmark against tuned, especially as it's un-archived and active it may as well stay the fedora default tbh
latest ppd update is just adding a couple tiny features tuned already supports
I don't say you're wrong, but I'll look at numbers when I have some spare time, I've seen a lot of claims
(something something gentoo in year 2000)
To be fair it's mostly epp related, I don't expect a real difference on acpi-cpufreq, but worth a look
If anything for the bazzite default "balanced" vs "balanced-no-pstate" proposed by tuned
yeah epp stuff is non-op on acpi-cpufreq
the balanced-no-pstate is a hotfix for acpi-cpufreq so schedutil is used and not conservative
on a proper pstate scheduler you're making full use of epp
tuned got that before PPD and they're just playing catch up now that they're no longer abandoned
Can you please stop spreading this kind of FUD
when you fix the suspend issue on the go and ally with 45-2
Let's lay off the comments on Chimera, not worth upsetting a sibling project. We've had bugs they didn't before too
If there's a fault I'd rather 100% of our resources go to learning the fault and fixing it AOT
i try not to mention anything on it anymore
Thank you
I think both are cool, chimera is much lighter for the zero, rpm-ostree takes forever to complete on the loki zero, just adding a kargs is a pain in the ass if I'm honest. But he's not wrong, without functional sleep mode a linux handheld is not really useful. Still as I always say, if you want x feature to be baked in or fixed, help yourself instead of complaining ๐
I am not pretending Chimera is perfect. Just that we are playing in the same sandbox, no need to be mean to each other.
of course, I have nothing against the project and especially not you โค๏ธ
1. make your own thread
2. documentation
Universal Blue
Bazzite Documentation
[Bazzite_Documentation] General FAQ Installation Guide Gaming Guide Contributing to Bazzite Software Installing and Managing Applications Waydroid Setup Guide Updates, Rollbacks, & Rebasing Quirks, Desktop Environment Tweaks, & Miscellaneous Topics Steam Gaming Mode Handheld Wiki Information on Steam Deck, Handheld, & HTPC Images (Gaming M...