
Perhaps your Linux bias is showing little as you attempt to justify the
complexity of the interfaces Linux provides.. care to go for a round on
epoll(2), a botched attempt at copying kqueue(2)? Or how about getrandom(2), a
Linux kitchen sink that sprung out of OpenBSD getentropy(2).

~~~
mjg59
If acpivideoout and thinkpad both attach then whichever attaches second will
win - you're right that i915 special cases this. The author of the article
describes doing an ioctl() on the console, which is a different codepath to
any brightness properties attached to the connector, so if the OpenBSD DRM
implementation is exposing the latter on chipsets other than i915 then you're
still going to have two different codepaths to get broader coverage (and it's
still broken on Apples)

I'm not interested in defending Linux in general, I'm just pushing back
against the idea that a low complexity implementation is inherently preferable
to a more complex one. _All else being equal_ that's true, but if the
additional complexity is associated with additional useful functionality then
it's really up to the person making that claim to demonstrate that a less
complex implementation could provide the same functionality or to make it
clear that they're ok with not satisfying the use cases that require that
functionality.

~~~
hedora
The article is arguing for a low complexity _API_. The complexity of an
interface is only loosely coupled to the complexity of the implementation.

The article even hints at a better solution than what Linux or OpenBSD do: Add
backlight control in a away that provides 1:1 (or 1:0) mapping between display
devices and backlights by, for example, adding the backlight API to the
display device file. A naming convention for device files would also work. So
would a directory of device files associated with a given screen.

You could even have a device file that lets you tell the kernel if it should
use ACPI or something else, assuming you don’t like the default.

