Skip to content

Commit 29261c9

Browse files
committed
deploy: 19cacbc
1 parent 36396e4 commit 29261c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+4763
-3632
lines changed

feed.atom

Lines changed: 171 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,178 @@
44
<title>Eric Winnington</title>
55
<link rel="self" href="http://ewinnington.github.io/" />
66
<rights>2025</rights>
7-
<updated>2025-04-16T11:09:52Z</updated>
7+
<updated>2025-09-10T05:09:04Z</updated>
88
<subtitle>A collection of thoughts, code and snippets.</subtitle>
9+
<entry>
10+
<id>http://ewinnington.github.io/posts/omarchy-brightness</id>
11+
<title>Omarchy - Setting screen brightness over HDMI by terminal</title>
12+
<link href="http://ewinnington.github.io/posts/omarchy-brightness" />
13+
<updated>2025-09-10T00:00:00Z</updated>
14+
<content>&lt;h1 id="omarchy"&gt;Omarchy&lt;/h1&gt;
15+
&lt;p&gt;Witht he coming arrival of the end of Windows10, I installed &lt;a href="https://omarchy.org/"&gt;Omarchy&lt;/a&gt; on one my &lt;a href="https://www.bee-link.com/products/beelink-mini-s12-n95"&gt;Beelink MiniS12 N95&lt;/a&gt;, fully expecting just to play with it and revert back to Windows11 on the machine. Win11 was slow on the machine, but a decent cheap desktop to have connected to a screen. &lt;em&gt;Omarchy&lt;/em&gt; on the Beelink, even on the tiny hardware, has been absolutely flying. To the point that it's now my main desktop for everything right now.&lt;/p&gt;
16+
&lt;p&gt;One thing I needed to do is to handle the brightness of the screen, from the command line, so I could toggle the screen brightness from the command line. I discovered I could use &lt;code&gt;ddcutil&lt;/code&gt; which I installed using the package manager on Omarchy.&lt;/p&gt;
17+
&lt;pre&gt;&lt;code&gt;sudo ddcutil detect
18+
Display 1
19+
I2C bus: /dev/i2c-0
20+
DRM_connector: card1-HDMI-A-2
21+
EDID synopsis:
22+
Mfg id: BNQ - UNK
23+
Model: BenQ EL2870U
24+
Product code: 31049 (0x7949)
25+
Serial number: 58M02252SL0
26+
Binary serial number: 21573 (0x00005445)
27+
Manufacture year: 2021, Week: 34
28+
VCP version: 2.2
29+
&lt;/code&gt;&lt;/pre&gt;
30+
&lt;p&gt;My screen is connected by HDMI, do I was able to get the information on it.&lt;/p&gt;
31+
&lt;pre&gt;&lt;code&gt;~ ❯ sudo usermod -aG i2c $USER
32+
&lt;/code&gt;&lt;/pre&gt;
33+
&lt;p&gt;So I didn't want to sudo all the time for my screen display information, I added my user the control of the i2c bus. This could be a security weakening, there's other ways to do it, but for my case it's fine.&lt;/p&gt;
34+
&lt;pre&gt;&lt;code&gt;~ ❯ ddcutil detect
35+
Display 1
36+
I2C bus: /dev/i2c-0
37+
DRM_connector: card1-HDMI-A-2
38+
EDID synopsis:
39+
Mfg id: BNQ - UNK
40+
Model: BenQ EL2870U
41+
Product code: 31049 (0x7949)
42+
Serial number: 58M02252SL0
43+
Binary serial number: 21573 (0x00005445)
44+
Manufacture year: 2021, Week: 34
45+
VCP version: 2.2
46+
&lt;/code&gt;&lt;/pre&gt;
47+
&lt;p&gt;Then getting and setting the brightness was done with the following commands: &lt;code&gt;ddcutil getvcp 10&lt;/code&gt; and &lt;code&gt;ddcutil setvcp 10 20&lt;/code&gt;&lt;/p&gt;
48+
&lt;pre&gt;&lt;code&gt;~ ❯ ddcutil getvcp 10
49+
VCP code 0x10 (Brightness ): current value = 40, max value = 100
50+
51+
~ ❯ ddcutil setvcp 10 20
52+
&lt;/code&gt;&lt;/pre&gt;
53+
&lt;p&gt;To get a listing of what codes the screen supports, you can use &lt;code&gt;ddcutil capabilities&lt;/code&gt;.&lt;/p&gt;
54+
&lt;pre&gt;&lt;code&gt;ddcutil capabilities
55+
Model: EL2870U
56+
MCCS version: 2.2
57+
Commands:
58+
Op Code: 01 (VCP Request)
59+
Op Code: 02 (VCP Response)
60+
Op Code: 03 (VCP Set)
61+
Op Code: 07 (Timing Request)
62+
Op Code: 0C (Save Settings)
63+
Op Code: E3 (Capabilities Reply)
64+
Op Code: F3 (Capabilities Request)
65+
VCP Features:
66+
Feature: 02 (New control value)
67+
Feature: 04 (Restore factory defaults)
68+
Feature: 05 (Restore factory brightness/contrast defaults)
69+
Feature: 08 (Restore color defaults)
70+
Feature: 0B (Color temperature increment)
71+
Feature: 0C (Color temperature request)
72+
Feature: 10 (Brightness)
73+
Feature: 12 (Contrast)
74+
Feature: 14 (Select color preset)
75+
Values:
76+
04: 5000 K
77+
05: 6500 K
78+
08: 9300 K
79+
0b: User 1
80+
Feature: 16 (Video gain: Red)
81+
Feature: 18 (Video gain: Green)
82+
Feature: 1A (Video gain: Blue)
83+
Feature: 52 (Active control)
84+
Feature: 60 (Input Source)
85+
Values:
86+
0f: DisplayPort-1
87+
11: HDMI-1
88+
12: HDMI-2
89+
Feature: 62 (Audio speaker volume)
90+
Feature: 72 (Gamma)
91+
Invalid gamma descriptor: 50 64 78 8c a0
92+
Feature: 7D (Unrecognized feature)
93+
Values: 00 01 02 (interpretation unavailable)
94+
Feature: 7E (Trapezoid)
95+
Values: 03 0F 10 11 12 (interpretation unavailable)
96+
Feature: 7F (Unrecognized feature)
97+
Feature: 80 (Keystone)
98+
Values: 01 02 03 (interpretation unavailable)
99+
Feature: 86 (Display Scaling)
100+
Values:
101+
01: No scaling
102+
02: Max image, no aspect ration distortion
103+
05: Max vertical image with aspect ratio distortion
104+
0c: Unrecognized value
105+
10: Unrecognized value
106+
11: Unrecognized value
107+
13: Unrecognized value
108+
14: Unrecognized value
109+
15: Unrecognized value
110+
16: Unrecognized value
111+
17: Unrecognized value
112+
Feature: 87 (Sharpness)
113+
Feature: 8D (Audio mute/Screen blank)
114+
Values: 01 02 (interpretation unavailable)
115+
Feature: AC (Horizontal frequency)
116+
Feature: AE (Vertical frequency)
117+
Feature: B2 (Flat panel sub-pixel layout)
118+
Feature: B6 (Display technology type)
119+
Feature: C0 (Display usage time)
120+
Feature: C6 (Application enable key)
121+
Feature: C8 (Display controller type)
122+
Feature: C9 (Display firmware level)
123+
Feature: CA (OSD/Button Control)
124+
Values:
125+
01: OSD disabled, button events enabled
126+
02: OSD enabled, button events enabled
127+
Feature: CC (OSD Language)
128+
Values:
129+
01: Chinese (traditional, Hantai)
130+
02: English
131+
03: French
132+
04: German
133+
05: Italian
134+
06: Japanese
135+
07: Korean
136+
09: Russian
137+
0a: Spanish
138+
0b: Swedish
139+
0d: Chinese (simplified / Kantai)
140+
0e: Portuguese (Brazil)
141+
0f: Arabic
142+
12: Czech
143+
14: Dutch
144+
1a: Hungarian
145+
1e: Polish
146+
1f: Romanian
147+
Feature: D6 (Power mode)
148+
Values:
149+
01: DPM: On, DPMS: Off
150+
05: Write only value to turn off display
151+
Feature: DA (Scan mode)
152+
Values:
153+
00: Normal operation
154+
02: Overscan
155+
Feature: DC (Display Mode)
156+
Values:
157+
04: User defined
158+
05: Games
159+
0b: Unrecognized value
160+
0c: Unrecognized value
161+
0e: Unrecognized value
162+
0f: Unrecognized value
163+
12: Unrecognized value
164+
13: Unrecognized value
165+
21: Unrecognized value
166+
Feature: DF (VCP Version)
167+
&lt;/code&gt;&lt;/pre&gt;
168+
&lt;p&gt;This was what my BenQ exposes.&lt;/p&gt;
169+
&lt;h2 id="ease-of-use"&gt;Ease of use&lt;/h2&gt;
170+
&lt;p&gt;Discovered that ddcutil allows relative up downs:&lt;/p&gt;
171+
&lt;pre&gt;&lt;code&gt;~ ❯ ddcutil setvcp 10 + 10
172+
~ ❯ ddcutil setvcp 10 - 10
173+
&lt;/code&gt;&lt;/pre&gt;
174+
&lt;h2 id="next-steps"&gt;Next steps&lt;/h2&gt;
175+
&lt;p&gt;I need to figure out how to wire up these commands to the brightness up / down key commands on Omarchy - so I can control the brightness on the keyboard. Still not sure how to get that configuration working, since it doesn't work out of the box with my screen with the default tooling.&lt;/p&gt;
176+
</content>
177+
<summary>&lt;p&gt;Witht he coming arrival of the end of Windows10, I installed &lt;a href="https://omarchy.org/"&gt;Omarchy&lt;/a&gt; on one my &lt;a href="https://www.bee-link.com/products/beelink-mini-s12-n95"&gt;Beelink MiniS12 N95&lt;/a&gt;, fully expecting just to play with it and revert back to Windows11 on the machine. Win11 was slow on the machine, but a decent cheap desktop to have connected to a screen. &lt;em&gt;Omarchy&lt;/em&gt; on the Beelink, even on the tiny hardware, has been absolutely flying. To the point that it's now my main desktop for everything right now.&lt;/p&gt;</summary>
178+
</entry>
9179
<entry>
10180
<id>http://ewinnington.github.io/posts/MIQP</id>
11181
<title>It’s a proportional allocation - how hard can it be? Going from Water filling to QP</title>
@@ -2220,90 +2390,4 @@ aaa &amp;gt; eee
22202390
</content>
22212391
<summary>&lt;p&gt;When working with large amounts of data, extraction, transforms and loads procedures can hide the source of the original data and make inquiries on "where did this data come from and what happened to it?" difficult to answer.&lt;/p&gt;</summary>
22222392
</entry>
2223-
<entry>
2224-
<id>http://ewinnington.github.io/posts/tesla-megapack</id>
2225-
<title>Tesla Megapacks put into context</title>
2226-
<link href="http://ewinnington.github.io/posts/tesla-megapack" />
2227-
<updated>2022-11-09T21:40:00Z</updated>
2228-
<content>&lt;h1 id="tesla-megapacks"&gt;Tesla Megapacks&lt;/h1&gt;
2229-
&lt;p&gt;Tesla on Twitter announced: &lt;a href="https://t.co/aw85eHECXI"&gt;&amp;quot;Meet Megafactory, our new Megapack factory in Lathrop, CA 🔋🔋🔋&amp;quot;&lt;/a&gt;&lt;/p&gt;
2230-
&lt;p&gt;Tesla's energy division has recently completed their new Megapack factory in Lathrop California , which they claim can produce currently 10'000 Megapacks a year. How much storage is that and how does this compare to a Hydropower pump storage plant?&lt;/p&gt;
2231-
&lt;h2 id="tesla-megapacks-specs-per-pack"&gt;Tesla megapacks Specs per pack&lt;/h2&gt;
2232-
&lt;ul&gt;
2233-
&lt;li&gt;4 Hour Duration&lt;/li&gt;
2234-
&lt;li&gt;Power: 970 kW&lt;/li&gt;
2235-
&lt;li&gt;Energy: 3,916 kWh per Megapack&lt;/li&gt;
2236-
&lt;li&gt;Round Trip Efficiency: 93.5%&lt;/li&gt;
2237-
&lt;li&gt;9.12 m x 1.65 m x 2.79 m&lt;/li&gt;
2238-
&lt;li&gt;38,100 kg&lt;/li&gt;
2239-
&lt;li&gt;~$2 million per pack&lt;/li&gt;
2240-
&lt;/ul&gt;
2241-
&lt;h2 id="offer"&gt;Offer&lt;/h2&gt;
2242-
&lt;p&gt;An offer was generated on the Tesla Energy website to get an appropriate pricing for the largest system they offer.&lt;/p&gt;
2243-
&lt;ul&gt;
2244-
&lt;li&gt;1000 Megapack&lt;/li&gt;
2245-
&lt;li&gt;969.6 MW Power&lt;/li&gt;
2246-
&lt;li&gt;3916 MWh Energy Megapack&lt;/li&gt;
2247-
&lt;li&gt;Duration: 4 Hours&lt;/li&gt;
2248-
&lt;li&gt;Delivery: Q3 2024&lt;/li&gt;
2249-
&lt;li&gt;Estimated Price (California) $1,832,519,850&lt;/li&gt;
2250-
&lt;li&gt;Est. Annual Maintenance $4,821,480 - Maintenance Price escalates at 2% per year&lt;/li&gt;
2251-
&lt;/ul&gt;
2252-
&lt;p&gt;Based on this, we can see that 10'000 megapacks represent about 39160 MWh of storage (39 GWh), with a sales cost of approx $18 billion.&lt;/p&gt;
2253-
&lt;p&gt;So how does this compare to the two latest large Swiss Pump-Storage Hydropowerplants?&lt;/p&gt;
2254-
&lt;h2 id="hydropower-plants"&gt;Hydropower plants&lt;/h2&gt;
2255-
&lt;h3 id="nant-de-drance-pump-storage-extension"&gt;Nant-de-Drance pump-storage extension&lt;/h3&gt;
2256-
&lt;ul&gt;
2257-
&lt;li&gt;1 Pump-storage power plant&lt;/li&gt;
2258-
&lt;li&gt;Power 900 MW (Turbines and Pumps)&lt;/li&gt;
2259-
&lt;li&gt;Storage 20 GWh&lt;/li&gt;
2260-
&lt;li&gt;Duration: 19 Hours&lt;/li&gt;
2261-
&lt;li&gt;Round trip efficiency: over 90%&lt;/li&gt;
2262-
&lt;li&gt;Estimated Price 2 billion CHF&lt;/li&gt;
2263-
&lt;li&gt;~14 years to build and bring into operation&lt;/li&gt;
2264-
&lt;/ul&gt;
2265-
&lt;h3 id="kraftwerk-linthlimmern-pump-storage-extension"&gt;Kraftwerk-Linth–Limmern pump-storage extension&lt;/h3&gt;
2266-
&lt;ul&gt;
2267-
&lt;li&gt;1 Pump-storage power plant&lt;/li&gt;
2268-
&lt;li&gt;Power 1000 MW (Turbines and Pumps)&lt;/li&gt;
2269-
&lt;li&gt;Storage 33 GWh&lt;/li&gt;
2270-
&lt;li&gt;Duration: 33 Hours&lt;/li&gt;
2271-
&lt;li&gt;Round trip efficiency: over 90%&lt;/li&gt;
2272-
&lt;li&gt;Estimated Price 2.1 billion CHF&lt;/li&gt;
2273-
&lt;li&gt;~10 years to build and bring into operation&lt;/li&gt;
2274-
&lt;/ul&gt;
2275-
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
2276-
&lt;p&gt;The storage cost of the batteries is currently about a factor 4-9x the price of the hydropower plant construction but have the advantage of being available within about 18 months. What remains to be seen is how much battery degradation is a factor in these grid scale battery installations. At least Tesla is offering, from my understanding, a 15 year warranty on the Megapack.&lt;/p&gt;
2277-
&lt;p&gt;The amount of storage produced by the factory represents more than 1 large hydropower plant per year.&lt;/p&gt;
2278-
&lt;p&gt;The 39 GWh storage produced by the factory in one year is a huge amount, so much that it would cover around 25% of the &lt;a href="https://www.iea.org/data-and-statistics/charts/battery-storage-capability-by-countries-2020-and-2026"&gt;expected total capacity that the IEA planned for the entire world by 2026&lt;/a&gt;.&lt;/p&gt;
2279-
&lt;h2 id="post-scriptum-new-gridscale-batteries-in-europe"&gt;Post-scriptum: new gridscale batteries in Europe&lt;/h2&gt;
2280-
&lt;p&gt;2022.11.22 - &lt;a href="https://www.bbc.com/news/uk-england-humber-63707463"&gt;Cottingham: Europe's biggest battery storage system switched on - 196MWh&lt;/a&gt;&lt;/p&gt;
2281-
&lt;ul&gt;
2282-
&lt;li&gt;Power: ? (my estimate ~50-100 MW)&lt;/li&gt;
2283-
&lt;li&gt;Storage: 196 MWh&lt;/li&gt;
2284-
&lt;li&gt;use Tesla's AI software to match energy supply to demand&lt;/li&gt;
2285-
&lt;li&gt;Commissioning in two stages in December 2022 and March 2023.&lt;/li&gt;
2286-
&lt;li&gt;Supplier: Tesla&lt;/li&gt;
2287-
&lt;li&gt;Cost: ? (my estimate $100 million+)&lt;/li&gt;
2288-
&lt;/ul&gt;
2289-
&lt;p&gt;As usual, BBC is terribly uninformative about specifications and cost. If we assume 50 Tesla Megapacks, cost should be around $100 million+ and 50 to 100 MW based on the 2h or 4h megapacks. Interesting to see a Tesla system in Europe. I expect many more to come online.&lt;/p&gt;
2290-
&lt;p&gt;2022.11.07 - &lt;a href="https://www.rwe.com/en/press/rwe-generation/2022-11-07-battery-storage-220-mw-neurath"&gt;RWE gives green light for 220-megawatt battery storage system in North Rhine-Westphalia&lt;/a&gt;&lt;/p&gt;
2291-
&lt;ul&gt;
2292-
&lt;li&gt;Power: 80 + 140 MW = 220 MW&lt;/li&gt;
2293-
&lt;li&gt;Storage: delivering the required output for over an hour but full capacity not mentioned. 220 MWh to 440MWh.&lt;/li&gt;
2294-
&lt;li&gt;140 million euros&lt;/li&gt;
2295-
&lt;li&gt;commissioning in 2024&lt;/li&gt;
2296-
&lt;li&gt;Supplier: Not mentioned.&lt;/li&gt;
2297-
&lt;/ul&gt;
2298-
&lt;p&gt;2021.07.22 - &lt;a href="https://www.rwe.com/en/press/rwe-ag/2021-07-22-rwe-builds-one-of-the-largest-battery-storage-facilities-in-germany"&gt;RWE bringing 72MW BESS in Germany online in November&lt;/a&gt;&lt;/p&gt;
2299-
&lt;ul&gt;
2300-
&lt;li&gt;Power: 72 + 45MW = 117 MW&lt;/li&gt;
2301-
&lt;li&gt;Storage: 128MWh&lt;/li&gt;
2302-
&lt;li&gt;€50 million&lt;/li&gt;
2303-
&lt;li&gt;commissioning in end 2022&lt;/li&gt;
2304-
&lt;li&gt;Supplier: CATL batteries&lt;/li&gt;
2305-
&lt;/ul&gt;
2306-
</content>
2307-
<summary>&lt;p&gt;Tesla on Twitter announced: &lt;a href="https://t.co/aw85eHECXI"&gt;"Meet Megafactory, our new Megapack factory in Lathrop, CA 🔋🔋🔋"&lt;/a&gt;&lt;/p&gt;</summary>
2308-
</entry>
23092393
</feed>

0 commit comments

Comments
 (0)