libera/#maemo-leste/ Tuesday, 2022-01-11

Wizzuphuckg: did you manage with the bionic?00:00
huckgI ran down my battery and couldn't charge it because of the banjaxed state of my attempted install.00:01
huckgI found a bionic for $6US on ebay, today I put a charge on my battery and successfully completed step 10 of https://github.com/IMbackK/bionic-clown-boot readme.00:02
huckg(putting the charged battery in my old bionic). But upon rebooting it still gets stuck on a screen with 2 tux penguins at the top.00:04
uvoshuckg: how long is it "stuck"?00:04
uvoswhat hash of droid4-kexecboot.img did you use?00:05
huckgsha256sum 01803c63d7f0f7dcf7e101f4a136b76c9aae5885ed458259169c93b1c656326200:06
huckgI suppose I only left it 'stuck' for maybe 5 minutes00:07
uvosno thats to long00:07
huckglet me actually time it...00:07
uvosyour sure that you flashed that bpsw and this went of without a hitch?00:08
huckgSending 'bpsw' (156 KB)                            OKAY [  0.053s]00:08
huckgWriting 'bpsw'                                     OKAY [  0.340s]00:08
uvos156KB?00:08
uvosthas wrong00:08
uvosshould be 4MB in size00:09
uvossha256sum maemo-leste-1.0-armhf-droid4-20220104.img00:10
uvos6f5fbf8d45de13bac86e90848ff9017051b87682b359aee7d682d97c386032cf00:10
uvossomethings wrong with the downloaded image00:10
huckgoh, that's interesting00:10
uvoshttps://github.com/tmlind/droid4-kexecboot/blob/master/2021-01-28/droid4-kexecboot.img00:10
huckgOh yeah I filed a bug report on the mismatch of the sha256sum under issues there00:13
huckg8 days ago00:14
huckgshould I try again with an earlier version?00:14
uvosthat vession should work00:15
uvosand that sha256sum00:15
uvosis not from the file there00:15
uvosi just generated it form my local copy00:15
uvoswich works fine00:15
uvosbut yeah no idea about the mismatch with tmlinds hash00:16
uvostmlind: ^^^ could you look at this?00:16
huckgI got it from here: https://github.com/tmlind/droid4-kexecboot/tree/master/2021-01-2800:17
huckgwas that just some kind of patch rather than the whole enchilada?00:17
uvosno00:17
uvoshuckg: same here i cloned that repo00:17
uvosand i get the above hash00:17
uvosand this file works fine on my bionic00:18
uvosso everything is fine besides the hash in the text file00:18
uvosbut your file is only 156KB in size and has a 3rd hash00:18
huckgweird00:18
uvosso clone the repo00:19
uvosand use the file you get00:19
huckgwill try that and get back to you in a few minutes, thanks.00:20
huckgIt looks like what I previously downloaded was the webpage about droid4-kexecboot.img!00:33
Wizzupyikes00:35
uvosheh00:36
uvoswell at least the bspw partition can read about what it should contain :P00:36
huckgNow do I just flash the actual file to bpsw or do I need to undo anything first?00:37
uvosnah just flash over00:37
huckgok, now flash reboot?00:38
uvosyes00:39
huckg(I mean fastboot reboot)00:41
uvossure00:41
huckga screen briefly came up with some text, now I am looking at a black screen00:42
huckg...with a cursor00:43
huckgoops, I forgot to put my sdcard back in!00:44
uvosso you should get the motorola logo -> penguins -> a graphical menu with some text -> sort timeout -> boots whatever entry is selected00:46
huckgbooting!00:47
uvosdont try to boot the safestrap and stock android entry00:48
uvosthat dosent work on bionic00:48
uvosi have a patch for that but its not in this version yet00:48
huckglooking at maemo-leste!00:49
huckgThanks a million! It is now charging in maemo (very old battery).00:53
Wizzuprafael2k: looks like the built image doesn't boot00:53
uvoshuckg: yw, sucks about the convoluted install process00:56
uvoshuckg: locked bootloaders suck00:56
Wizzuprafael2k: also, what hw dev do you have?01:00
Wizzuprafael2k: hw rev*01:00
huckgMaybe I could write an idiot's guide, I seem to be well qualified.01:00
Wizzup:)01:01
Wizzuprafael2k: I get:01:05
Wizzup[    4.380262] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,770): error -1901:05
Wizzup[    4.388491] Please append a correct "root=" boot option; here are the available partitions:01:05
Wizzuprafael2k: I can't make sense of this01:11
Wizzup-19 is ENODEV?01:12
Wizzupso what, EXT4 is enabled or something?01:15
Wizzup+CONFIG_EXT3_FS=y01:15
Wizzup+CONFIG_EXT4_FS_POSIX_ACL=y01:15
Wizzup..01:15
Wizzupoh they make it a module later on...01:16
Wizzupcan we just go back to our config? :(01:17
huckgDo I run expandcard.sh01:26
huckg?01:26
Wizzuphuckg: yeah01:26
huckgresize2fs: not found01:32
Wizzupuhh01:33
huckgalso partprobe and fdkisk not found. First I did su and used toor as password.01:35
Wizzupdoes /sbin/resize2fs exist01:37
huckgthen cd /etc and ./expandcard.sh01:37
WizzupI usually run /etc/expandcard.sh but it probably does not matter01:37
huckgall of those are in /sbin01:38
WizzupSo you got 'resize2fs: not found' when running the script as root?01:39
WizzupI guess so, it checks if it is run as root or not01:39
Wizzuphow did you do su?01:40
Wizzuptry 'su -'01:40
Wizzupor just use 'sudo -i'01:40
Wizzuphuckg: yeah that's it I think01:40
huckgsimply 'su' no hyphen01:41
Wizzupyes, that seems to not set the correct $PATH01:41
Wizzupthe other two options as laid about work01:41
Wizzuplaid out above*01:41
huckgok, did that, it seemed to work, now device is unresponsive01:45
huckgon reboot stuck on KEXECBOOT screen, doesn't respond01:50
WizzupI think there is an occasional hang in kexecboot where it doesn't work01:52
Wizzuppower + volume min resets01:52
Wizzup(hold it)01:52
WizzupI don't know why it happens on bionic, I don't have it on the droid3 kexecboot01:52
huckgok, second reboot working01:52
Wizzupbtw, there's a lot of good stuff coming to stable updates soon :)01:53
Wizzupmuch faster 2d01:53
huckghappy to be your guinea pig.01:53
Wizzup:)01:59
Wizzupfew days01:59
Wizzupweird kernel build was much faster now03:06
tmlindfreemangordon: so based on my initial quick hacks looks like adding int drm_fd to the end of struct _dbm_device and opening and using it instead of the render node for buffer allocation the related wlroots hacks can be dropped :)07:28
tmlindso drm_fd is looked up with drmGetPrimaryDeviceNameFromFd(dev->fd)07:28
tmlindmaybe this issue also goes away with your planned buffer changes?07:29
tmlindso the issue is that some operations are not allowed for the render nodes07:30
tmlindanyways, will tinker more with it tonight07:31
freemangordontmlind: I don;t know how those render nodes are supposed to work, so no idea if it will help07:41
freemangordonbut, basically I plan to move to omap GEM buffers from DUMB biffers07:41
freemangordonthat will allow me to set TILER flag on scanout buffers, which in turn shall allow setting "rotation" property on the relevant planes07:42
rafael2kWizzup: kernel works, not only me using, but all mobian users...07:43
rafael2kWizzup: did you copy over the new dtbs? btw, my pp is the 1.2 hw rev07:44
rafael2kmorning!07:44
freemangordonrafael2k: morning!07:45
freemangordontmlind: also, if we move to gbm BOs in omap DDX it may turn out that "export non-linear buffers" patch is not needed as it seems pvr_dri_support allocates directly from pvr driver for non-scanout buffers07:47
freemangordontmlind: oh, and libdbm from ddk 1.9 is using omap_bo functions, I wonder why did they moved to dumb buffers later on07:50
tmlindfreemangordon: no idea, but why do we even need libdbm? why not do this directly in mesa?07:55
freemangordonbecause of the closed pvr_dri_support blob which calls into this07:56
tmlinduhh07:56
freemangordon:)07:56
tmlindanyways, looks like the nastiest wlroots hack can be dropped with some libdm changes :)07:58
tmlindi'm now seeing display not come back up after blanking though, not sure if my changes somehow caused that07:59
freemangordonmake sure to pull latest code as I fixed a nasty use-after-free bug I introduced with REing08:00
tmlindok, need to go now, bbl08:00
freemangordonbbl08:00
rafael2kI realize the new pp kernel is already in the repo!09:56
rafael2kok, initrd was not created after new kernel installed (through apt-get upgrade)10:03
rafael2kand yes! 5.15.10 from the repo boots fine! yay!10:06
rafael2kbut the initrd not being automagically created and copyed to correct path needs to be fixed10:07
rafael2kI don't really know what happened in the recent batch of maemo updates, but I'm getting a strange 3G icon instead of 4G10:11
rafael2kand no strenght bars10:12
rafael2kLinux devuan-pinephone 5.15.10 #1 SMP Tue Jan 11 00:53:27 UTC 2022 aarch64 GNU/Linu10:13
rafael2k; )10:13
rafael2kbut the kernel seems all good10:14
rafael2kso now we have telephony back to PP! with new ofono, also voice calls!10:19
uvosWizzup: bionic dossent reboot with the power+vol key presses10:59
uvosWizzup: none of the mapphones older than xt894 do this10:59
rafael2kbtw, forget about the telephony icon - it all works great in latest kernel - I just was in a place without signal...11:21
uvoswe dont use initramfs btw11:22
rafael2kI use11:22
rafael2k:P11:22
uvosso nessecary modules have to be built in11:22
uvosyeah thats why its broken11:22
uvosyou added a kernel config11:23
uvosthat dosent have enough modules to mount the fs11:23
rafael2ksure11:23
uvosand work around it with initramfs11:23
rafael2kinitramfs has all the modules to boot11:23
rafael2kthis is why it exists in the first place...11:23
rafael2kwhy no initd, btw?11:24
uvosthis makes sense on x86 pcs11:24
uvoswhere you have one kernel for very different hw11:24
uvosso a image with all the modules needed to get to mounting the fs is large11:24
rafael2kthis is the idea for arm too11:24
rafael2kwith device trees, dtbs and so on11:24
uvoswith a kernel that only works for one device anyhow its not needed11:24
rafael2kthere are many reasons of why to use a kernel module, but anyway, got it11:25
rafael2kso some modules need to be sneaked in with 'y'11:26
uvosyes11:26
Wizzupuvos: oh11:26
rafael2kand I'll need to update my boot.txt11:26
Wizzuprafael2k: we do not have an initrd in our package, which is why the previous kernel failed11:27
Wizzuprafael2k: it must work without initrd or we need to make initrd11:27
rafael2kdid not failed for me :P11:27
Wizzupyes because I rebuilt and fixed the package so that EXT4 is built in11:27
Wizzupit was a module and therefore my pinephone can't mount its rootfs atm11:27
rafael2knope, I just created an initrd11:27
Wizzupthat's not the point11:28
rafael2kanyway, easy pizzy11:28
Wizzup'apt dist-upgrade' gives nobody an initrd on leste11:28
rafael2kI did not know that, sorrio11:28
Wizzupso any upgrade will break if the required modules aren't built in11:28
Wizzupdoes the current kernel package work without initrd for you?11:28
Wizzup(M iade ext4 built in)11:28
WizzupI made*11:28
rafael2kI dunno, I was always creating an initrd11:28
rafael2kbut it is not only ext4 right?11:29
rafael2khow would one use use a luks root fs this?11:29
rafael2kthen you would need crypto stuff too, md stuff, and so on11:30
WizzupI don't know what else besides ext4 is required to boot11:30
Wizzupluks is always done with an initrd11:30
rafael2kit depends on the use case11:30
WizzupI am not -against- an inird but we never needed it up to this point, and ext4 being a module is not a good reason11:30
Wizzupof course when we add luks support, we will need them11:30
rafael2kok, I don't really see the point in not truggering update-initrd after a kernel upgrade11:30
rafael2kbut it is an easy change anyway11:31
Wizzupare those scripts even installed in leste pp?11:31
rafael2kI'd like to see my root fs ciphered soon11:31
rafael2kyes11:31
WizzupI am not so sure they are on mine, because I don't think an initrd was made11:31
uvosnon11:31
uvosno they arnt11:31
Wizzupyou probably just did something to your image to get it rafael2k11:32
rafael2klemme see the packages11:32
rafael2kno11:32
rafael2kall from the repo11:32
Wizzupour repo is debian :)11:32
rafael2kmy system is clean11:32
rafael2kyeap11:32
Wizzupinitrd will require us to think a lot of things through that we're not really ready for I think, so we've been postponing that until we really need it11:33
rafael2kinitramfs-tools initramfs-tools-core cryptsetup cryptsetup-initramfs11:33
rafael2kwith this I have luks up and running11:34
Wizzupok, but this is not installed by default11:34
rafael2kbut it could, right? in case we want to add security as an option11:35
Wizzup11:33 < Wizzup> initrd will require us to think a lot of things through that we're not really ready for I think, so we've been postponing that until we really need it11:35
rafael2kwhich things exactly?11:35
Wizzuplet's see "can we do luks" separate from "get proper pine64 kernel"11:35
rafael2ksure!!11:35
rafael2kand one step of the other11:35
rafael2k; )11:35
WizzupI am pulling the new image now on a fresh image with -devel added11:36
Wizzuplet's see if I get an initrd11:36
rafael2kI can test here too11:36
rafael2kwithout any manual intervention11:36
Wizzupthe thing with luks and initrd is that we might even want some ui in there, touchscreen, on screen keyboard to enter unlock codes, etc11:37
Wizzupand we also need to think about alarms, other stuff11:37
Wizzupso I doubt it'll be as simple as installing 'cryptsetup-initramfs'11:37
Wizzupalso we have various modes we (can) boot to like recovery mode with on screen keyboard11:37
rafael2know with hardware keyboard in the pine, already supported by the kernel...11:37
WizzupI don't have a hw keyboard for mine yet, and our general solution should work for devices without hw keyboard11:38
Wizzup(mine is being shipped, but yeah)11:38
rafael2kif you want luks, find yourself a keyboard, or copy the initd from postmarket OS (which has on-screen keyboard and so on to unlock luks rootfs)11:38
Wizzupno, I want luks the proper way :P11:38
Wizzupthat was not the point11:39
rafael2kthe standard way is the proper way11:39
rafael2k:P11:39
bencohwait, what would be the proper way?11:39
rafael2kyeap11:39
Wizzupwell then I guess you can run xfce on your phone and hope for the best :P11:39
rafael2kluks is support for long time in debian, I just for decades11:40
rafael2kit works fine as it11:40
rafael2k*as is11:40
WizzupI think we are miscommunication very often11:40
bencohWizzup: how do you expect it to boot with a luksed rootfs and no initrd?11:40
Wizzupbencoh: I did not say that11:40
bencohI thought so as well, but then ... what's the proper way? (or rather, what isn't the proper way?)11:41
Wizzuprafael2k: I am not questioning how well luks works in debian, I am saying that I don't think a tty and 'use hw keyboard' is a good way, some on screen keyboard is required, and probably way more integration11:41
Wizzuprafael2k: so whether and how debian supports it is not super relevant, debian is built for servers11:41
Wizzupbencoh: well clearly with initrd, but not just 'oh copy this initrd from source X' :)11:41
bencohah :)11:41
bencohI wonder if a framebuffer app would cut it11:42
Wizzuphow would maemo alarm work?11:42
rafael2kWizzup: Debian is built for server? Did not know that. :P11:43
bencohWizzup: ah, right11:43
rafael2kbtw, I can work in copying over the on-screen keyboard from PmOS11:43
Wizzuprafael2k: still kernel does not boot for me11:43
bencohmeaning we'd need a fullblown xorg-capable initrd anyway11:43
rafael2kwhen we have the more urgent stuff settle down11:43
Wizzupbencoh: yes11:43
bencoh(not just xorg-capable, but hildon-capable)11:43
bencohsounds like a lot tbh11:43
Wizzupbencoh: well there are other things we can do, but these are things to consider when I say "I want luks the proper way"11:44
bencohyeah11:44
rafael2kbencoh: x on initrd? no11:44
Wizzuplayman translation would be "I don't want to miss my flight because my phone was stuck in on screen keyboard to unlock my luks partition and thus could not make an alarm sound"11:44
bencoh:]11:44
Wizzuprafael2k: ok now both my pinephone sd cards are bricked wrt kernel11:45
rafael2kWizzup: you need to light a candle11:45
Wizzupwe could have the pinephone use debian initrd I suppose, but it could get in the way of many things11:45
Wizzuplike probably it will come with systemd in the initrd11:45
rafael2kI don't really get this maemo stack part11:45
bencoheither that, or add a tiny framebuffer-only alarm app for actdead/alarm-mode11:45
Wizzupthat can mess up things for us11:45
rafael2kwhat is this alarm thing you are talking about?11:46
uvosrafael2k: phone is off11:46
uvosrafael2k: alarm fires11:46
uvosrafael2k: what happens?11:46
uvosrafael2k: phone is off11:46
bencoh(alarm, as in, wakeup-wakeup-time-to-wakeup)11:46
uvosrafael2k: user plugs in usb charger11:47
uvosrafael2k: what happens?11:47
Wizzuprafael2k: care to send over the initrd you made for the latest kernel pkg11:47
uvosyes replacing the mess of "actdead" with small framebuffer applicatiosn is something imo we need to do11:48
uvosits also what im doing allreay11:48
uvossee charge-mode11:48
Wizzupwell that could work, but there are also other ways to do deal with it11:48
Wizzupthere could also be a (read-only by default, forced by crypto) partition which we boot from11:48
WizzupI think the chromebooks use some dm thing for this - dm verity?11:49
uvosi gues, but the way actdead is implemented its pretty terrible, so reimplementing how it works is a good thing11:49
WizzupI think this is unrelated to how actdead works11:49
uvossure11:49
uvosyou could place small framebuffer application(s) into  readonly rootfs11:50
Wizzuprafael2k: so point is that "phone is not a server and fullfills some other needs that typical initrd does not deal with"11:50
Wizzuprafael2k: could you send me the initrd from your device so that I can maybe rescue one of my devices?11:50
Wizzupuvos: or X if we are lazy and want to re-use code11:50
uvosyes but the curreny code is a huge maintiance bruden because its so bad11:51
uvos(spread over all of the deamons)11:51
uvoswith if(actdead) changing deamon behavior11:51
Wizzupwe don't even have alarms working yet, I think because of pulseaudio setup11:51
WizzupI don't know if it's that bad really, but I haven't looked at it in a while11:52
Wizzupbtw dm-verity: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/verity.html - for any real threat model we'd probably want the key to check against in some hsm but nevermind that11:52
Wizzup(for now)11:53
uvosWizzup: it really is that terrible, so it works by having the entire stack runing, changings its behavior all over the place, this is really bad allready beacuse this means that actdead implementation (a mode that really dosent do mutch at all) is spread over manny manny thousands of lines of code for no reason. then it causes a masive burdon of code in all of these unrelated applications that cant really be tested, because you cant11:57
uvosjust test these codepaths in a single deamons in isolation so you have to spin up actdead on the entire device an poke around, but good luck finding bugs because all of these deamons in freshly untested codepaths interact via dbus so who knows who causes what.11:57
uvosits basicly as bad as the entrie rest of the  system in complexity11:57
uvosfor providing functionality that could be in a 1klock frambuffer application11:58
Wizzupyeah, I'm not saying we should do this for alarm, I mostly do not have a grasp on the complexity of it so will refrain from commenting12:00
uvosnot to even mention the insanity of booting all the way to x with most deamons runing just to display a battery icon12:00
WizzupI think first steps alarm wise is to make sure that our audio setup works the way it expects (with roles) and then see if normal alarms (nevermind 'wake-to-alarm') works12:01
uvosnormal alarms work in the sense that alarm mode is enterd and the alarm shows up12:01
uvosso dose wake to alarm btw12:02
uvosexcept that rtc isent set12:02
uvoseverything else is in place12:02
Wizzupuvos: sounds also don't work12:02
uvos(except  also that it boots to hildon and shows the alarm there ofc)12:02
uvosyes12:02
Wizzupand the vibration doesn't work because the sound doern't work12:02
uvosyes12:02
uvosi mean it goes thrugh the motions mostly12:02
Wizzupright12:02
Wizzupfreemangordon: ftr looks like normal mc places accounts in $HOME/.local/share/telepathy/mission-control/accounts.cfg12:10
Wizzupvs $HOME/.rtcom-accounts on fremantle12:11
WizzupI bet that noia patched mc to read from that dir12:11
Wizzupnokia*12:11
uvosseams like mostly nonsese obfuscation or?12:12
WizzupI wouldn't go so far to say thatr12:13
WizzupI'm just trying to understand who stores what, reads/writes what to where12:13
uvosok12:13
Wizzupthe file format/config is exactly the same, so it looks like just a changed path12:13
Wizzupfremantle also has accounts.cfg in .rtcom-accounts12:13
Wizzupso this means that probably indeed telepathy and mc (mission-control) manage accounts for us, and rtcom doesn't do special things there to 'register' accounts or something12:14
WizzupI mean rtcom clearly does some things in conversations and calls ui, but they don't add accounts to telepathy by parsing .rtcom-accounts/accounts.cfg for example12:14
Wizzupwhich is good to know conceptually12:14
uvossure12:15
rafael2kWizzup: entered in a working meeting - come back soon12:37
Wizzupnp12:38
Wizzupuvos: do you think we're ready to start pushing 5.15 to stable?12:54
WizzupI think there might be -some- issues we haven't run into yet in -devel, but otherwise we're pretty good?12:54
Wizzupfreemangordon: same question to you^12:55
WizzupI suppose I should test one more "download latest image" and try "apt dist-upgrade" to -devel type of action12:55
uvosi hangs often for me13:12
uvosits allways pretty stable @home13:12
uvosas soon as i take it outside it starts rebooting every 10 minutes or so if in use in any way (audio etc)13:12
Wizzupreally?13:13
uvosyeah13:13
Wizzupon the droid4?13:13
uvosyeah13:13
Wizzupinteresting...13:13
WizzupI really haven't seen any resets/hangs for a week+13:13
uvossomething with wlan13:13
Wizzupmaybe longer13:13
Wizzupright, the "microwave bug" :p13:14
uvosif you rmmod it its stable i think13:14
uvosat least stable is13:14
uvos*ish13:14
uvosit still reboots sometimes13:14
uvosbut it dose that @home too13:14
uvosonce every couple of days13:14
rafael2kWizzup: http://abradig.org.br/pinephone/initrd.img-5.15.1013:26
Wizzupdid you also adjust boot.txt?13:28
rafael2kwell, I copy this file to the default initrd image as specified in boot.txt13:30
Wizzupok let me try13:31
rafael2kif you change boot.txt, remember to re-create the boot.scr13:32
rafael2kmkimage -A arm -O linux -T script -C none -a 0 -e 0 -d boot.txt boot.scr13:32
Wizzupso13:32
Wizzup13:30 < rafael2k> well, I copy this file to the default initrd image as specified in boot.txt13:32
Wizzup# ls13:32
Wizzupallwinner  config-5.15.10  lost+found          vmlinuz-5.15.1013:32
Wizzupboot.scr   Image.gz        System.map-5.15.1013:32
Wizzupwhere is this default initrd image?13:32
Wizzup(it is not there in our pinephone images)13:33
rafael2klook at the config13:33
rafael2kif not, just add it13:33
Wizzupalso our boot.scr doesn't contain a reference to an initrd13:33
rafael2kof course it is not... as you just explained me why13:33
rafael2k:P13:33
Wizzupyes, but you said 'I copy this file to the default initrd image as specified in boot.txt'13:33
Wizzupwhich seems to suggest that we already have it in our boot.txt13:34
WizzupI also don't have a boot.txt13:34
Wizzupsee, I am just trying to understand what I need to change to go from "this works for me" to "this works for everyone"13:34
Wizzupso I need to understand the explicit steps :)13:34
Wizzupso what is the option in boot.txt?13:34
rafael2kright13:34
rafael2klemme put my boot.txt:13:34
rafael2kwell... it was not me who removed initrd support from maemo13:35
rafael2k:P13:35
rafael2kbtw, dont you have update-initramfs ?13:36
Wizzupyou're turning the world upside down13:37
Wizzupbefore this new kernel I build we never had an initrd and never needed it13:37
Wizzupso it was not "removed" by me13:37
Wizzuprafael2k: the system doesn't *boot*, how am I supposed to run it13:37
rafael2khttp://abradig.org.br/pinephone/boot.txt13:37
Wizzupty13:37
Wizzupthis is a very different boot.txt from what we ship13:37
rafael2kyou can use just the code from line:13:38
rafael2k  setenv bootargs console=tty0 console=${console} root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4 fbcon=rotate:113:38
rafael2kuntil line:13:38
rafael2k  fi; (the last before the final fi13:38
WizzupI understand13:38
rafael2kbtw, this also can be used as the scheleton for the multi-boot boot.txr13:38
rafael2k*boot.txt13:38
rafael2kedit the boot.txt, and do the mkimage13:39
rafael2kWizzup: this is why multi-boot is good13:40
rafael2k; )13:40
rafael2kif one does not boot, boot the other system13:40
Wizzupmuch better is not to break the system13:41
rafael2ktotally agree13:41
rafael2kThe system is broken for more than one year13:42
rafael2kwe are trying to unbreak, right?13:42
Wizzupwe're trying to fix bugs yes, it was not usually in an unbootable state, but this is fine, it's -devel anyway13:42
WizzupI'm just trying to understand we never "removed" initrd, it was just never necessary13:42
Wizzupso saying "it was not me who removed initrd from maemo" is just weird13:43
rafael2kIm just kidding13:43
Wizzupit's booting now btw13:43
Wizzupok13:43
Wizzupuvos: heh I am greeted by salutem13:43
Wizzuprafael2k: so we have two options: (1) we make a less bloated config and also remove all the parts where we make the stuff that we need modules (this could just be removing some mobian patches) or (2) we have pine64 kernel package depend on initrd tools and hope the stuff runs automatically13:44
Wizzup(2) also means we have to update our uboot package13:44
WizzupIf we do (2) the nice thing is we can just piggy back on mobian kernel, which is fine by me13:45
rafael2kIs the config bloated?13:45
rafael2kI don't get it13:45
Wizzupdebian configs usually are bloated yeah13:46
rafael2kwait13:46
rafael2kyou was saying about booting13:46
rafael2know about bloat?13:46
Wizzupit's the same thing: we need to change the pine64_config13:46
rafael2ksame thing?13:46
rafael2khum13:46
rafael2kok13:46
rafael2kI don't see any bloat tbh13:46
rafael2kit is just a pretty standard setup13:47
rafael2kdoes it harm?13:47
Wizzupultimately yes, but it's not particularly important now13:47
rafael2kI thought we just needed to add some modules as static and voila13:47
Wizzupthe kernel build took like 4 hours yesterday13:47
rafael2kyes?13:47
Wizzupas opposed to like 1hr for droid413:47
Wizzupbut it seems to vary, so idk13:48
rafael2kof course yes... not having half of the functionalities of linux - definitelly13:48
Wizzupyeah so if we want to go for (1) then we need to figure out what stuff needs to be built in13:48
rafael2kok13:48
Wizzupyesterday I tried to just make EXT4 builtin, but that wasn't enough to make it boot13:48
rafael2kI can do that13:48
rafael2kI'll try to do it today at night, after baby goes sleep13:48
WizzupI would really appreciate that if you can, we could just add another patch on top of the mobian patches to changef pine64_defconfig13:49
Wizzupawesome13:49
rafael2ksure13:49
Wizzupif that ends up being too frustration, we can go for (2) as far as I am concerned13:49
rafael2kno no13:49
rafael2klets do the fast track now13:49
Wizzupre: bloat, you're right the on-disk is about the same d4 and pine64, so maybe the raspi build setup was just struggling more initially13:49
rafael2kto have everything up and running13:49
rafael2kjust set some 'y'  and that is it13:50
Wizzupok so you want me to install initramfs-tools ?13:50
Wizzupwait, I don't understand13:50
Wizzupwhat is "fast track"?13:50
rafael2kjust edit the config13:50
rafael2kand have a kernel config which boots without initrd13:50
rafael2kas is in maemo right nnow13:50
Wizzupok, and you can take a look at that?13:50
rafael2kyes13:50
Wizzupok, ty13:50
rafael2kI come back later13:51
rafael2klemme know about ofono too13:51
rafael2kif there are any questions, lemme know13:51
rafael2kI saw updated sphone13:51
rafael2kcool!13:51
Wizzuplooks like I had initramfs-tools already installed, so why did it not run... hm13:54
freemangordonWizzup: I am not sure I can help with mc/tp stuff, it passed more then an year I played with it14:14
freemangordonre kernel - do you still see xorg crashes after latest patch?14:14
freemangordonBTW I had very strange behaviour twice, in different ways14:15
Wizzupno, I have not seen X crashes14:15
freemangordonfirst time device was in my pocket with this maps application searchiong for gps14:16
freemangordonmaybe 30 minutes later as was unable to unlock the device - swiping tklock slider was doing nothing14:16
Wizzupthe latter sounds like the drm thing I ran into14:17
Wizzupor did tklock show for you?14:17
freemangordonyes, it was there14:17
freemangordonand wotking14:17
freemangordonI was able to swite the slider14:17
Wizzupthe power button might trigger more easily14:17
freemangordonhmm?14:17
freemangordonpower button triggers tklock14:18
WizzupI was thinking about the maps app14:18
Wizzupnot sure about either bugs14:18
WizzupI don't think I have seen those beforfe14:18
freemangordonme neuther14:18
freemangordon*neither14:18
freemangordoneither mce or systemui was misbehaving14:18
uvosnever seen that befor either14:18
uvosthen again i dont use tklock14:19
uvosyeah that sounds like systemui and mce got out of sync14:19
uvosglobal state flags wise14:19
uvosmaybe mce crashed14:19
freemangordonbut, given that systemui/tklock have not been changed since long time ago I would say mce got out of sync, somehow14:19
freemangordoncould be14:19
uvosand got restarted14:19
uvosthen its in the wrong state14:19
freemangordonmce should unlock the device on start14:20
freemangordonat least this was the behaviour back then14:20
uvossure, it dose14:20
freemangordonnot really as eventually I had to har-reset (power+vol)14:20
freemangordon*hard-reset14:20
uvoswell it dose internally14:21
uvosso probubly not a crash then14:21
freemangordonmhm14:21
freemangordonanother very weird thing that happened is something with touchscreen14:21
uvosit dident work?14:21
uvosthats hw bug14:21
uvosalso happens on android14:21
freemangordoncould be14:21
freemangordonhappened only once14:22
freemangordonit was semi-working14:22
freemangordonlike some touches were registered some not14:22
uvoshw bug14:22
freemangordoncould be14:22
uvosvery sure14:22
freemangordonI am reporting re Wizzup's question if we shall push to -stable14:22
freemangordonand the most annoying thing is that charging stuff14:23
uvosright and a hw bug is no reason not to14:23
freemangordonsure14:23
Wizzup:)14:23
uvosthe charging stuff is fine for me14:23
uvosexcept the ocassional delay14:23
freemangordonnot for me14:23
uvosso whats the probel exacly14:24
uvosplease describe in extream detail14:24
freemangordonthat occasional delay happens 90% if not more of the cases here14:24
freemangordonsec14:24
freemangordonafter I plug a cable, led turns green, but no charging notification is giver neither battery icon is animated14:25
freemangordonno idea what the 'delay' you talk about is, but it sits like that here forever14:25
uvoshavent seen that14:26
uvosbut ok14:26
freemangordonhappens every time14:26
uvossame bug as the 30s delay14:26
freemangordondo you want me to provide some logs?14:26
uvoscan you check sysfs in this state?14:26
freemangordonsure14:27
freemangordonwhat in particular?14:27
uvosfreemangordon: so please:14:28
uvoscat /sys/class/power_supply/battery/uevent14:28
uvosudevadm monitor14:28
uvosplug in usb14:28
uvoscat /sys/class/power_supply/battery/uevent14:28
uvospastbin output14:28
freemangordonok, now I have the cable disconnected and battery icon is animated :)14:30
freemangordonso I am nit sure I can do what you want me to14:30
uvosdo the above14:30
freemangordonoh, it is even better14:30
uvosand note the state of the gui inidcator at eatch step14:31
freemangordonif I plug the cable, battery animation stops14:31
freemangordonok, now I have cable connected and no animation, sec will provide the output14:31
freemangordonuvos: https://pastebin.com/nVHdcwLY14:32
uvosplease do as i say14:32
uvos1. usb unplugged14:32
uvos2. note inidcator14:32
uvos3.  cat /sys/class/power_supply/battery/uevent14:32
uvos4. udevadm monitor14:32
freemangordonthis is what I did, no?14:33
uvos5 . plug in usb14:33
freemangordonbesides udevadm14:33
uvos6. cat /sys/class/power_supply/battery/uevent14:33
uvosplese provide all steps14:33
uvosotherwise its useless14:33
uvosalso what state is this pastebin even14:33
freemangordon(15,31,24) freemangordon: ok, now I have cable connected and no animation, sec will provide the output14:33
freemangordon(15,31,57) freemangordon: uvos: https://pastebin.com/nVHdcwLY14:33
uvosui inidcator and usb plug state wise14:33
freemangordonok will do it from start14:33
uvosok so upower got out of sync14:34
uvosalso check upower -d for state14:34
uvos(this is probubly going to be wrong14:34
uvos)14:34
uvoswhile sysfs is correct14:34
freemangordonstate:               discharging14:35
freemangordonthat's upower -d14:35
uvosyeah so upower drops the ball somewhere since uevent is correct14:35
uvosthis is pretty mutch what i know allready14:35
uvosit being in uevent file without the kernel having issued the corrisponding uevent event is impossible14:36
freemangordonshall I restart upower with some verbosity?14:36
uvosyeah14:36
uvosalso udevadm monitor14:36
uvosjust to be sure14:36
freemangordonok14:36
freemangordonuvos: on cable being plugged https://pastebin.com/iE2FxYNF14:37
uvosagain with udevadm monitor -p -k14:39
uvosplease14:39
freemangordonupower -m https://pastebin.com/8YXP6m5y on plug14:39
freemangordonok14:39
freemangordonugh14:40
tmlindfreemangordon: your mesa changes dropped PVRDRIQueryDmaBufFormats PVRDRIQueryDmaBufModifiers PVRDRIQueryDmaBufFormatModifierAttribs, are these not implemented in the firmware or dropped by accident?14:40
freemangordonnot implemented14:40
freemangordonuvos: https://pastebin.com/19aGm7D714:40
uvoshmm14:41
uvossomething is wrong here14:41
freemangordonuvos: I don't think this is upower problem :)14:41
uvosyeah14:41
freemangordonPOWER_SUPPLY_STATUS=Discharging14:41
uvosbut thats really wierd14:41
uvossince the kernel has it as the last set porparty14:41
uvosin the uevent file14:41
uvoshmm14:42
tmlindfreemangordon: if dmabuf modifiers are not implemented then we need to also do what xcracer did and not advertise EXT_image_dma_buf_import_modifiers at all, at least wlroots will bail out otherwise14:42
freemangordontmlind: I don't think this is adretised14:43
freemangordonoh, it is :(14:43
freemangordonwhy?14:43
tmlindfreemangordon: maybe that commit got accidentally reverted, see 4f851d108e8f ("egl_dri2: Don't expose EXT_image_dma_buf_import_modifiers")14:43
uvosfreemangordon: wierd14:44
freemangordonno, changing DRI_IMAGE version should prevent this being advertised14:44
uvosfreemangordon: i also cant repoduce the problem14:44
freemangordonuvos: ok, but this happens every time14:44
freemangordonwhich kernel?14:44
uvosleste14:44
uvosdevel14:44
uvoswith my patch ofc14:44
freemangordonLinux devuan-droid4 5.15.2 #1 SMP PREEMPT Sat Jan 8 23:05:00 UTC 2022 armv7l GNU/Linux14:44
uvosyeah14:45
freemangordontmlind: gimme some time to finish what we do with uvos and I'll have a look14:45
tmlindfreemangordon: yeah sure no hurry, just wondering.. maybe DRM_IMAGE version gets checked too late when using the extension14:46
tmlindanyways, so i got wlroots working with pretty much just xcracer's modified patch for GL_EXT_unpack_subimage only :)14:47
freemangordonuvos: but "POWER_SUPPLY_STATUS=Charging" in /sys/class/power_supply/battery/uevent14:48
uvosfreemangordon: wierd14:48
freemangordonoh14:49
uvosim also not sure how my patch breaks it14:49
freemangordonsec14:50
uvossince it seams to report it the same way14:50
freemangordonyeah, I don;t think it is your patch really14:50
freemangordonsee https://pastebin.com/ubj52RAX14:50
freemangordonthe first event, but this is on unplug14:50
freemangordonso, "charging" comes on unplug14:51
uvoswhat about it?14:51
uvosits the wrong way around14:51
freemangordonyes14:51
uvosand uevent contains the right value14:51
uvosi know this is the problem but not sure how that can happen14:52
freemangordonmaybe udev does not read the events properly14:52
uvosseams kinda unlikley14:52
uvosconisdering how mutch stuff would not work then14:52
freemangordonwell, then kernel does not send them properly14:52
uvosright - somehow14:52
tmlindor sends the events wrong way around with charge vs drain voltage direction confused?14:53
uvosyeah but its fine in sysfs, so the values in cpcap-charger are fine14:53
uvosthey must be bouncing or something14:53
tmlindok14:53
freemangordonuvos: which patch is that? https://github.com/maemo-leste/droid4-linux/commits/wip/n900/maemo-5.15-cleaned-up14:54
uvoshttps://github.com/maemo-leste/droid4-linux/commit/549645980ae302c6b13f62e29715420a08b87bb214:54
freemangordonhmm, POWER_SUPPLY_CHARGE_COUNTER=-367614:54
freemangordonhow's that possible?14:54
uvosthats fine14:54
uvosfine14:54
freemangordonok14:55
uvosit starts at 0 at boot14:55
uvosno matter what the battery state is14:55
uvosand gows down14:55
uvoswith discarge ofc14:55
tmlindfreemangordon: fyi for later on when you get a chance, here's what i did to get wlroots working with your dbm http://muru.com/linux/d4/0001-dbm-Fix-render-node-usage-for-wlroots.patch14:55
freemangordontmlind: ok14:57
freemangordonuvos: and what about POWER_SUPPLY_POWER_AVG=-169092914:57
freemangordonis that ok to be negative?14:57
uvosyes14:57
uvosthat means discharging14:58
freemangordonok14:58
uvoser charging14:58
uvosnegative numbers there mean charging14:58
tmlinddoes that match also on other hardware like n900?14:58
freemangordonnever seen negative average power14:59
uvosyes it matches the expecations of maemo14:59
tmlindok14:59
uvossince if it drops above 014:59
uvosand usb is plugged in the baner shows up14:59
uvosto warn you device is using more power than can be supplyed by usb or something14:59
freemangordonuvos: ok, so it seems no events are missing, it is just that kernel sends wrong state on device chage14:59
uvosright15:00
uvosnot sure how this is possible tho15:00
freemangordonmost-probably because there is some logic based on current15:00
uvosmaybe15:00
freemangordonand your initial current maybe is too low15:00
uvosbut why would sysfs then be correct15:00
freemangordonbecause later-on the cirrent is alredy high15:00
tmlindor we have cpcap charger driver handle the positive and negative current the wrong way around?15:00
freemangordon*curent15:00
uvostmlind: no15:00
freemangordon*current15:01
uvostmlind: pretty sure thats fine15:01
uvosfreemangordon: but that dosent hold water15:01
uvossince if you load the device15:01
uvossysfs dosent change15:01
uvosbut its again discharging the battery15:01
freemangordonsure it does15:01
uvos(in real terms)15:01
freemangordonuvos: sec, lemme try to explain what I think happens:15:01
uvospretty sure i tryed this15:01
uvoslet me try again15:02
freemangordonwhen the initial event is send, charging current is below used cirrent15:02
freemangordon*current15:02
freemangordonso basically it is discharging15:02
uvossure yeah15:03
uvoscat /sys/class/power_supply/battery/status15:03
uvosafaik15:03
uvoslet me install stress15:03
uvosfreemangordon: your right15:04
freemangordonfor some reason no new event is send when charging current increases enough for charging to actually happen15:04
uvosstress -n 215:04
uvoscauses  sysfs to rappidly flip15:04
uvosback and fourth15:04
freemangordonmhm15:04
uvosok15:04
uvoshmm15:04
uvosso just report on the battery state later then15:04
uvos(in the patch)15:04
uvosbut the kernel is still bugy15:05
uvosif i enable charging15:05
uvosand then the kernel framework says "no current is positive"15:05
uvosit should report the battery as charging to udev15:05
uvoswhen curent is positive again15:05
uvosotherwise i cant guarentee the event is right at all15:05
freemangordonwho triggers the event?15:06
tmlindthe sysfs state for battery instead of usb should be used..15:06
uvostmlind: yes15:06
freemangordontmlind: it is15:06
uvosthis is for battery15:06
tmlindok15:06
uvosfreemangordon: so the real bug is15:06
freemangordonhmm?15:08
uvosthe real bug the kernel dosent issue an event when it changes the state due to current sign changeing15:08
uvosit dose correctly issue an event when charging state changes15:09
uvosand the patch just makes this happen more often15:09
freemangordonuvos: but, is it correct that you say to the framework that it is charging, but current is negative?15:09
freemangordonI don't think this makes sense15:10
uvosyeah so the driver is charging in the sense of its internal state15:10
freemangordonok, but it is not logical to charge with negative current :)15:10
uvosbattery current should be negative15:10
uvosit makes perfect sense15:10
freemangordonno, it should be positive when cherging15:10
uvosno15:10
uvosbattery is a device type power_supply15:11
freemangordonyeah, sorry15:11
freemangordonmy bad15:11
uvosdischarging => removeing energy => supplying energy => positive value15:11
freemangordonok,ok15:11
freemangordonanyway, it is not logical then to enter charging state while still suplying energy15:11
uvosand it dosent15:11
uvosthat is fine15:12
uvosjust when it later dose enter charging state15:12
freemangordonI bet this is what happens15:12
uvosit is15:12
uvosit dosent issue another event15:12
freemangordonyou report charging with *positive* current15:12
uvosno negative15:12
uvoslook at what happens15:12
uvos watch -n 0.1 cat /sys/class/power_supply/battery/status15:12
freemangordonuvos: I understand what you say15:13
freemangordonyou say that wonce current changes sign an even shall be send15:13
uvoswatch -n 0.1 cat /sys/class/power_supply/battery/current_avg15:13
freemangordonright?15:13
uvosstress -c 215:13
uvosfreemangordon: yes15:13
freemangordonok, what I am saying is that this even is not send, because there is no change in the state15:14
uvosand cpcap-charger dosent do this at all (change state on sign) so it must be a framework thing15:14
freemangordonit is charging all the time15:14
uvos(or im not finding it)15:14
freemangordonyou supply initial state as charging15:14
uvosright but the framework changes this to discharging15:14
uvosand then later back to charging15:14
freemangordonBTW does it poll?15:14
uvosand dosent send an event15:15
uvosfreemangordon: no15:15
freemangordonhow FW knows that current has changed its sign?15:15
uvosnot the cpcap drivers themselves15:15
uvosidk how it works15:15
freemangordonit does not15:15
freemangordondriver shall signal somehow15:15
uvosi mean how the sign switching is detected15:15
freemangordonok, lets think about it for a while:15:16
uvoscpcap_charger_irq_thread15:16
freemangordonwe can sense that by either interrupt or polling, right?15:16
uvosput a printf there and se if it fires15:16
uvoswhen sign changes15:16
freemangordonhow do I know when the sign chagnes?15:16
uvosit happens when you run stress -c 215:17
uvosat 500mah input current15:17
freemangordonok15:17
freemangordondo you know irq no?15:17
uvoshmm?15:17
uvosdo it in the delayed work of15:17
uvos*ofc15:18
freemangordonI'll jest check in /proc15:18
freemangordon*just15:18
uvossure15:19
uvosnever sure what irq is what there15:19
freemangordonuvos:  watch -n 0.1 -d 'cat  /proc/interrupts | grep cpcap'15:24
freemangordonno interrupt triggered15:24
uvosok no idea then15:26
uvossre should now, he is framework mantainer for power_suppy :P15:26
uvosand tmlind wrote the driver15:26
freemangordonok, but I was seeing "device using more power" before that change15:27
freemangordonso it must have worked somehow15:27
uvosmaybe the framework checks only when something touches the deivce15:28
uvosso the device using more power thing could only pop up when upower was reading sysfs15:28
freemangordonuvos: hmm https://github.com/maemo-leste/droid4-linux/commit/549645980ae302c6b13f62e29715420a08b87bb2#diff-ffffe39a400007faafb9049b0d20245c5a0ee6759068ce3e53d921f498f57318R67015:29
freemangordonwhat is the idea?15:29
freemangordon"&& ddata->status != POWER_SUPPLY_STATUS_CHARGING"15:30
freemangordonis that possible?15:30
freemangordonalso, why do you still schedule work after ichrg_current == ichrg ?15:31
freemangordonI would say you should stop, no?15:31
freemangordonunless I am missing the logic15:31
freemangordonah, it returns early15:32
uvosit runs one step extra yeah15:33
uvosshould probubly fix that15:33
uvosbut dosent matter15:33
uvos(for this bug)15:33
freemangordonI think the issue is with "&& ddata->status != POWER_SUPPLY_STATUS_CHARGING"15:33
freemangordonwhy is that check needed at all?15:33
uvosbecause the current can change15:34
uvosso the user can set a different max current15:34
uvoswe then continue ramping15:34
uvosbut we where charging before15:34
uvosso dont set it again15:34
uvosso we have max current 300mA for instance15:34
uvosand usb gets pluged in15:34
uvoswe ramp to 30015:34
uvosand set the charging state15:34
uvosthen user sets max current to 500mA15:35
uvoswe continue ramping15:35
uvosbut dont want to reset the state15:35
uvos(since it dident change)15:35
uvosthats the logic15:35
freemangordonok, but are you sure https://github.com/maemo-leste/droid4-linux/commit/549645980ae302c6b13f62e29715420a08b87bb2#diff-ffffe39a400007faafb9049b0d20245c5a0ee6759068ce3e53d921f498f57318R671 is ever called?15:35
uvosyeah15:35
uvosnot way sysfs can be correct otherwise15:35
uvosalso from the logic jeah15:35
freemangordonsysfs is on-demand15:35
uvosright but it just reads that state15:36
uvosanyhow yeah it should15:36
uvosso15:36
uvosso ichrg_current < ichrg by 115:36
freemangordonyes, but this state could have been set earlier15:36
uvosthen we ++ichrg_current15:36
uvosand then ichrg_current == ichrg15:36
uvosso yeah15:36
freemangordonbefore you start delayed work15:36
uvosshould run15:36
uvosif the state is set erlier15:37
uvoseither it was set to POWER_SUPPLY_STATUS_CHARGING15:37
uvosand we have nothing to do15:37
freemangordonmy point15:37
uvosor its set to something else and POWER_SUPPLY_STATUS_CHARGING is set15:37
uvosfreemangordon: so?15:37
uvosbtw nothing else in the driver sets this state15:37
freemangordonthat it is set to POWER_SUPPLY_STATUS_CHARGING earlier, but while the current was still too low, so FW reported discharging15:38
uvosfw dosent report anything15:38
uvosor framework15:38
freemangordonfw == framework15:38
uvossure maybe thats what happens15:38
uvosbut framweork then later changes the state back to POWER_SUPPLY_STATUS_CHARGING15:39
uvosas evidenced by sysfs15:39
uvosso it should report an event then15:39
freemangordonno, it just reads the current state15:39
freemangordonno15:39
freemangordonno, why event?15:39
freemangordonsysfs is just a representation of the state15:39
freemangordonnobody tracks if there is a chage15:40
freemangordon*change15:40
freemangordonit is driver that shall say "my state has changed"15:40
uvossure15:40
uvosand it dose15:40
uvosif fw rejects this15:40
uvosit should tell the driver15:40
uvosor report later if the rejection changes15:40
freemangordonmaybe it is a corner case not considered15:41
uvosotherwise how shal the driver know it has to report again15:41
freemangordonstate == charging with current > 015:41
uvosbut then it needs to poll15:41
uvosit cant do that15:41
freemangordonexactly15:41
freemangordonthat's why the driver shall raise an event15:41
uvosit dose15:41
freemangordonI think it does not15:42
uvoswhen it enables charging15:42
uvosthats the only time it can15:42
uvoswihtout polling15:42
freemangordonyes, but it is too early then15:42
uvosyeah but15:42
uvosit might never be late enough15:42
freemangordonno, you have delayed work15:42
uvoshow should the driver know15:42
uvosthe current usage might simply be to high for the next 10 minutes15:42
freemangordonsee, I don;t think you can report state == charging with positive current15:42
freemangordonthat's my point15:42
uvosright15:42
uvosbut if so15:43
freemangordonit does not make sense15:43
uvosi dont se how the driver can make it work15:43
freemangordonPali: ping15:43
Palipong15:43
freemangordonPali: do you know, in theory, is it allowed/sane to report battery state as "charging" and "current now" saying that battery supplies energy?15:44
uvosfreemangordon: https://github.com/maemo-leste/droid4-linux/blob/549645980ae302c6b13f62e29715420a08b87bb2/drivers/power/supply/cpcap-battery.c#L58615:45
uvoshere its that15:45
uvosnot fw15:45
PaliIIRC negative current now is suppose to do15:45
uvosso udev gets an event that somthing changes15:45
uvosand reads it15:45
uvosand but cpcap-battery reports no15:45
uvosso the fix is to check with cpcap-charger what it thinks should be happening15:46
uvosnot the "real" state15:46
uvosotherwise it cant work15:46
uvoswithout polling15:46
uvosit probubly fails for you because your usb cable is high inductiviy or something15:47
freemangordonuvos: so, at the moment udev receives "charging" event, "current now" is still announcing "discharging"15:47
uvosyes15:47
uvosbeacuse cpcap-battery reports15:47
uvosin the line linked above15:47
uvosnot current now directly15:47
freemangordoncome on, the cable is perfect15:48
uvosbut battery state sysfs file15:48
uvosfreemangordon: sure its fine but it dosent happen here15:48
freemangordonactually thi is my best cable15:48
uvosfreemangordon: so the differens is electrical most likely15:48
uvosanyhow15:48
freemangordonuvos: and? because it works for you that means we can leave it like that or what?15:48
uvosno15:48
uvoswtf15:48
uvosanyhow cpcap-charge must allways report charging in state sysfs file (not in current that dosent mattter) when cpcap-charger has enabled charging15:49
uvosanyhow cpcap-battery must allways report charging in state sysfs file (not in current that dosent mattter) when cpcap-charger has enabled charging15:49
freemangordonok, so, how is "current too high" detected?15:50
freemangordonI guess someone polls15:50
uvosyeah15:50
freemangordonok, that's fine15:50
freemangordonok, so, do you want me to put printks somewhere?15:51
uvosno its fine15:51
uvoswe know why it happens15:51
freemangordonumm, lemme read it again, as I am not sure I know15:51
uvosunfortionatly having the state sysfs file follow current (ie real charging vs discharing) state is impossible without polling in kernel15:52
uvoswithout breaking events15:52
uvosso we have to make it show intended state not real state15:52
freemangordonthat's fine I guess, as this polling happens only when charger is connected15:52
uvosno15:53
uvosyou would have to poll also while discharging and connected15:53
uvosi dont think thats fine15:53
freemangordonuvos: so, "charging" here means "charging connected", right?15:53
uvosat all15:53
uvosyes so charging in the sense that the charging registers are enabled15:53
uvosthis is different from connected15:53
uvosand from  current state15:53
freemangordonok, I still fail to understand why it does not work then.15:54
freemangordonuvos: also, lets forget about sysfs15:54
freemangordonit is not related to events15:54
uvosit is15:54
freemangordonhow's that?15:54
uvosudev gets a changed event15:54
freemangordonand reads sysfs?15:55
uvosand then reads sysfs to get what it changed to15:55
uvosiiuc15:55
freemangordonI think event itself contains the change15:55
freemangordonbut not sure15:55
freemangordonI guess I can strace15:55
Wizzupudev listens on netlink which probably already contains some info, but they are closely linked15:55
freemangordonWizzup: the point is that information comes with the event15:55
freemangordonyou don;t just receive "something changed"15:56
freemangordonno?15:56
Wizzupyes, over netlink15:56
freemangordonexactly15:56
WizzupI would assume kernel makes drivers able to change both sysfs and netlink events at once though, so they should be linked15:56
uvosfreemangordon: just change https://github.com/maemo-leste/droid4-linux/blob/549645980ae302c6b13f62e29715420a08b87bb2/drivers/power/supply/cpcap-battery.c#L58615:57
uvosto read the charging register instead15:57
uvosof the current15:57
uvoseveything will work fine15:57
uvosthen15:57
uvosim allmost certain15:57
freemangordonand because the initial event comes at the very beginning, either state is still "discharging" (as we are about to ramp-up) or the current is not ok15:57
uvosno15:57
uvosit comes at the end15:57
freemangordonuvos: where from?15:58
uvosits reported at the end by cpcap-charger15:58
uvosin the delayed work funciton15:58
freemangordonend of ramp-up?15:58
uvosi made sure to change the state at the end of ramp-up15:58
uvosbut ofc15:58
freemangordonhmm15:58
uvoscurrent might still be negative15:58
uvossince its an avg15:58
uvosover some length15:58
freemangordonok, lemme see what is reported15:58
freemangordonuvos: ah, I see16:00
freemangordonuvos: isn't it better to delay status report?16:00
uvosno16:00
uvosbeacuse what happens if the device is loaded16:00
uvosyou dont know how long oyu need to delay16:01
freemangordonright16:01
freemangordonbut, how you want me to change that?16:01
freemangordonif (cpcap_battery_cc_get_avg_current(ddata) < 0) I mean16:01
freemangordonthis makes sense16:01
uvosjust report the state of CPCAP_REG_CRM instead of current in POWER_SUPPLY_PROP_STATUS16:02
uvoscurrent sure makes sense16:02
uvosbut we cant make it work16:02
uvosi dont see how16:02
freemangordonok, lemme think about this for a while16:03
freemangordonuvos: that's how: on ichrg_current == ichrg, schedule  HZ/10 delayed work and report POWER_SUPPLY_STATUS_CHARGING on that scheduled work16:11
freemangordonthat way avg will have time to settle16:12
freemangordonofc if you have 2 cores spinning 100%, udev will see discharging, but not much we can do16:13
freemangordonshall I do that patch and test it here?16:14
uvosno16:16
uvosthats terrible16:16
uvosso what happens if right at 10 sec theres a usage spike?16:16
uvosof current16:16
uvoser 1/10 second16:17
uvosalso what happens if the user just enables charging with 200mA or whatever16:17
uvosyou have to just report the state of CPCAP_REG_CRM instead of current in POWER_SUPPLY_PROP_STATUS16:17
uvosplease also check what other drivers so16:18
uvos*do16:18
uvosn90016:18
uvosacpi16:18
freemangordonuvos: sorry, don;t get it16:23
freemangordonyou only changed how charge current is applied - immediately vs ramp, right?16:24
uvosyes16:24
freemangordonso, what I propose will fix the issue caused by that chagne16:25
freemangordonif there is some general issue with status reporting, that's another story16:25
freemangordonand we shall report on ML16:25
uvosit was wrong before to16:25
uvosit just happend to work16:25
freemangordonexactly16:25
uvosbut if you report the state of CPCAP_REG_CRM instead of current in POWER_SUPPLY_PROP_STATUS16:26
freemangordonbut this driver has a maintainer, no?16:26
uvosits fixed16:26
uvostmlind:16:26
uvosand me16:26
uvosreally16:26
freemangordonwhat is CPCAP_REG_CRM?16:26
uvostarget current16:26
freemangordonwill we have "using too much power" notifications?16:26
uvosi dont know, depends on if it checks status or current16:27
freemangordonbecause this was definitely working16:27
freemangordonand I am afraid we will break it16:27
uvosyeah but you cant have status reflect real current16:27
uvosand not have the event be a random number generator16:28
uvosits impossible16:28
uvosunless you poll16:28
freemangordonalso, I think we have this 500 mA limit issue as well. if our budget is 1.5A then we won;t have those problems I guess16:29
uvosthats just hiding it16:29
uvosalso you can acivate 1.5a16:30
uvosi do16:30
uvosits just not safe to do generally16:30
freemangordonmhm16:30
uvosbesides its still a problem with 1.5a16:31
uvosgues who plugs in there phone with sgx and cpu fully loaded16:31
uvos?16:31
uvosabsolutly everyone who plays games on mobile devices16:31
freemangordonyeah16:31
uvoseven 1.5a is not enough16:31
freemangordonlemme check what n900 driver does16:32
freemangordonuvos: oh, wait :)16:34
freemangordonsee https://elixir.bootlin.com/linux/latest/source/include/linux/power_supply.h#L3816:34
uvosi dont se how that helps us16:35
uvoswe cant switch to and away from that without polling16:35
freemangordonuvos: still, POWER_SUPPLY_STATUS_NOT_CHARGING is the correct status to report if charger is connected but it cannot supply enough current, no?16:36
uvosyes16:37
uvosbut we cant do that16:37
freemangordonwhy?16:37
uvossince we dont have irq to tell us when real current passes 016:37
freemangordonare you sure?16:37
freemangordonas this does not make sense16:38
freemangordonmaybe it is not enabled16:38
uvoswell the chip isent documented16:38
freemangordonI guess we dont; have docs16:38
uvosif so moto dosent use it16:38
freemangordonOTOH I don;t see any problem to poll when on charger16:39
uvosnot sure how that interacts with inductive charging16:40
freemangordonhttps://github.com/maemo-leste/droid4-linux/blob/master/drivers/power/supply/bq27xxx_battery.c#L90316:42
freemangordonuvos: what is chrgcurr1 irq?16:46
sicelotmlind: nice @ wlroots. I must try sway again on my n90016:48
siceloYou guys are busy and I don't want to interrupt, but I was going to ask where/how to see the charge mode in action, as I haven't seen it yet16:49
uvosshould work on mapphones16:52
uvosin devel16:52
siceloHow?16:52
uvosif you boot with usb pluged in16:52
siceloI'm testing on a mapphone16:53
uvoshave the device off16:53
uvosplug in a usb cable16:53
uvosshould be sufficant16:53
siceloMine boots leste16:53
uvoscheck if you charge-mode in cmdline16:53
uvosbut should be in devel16:53
uvosbut if you changed boot.cfg it wont update16:54
siceloI'm always in -devel16:54
uvosso whats you cmdline?16:55
siceloIt's rebooting. Will see when it's back up16:55
siceloMmm, bootloop, heh16:56
siceloOkay now looks like my new battery is broken :'(17:03
siceloMaybe I'm hitting the same issue fmg is ... no idea.17:03
* sicelo gets his power back ... the d4 usually seems happier with it17:04
sicelo*bank17:08
siceloNo luck with this too. Back to Android charging. At least that works, so yeah ... appears I'm facing what issue fmg faces17:09
uvosright17:09
uvosits one and the same issue17:09
uvosthe device will shutdown if it enters hildon with the battery to low but it should never get there17:09
uvosit should stay in charge mode17:09
uvosso for some reason yours isent17:09
uvosprobubly because you at some point touched boot.cfg17:10
uvosand leste config wont update it if it was touched17:10
siceloI haven't. No reason to17:11
uvosmaybe hildon-meta is not installed?17:12
uvosthere was a packaginge problem where apt uninstalled it during upgrade some time ago17:12
uvosif so then charge-mode simply isent installed17:12
siceloI think I have it (meta). Anyway, can't tell right now17:13
rafael2kI pulled the upstream changes of pine64-kernel to my fork17:17
rafael2kbtw, how do you compile the kernel?17:19
Wizzuprafael2k: is that aimed at me?17:21
Wizzuprafael2k: what is 'upstream' here?17:21
Wizzupdo you mean the maemo/beowulf-devel branch?17:21
rafael2kyes!17:22
Wizzupthe kernel is built on the CI using git build package17:23
Wizzupif you want to mimic it locally then checkout the maemo-kernel-5.15 tag (or the maemo mobian-5.15 branch) and then run 'git checkout maemo/beowulf-devel debian' from it and then 'dpkg-buildpackage -b -uc'17:23
Wizzup(from memory)17:23
WizzupI'm going to the supermarket for a bit17:24
siceloCharge mode installed, softlevel=charge exists in boot.cfg17:37
siceloAnyway, charging doesn't work at all for me now.17:39
uvosthats wrong17:42
uvosshould be charge-mode or charge_mode17:43
uvosdont quite remember what i named it17:43
siceloAnyone ever tested n900's IR with mainline? It probes perfectly well, and the proprties of the device can be fetched. Trying to send an IR pulse makes kernel hang instantly however18:06
uvosnot me18:06
uvosbut its just a gipo right? cant be so hard to fix it18:06
siceloI'll maybe test it further in the near future  but if someone has, would be nice to hear18:07
freemangordonuvos: obviously both me and sicelo are facing exactly the same behaviour19:14
freemangordonI think it makes sense to revert that patch (or those patches) as of now, to be able to push -devel to -stable after some quarantine period19:15
Wizzupwe can do that, but if we can find a fix that works too19:18
freemangordonI proposed one that will fix the behaviour to the state before patch, but uvos didn;t like it19:27
WizzupI thought he had a fix19:27
freemangordonI don;t hink it is a proper one19:27
Wizzupbut I didn't follow along19:27
freemangordonplease read the backscroll, maybe I didn't understand it19:28
freemangordonbrb19:28
Wizzupfreemangordon: around 16:57 your time19:43
freemangordonmhm19:43
freemangordonbut, this is a change in the behaviour19:43
freemangordonwhich needs testing as well. that's why I think it is better to revert, push to -stable and then try to fix whatever needs to be fixed19:44
Wizzupsure we can do that19:44
Wizzupit did make charging much more stable for me though, but we see it is better in some ways only19:45
freemangordonI am not saying the patch is bad or not needed, it is just that it needs more polishing19:45
freemangordonI prefer to be done after -stable release19:45
uvosthe issue is independant of the patch really19:45
uvosanyhow just having the state report what target current fixes all reall issues19:46
uvosand thats a small easy one liner19:46
uvoswe can talk about polling19:46
uvosor finding an irq later19:46
freemangordonthe patch I proposed makes more sense to me, as it restores the behaviour as it has been before the ramp-up patch19:47
uvosbut it dosent solve the issue19:47
freemangordonsure, but it is *another* issue19:47
uvosjust because in your setup the electrical timeing hapens to line up like that19:47
uvosmeans nothing really19:47
uvosno its the same issue19:47
uvosjust my patch alters timeing a bit19:47
uvosso this starts happening to you19:47
freemangordonuvos: just because it works for you means nothing, really19:47
uvosand sicleo too19:47
uvosif i change it to report target current19:48
uvosit will work for everbody19:48
uvosno matter what iductivity/regulation charecaristicts the usb wall wart hast19:48
freemangordonand it will report the real state incorrectly19:48
uvos*has19:48
uvossure but we can investigate how to fix that latter19:49
uvosthis patch exits because charging dident work for ME19:49
freemangordoncurrent reporting is correct19:49
freemangordon*currently19:49
uvosexcept with one signle usb cable i have19:49
uvoswell tough19:49
uvoswe cant make it report correctly and not have the timeing issue19:49
uvoswithout polling19:49
freemangordonuvos: that's why I proposed to extend it to report the state after _avg has settlet19:49
freemangordonI know19:49
uvosor figureing more out about the chip19:49
freemangordonagree19:50
uvosso lets just fake it untill we know how to fix it for real19:50
freemangordonwhy? instead of delaying the initial state reporting for 100ms?19:50
freemangordonyou may as well hardcode19:50
uvosthats terrible19:51
uvossorry19:51
uvosit dosent solve the issue at all19:51
freemangordonI am not saying my proposal fixed the issue19:51
uvosjust makes it maybe slightly less common19:51
freemangordonit will just make it like before ramp-up patch19:51
uvosright and it dident work before the ram up patch19:52
uvosjust on different configurations19:52
freemangordonright, I am not saying to revert ramp-up patch, but to extend it19:52
uvoscan you just let me fix my own damn patch19:52
uvosyeez19:52
freemangordonsure, after a -stable release19:52
Wizzupwe do not need a -stable right now, I was just asking19:57
Wizzupif there is a fix that makes it work for us all we can wait a bit19:57
Wizzupno rush19:57
freemangordonand what about "charge-mode"?19:58
uvoswhat about it19:58
freemangordonit doesn;t work here either19:58
freemangordonand I didn;t play woth boot.cfg or whatever19:59
freemangordon*with19:59
uvosprobubly one and the same issue19:59
Wizzupyeah I think so19:59
Wizzupit works for me19:59
uvosi dont quite remember how i had charge-mode detect if the device is charging19:59
Wizzup(charge mode)19:59
uvosbut maybe i used status19:59
freemangordonmaybe the same issue, yeah19:59
Wizzupbut I ended up on the right side of this patch :)19:59
Wizzupit sounds like sicelo can maybe help test a new patch as well20:00
Wizzupuvos: so what do you think, should I exclude those charging patches from a new kernel build and then look at moving it all to stable, and then include those patches with a fix? I am not in a rush, just trying to get a sense what would work best for you :-)20:07
freemangordontmlind: I am sure I checked that extension is not announced, lemme see what's going on20:25
tmlindfreemangordon: ok20:29
tmlindtrying to figure out why my es2gears_wayland stopped working..20:29
tmlindi think that happened already a while back, need to grep the irc.txt20:29
freemangordonuh: the check if for dri2_dpy->image->base.version >= 820:34
freemangordon*is for20:34
inkyuvos, i maybe forgot what was the problem with the keyboard, i remember i generated u a header file, but20:35
inkydo we need it?20:35
inkyif the maemo user chooses20:35
inkya, yes we needed that20:36
inkybut the other problem now is that20:36
inkyyou don't know which language is being typed to execute setxkbmap20:36
inkybut we know!20:36
inkybecause if i choose armenian layout then as i have chosen it20:36
inkysetxkbmap am20:37
inkyshould be issued20:37
inkyby vkbd20:37
inkyotherwise i do two things20:37
inkyi choose armenian, then in terminal type setxkbmap am20:37
freemangordontmlind: yeah, my bad20:37
inkyit can be done automaticlly20:37
freemangordonthis has to be 8, not 1420:37
inkyuvos, do you want we to give u a table of setxkbmap layouts that correspond to languages we hve in vkbd?20:38
freemangordonhmm, 8 should support modifiers too20:38
freemangordontmlind: so, according to mesa, if you support   EXT_image_dma_buf_import you must support  EXT_image_dma_buf_import_modifiers too20:39
freemangordontmlind: but still, could you change https://github.com/maemo-leste-upstream-forks/mesa/blob/maemo/beowulf-devel/src/mesa/drivers/dri/pvr/pvrext.c#L78 from 14 to 8 and try with that change?20:41
freemangordontmlind: or, shall I build on the device?20:46
Wizzupinky: just wondering, does the h-i-m method of changing keymaps work for you20:46
WizzupI don't think I got it to switch languages20:46
tmlindfreemangordon: ok i'll try just a few mins20:46
freemangordonthanks!20:46
tmlindonly 11 files to build..20:48
tmlindwell 11 steps actually with linking20:48
freemangordonwell, thats great20:49
tmlindfreemangordon: yup, changing it to 8 fixes the issue20:50
freemangordon:)20:50
tmlindoh looks like install did not happen20:51
tmlindERROR: Build directory has been generated with Meson version 0.60.2, which is incompatible with the current version 0.61.0.20:51
tmlindheh let's see if it will be a full rebuild :)20:51
tmlindphew only 38 steps, not a full rebuild after meson --reconfigure build20:54
_inkyWizzup: you mean with hildon programs?20:54
_inkyor with X programs?20:54
uvos_inky: i yeah i know this is still a problem20:56
uvos_inky: its not a priority for me atm, sorry20:56
uvos_inky: so i dont want a table20:56
_inkyuvos, i think we even know the names of the mappings.20:56
_inkyyes, okay.20:56
_inkyi mean the source code already contains the names.20:56
uvos_inky: i think it would be better if the vkb could just pick a couple of safe keycodes to overwrite20:57
uvos_inky: and then change the keymap on the fly20:57
_inkyi mean, no need to take keycodes even20:57
uvosby modifing it with the keys it needs to send the string20:57
uvosand then restoring the keyboard map20:57
_inkyi choose the layout explicitly20:57
_inkyto type20:57
tmlindfreemangordon: still getting wlroots error [wlr] [render/egl.c:765] Failed to query number of dmabuf formats20:58
uvossure but the hwkybd also needs to wrok at the same time20:58
_inkyit is in the source as hy_AM - then setxkbmap am should be executed.20:58
uvosso the way to make that happen is take the string the user wants the vkb to send to the applicaiton "abced"20:58
_inkyif i choose russian, then it's ru_RU in our source, then setxkbmap will cover all the chars.20:58
uvosadd abced to the keymap20:58
uvossend string20:58
uvosrestore keymap20:58
freemangordontmlind: ok, I think this is a bug in mesa then20:58
_inkyi just had the idea that it could be much much easier.20:59
_inkybecause the user explicitly chooses the layout before typing20:59
uvosyeah but ru_RU dosent cover all the chars20:59
uvosis the problem20:59
_inkyi choose the layout, then we know which setxkbmap needs to be executed20:59
uvosnot even en_US covers all the chars20:59
uvoson droid 4 with english vkb and english hwkbd21:00
uvosbecaus vkb has lots of spcial chars21:00
freemangordontmlind: I will need some more time to see what can be done21:00
_inkywhat kind of chars, i don't know about it.21:00
uvossome on the second page21:00
_inkyWizzup: yes, with maemo apps maemo kbd works without forcing me to do setxkbmap manually.21:00
uvoslike the pound symbol i think21:00
uvossome others21:00
_inkybut with regular debian apps not.21:00
freemangordontmlind: maybe it is a good idea to ask someone that knows more then me though21:01
tmlindfreemangordon: it checks for >= 8 :) i'll try 721:01
_inkyi think it is much better for user now if the vkbd just execute setxkbmap according to the current layout, and the pound symbol not work, than scare the user away by telling them to execute setxkbmap each time.21:02
uvosand ru vkb with ru_RU keymap on droid 4 is entriely hopeless ofc21:02
freemangordonyeah, but then there will be no  EXT_image_dma_buf_import as well21:02
_inkywhy hopeless?21:02
tmlindfreemangordon: ah21:02
uvosbecasue of all of the wrongly mapped keys21:02
_inkyyou mean hw kbd? i am very concerted with vkbd21:02
_inkyalso i don't have hwkbd on pinephone.21:02
uvossure but you cant break the hwkbd to make the vkb work :P21:03
_inkyeh.21:03
uvosanyhow as stated there is a solution21:03
uvosyou have to have him modify the keymap on the fly21:03
uvosbut its not a priority for me atm, sorry21:04
uvosmaybe some one else wants to pick it up21:04
uvosWizzup: just wait, ill give you a temp fix tomorow21:10
uvosand then we can discuss a proper fix at some later point21:10
freemangordontmlind: how exactly does it fail?21:12
freemangordonbecause IIRC it was segfaulting before, no?21:13
freemangordonah, "Failed to query number of dmabuf formats"21:13
freemangordonbut, it should check for the extension first21:13
freemangordontmlind: see  dri2_query_dma_buf_formats21:16
freemangordonhmm, well, I think this is really bug in mesa21:18
tmlindfreemangordon: i think we can disable it in the pvr driver but i need to look at that stuff more21:18
freemangordonI'd rather will fix mesa to check for proper image version21:19
tmlindfreemangordon: fyi, see the wlroots logic here at https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/render/egl.c#L25821:22
freemangordonwait, what the?21:23
freemangordonsec21:23
freemangordontmlind: look at https://github.com/anholt/mesa/blob/master/src/egl/drivers/dri2/egl_dri2.c#L73721:23
tmlindfreemangordon: and see also the wlroots fallback logic we can use at https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/render/egl.c#L74521:23
freemangordonwhy we don;t have that code?21:24
freemangordontmlind: we have some issue with our mesa21:24
freemangordonsee the link ^^^21:24
tmlindfreemangordon: ah maybe we need to backport some patch?21:25
freemangordonno, this is 5yo21:25
freemangordonhttps://github.com/anholt/mesa/commit/4c412293d0e3e38f6b4e9c10b492b8ed1d9a4a6921:25
freemangordonMay 30, 201721:26
freemangordonWTF?!?21:26
freemangordonok, seems this was initially broken :(21:27
freemangordonso, we're using wring version of this file21:28
freemangordonhmm this check was dropped for some reason, lemme try to find the commit21:29
freemangordonthis: https://github.com/maemo-leste-upstream-forks/mesa/commit/4e3a7dcf6ee4946c46ae8b35e7883a49859ef6fb#diff-1068a0daaafeee588896c915b1377ef8438fdb813a09602d1c88e92916a6ea2221:29
tmlindseems that stuff is super buggy..21:33
freemangordontmlind: yeah21:33
tmlindon the hardware i mean21:33
freemangordonfor sure we shall advertise version 8, not 1421:33
tmlindprobably best to just disable it for pvr driver rather than try to get tangled for fixing it for whatever pc quirks21:34
freemangordonit is not about pvr driver only21:34
freemangordonwe use same mesa on all devices21:34
tmlindright and they will have these calls implemented21:35
tmlindmy guess is that later versions of sgx also work fine21:35
freemangordontmlind: I think the issue is with get_egl_dmabuf_formats in wlroots21:35
tmlindfreemangordon: same story there.. trying to mess with it breaks something else likely :)21:36
freemangordonbecause, note in that mesa commit is that the call may return zero formats21:36
tmlindright but wlroots does not assume the call will fail like it does for pvr blobs21:37
freemangordonbut it fails in mesa, not in pvr21:37
tmlindhmm21:37
freemangordonbecause pvr properly announces that it does not support that21:37
tmlindno, we advertise those two extensions21:38
tmlindbut they will fail because they're not implemented21:38
freemangordonno, mesa does21:38
tmlindwhere?21:38
freemangordonand actually the first one (  p, li { white-space: pre-wrap; }  EXT_image_dma_buf_import) is implemented21:38
freemangordonsec21:39
tmlindright, EXT_image_dma_buf_import and works21:39
tmlindmodifiers are not implemented, you removed those with your patch earlier21:39
freemangordonhttps://github.com/maemo-leste-upstream-forks/mesa/blob/maemo/beowulf-devel/src/egl/drivers/dri2/egl_dri2.c#L275421:40
freemangordonthey were never implemented21:40
freemangordonthat was a remnant from chromeos version21:40
freemangordonand it was segfaulting because chromeos was announcing version 15 or 1721:41
freemangordonyeah, 1721:42
tmlindso the chromeos version had PVRDRIQueryDmaBufModifiers etc21:42
freemangordonyes21:42
freemangordonbut no :)21:42
tmlindare you saying there should be now generic handling for the modifiers?21:42
uvosfroububly yes for series 621:42
freemangordonbecause it dloads pvr_dri_support.so blob21:42
uvos*probubly21:42
freemangordonand our blob does not supports thoes21:42
uvosright21:43
freemangordonmaybe series 6 blob supports it21:43
tmlindyeah ok that's what i though21:43
freemangordonthat's why I removed everything that is not supported21:43
freemangordonand actually pvr_dri (blob) announces version 821:43
tmlindsure, but we still advertise the the modifiers :)21:43
freemangordonno, we don't21:43
freemangordonit is mesa that does unconditionally21:44
freemangordonlook at the patch21:44
freemangordon https://github.com/maemo-leste-upstream-forks/mesa/commit/4e3a7dcf6ee4946c46ae8b35e7883a49859ef6fb#diff-1068a0daaafeee588896c915b1377ef8438fdb813a09602d1c88e92916a6ea2221:44
freemangordonthere was a check for dri_image version >= 1521:44
freemangordonand we report 14 now (which is wrong, but still not 15)21:44
freemangordon"With this change, queryDmaBufModifiers always returns zero modifiers."21:45
freemangordonactually it does not, for some reason21:46
freemangordonbut rather returns FALSE21:46
tmlindprobably more quirk handling21:47
freemangordonyeah, the reason is that our version is < 1521:47
tmlindhmm so should it be 15 then?21:47
freemangordonno because we don;t support that21:48
freemangordonit is 'our' dri driver that shall implement that and return sane values21:48
freemangordonbut that function is not implemented in the blob21:48
tmlindso let's add back that dropped snippet?21:49
freemangordon:)21:49
freemangordonno, because we use the same mesa on PP, for example21:49
freemangordonah, you mean the version?21:49
tmlindright the version check21:49
freemangordonyeah, maybe21:49
freemangordonbut, I wonder if we shall raise an issue on mesa21:50
tmlindlet me test adding the  if (dri2_dpy->image->base.version >= 15... check back21:50
freemangordonok21:50
freemangordonit seems they fixed only some of the code paths back then21:50
freemangordontmlind: seems they fixed gallium dri2 frontend21:53
tmlindheh21:53
tmlindthe version check for 15 was probably dropped for some old pc hardware21:54
freemangordonsee   dri2_query_dma_buf_modifiers in dri2 gallium frontend21:54
uvoswell idk if upsream will be helpfull then21:54
uvosthey just droped eveything except gallium 3d drivers21:54
freemangordonI think we shall patch egl_dri2.c to return zero modifiers instead of EGL_FALSE21:55
tmlindhehehe good luck merging that upstream :)21:55
freemangordonhmm? why?21:55
tmlindprobably something somewhere breaks again21:56
tmlindbut sure go for it if you have a proper fix in mind21:56
tmlindfreemangordon: adding back the 15 check makes things work, but who knows what other things it might break..21:57
freemangordonhmm, wait, they say that 'formats' query shall be always suppoerted, no?21:57
tmlindsounds like they pulled back21:57
freemangordon"This allows users to use queryDmaBufFormats..."21:58
freemangordonok, this is really a mess21:59
tmlindbut we don't have the function implemented at all, it's null21:59
freemangordonyes, we don't21:59
freemangordonwe don;t support that22:00
freemangordonI would say this is strictly against specs22:00
freemangordonbut...22:01
freemangordonor, we can implement queryDmaBufFormats to return zero formats22:02
tmlindthat won't help, see the wlroots links i pasted earlier22:02
tmlindwe either need to implement them in a way that works, or just have !egl->exts.EXT_image_dma_buf_import_modifiers22:03
freemangordonyeah22:04
freemangordonwell, I think moving the version check back is ok22:04
freemangordoneither ways we carry our own patches22:04
tmlindyeah ok let me type up some kind of description22:05
tmlindseems to implement these functions we should just return two formats DRM_FORMAT_ARGB8888 and DRM_FORMAT_XRGB8888 looking at the wlroots fallback handling22:06
tmlindthe pvr mesa hacks have some comments about pvr having multiple compatible options where some cannot be shown22:07
tmlindmaybe we don't even need to call the blobs to implement this, but that can be always done later22:08
freemangordonI think version check is ok22:08
tmlindyup22:09
freemangordonthat way wlroots will fallback22:09
freemangordonto those 2 formats22:09
freemangordonI will make a proper patch (along with version fix) afte I am back from holidays (sunday, most-probably)22:10
freemangordonunless someone beats me to it22:10
freemangordonI still thinks it make sense to open an issue on mesa bugtracker22:10
tmlindok22:15
tmlindmeanwhile, here's the partial revert for folks to play with like we discussed: http://muru.com/linux/d4/0001-egl-dri2-Workaround-for-EGL_EXT_image_dma_buf_import.patch22:17
tmlindanyways, enough of this, ttyl22:20
Wizzupuvos: sounds good @ temp fix22:24
Wizzupuvos: no rus22:24
Wizzuph22:24
freemangordontmlind: actually, checking for verision only is enough (and correct)22:29
freemangordon*version22:29
freemangordonbut anyway, I'll fix that properly22:30
tmlindfreemangordon: oh maybe all we really need to do is implement something like etna_screen_query_dmabuf_modifiers()22:30
freemangordonwe have issue with formats, not modifiers :)22:30
freemangordonbut yeah, something like that22:31
tmlindshould not be any need to call the blobs22:31
freemangordonright22:31
freemangordonalso, see https://github.com/maemo-leste/sgx-ddk-um/blob/master/dbm/dbm.c#L46722:32
tmlindoh right :)22:33
freemangordontmlind: still, I think it will be good if we have chromeos pvr_dri_support to feed IDA with, to see what they do there22:34
tmlindsure, no docs22:34
BoshtannikHi to all!22:35
BoshtannikHow can I be notified about keyboard mapping unmatching to be fixed?22:37
tmlindhi, sounds like you need to set up a user account at github and subscribe for notifications22:41
tmlindfreemangordon: probably the old modifiers code did not work as things have changed around, see c8a0660ab4d1 ("etnaviv: advertise supported dmabuf modifiers")22:41
tmlindseems like pscreen->query_dmabuf_modifiers needs to be implemented as the patch removing 15 version check adds checks for those22:42
freemangordonbut this is for gallium, no?22:43
freemangordonnot for egl22:43
tmlindargh you're right22:44
BoshtannikAhh github? But it was microsoft ed..22:45
siceloor manually visit the page at regular intervals, without an account. you can choose your poison ;-)22:46
freemangordontmlind: hmm, see g_asFormats in pvrutil.c22:47
freemangordonbut yeah, it is about dma_buf22:48
freemangordonanyway, I will stop for today22:48
tmlindfreemangordon: yeah and note how we now have .bQueryDmaBufFormatsExclude unused22:48
freemangordonnight!22:48
tmlindnight, me out of here too22:48
BoshtannikHave built python 3.10 on my n900)22:50
freemangordontmlind: yeah, maybe I shaved too much code, will see what can be done22:52
freemangordonuvos: BTW, I think it makes sense to not disable the second core while charging23:02
uvosfreemangordon: sure yeah23:25
uvosfreemangordon: did you see the config option?23:25
uvos(to disable this entirely)23:25

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