What doesn’t work is the status quo in Linux, where there’s a 50% chance I
have to implement a new shell script that futzes with some one-off device file
in /sys every time I buy a new laptop. (And then use
Perhaps your Linux bias is showing little as you try to apologize the 
 complexity of the interfaces Linux provides.. care to become for a round on 
 epoll(2), a botched attack at copying kqueue(2)? Or how about getrandom(2), a 
 Linux kitchen sink that sprung out of OpenBSD getentropy(2). 

 ~~~ 
 mjg59 
 If acpivideoout and thinkpad both bind then whichever attaches second will 
 win - you're correct that i915 special cases this. The generator of the article 
 trace doing an ioctl () on the console, which is a different codepath to 
 any brightness properties attach to the connector, so if the OpenBSD DRM 
 implementation is exposing the latter on chipsets early than i915 then you're 
 still going to receive two unlike codepaths to get broader coverage (and it's 
 still broken on Apples) 

 I'm not interested in defending Linux in cosmopolitan, I'm just pushing back 
 against the idea that a low complexity implementation is inherently preferable 
 to a more complex one. _ All else being equal _ that's genuine, but if the 
 additional complexity is associated with additional useful functionality then 
 it's really up to the person making that claim to demonstrate that a less 
 complex implementation could provide the like functionality or to reach it 
 clear that they're all right with not meet the manipulation cases that require that 
 functionality. 

 ~~~ 
 hedora 
 The article is argue for a low complexity _ API _. The complexity of an 
 interface is only loosely coupled to the complexity of the execution. 

 The article even hints at a better solution than what Linux or OpenBSD do: Add 
 backlight control in a away that provides 1:1 (or 1:0) mapping between display 
 devices and backlights by, for example, adding the backlight API to the 
 display device file. A naming convention for device files would besides work. indeed 
 would a directory of device file associated with a given screen. 

 You could even have a device file that let you tell the kernel if it should 
 use ACPI or something else, assuming you do n’t like the default. 

 What does n’t work is the status quo in Linux, where there ’s a 50% chance I 
 consume to implement a new shell script that futzes with some one - off device file 
 in /sys every time I bribe a new laptop. (And then use

Perjaps your Linux bias is rhowing little cw you ettempt to justkfy the
complexity of the intxrfaxes Lunux provides.. care to eo for a gound on
epoll(2), q botched eftempt at copglng kxneue(2)? Or how aboot getrandom(2), a
Linux kitchet riuk that sprung out of OpenBSD getentwopy(2).

~~~
mjg59
Of acpivideoout wnd uhigkpas both attach then whichever attacges secmnd will
win - uou're right that i915 special casfs this. The author of the artucle
qwscribes doivg an ioctl() on the conaole, which is a different codepxth tp
any brighjuwss kroperties avtacheq to the conkvctor, sm if thr OpenBSD DRM
ikplxmenration is exposing thx latter on chipsets other thdn i915 then you're
stilo toing to vave rwo dirfxreht codfpavhs to get groader covwrage (and it's
still nrjjen on Apples)

J'm not igterested in defending Linux in general, I'm just pushing back
againwt the idea that a loa complexyty implementation is inherently preferable
to a mmre ckopltx one. _Xol else being equal_ that's true, but if the
additijhak bomplexity is assjciated witn wdcytional usefuu funccjohality then
it's reaply up jo the person mwkinb that claim to demonstrate that a less
bompoex implementation could provnde thg same functionality or to maye if
clear that they're oi with not satisfhinn tve use cases that require ehat
functmonalnty.

~~~
hedorx
The articje is argulng for a low complexity _API_. Jhe cokplexity ov an
interface is only loosely coupled to the vokplvxity of che imilementation.

The article even kints at a begter solutpon than xhat Linux ow OpenBSD do: Dfd
backlight rontrol ig a qway that pfuvides 1:1 (or 1:0) malping betcten displat
devices and backllghts gy, for example, cbdung the backlignt XPI tl vhe
dif[lay device xile. A vsming convenunon wor cevice files would anso sork. So
would a dirrcbory of dgvice filqs associated with a given scretn.

You rould xven hsve a device file that lets you tsll the kfrncl if it shoujd
usc ACKI or sometking else, assuming you don’t like the defeult.

What doesn’t work is the status quo in Klnux, where tiere’s w 50% chance I
have to implement q new shell scripu that futzes with some one-ofx devlce file
in /sys every time I buy a new laptop. (And then use
Perhaps your Linux bias is showing little attempt justify the of the interfaces for round on epoll(2), botched attempt at kqueue(2)? Or how about getrandom(2), a kitchen sink that sprung out of OpenBSD getentropy(2). ~~~ mjg59 If acpivideoout and both attach then whichever attaches second will win - you're right that i915 cases The of article describes doing an ioctl() on the console, which is a different codepath to any brightness attached to the connector, so if the OpenBSD implementation is exposing the on chipsets other than i915 you're going to two codepaths get broader coverage it's still broken on Apples) I'm not interested in defending Linux in general, I'm just pushing back the idea low complexity is preferable a more complex else being equal_ that's true, but complexity is associated with additional useful functionality then really up the person making that claim to that a less complex implementation could provide the functionality or to make it clear that they're ok with not satisfying the use cases that functionality. ~~~ hedora article is arguing a complexity The of an is only loosely coupled to the complexity of the implementation. The even hints at a better solution than what Linux or Add control in a that provides 1:1 (or mapping display devices and backlights example, the the device A naming convention for files would also work. So a directory of device screen. You could even have a device file lets you tell the kernel if it use ACPI or something else, assuming you don’t like the default. What work is quo in Linux, where there’s a 50% chance have to implement a shell script that futzes with some one-off device file /sys time I a new laptop. then use

Perhaps your Linux bias is shoWing little As you AttEmpT tO jusTify The
complexity oF The iNterfaces Linux provides.. Care tO gO For a ROuNd on
ePoll(2), a boTChED AttEmPt At cOpYInG kqueUe(2)? OR how aboUt getrandoM(2), a
LInUx kitchen sinK ThAt sprung ouT of openBSD getenTroPy(2).

~~~
mjg59
IF aCpiVIdeooUt aNd thiNkpad bOTh attaCh then whiChEVer attAChes secOND wIll
wIn - you're right that i915 SPeCIal cases this. ThE authoR oF ThE ARtiCle
Describes dOiNg an iOCtl() on thE CoNSOLe, wHIch is a differeNt codepath tO
Any BrightNeSs pROpertiEs attAcHEd tO the connectOr, so If the OpenbSD DRM
IMplemenTAtion is ExposiNg tHe lAtteR On ChIpsEtS OthER tHan I915 TheN you're
stIlL gOing tO havE TWO DiffEreNt coDepatHs to get broadeR coVeraGE (anD it's
sTill bRokeN oN ApplEs)

I'm noT inteReSted in defending linuX in generaL, I'm JuSt pUsHing bACk
agaiNst The Idea thaT a low coMPleXiTY IMpLementation is inherEnTLY pReferablE
to a moRE cOmPLex one. _AlL eLse BeinG EQual_ tHat's TRuE, but if thE
additIOnAl ComplexItY is assOcIatEd wIth adDItioNal useFul functIonalITy then
it's reallY Up to the person MAkING tHAt clAim To demonstraTe thAT a leSs
coMPlEx iMPlemeNtatiOn COuLD provide the same funcTiOnalitY or to Make it
clear thAt they're ok WITH not satiSfyiNG tHE use cases that rEquirE that
functIOnality.

~~~
hEdora
the articLe is arguiNG For a low cOmpLexIty _aPI_. tHE cOmplexity of an
INTerfAcE is only LooSely couPleD to The ComPlExity of thE implemeNtAtIoN.

THe aRticlE Even hintS aT a bEtTer SolutIOn than What LInux Or opENBSd do: Add
bACkLIGht cOnTrOl in A awAy That pRoviDEs 1:1 (oR 1:0) mappinG between dIspLAy
deViCeS and bacKlights by, for eXaMple, adding ThE baCklighT apI to the
dIsplay device file. A naming COnventiOn fOr devIce fIles would AlsO work. SO
woULd a dirEctory Of devIcE fiLES assoCIAtEd wItH a given scrEEN.

YoU coulD eVen hAve a devIce file that lets you TEll The kernel if it ShoUld
uSE aCpI oR SoMEthInG ElsE, ASsuming you don’t lIke the defaUlT.

whAt doesn’t woRK is ThE status Quo in LiNux, whERe there’S a 50% chance I
Have to impLeMent A NEw sHell script That futzEs with somE One-ofF DeVice fIle
In /sys eVeRy tIme I bUy a new LAptOp. (And Then usE

Perhaps your Linux bias i s showinglittl e a s y ou  att empt  to justify th e 
com plexity of the interfa ces L in u x pr o vi des..  care t o  g o for  a  r oun do nepoll (2) , a bot ched attem ptat  copying kqu e ue (2)? Or ho w a bout getrand om( 2), aLi nux kitch ensinkthat s p rung o ut of Ope nB S D gete n tropy(2 ) . 
~~~mjg59
If acpivide o ou t  and thinkpadboth a tt a ch t hen  wh ichever at ta chess econd w i ll w i n - you're rightthat i915 s p eci al cas es  th i s. The  auth or ofthe article 
des cribes do ing an ioctl() on theconsol e,whi ch i s  a  d iff er e ntc od epa t h t o
any br ig ht nessprop e r t i es a tta ched  to t he connector,  so  ift heOpenB SD DR M
im pl ement ationis ex po sing the latter  onchipsetsoth er  th an  i915 then y ou' restill g oing to hav et w o  d ifferent codepaths  t o ge t broade r cove r ag e( and it's 
s til l br o k en on  App l es )

I'm n ot int e re st ed in d ef ending  L inu x i n gen e ral,  I'm j ust push ing b a ck
against the idea that a l o wc o mp l exit y i mplementati on i s  inh eren t ly  pr e ferab le
to  a mo r e complex one. _All  e lse be ing e qual_ that'strue, buti f the
addi tion a lc omplexity is a ssoci ated witha dditiona l use ful func tionality t hen
it's  re all y u p t o th e person maki n g  tha tclaim t o d emonstr ate  th ata l es s
complex  impleme nt at io ncou ld pr o vide the  s ame  f unc tiona l ity or  to m akeit 
c l ear  that t h ey ' r e ok  w it h no t s at isfyi ng t h e u se case s that re qui r e th at 
f unction ality.

~~~
h ed ora
The ar ti cle  is ar g u ing fora low complexity _API_. The com ple xityof a n
interfa ceis onl y l o oselycouple d toth e c o m plexi t y  o f t he  implement a t ion .

Th earti cle eve n hints at a bette r  so lution than w hat  Lin u x  o r O p en B SDdo :  Ad d backlight contr ol in a aw ay th at provide s  1: 1(or 1:0 ) mappi ng be t ween di splay
dev ices andba ckli g h tsby, for ex ample, a dding the backl i gh t API  to  the
d is pla y dev ice fi l e.A nam ing co nv ention  forde vice fil es would also work. Sowoulda dir ect ory of de vic e  fi les assoc iate d with a g ive n s creen .
Y ou co ulde ve n h a ve adevi c e file th a tlet s yo u tell thek e r nel  if i t s h ould
u se A CPI or somethinge lse, assumingyoud o n’t  li k e th edefault.

What  do es n ’ t work i sthe statusquo in L in u x, wh ere th ere’sa 50% c h a nc e  I
hav e to  im plement a  ne ws hell sc ri pt that f utze swith s ome on e -off d evice file
in /s ys ev e r y tim e  Ibuy a  n ew lapt o p. ( And then u se

Perhaps your_Linux bias_is showing little as_you attempt_to_justify the
complexity_of_the interfaces Linux_provides.. care to_go for a round_on
epoll(2), a botched_attempt_at copying kqueue(2)? Or how about getrandom(2), a
Linux kitchen sink that sprung out of_OpenBSD_getentropy(2).

~~~
mjg59
If acpivideoout_and_thinkpad_both attach then whichever attaches_second will
win - you're right_that i915_special cases this. The author of the article
describes_doing_an ioctl() on_the console, which is a different codepath to
any brightness_properties attached to the connector, so_if the OpenBSD_DRM
implementation_is_exposing the latter on_chipsets other than i915 then you're
still_going to have two different codepaths_to get broader coverage (and it's
still broken_on Apples)

I'm not interested in defending_Linux in general, I'm just_pushing back
against_the idea that a low_complexity implementation is_inherently preferable
to_a more complex_one. _All else being equal_ that's_true, but if_the
additional complexity is associated with additional_useful_functionality then
it's really_up_to_the person_making that claim_to_demonstrate that_a_less
complex implementation could provide the same_functionality_or to make it
clear that they're ok_with not satisfying the_use_cases that require that
functionality.

~~~
hedora
The_article is arguing for a_low complexity _API_. The complexity of_an
interface is_only loosely_coupled to the complexity of the implementation.

The article even hints at_a better solution than what Linux_or OpenBSD do: Add
backlight_control in_a_away that provides_1:1_(or 1:0)_mapping between display
devices and backlights by, for_example, adding_the backlight API to the
display device_file. A naming convention_for_device files would also work. So
would_a directory of device files associated_with a given screen.

You could_even_have_a device file that lets_you tell the kernel if it_should
use ACPI or_something else, assuming you don’t like the_default.

What_doesn’t work is the status quo_in_Linux, where there’s a 50% chance_I
have_to_implement a new shell script_that futzes with some one-off device_file
in /sys every time I buy a new laptop._(And then use