#
…

2022-12-01

00:00steven has quit [Quit: ZNC 1.8.2 - https://znc.in]
00:01steven has joined #asahi-dev
00:01Dcow has joined #asahi-dev
00:11tenkuu has quit [Read error: Connection reset by peer]
00:13Dcow has quit [Ping timeout: 480 seconds]
00:17user982492_ has joined #asahi-dev
00:19chengsun has joined #asahi-dev
00:22user982492 has quit [Ping timeout: 480 seconds]
00:23Dcow has joined #asahi-dev
00:36Dcow has quit [Ping timeout: 480 seconds]
00:38chengsun has quit [Read error: Connection reset by peer]
00:38chengsun has joined #asahi-dev
00:51user982492_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:56chengsun_ has joined #asahi-dev
01:01chengsun has quit [Ping timeout: 480 seconds]
01:02Dcow has joined #asahi-dev
01:07chengsun has joined #asahi-dev
01:08chengsun_ has quit [Ping timeout: 480 seconds]
01:10Dcow has quit [Ping timeout: 480 seconds]
01:11chengsun_ has joined #asahi-dev
01:15chengsun has quit [Ping timeout: 480 seconds]
01:16user982492 has joined #asahi-dev
01:17chengsun has joined #asahi-dev
01:17chengsun_ has quit [Read error: Network is unreachable]
01:27user982492_ has joined #asahi-dev
01:31nopeslide has joined #asahi-dev
01:32user982492 has quit [Ping timeout: 480 seconds]
01:40tenkuu has joined #asahi-dev
01:46chengsun_ has joined #asahi-dev
01:50chengsun has quit [Ping timeout: 480 seconds]
01:51leafpaw has joined #asahi-dev
01:52chengsun has joined #asahi-dev
01:53digicyc2 has quit [Ping timeout: 480 seconds]
01:54chengsun_ has quit [Ping timeout: 480 seconds]
02:05goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:15chengsun has quit [Ping timeout: 480 seconds]
02:59ma3 has joined #asahi-dev
03:02phire_ has joined #asahi-dev
03:02phire is now known as Guest501
03:02phire_ is now known as phire
03:05ma2 has quit [Ping timeout: 480 seconds]
03:05Guest501 has quit [Ping timeout: 480 seconds]
03:25nicolas17 has quit [Quit: Konversation terminated!]
03:29user982492 has joined #asahi-dev
03:29user982492_ has quit [Read error: Connection reset by peer]
03:41eiln has joined #asahi-dev
03:42eiln has quit []
03:54tenkuu has quit [Read error: Connection reset by peer]
03:59tenkuu has joined #asahi-dev
04:02tenkuu has quit [Remote host closed the connection]
04:08tenkuu has joined #asahi-dev
04:10Dcow has joined #asahi-dev
04:18Dcow has quit [Ping timeout: 480 seconds]
04:38user982492_ has joined #asahi-dev
04:43user982492 has quit [Ping timeout: 480 seconds]
04:53user982492_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:50chadmedpovik: does macaudio need to explicitly handle SNDRV_CTL_IOCTL_ELEM_LOCK or is alsa meant to deal with that in a driver agnostic way?
05:50nopeslide has quit []
05:51nopeslide has joined #asahi-dev
05:55chadmedhm its the latter
05:57chadmedalsa lib returns 0 on snd_ctl_elem_lock but the element in question does not lock?
05:58chadmedaiui this is supposed to stop userspace from being able to change it but i can still twiddle it in alsamixer
06:00weitcis has joined #asahi-dev
06:10Dcow has joined #asahi-dev
06:12evanzheng has joined #asahi-dev
06:16SSJ_GZ has joined #asahi-dev
06:19Dcow has quit [Ping timeout: 480 seconds]
06:23nopeslide has quit []
06:23nopeslide has joined #asahi-dev
06:27evanzheng has quit [Remote host closed the connection]
06:30tenkuu has quit [Quit: WeeChat 3.7.1]
06:35user982492 has joined #asahi-dev
06:44user982492 has quit [Ping timeout: 480 seconds]
06:52weitcis has quit [Remote host closed the connection]
07:07psykose has joined #asahi-dev
07:08user982492 has joined #asahi-dev
07:44user982492 has quit [Ping timeout: 480 seconds]
07:53chadmed_ has joined #asahi-dev
08:05chadmed_huh so i can read and write values to the elems but still cant lock or unlock which sucks
08:06chadmed_i had an idea for a multi-level failsafe and part of that was being able to lock/unlock elems at will
08:11MajorBiscuit has joined #asahi-dev
08:12Dcow has joined #asahi-dev
08:14tim has joined #asahi-dev
08:15tim is now known as Guest523
08:20Dcow has quit [Ping timeout: 480 seconds]
08:28user982492 has joined #asahi-dev
08:30goldsoultheory has joined #asahi-dev
08:58goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
08:58Dcow has joined #asahi-dev
09:08leitao has joined #asahi-dev
09:10MajorBiscuit has quit [Ping timeout: 480 seconds]
09:12Guest523 has quit [Quit: Guest523]
09:13goldsoultheory has joined #asahi-dev
09:14Dcow has quit [Ping timeout: 480 seconds]
09:20_jannau_the mac studio storage is upgradeable if you know what you're doing and have the proper modules https://forums.macrumors.com/threads/upgrading-mac-studio-storage.2370048/
09:21Dcow has joined #asahi-dev
09:21svenjannau: thanks! looks like usb4 indeed sets different bits than tbt altmode in that data status register
09:22user982492 has quit [Ping timeout: 480 seconds]
09:22Dcowdifferent from thunderbolt3?
09:23sveni think so. technically thunderbolt 3 is an alternate mode while usb 4 isn't (lol, usb)
09:23chadmedof course its different, the usb-if's primary objective is to cause sven grief. maintaining usb is merely a consequence of that
09:25Dcowyeah, sometimes I read the logs and just want to send sven flowers or a cake to cheer him up
09:28ChaosPrincessSo, kind of a RFC: how to represent the touchbar for consumption by linux kernel. I have reversed most of the digitizer protocol, but idk how to hook it up properly.
09:29chadmedif its HID/HID-like i imagine you could draw some inspiration from the existing HID touchscreen drivers
09:29ChaosPrincessthe problem is that it is not _quite_ a touchscreen
09:30ChaosPrincessi guess i can try doing it as a regular touchscreen, but its likely to confuse userland
09:30chadmedwhat special handling does it need specifically?
09:31ChaosPrincessi do not want users to be able to drag a normal window there :P
09:31chadmedah of course :P
09:31chadmedare there any drivers for those cringe little screens they put on PC AIOs et al these days?
09:32ChaosPrincessthose screens tend to be connected to a microcontroller that actually drivers the screen, and communications are done over usb.
09:33chadmedis there nothing like that in front of the touchbar?
09:33ChaosPrincessand while i haven't looked too close at the screen part, it looks like there is just a framebuffer there
09:33ChaosPrincessnot on m1 touchbar, t2 had it, but you could also send framebuffers there
09:34chadmedsounds like something that would benefit from a bespoke userspace lib that does any special stuff with ioctls
09:36chadmedif its just a dumb framebuffer with a digitiser on top of it that we cant represent as a "normal" touchscreen
09:38chadmed_ has quit [Remote host closed the connection]
10:04Dcowit's like embedded stream deck
10:04ChaosPrincessyea, something like that
10:10MajorBiscuit has joined #asahi-dev
10:22c10l has quit [Read error: Connection reset by peer]
10:22c10l has joined #asahi-dev
10:26poviksounds to me like it should be a regular touchscreen kernel-wise
10:26povikno point in not using the right interface that's already there because you want to make it less compatible and enforce use-case
10:38dsharshakov has joined #asahi-dev
10:39dsharshakovChaosPrincess: hello! I wanted to reach out to either you or T2 people about touchbar userspace
10:39Dcowjust imagine KDE panel there ;)
10:40dsharshakovI think of writing a Rust-based touchbar service `auxdisplayd` for such cases as touchbar, ASUS ScreenPad or custom touchscreens makers want to attach
10:40* Dcoweven don't have any touchbar devices anymore
10:41_jannau_ChaosPrincess: iirc drm has a flag for non-desktop display devices
10:41ChaosPrincess_jannau_: how does that work?
10:41dsharshakovIt'd have a D-Bus (or socket) API for apps to register widgets with, as well as own widgets such as Fx (+esc) buttons or sth like that
10:42dsharshakovLikely we can avoid drm, since that's unlikely to fit well. T2 touchbar is a framebuffer, not a proper display controller with swaps etc
10:43dsharshakovThere's been a MIT-licensed BootCamp driver for TouchBar by someone, that just pushes pixels over usb
10:43ChaosPrincessyea, i looked at that, but i think it does swaps, no?
10:43j`ey"@non_desktop: Non desktop display (HMD)." (in include/drm/drm_connector.h, not sure what HDM is)
10:44chadmedhead-mounted display?
10:44MajorBiscuit has quit [Ping timeout: 480 seconds]
10:44j`eychadmed: ok like vr stuff
10:44dsharshakova drm driver would be difficult to prevent from being grabbed by the compositor (likely we'll have to either place our quasi-window there or ask for a DRM lease)
10:44dsharshakov"ok like vr stuff" <-- yes, for that
10:44chadmedyeah vr, but probably also used for significantly more lethal devices id say
10:45ChaosPrincessfighter pilot helmet? :P
10:45chadmedthats what i was thinking of yeah heh
10:47dsharshakovProbably a FB driver should be sufficient to render the touchbar at its 60 Hz with plain pixel copies. Maybe it'd be great to co-ordinate with T2 devs to propose a common device api to expose touchbar display with
10:48chadmedfwiw all those elgato stream deck things share some python lib for actually doing things with them
10:48ChaosPrincessis there even a t2 touchbar driver that exposes full features and not just f-keys for linux? i only know of a winders one
10:48dsharshakovI wanted to ask them whether someone can port that bootcamp driver to Linux to later try with my `auxdisplayd` approach
10:49ChaosPrincesschadmed: yea, but they are behind a usb attached controller that actually draws the screen, while m1 seems to have it in software
10:49dsharshakovYes, but existence of one means people discovered how to talk to bridgeOS to customize the touch bar. Maybe lack of Linux driver is just bc nobody cares
10:49sventhe hw interface is likely the same, it's just that apple wrote their own driver running on the T2 and somehow proxies that over a custom usb protocol
10:50dsharshakovand t2linux likely have less work to do and somebody might devote their time to writing a Linux driver + discussing the concept
10:51_jannau_ah, non_desktop/HMD isn't that useful then. So the hope is then that compositors prefer screens with height > 128 pixels or what ever resolution the touchbar has
10:51dsharshakovI wouldn't trust in compositors that much
10:52svenlet's please not bypass some kernel framework just because compositors are possibly broken
10:52dsharshakovMaybe a new flag? Non_desktop | non_vr = don't touch unless asked to?
10:52ChaosPrincessyea, i want to just hook it up in a sane way, just maybe hide it from the compositor
10:53svenChaosPrincess: yeah, that sounds good
10:53dsharshakovthey mustn't use non_desktop screens unless asked by a VR client, and the NON_VR flag will tell VR clients to avoid the bar as well
10:54dsharshakovHowever, should touchbar support be in or stay away from compositors? I'm mostly for the latter approach for better cross-desktop support and easier app integration
10:55dsharshakovHowever, someone might have different ideas and then compositor must use the touchbar, but just know about it and use wisely
10:56chadmedimho i think its a cool exercise in RE and all that, but theres very little chance anyone is going to put in the dev time to support it in desktop apps. even apple seem to have abandoned it
10:56chadmedand if its an EOL feature on the machines then theres even less incentive for people to support it
10:57dsharshakovMaybe the question should be postponed to when there's understanding of the display controller such as a m1n1 experiment, so that we see the properties better and know whether it's DRM or not
10:57povikright, better not make grandiose plans with it and instead head for some minimal usable integration
10:57_jannau_please don't start worrying about this before there is at least a PoC mipi drm/kms driver
10:57ChaosPrincessif there is support for f-keys and maybe 1 alternative layer with the fn+f-keys, i'd be happy
10:58sven_jannau_: +1
10:58dsharshakov_jannau_: +1, first we need an understanding of the device to know how to hook it up in kernel
10:58_jannau_the hardware ought to use standard interfaces. if user space can not deal with that we have to and can fix user space
10:59dsharshakovThe userspace part could be discussed in T2 chats, since apparently there's a knowledge on how to get the display working on those machines
11:00povikhuh? "how to get the display working" and "the userspace part" sound unrelated :D
11:00dsharshakovSome more integration than virtual keys is possible: volume + brightness controls (sliders) and global menu can be done relatively easily
11:01dsharshakovpovik: I mean if they're interested they know how to do a driver and then try out userspace stuff
11:01dsharshakov(and the USB driver could easily live in userspace as well)
11:09dsharshakovmaybe hwdb or libinput quirks can be used to disable the touchscreen input from being mapped, so touch part can be exposed as a touchscreen
11:13dsharshakovthis type of quirk appears to be able to just discard the unwanted events for all libinput users: https://gitlab.freedesktop.org/libinput/libinput/-/blob/main/quirks/30-vendor-wacom.quirks#L28
11:18MajorBiscuit has joined #asahi-dev
11:21user982492 has joined #asahi-dev
11:27dsharshakov has quit [Quit: Page closed]
11:29leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:31leitao has joined #asahi-dev
11:37leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:38leitao has joined #asahi-dev
11:41leitao has quit []
11:48user982492 has quit [Ping timeout: 480 seconds]
11:49leitao has joined #asahi-dev
11:52leitao has quit []
12:19minecrell has quit [Remote host closed the connection]
12:21minecrell has joined #asahi-dev
12:40c10l has quit [Ping timeout: 480 seconds]
12:44c10l has joined #asahi-dev
12:56tobhe_ has joined #asahi-dev
13:00tobhe has quit [Ping timeout: 480 seconds]
13:05leitao has joined #asahi-dev
13:11leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
13:14nicolas17 has joined #asahi-dev
13:17leitao has joined #asahi-dev
13:20leitao has quit []
13:26MajorBiscuit has quit [Ping timeout: 480 seconds]
13:27leitao has joined #asahi-dev
13:31leitao has quit []
13:48leitao has joined #asahi-dev
14:03leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:21leitao has joined #asahi-dev
14:27leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:43leitao has joined #asahi-dev
15:16garuru11 has joined #asahi-dev
15:23leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:28leitao has joined #asahi-dev
15:44beeblebrox has joined #asahi-dev
15:58leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:59leitao has joined #asahi-dev
16:05amarioguy2 has joined #asahi-dev
16:11amarioguy2 has quit [Remote host closed the connection]
16:13gladiac has joined #asahi-dev
16:20gladiac has quit [Quit: k thx bye]
16:20kode54 has quit [Quit: Ping timeout (120 seconds)]
16:21kode54 has joined #asahi-dev
16:26jluthra has quit [Remote host closed the connection]
16:27jluthra has joined #asahi-dev
16:29leitao has quit [Remote host closed the connection]
16:32leitao has joined #asahi-dev
16:33tenkuu has joined #asahi-dev
16:54marcansven: you've got mail :)
16:56marcandsharshakov: it's DRM, it has to be DRM (the legacy framebuffer stuff is deprecated)
16:57marcanusing those flags to keep it out of compositor's reach sounds like a plan (or maybe new flags or something, maybe discuss with #dri-devel?)
16:57marcanbut I expect we'll have a daemon doing uinput to emulate F keys and that's that for a while
16:58marcanand yes we'll need a libinput quirk similarly, to keep it from being interpreted as a regular touchscreen
17:07svenok, will take a look later
17:14dsharshakov has joined #asahi-dev
17:18dsharshakovmarcan: yes, uinput + many decent things daemon is what we want likely. I wanted to discuss some of its working principles. It could be done with Rust and egui (just see it, appears to be a nice toolkit which can be shaped into a touchsceen-first UI for constrained space)
17:19dsharshakovHowever, it's necessary to know how should it access the device and will it be root or not. Likely needs to be either root or a system daemon getting uinput access permission
17:20dsharshakovAnd then things go much complex since it will also need to keep track of user logins, seat and VT management etc...
17:20dsharshakov has quit [Quit: Page closed]
17:27leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:32leitao has joined #asahi-dev
17:52leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:54leitao has joined #asahi-dev
18:04leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:06leitao has joined #asahi-dev
20:07gladiac has joined #asahi-dev
20:10leitao has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:25___nick___ has joined #asahi-dev
20:25___nick___ has quit []
20:26gladiac has quit [Quit: k thx bye]
20:27___nick___ has joined #asahi-dev
20:44garuru11 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:59garuru11 has joined #asahi-dev
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:24nicolas17 has quit [Quit: Konversation terminated!]
21:41garuru11 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:42garuru11 has joined #asahi-dev
21:48garuru11 has quit [Read error: Connection reset by peer]
21:54blazra has joined #asahi-dev
23:10tenkuu_ has joined #asahi-dev
23:17tenkuu has quit [Ping timeout: 480 seconds]
23:28SSJ_GZ has quit [Ping timeout: 480 seconds]
…