libera/#maemo-leste/ Friday, 2025-05-30

sicelohttps://github.com/maemo-leste-extras/simple-brightness-applet ... just needs to be imported to daedalus. want to give that a go? :-)00:00
dsc_I'd like to register Qt widgets in the status bar00:00
dsc_that would be nice ;p00:00
siceloe.g. widget for what functionality?00:00
dsc_oh, just for whatever custom thing I personally want to build (not for inclusion into maemo)00:02
dsc_well, perhaps a weather status widget00:02
siceloalthough i think atm all widgets (status and desktop) are gtk00:03
kiva14Is there any "hello world" programming tutorials for widgets?00:05
sicelothere should be, on wiki.maemo.org00:06
sicelohttps://wiki.maemo.org/Using_Fremantle_widgets00:07
kiva14thanks..I found also this: http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets00:17
kiva14this is not related to widgets, but there is real "hello world" for Maemo 4.x: http://maemo.org/maemo_training_material/maemo4.x/html/maemo_Getting_Started_Chinook/Chapter_03_Testing_the_installation.html00:30
kiva14It would be nice that have for Maemo Leste to lower starting to Leste programing.00:32
dsc_I debugged mce, it actually ranges from 624 to 312400:35
dsc_but the fade is quite slow, so I assumed it was not working00:35
kiva14fade is slow, because as you see in source it change with -1.00:37
dsc_kiva14: ? :P00:38
kiva14look under where was that something * something /100 (if I looked right when somebody put link about it.00:40
dsc_I put a breakpoint here: https://git.maemo.org/leste/mce/src/branch/master/src/modules/display.c#L25900:41
dsc_new_brightness = 624 - 3124 (depending on what you clicked in the GUI)00:41
dsc_it goes into the fade: https://git.maemo.org/leste/mce/src/branch/master/src/modules/display.c#L16800:41
dsc_which seems to be 10 seconds?00:41
dsc_testing it now00:42
kiva14line 24900:42
kiva14I am not c++ programmer, but if I can read that code, that makes fadings from old value to new00:43
dsc_looks like an early exit to not fade twice with the same value?00:43
kiva14ah you are right00:44
kiva14Pinephone might have hardware fading.00:48
kiva14or maybe not..line 187 :  brightness_fade_steplength = 2;00:49
dsc_step_time is the timeout for a callback (a function call) https://git.maemo.org/leste/mce/src/branch/master/src/modules/display.c#L15600:49
dsc_which then writes to a file https://git.maemo.org/leste/mce/src/branch/master/src/modules/display.c#L12400:50
dsc_so when our step_time is 1000:50
dsc_and we have 4 steps to go from 1 to 400:50
dsc_it takes 40 seconds?00:50
dsc_to fade00:50
dsc_probably not00:50
dsc_idk, im just looking how this works00:50
dsc_well, 3 steps in that case00:51
dsc_g_timeout_add(interval00:52
dsc_"The interval given is in terms of monotonic time, not wall clock time. See g_get_monotonic_time()."00:52
dsc_??00:52
dsc_thx glib00:52
sicelomce supports hardware fading only on the N90000:54
kiva14actually that fading time is not problem, because if steps for Pinephone would be 1, 800, 1600, 2400 and 3124 then change is more visible.00:55
siceloscratch that ... this is not LED :-)00:56
* sicelo should been long asleep anyway00:57
dsc_yeah, it just writes to /sys/class/backlight/backlight/brightness00:57
dsc_but it does so too slow00:57
Wizzupyeah the steps seem to be the problem no?00:58
dsc_yes00:59
kiva14no if write to sys/class/ 3124 and then 1 it change instantly.01:00
dsc_I have step_time "1" now, its faster, but I want to understand what it is :D01:00
dsc_its the interval to g_timeout_add01:00
dsc_but I dont think its milliseconds01:00
dsc_anyway01:00
siceloanother solution would be to define the steps in an mce key, since, after all, there may be devices where the linearity (or visibility) of the change cannot be expressed in an easy formula (e.g. 20%, as we seem to have it)01:01
dsc_yeah01:01
sicelotimeout_add is ms01:02
kiva14if ask me Pinephone does not have linear brigness value.01:03
dsc_ok ye01:03
sicelolinear wasn't the correct word actually, but my English fails me :-)01:03
kiva14:)01:04
dsc_with step_time=1, from step 1 (brightness 624) it executed that callback 1251 times, and 624+(1251*2) = 312601:04
dsc_(from step 1 to full brightness)01:04
dsc_and thats correct because01:05
dsc_static gint brightness_fade_steplength = 2;01:05
dsc_k01:05
Wizzupsicelo: too bad mainline doesn't offer another more simple interface01:05
dsc_ahh ok, so the step length should be dynamic/related to the overall size01:07
dsc_then we'll fix it, regardless of step_time01:07
dsc_because I dont like firing a function every 1ms01:07
Wizzupit's non-linear01:07
dsc_but like sicelo said, maybe better to hardcode some stuff01:07
kiva14But anyway we (who we?) should only change step1 value from 624 to 1...get full brightness control. Value one is enough bright.01:08
dsc_yeah but going from 624 to 3126 is not linear, im just talking about fixing the duration bug01:08
dsc_i mean01:08
dsc_ok this is becoming chaotic01:09
dsc_but what I mean is, going from 624 to 3126 is linear01:09
Wizzuphas anyone tried using brightnessctl?01:09
Wizzupbrightnessctl s 40% (or whatever) seems to do the right thing01:09
siceloon maemo? no. i use it on my laptop01:09
Wizzupit's available in daedalus01:09
Wizzupcould we just call it for 20/40/60/80/100% ? :D01:10
dsc_easy fix is making step length take into account the overall size of the total length01:10
siceloi am not fully sure yet what's the problem with what we already have btw, haha. we calculate the values wrong? or the issue is the fading?01:10
kiva14but 1/40/60/80/100 would be better.01:10
Wizzupdsc_: that doesn't work with non-linear doesn't it?01:11
dsc_Wizzup: there is a callback (function call) which increments a number to a target value, the bigger the number, the longer it takes to get there (because the increments are static (2))01:11
sicelokiva14: it's not so simple. some devices may have a very big difference in brightness for that 40% :-)01:11
dsc_I can make it call the function more often (decrease step_time) but this is a hack01:11
Wizzupok yeah whatever the smooth thing is should just never run for more than a second01:12
siceloe.g. Droid 4 max_brightness is 7 :-)01:12
dsc_so the easy fix is to make the increments related to how big the change is01:12
Wizzupto me the bigger problem seems mce not supporting non-linear backlights01:12
kiva14sicelo: conditional compile for Pinephone? Or 1/25/50/75/100? or more steps?01:13
kiva14If ask me more steps.01:14
sicelokiva14: that's why i think easiest/safest 'cheat' is a key in mce. it can be per device (leste-config-<device>).01:14
dsc_do you have a droid, i'd like to see max_brightness there01:15
siceloit's 7 :-)01:15
dsc_I'm guessing its not a high number01:15
dsc_right, thats why it goes fast there xD01:15
kiva14sicelo: it would be good. And more steps ;)01:16
siceloi totally agree that the increment shouldn't be static ... it should be derived from the whole range01:16
sicelothat way if the range is large, some values are skipped01:16
dsc_right01:17
dsc_ill change it01:17
kiva14So if add one step to UI then Droid would have all values (I assume that 0 is off), one step more would be good also for Pinephone 1/20/40/60/80/10001:22
kiva14that was in persent, not real values.01:23
dsc_if the increments are 2, and max brightness is 7 on droid, was it ever fully 100% :P01:35
dsc_depends on the starting point I guess01:35
dsc_https://git.maemo.org/leste/mce/pulls/6602:11
dsc_https://git.maemo.org/leste/status-area-applet-battery/pulls/1102:19
inkykiva the app was fcamera. and it brought custom camera drivers.02:49
freemangordonWizzup: https://github.com/cisco/libsrtp/pull/75707:35
kivadsc_: so six step with pre defined values and predefined fade value would one solution and another solution would be stepless bar and fade speed value calculated from how many values are for use.09:18
kivainky: yes fcamera was that app.09:18
siceloBlessN900 was also a thing, and worked the same way09:19
kivaDo I remember right Bless900 used fcamera driver?09:21
siceloiirc yes09:21
kivaSo Bless900 for Leste?09:23
sicelothe fcamera drivers are not available for use with mainline09:25
kivabut source is?09:26
sicelodsc_: left review on the status-area-applet-battery MR10:20
dsc_sicelo: ty10:51
Wizzupfreemangordon: great, ty10:54
dsc_my pinephone survived the night without power13:05
dsc_from 90% to 20%13:05
dsc_wifi disabled, with conversations13:05
Wizzupyou can also use loginctl suspend to s2r13:17
Wizzupwith the right setup the modem will wake it up if there is a call/sms, but we never tried to do that yet13:17
dsc_Wizzup: preferably this suspend thing is an option in the dropdown menu that happens when you press the physical power button13:28
dsc_however, since its all gtk I'm not particularly motivated to look at that13:29
dsc_ill try suspend though13:29
dsc_Wizzup: what email client do you use on Leste13:31
Wizzupmodest, the built in13:33
Wizzupdsc_: no probably suspend would happen automatically once we have inhibitor locks or some kind13:33
dsc_alright13:41
freemangordondsc_: actually it is xml and dbus17:21
freemangordondsc_: https://git.maemo.org/leste/osso-systemui-powerkeymenu/src/branch/master/systemui.xml17:31
dsc_do I understand correctly we need a mechanism to auto-suspend when the screen has been blanked for X amount of time?17:31
freemangordonI meant that you can easily add button in powerkey menu17:32
freemangordonI am not sure we shoud auto-suspend17:32
freemangordon*should17:32
dsc_ok17:32
freemangordonmaybe someone can run AI on that repo and ask it to generate documentation17:32
dsc_freemangordon: btw, now that you are here17:33
dsc_Qt apps with QtQuick scenes seem to render at 25 fps for me, and with QT_QUICK_BACKEND=software, it renders at 125fps17:34
dsc_this GPU rendering also seems to introduce some stuttering at times17:34
dsc_do you think this is Lima or our Qt maemo integration?17:34
freemangordonmost-probably it is HW sync17:35
dsc_(this 125fps I dont understand btw, because QML scenes are vsync'd, and pinephone refresh rate is not 125fps)17:35
dsc_(but probably due to how I measure things)17:35
Wizzupfreemangordon: dsc_: no, I don't think we want a human triggered s2r and I also don't think we should want that in general unless we have the right wake up in place and also the proper inhibit suspend locks17:35
Wizzupdsc_: there is a mesa env var for vblank override17:36
dsc_yes I found it17:36
freemangordondsc_: OTOH https://talk.maemo.org/showthread.php?t=5573417:36
dsc_I tried vblank_mode=0 IIRC17:36
freemangordonWizzup: I didn't say we shall add such entry for everyone, it is for dsc_ to experiment if wants17:37
dsc_yes, thanks :)17:37
freemangordonBTW it is chatgpt that pointed me to that link :D17:37
dsc_freemangordon: what do you mean with HW sync btw17:38
freemangordonvsync17:38
freemangordondo we know what is panel refresh rate? or it is cmdmode panel?17:38
dsc_60hz it seems17:39
freemangordondsc_: could you run glmark2 to see what it will show?17:39
freemangordonglmark-es2 that is17:39
freemangordonmaybe you should have to build it from the repo17:39
dsc_well, my issue with glmark2/glxgears is that it starts in landscape mode, which is laggy by default (on pinephone)17:39
dsc_(even with orientation lock)17:39
freemangordonno way17:40
freemangordonwhy would it rotate?17:40
freemangordonalso, I guess you can force-rotate h-d17:40
dsc_I think it rotates because the application window has not communicated it supports potrait17:40
dsc_(but thats just guessing)17:41
freemangordonI see17:41
freemangordonyou can force-rotate through h-d.ini17:41
freemangordondsc_: https://git.maemo.org/leste/hildon-desktop/src/branch/master/data/transitions.ini#L23017:41
dsc_ah17:42
freemangordonif you start it via osso-xterm, that may explain it17:42
freemangordonI wonder why is osso-xterm blacklisted17:43
dsc_suppose I need to restart hildon17:43
dsc_how to?17:43
freemangordonhehe https://git.maemo.org/leste/hildon-desktop/commit/2cc7f9ae4bc07f1e9608992ec3a019c043d3564f17:43
dsc_ah just killall17:43
freemangordonkillall hildon-desktop17:43
freemangordonomg 14 years ago17:43
dsc_it still goes into landscape17:44
freemangordonhow do you start it?17:44
dsc_via ssh, and also osso-xterm17:45
freemangordonhmm17:45
dsc_or ehm, "X terminal"17:45
dsc_yes17:45
freemangordondoes ctrl-shift-r work?17:45
freemangordonoh, no keyboard :)17:45
freemangordonsec17:45
dsc_xdotool search --name "glxgears" windowactivate --sync key ctrl+shift+r17:46
dsc_we shall try17:46
dsc_nope17:47
dsc_ctrl-c worked, it closed it :P17:47
dsc_oh wait17:47
freemangordonno, you should send that to h-d17:47
dsc_it magically rotated after ctrl-c17:47
freemangordonor h-h17:48
freemangordonyeah, to h-d17:48
freemangordontry:17:48
freemangordondbus-send --system --type=signal /com/nokia/mce/signal com.nokia.mce.signal.sig_device_orientation_ind string:'portrait'17:48
dsc_xdotool search --name "glxgears" windowactivate --sync key ctrl+shift+r17:48
dsc_^-- this works, just need to "alt-tab" it17:48
freemangordonok17:48
dsc_ok so, 45fps in portrait17:49
dsc_17fps in landscape17:49
dsc_the landscape is expected (on pinephone)17:49
freemangordonmhm17:49
dsc_but I think 45fps is too slow17:49
freemangordonit is17:49
freemangordond4 does ~ 80 on glmark2-es217:49
dsc_do you want me to look with renderdoc17:50
freemangordonyou run glmark2-es2, right?17:50
dsc_no glxgears17:50
dsc_ill try glmark217:50
freemangordonno, forget about glxgears17:50
freemangordonyes, do glmark-es217:50
freemangordonkeep in mind mail400 is not the best gpu around :)17:50
freemangordonhmm, I shall run glmark on my tabletg17:51
dsc_well yeah17:51
freemangordonnot now though, have to do some cooking, bbl17:51
dsc_I see a horse and a box, they render at ~45fps17:52
dsc_yeah its not smooth17:52
dsc_glmark2-es same story17:56
Wizzupfreemangordon: pinephone has a higher res than most of our devices17:58
Wizzupimo portait performance is more than acceptable for me in the pp17:59
dsc_portrait works great, very smooth17:59
dsc_(hildon, that is)17:59
freemangordonWizzup: sure, portrait perf is ok17:59
freemangordon45fps *is* ok18:00
freemangordonbut, this is what n900 does :)18:00
freemangordonor even more18:00
Wizzupnot at 720p :p18:00
dsc_its the irregular stalls that bother me, which is prevalent when scrolling through lists @ QtQuick18:01
freemangordonIIRC glmark score on n900 is 36 or somesuch18:01
Wizzupr w/e the res is18:01
Wizzuppp is 1440x72018:01
freemangordonso?18:01
Wizzupthe n900 fits in that almost four times18:01
freemangordonso? it is still the same fps18:01
freemangordonno matter the reasons :)18:01
Wizzupsure18:01
dsc_i dont understand how hildon can be so smooth, but a very simple QML scene renders at 25fps18:02
freemangordonhildon is optimised18:02
dsc_i think hildon runs at a locked 60hz18:03
dsc_it feels really smooth18:03
freemangordonalso, are you sure you don;t use qwidget?18:03
dsc_I made a test QML program with a moving rectangle + fps counter18:03
dsc_https://git.maemo.org/sanderfoobar/qt5-qml-fps218:03
freemangordonif you embed qml (so qgraphicsscene or something like that) in qwidget, then you kill the perf because it has to do readback18:04
dsc_yes I do that18:04
dsc_but I also tried the other one, QML as application window18:04
dsc_https://git.maemo.org/sanderfoobar/qt5-qml-fps18:04
dsc_https://git.maemo.org/sanderfoobar/qt5-qml-fps2 <== standalone QML18:04
dsc_the first one is QML inside QtWidgets18:04
dsc_first one = 25fps, 2nd one is ~45fps18:05
freemangordonI admit I don't know how qml works18:05
dsc_so you're saying it readsback18:05
dsc_i think thats very likely18:05
freemangordonso, the first one does readback18:05
freemangordonalso, maybe there is something with modesetting driver18:05
freemangordonmaybe it does not do double-buffering18:06
dsc_because QtWidgets is painted via CPU, so if we have a QML scene rendered with the GPU, it will still have a CPU readback18:06
freemangordonthat kills the performance18:06
freemangordonyou should do everything on GPU18:07
freemangordonkeep in mind mali is tiled GPU18:07
freemangordon(also)18:07
dsc_with Qt6 I can render to an OpenGL texture and do something with that18:07
dsc_(i am already very familiar with that offscreen Qt6 stuff)18:07
dsc_they introduced a new system called RHI18:08
dsc_I am using it for https://godotwebview.com/18:08
freemangordonso, glReadPixels is your enemy (as is glFlush())\18:08
freemangordonwe have qt6 in maemo18:08
freemangordonafaik18:08
* freemangordon is back to cooking18:08
dsc_suppose renderdoc will show those calls18:09
dsc_I should check18:09
freemangordondsc_: rendering to texture does not hlp much if you want CPU to access it18:12
dsc_why should the CPU access it?18:12
freemangordonit still has to wait fpor rendering to finish so your texture to be ready18:12
dsc_hildon can just show a texture or no?18:13
dsc_:p18:13
dsc_or ehm, QtWidgets will have a QOpenGLWidget18:13
dsc_(but then perhaps we'll have the same issue)18:14
dsc_anyway, not important now18:15
dsc_side-note: QT_QUICK_BACKEND=software also feels faster in the VM18:16
freemangordonfeels?18:33
freemangordonstart h-d with G_MESSAGES_DEBUG=all CLUTTER_SHOW_FPS=118:33
dsc_freemangordon: is there a way to drop into a shell with a key combination for the VM18:38
dsc_SSH not working anymore, and hildon-desktop partially came up it seems18:38
dsc_nvm, Ill mount the qcow2 disk to fix the VM18:39
dsc_how do you start hildon-desktop with such env. vars?18:39
dsc_ah, /etc/X11/Xsession.post/20hildon-desktop18:45
dsc_idk where FPS ends up, I tried searching18:55
dsc_or logs in general18:55
dsc_ETA systemd :P18:55
freemangordondsc_: from ssh, stop h-d (with dsmetool) and then just start it from there18:58
dsc_pinephone+leste works pretty well must say20:33
dsc_im going to install postmarketOS and see what they are up to20:33
siceloyou'll need to decide on a UI :-)20:34
siceloforget Plasma ... it's painful on the pinephone20:35
siceloat least that's the general opinion. it does work though20:35
siceloon pp the winner is sxmo, or if you want something more conventional, Phosh20:36
dsc_ok, ill try sxmo :)20:36
sicelohaha, someone won't touch gtk with a ten-foot pole :p20:46
dsc_sicelo: hey, im using Ubuntu on my desktop :)20:47
sicelomy problem with sxmo is that it causes nearly 100% constant cpu load on N900. yes N900 is super weak, but it runs Leste without issues. So I guess/assume that whatever is killing the N900 will be killing beefier devices too (just it won't be obvious)20:51
dsc_sicelo: but seriously, I kind of skipped this whole Pinephone stuff past 5 years, people are complaining about things etc. but when I try Leste right now, I mean it works pretty good \o/20:52
dsc_maybe I am easily impressed, this is why I want to try other distros20:53
dsc_to see whats the status there20:54
siceloPP is great device, I think :-)20:54
dsc_yes20:54
siceloi guess people are just more used to Android/iOS20:54
Wizzupdsc_: don't forget that leste works smooth on the PP where most Oses do not20:55
Wizzupsxmo might, but phosh and plasme are pretty slow on it20:55
sicelobtw gtk is dropping gles2 support, worsening the PP's woes21:07
dsc_yes I read about it21:09
Wizzupsicelo: gtk4 or what?21:37
Wizzupsicelo: dpesm21:37
Wizzupsicelo: doesn't lima support opengl?21:37
Wizzupbut yeah gnome folks will do gnome things, they also plan to drop X no :)21:37
dsc_no its the hardware, mali 40021:37
Wizzupdsc_: are you sure?21:37
dsc_this GPU cannot support opengl3 because its missing some features21:37
dsc_yes21:37
WizzupI didn't see anyone say opengl321:38
WizzupI just saw opengl :)21:38
dsc_https://docs.mesa3d.org/drivers/lima.html#faq21:38
dsc_but fear not, there is now https://github.com/kkofler/gtk :P21:39
Wizzuppretty sure lima exposes opengl 2.o021:39
dsc_yes it does, but gtk4 went to opengl / es 3.021:40
Wizzupthat'd dumb21:40
Wizzupthat's dumb21:40
dsc_they did it though21:40
dsc_:p21:40
dsc_they killed the pp!21:40
Wizzupbeing dumb hasn't stopped gnome before :D21:40
dsc_(and quite a large amount of devices tbh)21:41
WizzupOpenGL version string: 2.1 Mesa 22.3.621:41
Wizzup(PP)21:41
dsc_yup21:42
Wizzupback in an hour or so21:42

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!