2022-09-29.log

- chomwitt (QUIT: Ping timeout: 268 seconds) (~chomwitt@2a02:587:dc14:f500:278:be15:4a20:8304)00:43
- vagrantc (QUIT: Quit: leaving) (~vagrant@2600:3c01:e000:21:7:77:0:20)01:09
- S0rin (QUIT: Ping timeout: 250 seconds) (~S0rin@user/s0rin)02:31
+ S0rin (~S0rin@user/s0rin)02:32
+ Gooberpatrol_66 (~Gooberpat@user/gooberpatrol66)03:04
+ vagrantc (~vagrant@2600:3c01:e000:21:7:77:0:20)04:00
- vagrantc (QUIT: Quit: leaving) (~vagrant@2600:3c01:e000:21:7:77:0:20)04:34
- Ar|stote|is (QUIT: Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) (~linx@149-210-4-72.mobile.nym.cosmote.net)05:31
+ Ar|stote|is (~linx@149-210-4-72.mobile.nym.cosmote.net)05:36
+ chomwitt (~chomwitt@2a02:587:dc14:f500:9e6a:c6cb:5be3:53b3)07:30
- ajr (QUIT: Quit: WeeChat 3.6) (~ajr@user/ajr)09:03
+ MajorBiscuit (~MajorBisc@c-001-013-022.client.tudelft.eduvpn.nl)09:58
- iank (QUIT: Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) (~iank@fsf/staff/iank)13:25
+ iank (~iank@fsf/staff/iank)13:27
- mjw (QUIT: Killed (NickServ (GHOST command used by wielaard!~mjw_@2001:1c06:2488:1400:9e5c:8eff:fe8f:a440))) (~mark@gnu.wildebeest.org)13:49
* wielaard -> mjw13:49
+ mark_ (~mark@gnu.wildebeest.org)13:50
+ GNUmoon (~GNUmoon@gateway/tor-sasl/gnumoon)14:14
- buckket (QUIT: Quit: buckket) (~buckket@pdp8.buckket.org)14:17
+ buckket (~buckket@pdp8.buckket.org)14:21
vkoskivUpdate: My reform battery cells appear to be fine. I charged it up fully yesterday and did multiple hours of work on battery power.15:51
vkoskivProtected battery holders are definitely on my shopping list, though!15:51
vkoskivHm. My battery status went away again after an apt upgrade.16:39
vkoskivI do have reform2-lpc-dkms installed, but the lpc kernel module isn't loaded for some reason16:40
vkoskivDo I need to enable it somehow?16:40
vkoskivI used to manually compile and install it from the forked repo16:40
joschvkoskiv: I don't know what the migration path is, but the kernel module is now built by reform-tools via dkms16:41
vkoskivHow do I trigger that to happen?16:41
joschsudo apt install reform-tools16:41
vkoskivAlready installed16:41
vkoskivReinstall maybe?16:42
joschvkoskiv: what version?16:42
vkoskiv1.1116:42
joschgood16:42
joschvkoskiv: maybe this thread starting from here can help you: https://community.mnt.re/t/lpc-spi-firmware-and-driver-prototype/1030/1816:43
vkoskivI can see a module in the directory you mentioned there. I tried installing reform2-lpc, but that package doesn't seem to exist.16:46
vkoskivTrying to modprobe that ko file spits up a fatal error, it can't find it (even though it's there, seemingly?)16:49
joschvkoskiv: the package is called reform2-lpc-dkms -- where do you have the other package name from?16:50
vkoskivFrom your message in the thread: "Can you try to apt update and apt install reform2-lpc to get the latest version of the package?"16:50
vkoskivI also tried reform2-lpc-dkms, but that's also already installed.16:51
joschvkoskiv: thanks, let me fix that error16:51
joschvkoskiv: but you have /lib/modules/5.19.0-reform2-arm64/updates/dkms/reform2_lpc.ko, correct?16:52
joschand what does "lsmod | grep lpc" show?16:53
vkoskivI do, yeah. Just tried reinstalling reform2-lpc-dkms too, didn't work I think. Booting.16:53
joschand what happens if you try to "modprobe reform2_lpc"?16:53
vkoskivBefore reinstalling reform2-lpc-dkms, it showed nothing. Now it shows reform2_lpc and the battery status works again.16:54
vkoskivI think this might have something to do with me manually installing it before, and/or that SD -> eMMC boot migration.16:54
joschvkoskiv: did you reboot after installing it?16:56
vkoskivYes16:56
joschhrm...16:56
vkoskivminute: Can I get a thumbs up/down on https://source.mnt.re/reform/reform/-/merge_requests/3117:03
joschdoes the reform keyboard firmware have any releases or tags? Or am I supposed to just pick the current git commit and flash that?17:08
vkoskivAt this time the master branch is intended to be stable, yeah.17:09
vkoskivBut releases would be more ideal17:09
joschyeah, I don't know whether what is in git HEAD is always deemed to be of stable release quality or not17:09
vkoskiv!31 just makes it so it ignores oled draw commands from the OS when it's displaying something.17:09
vkoskivI guess it's convention. *Usually* with production software, master isn't guaranteed to be stable. Tagged commits/releases are.17:10
vkoskivThat's also how I do it in c-ray, though nobody uses that apart from me.\\17:10
+ vagrantc (~vagrant@2600:3c01:e000:21:7:77:0:20)17:32
minutevkoskiv: can you ask me again tomorrow afternoon please? i'm kind of in a crunch to finish the cursed fpga project19:04
- mjw (QUIT: Killed (NickServ (GHOST command used by mark_!~mark@gnu.wildebeest.org))) (~mjw_@2001:1c06:2488:1400:9e5c:8eff:fe8f:a440)19:28
* mark_ -> mjw19:29
+ wielaard (~mjw_@2001:1c06:2488:1400:9e5c:8eff:fe8f:a440)19:29
+ oomono (uid328183@id-328183.tinside.irccloud.com)20:12
- cwebber (QUIT: Remote host closed the connection) (~user@user/cwebber)20:20
- MajorBiscuit (QUIT: Ping timeout: 246 seconds) (~MajorBisc@c-001-013-022.client.tudelft.eduvpn.nl)20:21
vkoskivminute: Will do!20:36
vkoskivGood luck with cursed FPGA20:36
joschWhere is the holy inquisition when you need them for an exorcism?!20:40
vkoskivWhy do /dev/hidraw* devices sometimes get "messed up"?20:40
vkoskivi.e. my /dev/hidraw0 just seemingly randomly stopped being a special device file and started being a normal file20:40
vkoskivAnd now the keyboard oled is one of the other ones instead, I have to guess.20:40
vkoskivhidraw1, now.20:41
vkoskivAlso, is there a proper way to write to them without root? Do I have to generate a user and mess with groups and stuff?20:41
joschvkoskiv: you can chown them to a group (usually "input") and then make your user be part of that group20:43
joschthat chown can be done by a udev rule20:43
vkoskivThanks, I'll look into that.20:44
joschvkoskiv: It's possible that /dev/hidraw* becoming normal files is caused by reform-standby20:45
joschMaybe it can happen that at the time that reform-standby writes xLITE0 or xLITE6 to it, the device is doesn't exist yet or not anymore20:45
joschvkoskiv: can you reproduce the problem?20:45
+ cwebber (~user@user/cwebber)20:48
vkoskivI did suspend and resume, so that might have been it20:50
vkoskivIn the middle of coding, will try to repro later.20:50
joschIf that is it, does anybody know if it's possible to write a shell script that writes to a file but doesn't create it if it doesn't exist? I.e. how to open a file for writing without O_CREAT? Is that possible?20:54
joschIf it isn't I guess the best we can do is to clean after ourselves if the file we just wrote to turned out to be a regular file instead of a character special.20:54
sigridtest -c FILE for character devices20:56
sigridtest -c /dev/hidraw... && echo blah >> /dev/hidraw...20:56
sigrid(probably)20:56
joschsigrid: that creates a race condition20:57
joschbetween checking and writing to it, the file might disappear and then we create a regular file through the redirection20:57
joschthe current code does a for d in /dev/hidraw*; do...20:58
joschso between evaluating the glob and doing the echo, /dev/hidrawXX disappears20:58
sigridwhat's that code do?20:58
joschsigrid: https://source.mnt.re/reform/reform-tools/-/blob/main/sbin/reform-standby#L4020:58
sigridyou need to put backlight on after the bind20:59
sigridI am pretty sure that's the reason why it sometimes creates normal files20:59
joschaha!21:00
sigridor always, which I'd always expect21:00
joschthat makes a lot of sense, thanks21:00
joschindeed the resume tasks should be in reverse order of the suspend tasks which currently they are not...21:01
joschsigrid: thank you, nice catch!21:01
sigridnp, I hope I am not wrong here ^__^"21:03
joschhrm... this still leaves me puzzled why the glob /dev/hidraw* matches anything21:03
sigridalso on a note related to lpc driver. as I understood it's not setting pm_power_off? would probably make sense to do that, so the systemd shutdown hack isn't needed21:04
sigridit would also work for distros that have none of that, like Void21:04
joschsigrid: can you create a merge request against https://source.mnt.re/reform/reform-tools/-/blob/main/lpc/reform2_lpc.c ?21:05
sigridif I get to that over the weekend, sure21:05
joschsigrid: what does writing xPWR0 to /dev/hidraw* do exactly?21:09
sigridit asks the keyboard to write to lpc over spi to shut off power rails, which lpc does21:09
sigridit doesn't give the chance for the kernel to issue a full shutdown of all devices, I believe, including nvme21:10
sigridhence that post in community about unsafe shutdowns on nvme, which I could also see here with 9front (but that's because 9front doesn't tell nvme it's shutting down yet)21:10
joschyeah, that's why I asked21:11
sigridsince that lpc driver module isn't built into the kernel, I think it should be able to override pm_power_off, which by default will probably be set to something that does not really work on reform21:12
sigriddon't think arm trusted firmware knows how to ask lpc to turn everything off, anyway21:13
joschsigrid: are you planning to reply to that forum post with your insights or would you otherwise mind me copypasting your messages from here to there?21:13
sigridyeah, feel free to do that21:14
joschokay!21:14
sigridshould be noted that is unverified information, I am not a linux kernel dev :)21:14
sigridI think reform's keyboard firmware might have kinda the same issue as trackball one - useless hid reports are being sent non-stop21:23
sigridI see 17Mb is transferred on one endpoint over 2 days, compared to 13Mb for the trackball21:23
sigridcan't imagine how it would ever be more data on the keyboard21:24
vkoskivOled draw commands are sent as hid reports to the keyboard21:24
vkoskivI'm writing things with that. I'd assume refreshing the oled at 50Hz would add up over time :D21:24
sigridI am not using that :)21:24
sigridthe laptop is mostly idle21:25
- Gooberpatrol_66 (QUIT: Remote host closed the connection) (~Gooberpat@user/gooberpatrol66)22:09
- oomono (QUIT: Quit: Connection closed for inactivity) (uid328183@id-328183.tinside.irccloud.com)22:24
sigridnvm, keyboard fw is fine. it's 9front's usb keyboard driver that sets a pretty small idle period (32ms?) as a workaround for raspi usb being crap22:49

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