<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Blog of Estela</title>
    <link>https://blog.estela.moe/</link>
    
    <atom:link href="https://blog.estela.moe/rss2.xml" rel="self" type="application/rss+xml"/>
    
    <description>O-oooooooooo AAAAE-A-A-I-A-U- JO-oooooooooooo AAE-O-A-A-U-U-A- E-eee-ee-eee AAAAE-A-E-I-E-A- JO-ooo-oo-oo-oo EEEEO-A-AAA-AAAA</description>
    <pubDate>Wed, 03 Jun 2026 22:00:00 GMT</pubDate>
    <generator>http://hexo.io/</generator>
    
    <item>
      <title>(Translation) The Political Science of Responding: When the Authoritarian System &quot;Hears&quot; the LGBTQ Community</title>
      <link>https://blog.estela.moe/33867d7ebc0f/</link>
      <guid>https://blog.estela.moe/33867d7ebc0f/</guid>
      <pubDate>Wed, 03 Jun 2026 22:00:00 GMT</pubDate>
      
      <description>&lt;p&gt;&lt;em&gt;This is a translation to this original post: &lt;a href=&quot;https://x.com/amiercreer/status/2056941616321957901&quot;&gt;https://x.com/amiercreer/status/2056941616321957901&lt;/a&gt; ; proxied link: &lt;a href=&quot;https://nitter.net/amiercreer/status/2056941616321957901&quot;&gt;https://nitter.net/amiercreer/status/2056941616321957901&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;May 2026, the Research Office of China’s Supreme People’s Court issued a written reply to a petition&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn1&quot; id=&quot;fnref1&quot;&gt;[1]&lt;/a&gt;&lt;/sup&gt; about judicial protection against LGBTQ discrimination, citing previous precedents, stating that they are “continuing to monitor the situation”.&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn2&quot; id=&quot;fnref2&quot;&gt;[2]&lt;/a&gt;&lt;/sup&gt; The response was partially interpreted on the social media as “a dawn breaking the binary order”. The legal nature of this reply – that a petition response is not a judicial interpretation, is non-justiciable, unenforceable, and carries no normative force – has already been accurately analysed by another one&lt;sup class=&quot;footnote-ref&quot;&gt;&lt;a href=&quot;#fn3&quot; id=&quot;fnref3&quot;&gt;[3]&lt;/a&gt;&lt;/sup&gt;. This article is not going to make the tautology, but to ask a more fundamental question: Why the state chose to respond in this form? What does this kind of response signify in the logic of political operations?&lt;/p&gt;</description>
      
      
      
      <content:encoded><![CDATA[<p><em>This is a translation to this original post: <a href="https://x.com/amiercreer/status/2056941616321957901">https://x.com/amiercreer/status/2056941616321957901</a> ; proxied link: <a href="https://nitter.net/amiercreer/status/2056941616321957901">https://nitter.net/amiercreer/status/2056941616321957901</a></em></p><p>May 2026, the Research Office of China’s Supreme People’s Court issued a written reply to a petition<sup class="footnote-ref"><a href="#fn1" id="fnref1">[1]</a></sup> about judicial protection against LGBTQ discrimination, citing previous precedents, stating that they are “continuing to monitor the situation”.<sup class="footnote-ref"><a href="#fn2" id="fnref2">[2]</a></sup> The response was partially interpreted on the social media as “a dawn breaking the binary order”. The legal nature of this reply – that a petition response is not a judicial interpretation, is non-justiciable, unenforceable, and carries no normative force – has already been accurately analysed by another one<sup class="footnote-ref"><a href="#fn3" id="fnref3">[3]</a></sup>. This article is not going to make the tautology, but to ask a more fundamental question: Why the state chose to respond in this form? What does this kind of response signify in the logic of political operations?</p><span id="more"></span><p>To answer this question, we must shift focus from the text to a concept that has accumulated a significant amount of empirical evidence in the field of Chinese political studies in recent years: authoritarian responsiveness.</p><h2 id="Authoritarian-Responsiveness-an-Essential-Analytical-Framework">Authoritarian Responsiveness: an Essential Analytical Framework</h2><p>Over the past fifteen years, political scientists have done a vast amount of research surrounding a seemingly contradictory phenomenon: Why would a regime without competitive elections take the trouble of responding to citizens’ demands?</p><p>Earlier explanations emphasised top-down information extraction functions. An on-site audit experiment of over two thousand county-level “mayor’s mailboxes” nationwide  carried out by Distelhorst and Hou indicates that the response rate of Chinese local governments to citizen correspondence is roughly equivalent to that of similar institutions in democratic countries, but the driving force behind this responsiveness is not electoral pressure, but rather the demand for grass-roots governance information from the superior accountability system.<sup class="footnote-ref"><a href="#fn4" id="fnref4">[4]</a></sup> Field experiments by Chen, Pan, and Xu further found that when citizens’ letters contain threats of collective action or hints of reporting to higher authorities, the probability of a response from the county-level government increases significantly; conversely, indicating one’s identity as a loyal party member has no effect on the response rate. <sup class="footnote-ref"><a href="#fn5" id="fnref5">[5]</a></sup> In other words, what drives the response is not an acknowledgement of citizen rights, but a preventive assessment of instability.</p><p>However, these studies simultaneously reveal a key limitation: there is a systematic disconnect between the content of the responses and the substance of the demands. The concept of “mechanical responsiveness”, proposed by Hu, Gong, and Zhao based on fieldwork conducted between 2022 and 2024, precisely captures such a mechanism: under the pressure of digitalised accountability, grass-roots officials meet procedural targets with high response rates, yet there is almost no correspondence between the content of these responses and the substance of the complaints.<sup class="footnote-ref"><a href="#fn6" id="fnref6">[6]</a></sup> The data show that, even with an annual case resolution rate as high as 91%, complaints that are truly fully resolved account for only 32.4%. From another perspective, Wang and Han name this same phenomenon “cosmetic responsiveness”, pointing out that government responses are often not born of a genuine concern for collective action or the erosion of legitimacy, but rather out of a bureaucratic need to show the image of “being responsive” to higher authorities.<sup class="footnote-ref"><a href="#fn7" id="fnref7">[7]</a></sup></p><p>These two concepts, mechanical responsiveness and cosmetic responsiveness, provided a direct means of analysis to understand the reply from the Supreme People’s Court’s Research Office. What did the reply do? It acknowledged receipt of the petition, expressed that it was being taken seriously, responded item by item with the existing precedents, and promised “follow-up attention”. It precisely performed the procedural actions required by the petitioning system, with not one step more and not one step less. It was a textbook-example of  closed procedure.</p><h2 id="Selective-Response-Why-Will-There-Be-No-Substantial-Compromise-on-LGBTQ-Issues">Selective Response: Why Will There Be No Substantial Compromise on LGBTQ Issues?</h2><p>One of the core findings in the study of authoritarian responsiveness is that responsiveness is not homogeneously distributed; the state exhibits a high degree of selectivity towards different types of demands.</p><p>In his monograph <em>Responsive Authoritarianism in China</em>, Heurlin provides a detailed analysis of the state response mechanism in protests against land acquisition. He finds that when demands concern material interests with broad resonance (such as compensation to land acquisition or wage arrears) and can be resolved through one-off economic compensation, local and even central governments have a strong motivation to make substantive concessions.<sup class="footnote-ref"><a href="#fn8" id="fnref8">[8]</a></sup> Putting Heurlin’s findings and the broader document on authoritarian responsiveness together, a symmetrical pattern can be identified: when demands involve identity recognition, institutional change, or ideological adjustment, the state’s scope for compromise narrows sharply.<sup class="footnote-ref"><a href="#fn7" id="fnref7:1">[7:1]</a></sup></p><p>The protection of the rights and interests of the LGBTQ community belongs precisely to the latter category. It is not a demand that can be “digested” by providing economic compensation or adjusting a policy parameter. It requires institutional recognition of identity, writing “sexual orientation” and “gender identity” into legal texts as protected collectives, which touches upon the state’s power to define social order itself. In the Chinese political context, such demands intersect with three structural obstacles:</p><p>Firstly, the exclusion of identity politics by the “harmonious society” discourse. The framework of identity discrimination is officially categorised as “Western” and is incompatible with the “social keynote of collectivism and conciliationism”.<sup class="footnote-ref"><a href="#fn9" id="fnref9">[9]</a></sup> This is not merely a rhetorical gesture, but an institutional preference embedded within the logic of governance: The Chinese legal system tends to reduce issues of discrimination to civil torts that can be resolved at the individual case level, while systematically avoiding naming the structural discrimination.</p><p>Secondly, the “benefit of stability maintenance”<sup class="footnote-ref"><a href="#fn10" id="fnref10">[10]</a></sup> regarding LGBTQ issues is extremely low. Research by Chen, Pan, and Xu has already demonstrated that the core incentive of authoritarian responsiveness is the threat of collective action.<sup class="footnote-ref"><a href="#fn5" id="fnref5:1">[5:1]</a></sup> However, the level of organisation among LGBTQ community in China is extremely low; they lack the capacity to mobilise large-scale protests and do not constitute a destabilising factor in the evaluation of administrative performance of local officials. For a system where stability maintenance is the core performance indicator, the “benefit”, which is avoiding large-scale mass incident<sup class="footnote-ref"><a href="#fn11" id="fnref11">[11]</a></sup>, of responding to this collective is almost zero.</p><p>The last one is risk avoidance against a backdrop of ideological tightening. Since 2016, China has continuously strengthened its control over civil society organisations, and the visibility of LGBTQ issues in public discourse has significantly diminished. In this climate, any substantial statement that goes beyond a procedural response, such as acknowledging the necessity of anti-discrimination legislation, represents a political risk for the specific departments handling such matters. Choosing the safest form of response (citing existing precedents, promising to “continue to monitor the situation”, and avoiding the creation of new obligations) is a perfectly rational bureaucratic behaviour.</p><p>The combination of these three factors points to the same conclusion: On the spectrum of authoritarian responsiveness, LGBTQ issues occupy the position that is least likely to yield substantial compromise. The state will hear and respond, but the content of that response will be strictly controlled within the confines of a closed procedure.</p><h2 id="Historical-Review-Marginalised-Groups-in-Petitioning">Historical Review: Marginalised Groups in Petitioning</h2><p>This is not a unique experience of LGBTQ community. Looking back at the history of the interaction between China’s petitioning system and marginalised groups, a recurring pattern can be identified: the system “absorbs” the demands, but directs them through procedural channels that do not produce substantial changes.</p><p>The most direct reference is the HIV-infected population. In the early 2000s, after the “blood disaster”<sup class="footnote-ref"><a href="#fn12" id="fnref12">[12]</a></sup> in Henan was exposed, a large number of farmers who were infected with HIV through selling blood demanded compensation and medical assurance through petitioning system. Under immense international and domestic pressure, the state issued a series of responses: free antiviral treatment (so-called “Four Frees and One Care”), living aid, and specialised examination. But the operational logic behind these responses is worth a closer look. In 2005, Human Rights Watch documented in its investigative report local governments’ systematic suppression of collective rights advocacy by individuals inflected with HIV: petitioners were arrested, placed under house arrest, and intercepted, while activists who organised collective petitioning were detained; meanwhile, individual cases of financial compensation were used precisely to undermine the organisational foundation of collective action.<sup class="footnote-ref"><a href="#fn13" id="fnref13">[13]</a></sup> Xi Chen’s analysis of approximately one thousand collective petitioning government archives reveals the general structure of this mechanism: the petitioning system is designed to individualise collective demands, dismantling the mobilisation potential of collective action through selective concessions to individual petitioners.<sup class="footnote-ref"><a href="#fn14" id="fnref14">[14]</a></sup> Material issues were partially addressed, but the institutional recognition of the HIV-infected collective as a subject of rights was never achieved.</p><p>The case of religious groups shares a similarly structure. Fenggang Yang describes the religious administration system as a triple-market model: a red market (officially permitted religions), a black market (officially banned religions), and a gray market (religions with an ambiguous legal/illegal status, which include a large number of house churches).<sup class="footnote-ref"><a href="#fn15" id="fnref15">[15]</a></sup> Religious individuals in this grey market long face a sticky situation highly similar to that of sexual minorities: while the constitution guarantees freedom of religious belief in principle, the exclusionary design of the registration system renders such guarantee unachievable in practice. The responses they receive when raising issues through petitioning follow the same standard template: reiterating constitutional principles, citing current regulations, and suggesting to resolve issues through legal registration channels, without ever addressing the structural barriers of the registration system itself.</p><p>The common structure of these cases is that the state is willing to provide limited relief at an individual-case level, but refuses to acknowledge the structural dimensions of the problem. The role played by the petitioning system in this process, in Hou’s terminology, is an emotional management apparatus for “maintaining social stability without solving problems”.<sup class="footnote-ref"><a href="#fn16" id="fnref16">[16]</a></sup> The response from the Supreme People’s Court’s Research Office regarding LGBTQ issues precisely replicates this pattern.</p><h2 id="The-General-Personality-Rights-Framework-“Incorporation”-at-the-Level-of-Legal-Technique">The General Personality Rights Framework: “Incorporation” at the Level of Legal Technique</h2><p>Back to the level of legal analysis, the “general personality rights” framework chosen in the Supreme Court’s response holds special functional significance in terms of political logic.</p><p>General personality rights deal with specific, provable acts of infringement committed by A against B. The implicit premise of this framework is that discrimination is individual, sporadic, and can be resolved between the two parties involved. It does not require the state to acknowledge the structural existence of discrimination, nor does it necessitate the creation of specific protected categories for LGBTQ community, nor does it require addressing institutional barriers within marriage law, the household registration system (<em>hukou</em>), or the healthcare system. In other words, the general personality rights framework allows the state to technically address the individual consequences of discrimination while, in principle, denying the systemic existence of discrimination. Joy Chia summarises the situation of LGBTQ community in China as one of “silence and invisibility” rather than overt homophobic violence,<sup class="footnote-ref"><a href="#fn17" id="fnref17">[17]</a></sup> and the general personality rights framework fits this style of governance perfectly.</p><p>This stands in fundamental contrast to the logic of anti-discrimination protections in international human rights law. The principle established by the UN Human Rights Committee in the case of Toonen v. Australia (1994) is that sexual orientation falls under the category of “status” protected by Articles 2 and 26 of the International Covenant on Civil and Political Rights, and that discrimination based on sexual orientation constitutes a systemic violation of equal protection.<sup class="footnote-ref"><a href="#fn18" id="fnref18">[18]</a></sup> A core feature of this framework is that it identifies discrimination as a structural phenomenon requiring active state intervention, rather than merely as individual incidents to be remedied retrospectively by tort law between private parties. Although China has signed but not yet ratified the International Covenant on Civil and Political Rights, this state of non-ratification is itself a form of “shelving” that has persisted for nearly thirty years.</p><p>The 2016 national survey report on China’s LGBTI community, published by the UNDP, presented the practical consequences of this “individual relief + structural absence” pattern: more than half of the respondents reported having encountered discrimination in their daily lives, with exclusion from the family being the most severe, yet the vast majority had never attempted to defend their rights through legal channels, not because they did not want to, but because no grounds could be found to cite within the existing legal framework.<sup class="footnote-ref"><a href="#fn19" id="fnref19">[19]</a></sup> General personality rights can theoretically cover certain extreme cases, but they cannot address this institutional exclusion that is     widely spread throughout everyday life.</p><h2 id="Re-evaluation-of-our-Advocacy-Strategies">Re-evaluation of our Advocacy Strategies</h2><p>The above analysis is not to argue that petitioning is useless, but rather that its utility needs to be precisely defined.</p><p>Within the framework of authoritarian responsiveness, the advocacy role of petitioning system for marginalised groups is primarily manifested in three dimensions:</p><p>First, the function of creating a record. Every petition record marked as “resolved” serves as a timestamped institutional trace. It proves that an issue has entered the sight of state authorities, a fact that in itself holds documentary value within international human rights review mechanisms. The detail that a response was issued by the Supreme People’s Court’s Research Office, instead of a grass-roots petition window, can be precisely cited in forums such as the UPR.</p><p>Second, the function of discourse anchoring. The existing judicial precedents cited in this response (such as the conversion “therapy” case and the employment discrimination case) were not charity from the state, but the results of the LGBTQ community embedding cases into judicial practice one after another through over a decade of influential litigation. The petitioning response gathers these scattered individual precedents into a document with an official institutional signature, granting them a form of quasi-official visibility.</p><p>Last, the function of framework diagnosis. The response explicitly chooses a general personality rights framework rather than an anti-discrimination one; this choice itself is valuable information. It tells advocates where the current boundaries of the state’s institutional imagination lie, thereby providing a basis for calibrating our strategy.</p><p>However, the common characteristic of these three functions is that they are auxiliary, not transformative. The path that can truly drive changes in judicial standards, as the experience of the past decade has proven, is still influential litigation in specific cases and the resulted accumulation of guiding cases and judicial rules. A petitioning response can record the location of the battlefield, but it cannot win the battle itself.</p><hr class="footnotes-sep" /><section class="footnotes"><ol class="footnotes-list"><li id="fn1" class="footnote-item"><p>Note added by translator: <a href="https://en.wikipedia.org/wiki/Petitioning_(China)">https://en.wikipedia.org/wiki/Petitioning_(China)</a> <a href="#fnref1" class="footnote-backref">↩︎</a></p></li><li id="fn2" class="footnote-item"><p>Note added by translator: for international readers, here is the background news: <a href="https://www.washingtonblade.com/2026/05/27/chinas-top-court-acknowledges-anti-lgbtq-discrimination/">https://www.washingtonblade.com/2026/05/27/chinas-top-court-acknowledges-anti-lgbtq-discrimination/</a> . This news title is misleading, you will understand why after reading the very first part of this article. However, that is the only detailed report in English I found. By the way, for your information, Chinese LGBTQ accounts on WeChat spreading or talking about this response got suspended. <a href="#fnref2" class="footnote-backref">↩︎</a></p></li><li id="fn3" class="footnote-item"><p>This was well explained by the Wechat Channel <em>Zhonghe Caihong Shuo</em> (account suspeded by the time of this translation): <a href="https://mp.weixin.qq.com/s/U1VX7omSTbnMjpoBTHIt-A">https://mp.weixin.qq.com/s/U1VX7omSTbnMjpoBTHIt-A</a>. This article provides a detailed analysis of the legal effect of responses to petitions, their differences from judicial interpretations, and the template-like nature of their phrasing. <a href="#fnref3" class="footnote-backref">↩︎</a></p></li><li id="fn4" class="footnote-item"><p>Greg Distelhorst &amp; Yue Hou, “Constituency Service under Nondemocratic Rule: Evidence from China,” The Journal of Politics 79, no. 3 (2017): 1024–1040. DOI: 10.1086/690948. <a href="#fnref4" class="footnote-backref">↩︎</a></p></li><li id="fn5" class="footnote-item"><p>Jidong Chen, Jennifer Pan &amp; Yiqing Xu, “Sources of Authoritarian Responsiveness: A Field Experiment in China,” American Journal of Political Science 60, no. 2 (2016): 383–400. DOI: 10.1111/ajps.12207. <a href="#fnref5" class="footnote-backref">↩︎</a> <a href="#fnref5:1" class="footnote-backref">↩︎</a></p></li><li id="fn6" class="footnote-item"><p>Jieren Hu, Xuan Gong &amp; Yun Zhao, “Mechanical Responsiveness: China’s Online Petition System,” The China Quarterly 262 (2025): 293–309. DOI: 10.1017/S0305741025000220. <a href="#fnref6" class="footnote-backref">↩︎</a></p></li><li id="fn7" class="footnote-item"><p>The judgement of that “demands on identity recognition” is not Heurlin’s direct argument, but a conclusion of multiple studies, including： Diana Fu &amp; Greg Distelhorst, “Grassroots Participation and Repression under Hu Jintao and Xi Jinping,” The China Journal 79 (2017): 100–122, which analysed the narrowing of space for civil society participation during the Xi Jinping era; and Chen, Pan, and Xu’s finding on threats of collective action as a core incentive of responsiveness, which means, on the other hand, it’s harder for a community without such capability to get a substantial response. <a href="#fnref7" class="footnote-backref">↩︎</a> <a href="#fnref7:1" class="footnote-backref">↩︎</a></p></li><li id="fn8" class="footnote-item"><p>Christopher Heurlin, Responsive Authoritarianism in China: Land, Protests, and Policy Making (New York: Cambridge University Press, 2016). Heurlin’s analysis takes protests against land acquisition as core empirical object. <a href="#fnref8" class="footnote-backref">↩︎</a></p></li><li id="fn9" class="footnote-item"><p>This viewpoint comes from <a href="https://nitter.net/Nevernessian">@Nevernessian</a>’s <a href="https://nitter.net/Nevernessian/status/2056748160110989477">comment</a> to <a href="https://nitter.net/SonogamiRinneTS/status/2056694246695154168">this post</a>，stating that “discrimination based on identity is Western, and does not fit the social keynote of collectivism and conciliationism”, and differentiating the fundamental difference in legal logic between the relief to identity discrimination victims and the general protection of personality rights. <a href="#fnref9" class="footnote-backref">↩︎</a></p></li><li id="fn10" class="footnote-item"><p>Note added by translator: <a href="https://en.wikipedia.org/wiki/Stability_maintenance">https://en.wikipedia.org/wiki/Stability_maintenance</a> <a href="#fnref10" class="footnote-backref">↩︎</a></p></li><li id="fn11" class="footnote-item"><p>Note added by translator: <em>Mass incident</em> is the Chinese political language to describe large-scale protests. <a href="#fnref11" class="footnote-backref">↩︎</a></p></li><li id="fn12" class="footnote-item"><p>Note added by translator: <a href="https://en.wikipedia.org/wiki/Plasma_Economy">https://en.wikipedia.org/wiki/Plasma_Economy</a> <a href="#fnref12" class="footnote-backref">↩︎</a></p></li><li id="fn13" class="footnote-item"><p>Human Rights Watch, Restrictions on AIDS Activists in China, vol. 17, no. 5© (New York: Human Rights Watch, June 2005). Chapter 4 of the report, “Continuing Crackdown in Henan Province”, provides a detailed account of the local government’s mechanisms for intercepting, detaining, and selectively compensating HIV-inflected individuals who engage in collective petitioning. The full text can be found at: <a href="https://www.hrw.org/reports/2005/china0605/">https://www.hrw.org/reports/2005/china0605/</a> <a href="#fnref13" class="footnote-backref">↩︎</a></p></li><li id="fn14" class="footnote-item"><p>Xi Chen, Social Protest and Contentious Authoritarianism in China (New York: Cambridge University Press, 2012). Based on approximately one thousand collective petitioning government archives, Chen analyses how the petition system structurally directs collective demands towards the handling as individual cases. See also: Carl F. Minzner, “Xinfang: An Alternative to Formal Chinese Legal Institutions,” Stanford Journal of International Law 42 (2006): 103–179. This paper analyses how the petition system, as a “multi-functional governance tool”, encourages the individualisation of demands through institutional incentives. <a href="#fnref14" class="footnote-backref">↩︎</a></p></li><li id="fn15" class="footnote-item"><p>Fenggang Yang, “The Red, Black, and Gray Markets of Religion in China,” The Sociological Quarterly 47, no. 1 (2006): 93–122. The triple-market model proposed in this paper reveals how China’s religious administration system creates boundaries between the legal and the illegal through a registration system, leaving a vast amount of religious practice in a state of institutional ambiguity. <a href="#fnref15" class="footnote-backref">↩︎</a></p></li><li id="fn16" class="footnote-item"><p>Rui Hou, “Maintaining Social Stability without Solving Problems: Emotional Repression in the Chinese Petition System,” The China Quarterly 243 (2020): 635–654. DOI: 10.1017/S0305741019001504. <a href="#fnref16" class="footnote-backref">↩︎</a></p></li><li id="fn17" class="footnote-item"><p>The conclusion of “silence and invisibility” pertains Joy L. Chia，quoted from: Jie Cheng, “The Legal Status of LGBTQ+ in China: A Law and Politics Perspective,” Constitutional Forum constitutionnel 32, no. 4 (2024): 31–38, DOI: 10.21991/cf29471. Cheng quoted Chia’s words： “[S]ilence and invisibility (rather than overt homophobia or anti-LGBTQ violence) define how LGBTQ individuals experience their daily lives in China.” The author of this article did not look up Chia’s original work, and followed Cheng’s quote. <a href="#fnref17" class="footnote-backref">↩︎</a></p></li><li id="fn18" class="footnote-item"><p>UN Human Rights Committee, Toonen v. Australia, Communication No. 488/1992, CCPR/C/50/D/488/1992 (1994). This case established the precedent that sexual orientation falls under the category of “status” in Article 26 of the International Covenant on Civil and Political Rights. <a href="#fnref18" class="footnote-backref">↩︎</a></p></li><li id="fn19" class="footnote-item"><p>United Nations Development Programme (UNDP), Being LGBTI in China: A National Survey on Social Attitudes towards Sexual Orientation, Gender Identity and Gender Expression (Beijing: UNDP, 2016) <a href="#fnref19" class="footnote-backref">↩︎</a></p></li></ol></section>]]></content:encoded>
      
      
      
      
      <comments>https://blog.estela.moe/33867d7ebc0f/#disqus_thread</comments>
      
    </item>
    
    <item>
      <title>Glòria a Hong Kong</title>
      <link>https://blog.estela.moe/8b01cc7ecc1a/</link>
      <guid>https://blog.estela.moe/8b01cc7ecc1a/</guid>
      <pubDate>Tue, 01 Jul 2025 00:00:00 GMT</pubDate>
      
      <description>&lt;p&gt;&lt;em&gt;Robat perquè el lloc de web ja no és accessible i a fi que no es perd a la mar d’informació de la plataforma que es deia Twitter. Els drets d’autor pertanyen a l’autor original.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Què ho fa, aquesta terra que plora?&lt;br /&gt;
Perquè bull de ràbia aquest Poble?&lt;br /&gt;
Aixeca’t i crida ben fort arreu:&lt;br /&gt;
llibertat per a Hong Kong!&lt;/p&gt;</description>
      
      
      
      <content:encoded><![CDATA[<p><em>Robat perquè el lloc de web ja no és accessible i a fi que no es perd a la mar d’informació de la plataforma que es deia Twitter. Els drets d’autor pertanyen a l’autor original.</em></p><p>Què ho fa, aquesta terra que plora?<br />Perquè bull de ràbia aquest Poble?<br />Aixeca’t i crida ben fort arreu:<br />llibertat per a Hong Kong!</p><span id="more"></span><p>Malgrat aquesta por que ens ha pres,<br />la fe mai no ens ha abandonat.<br />La sang que han vessat no ens podrà aturar:<br />Glòria i pau per a Hong Kong!</p><p>Per més que els estels caiguin del cel,<br />dins la boira la trompeta cantarà!<br />Lluitarem units i valents pel nostre futur,<br />pels nostres drets, fins a guanyar!</p><p>Quan surti el sol reviurà un nou Hong Kong.<br />Junts farem la revolta molt més gran!<br />Som nosaltres, el Poble, que haurem portat<br />Glòria i pau per a Hong Kong!</p><p><img src="gloria-a-hong-kong.jpg" alt="partitura" /></p>]]></content:encoded>
      
      
      
      
      <comments>https://blog.estela.moe/8b01cc7ecc1a/#disqus_thread</comments>
      
    </item>
    
    <item>
      <title>firefox can&#39;t copy and paste</title>
      <link>https://blog.estela.moe/860a0a238920/</link>
      <guid>https://blog.estela.moe/860a0a238920/</guid>
      <pubDate>Mon, 24 Mar 2025 17:08:50 GMT</pubDate>
      
        
        
      <description>&lt;p&gt;In case you met the problem of not able to copy and paste in Google Docs and Discord on Firefox:&lt;/p&gt;
&lt;p&gt;Navigate to &lt;code&gt;about:config&lt;/c</description>
        
      
      
      
      <content:encoded><![CDATA[<p>In case you met the problem of not able to copy and paste in Google Docs and Discord on Firefox:</p><p>Navigate to <code>about:config</code>, search <code>dom.event.clipboardevents.enabled</code>, turn it to <code>true</code>.</p>]]></content:encoded>
      
      
      
      
      <comments>https://blog.estela.moe/860a0a238920/#disqus_thread</comments>
      
    </item>
    
    <item>
      <title>碎碎唸：最近所見的系統美化</title>
      <link>https://blog.estela.moe/92881f65b0a1/</link>
      <guid>https://blog.estela.moe/92881f65b0a1/</guid>
      <pubDate>Thu, 14 Nov 2024 19:20:39 GMT</pubDate>
      
      <description>&lt;h2 id=&quot;星穹鐵道-GRUB-主題&quot;&gt;星穹鐵道 GRUB 主題&lt;/h2&gt;
&lt;p&gt;&lt;s&gt;星鐵，啓動！&lt;/s&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/voidlhf/StarRailGrubThemes&quot;&gt;https://github.com/voidlhf/StarRailGrubThemes&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;March7th-TheHunt.jpg&quot; alt=&quot;GRUB with Star Rail March 7th theme&quot; /&gt;&lt;/p&gt;</description>
      
      
      
      <content:encoded><![CDATA[<h2 id="星穹鐵道-GRUB-主題">星穹鐵道 GRUB 主題</h2><p><s>星鐵，啓動！</s></p><p><a href="https://github.com/voidlhf/StarRailGrubThemes">https://github.com/voidlhf/StarRailGrubThemes</a></p><p><img src="March7th-TheHunt.jpg" alt="GRUB with Star Rail March 7th theme" /></p><span id="more"></span><h2 id="一個好看的-fcitx-主題">一個好看的 fcitx 主題</h2><p><a href="https://github.com/sanweiya/fcitx5-mellow-themes">https://github.com/sanweiya/fcitx5-mellow-themes</a></p><p><img src="20241114_212336.png" alt="screenshot of this fcitx theme" /></p><h2 id="Firefox-畢業級主題">Firefox 畢業級主題</h2><p><a href="https://github.com/soulhotel/FF-ULTIMA">https://github.com/soulhotel/FF-ULTIMA</a></p><p><img src="20241114_213236.png" alt="screenshot of FF ULTIMA theme of firefox" /></p><h1>KDE Aurorae</h1><p><a href="https://github.com/paulmcauley/klassy">https://github.com/paulmcauley/klassy</a></p>]]></content:encoded>
      
      
      
      
      <comments>https://blog.estela.moe/92881f65b0a1/#disqus_thread</comments>
      
    </item>
    
    <item>
      <title>Build your own Linux for uConsole A06</title>
      <link>https://blog.estela.moe/94d2cdd0fe8d/</link>
      <guid>https://blog.estela.moe/94d2cdd0fe8d/</guid>
      <pubDate>Sun, 27 Oct 2024 04:26:24 GMT</pubDate>
      
      <description>&lt;p&gt;TL;DR If you’re still considering buying a uConsole, just purchase the CM4 version, save your life!&lt;/p&gt;
&lt;p&gt;ClockworkPi uConsole is a handy PC. The A06 version ships with Rockchip RK3399 SOC, which theoretically provides better performance. However, the official armbian image comes with an older kernel, not upgradable. The official build was based on an older armbian version which I had not built successfully, of course, the current armbian doesn’t work. Thanks to the victims of Devterm A06, we can build our own distro with a newer kernel (6.1 LTS).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;photo.jpg&quot; alt=&quot;uConsole A06 running Arch Linux ARM&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Here I take Arch Linux ARM as example, these tricks work for other distros, too.&lt;/p&gt;</description>
      
      
      
      <content:encoded><![CDATA[<p>TL;DR If you’re still considering buying a uConsole, just purchase the CM4 version, save your life!</p><p>ClockworkPi uConsole is a handy PC. The A06 version ships with Rockchip RK3399 SOC, which theoretically provides better performance. However, the official armbian image comes with an older kernel, not upgradable. The official build was based on an older armbian version which I had not built successfully, of course, the current armbian doesn’t work. Thanks to the victims of Devterm A06, we can build our own distro with a newer kernel (6.1 LTS).</p><p><img src="photo.jpg" alt="uConsole A06 running Arch Linux ARM" /></p><p>Here I take Arch Linux ARM as example, these tricks work for other distros, too.</p><span id="more"></span><h2 id="Preparing-the-SD-card">Preparing the SD card</h2><p>Here are the important tricks to make the SD card bootable.</p><p>Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.</p><p>Zero the beginning of the SD card:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> <span class="built_in">dd</span> <span class="keyword">if</span>=/dev/zero of=/dev/sdX bs=1M count=32</span><br></pre></td></tr></table></figure><p>Start fdisk to partition the SD card:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> fdisk /dev/sdX</span><br></pre></td></tr></table></figure><p>At the fdisk prompt, create the new partition, we are separating boot and root in order to use f2fs for rootfs:</p><ol><li>Type <strong>o</strong>. This will clear out any partitions on the drive.</li><li>Type <strong>p</strong> to list partitions. There should be no partitions left.</li><li>Type <strong>n</strong>, then <strong>p</strong> for primary, <strong>1</strong> for the first partition on the drive, <strong>32768</strong> for the first sector, then <strong>+2G</strong> for the last sector (boot partition, 2GB)</li><li>Type <strong>p</strong> and note the end sector number for the partition freshly created.</li><li>Type <strong>n</strong>, then <strong>p</strong>, <strong>2</strong> for the second partition, <strong>use number from the last step add 2</strong> as first sector, and then press ENTER to accept the default last sector. (rootfs, taking all space)</li><li>Write the partition table and exit by typing <strong>w</strong>.</li></ol><p>Create the filesystem:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> mkfs.ext4 -L BOOT -O ^has_journal  /dev/sdX1</span><br><span class="line"><span class="built_in">sudo</span> mkfs.f2fs -l ROOTFS -O extra_attr,inode_checksum,sb_checksum /dev/sdX2</span><br></pre></td></tr></table></figure><h2 id="Build-U-Boot">Build U-Boot</h2><p>I have prepared it for you:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/saeziae/uboot-clockworkpi-a06.git</span><br><span class="line"><span class="built_in">cd</span> uboot-clockworkpi-a06</span><br><span class="line">make</span><br></pre></td></tr></table></figure><p>flash</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./flash.sh /dev/sdX</span><br></pre></td></tr></table></figure><h2 id="Build-the-kernel">Build the kernel</h2><p>I have prepared patches for the Linux kernel, it is a bit different from the Devterm A06 one.</p><p><a href="https://github.com/saeziae/linux-clockworkpi-a06u">https://github.com/saeziae/linux-clockworkpi-a06u</a></p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/saeziae/linux-clockworkpi-a06u.git</span><br><span class="line"><span class="built_in">cd</span> linux-clockworkpi-a06u</span><br></pre></td></tr></table></figure><p>We use some tricks to build it on x86-64 PC (or you can use qemu-user to chroot into an aarch64 rootfs and makepkg natively, with pain):</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> pacman -S aarch64-linux-gnu-gcc aarch64-linux-gnu-binutils aarch64-linux-gnu-glibc aarch64-linux-gnu-linux-api-headers</span><br></pre></td></tr></table></figure><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">CARCH=aarch64 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CFLAGS=<span class="string">&quot;&quot;</span> CXXFLAGS=<span class="string">&quot;&quot;</span> CPPFLAGS=<span class="string">&quot;&quot;</span> LDFLAGS=<span class="string">&quot;&quot;</span> EXTRA_CFLAGS=<span class="string">&quot;&quot;</span> MAKEFLAGS=<span class="string">&quot;-j<span class="subst">$(nproc)</span>&quot;</span> makepkg -s</span><br></pre></td></tr></table></figure><p>You may encounter bugs while packaging headers, however you will successfully get <code>linux-clockworkpi-a06u-*-aarch64.pkg.tar.zst</code> in the same directory.</p><h2 id="Other-packages">Other packages</h2><p>Network firmware:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.comsync/yatli/arch-linux-arm-clockworkpi.git --depth=1</span><br><span class="line"><span class="built_in">cd</span> arch-linux-arm-clockworkpi/networking-clockworkpi-a06</span><br><span class="line">makepkg</span><br></pre></td></tr></table></figure><h2 id="INSTALL-THE-SYSTEM">INSTALL THE SYSTEM!</h2><p>mount the SD card:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> mount /dev/sdX2 /mnt</span><br><span class="line"><span class="built_in">sudo</span> <span class="built_in">mkdir</span> /mnt/boot</span><br><span class="line"><span class="built_in">sudo</span> mount /dev/sdX1 /mnt/boot</span><br></pre></td></tr></table></figure><p>Download and extract rootfs:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz</span><br><span class="line"><span class="built_in">sudo</span> su <span class="comment">#switch to root user</span></span><br><span class="line">bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C /mnt</span><br></pre></td></tr></table></figure><p>Copy your previous <code>.pkg.tar.zst</code> files (like <code>linux-clockworkpi-a06u-6.1.111-1-aarch64.pkg.tar.zst</code> and <code>networking-clockworkpi-a06-1.0-1-any.pkg.tar.zst</code>) to <code>/mnt/root</code>,</p><p>Chroot to the rootfs, <code>qemu-user-static-aarch64</code> is required:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">arch-chroot /mnt</span><br><span class="line"><span class="built_in">cd</span></span><br><span class="line">pacman -R linux-aarch64 <span class="comment"># remove original kernel</span></span><br><span class="line">pacman -U *.pkg.tar.zst</span><br></pre></td></tr></table></figure><p>Initialise pacman:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">pacman-key --init</span><br><span class="line">pacman-key --populate archlinuxarm</span><br></pre></td></tr></table></figure><p>It is also recommended installing you favourite network tools like NetworkManager now, or you will have trouble connecting to Wi-Fi on your first boot.</p><p>Write the bootargs:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">mkdir</span> /boot/extlinux</span><br><span class="line"><span class="built_in">cat</span> &gt;/boot/extlinux/extlinux.conf&lt;&lt;<span class="string">MEOW</span></span><br><span class="line"><span class="string">LABEL Arch Linux</span></span><br><span class="line"><span class="string">KERNEL /Image</span></span><br><span class="line"><span class="string">FDT /dtbs/rockchip/rk3399-clockworkpi-a06u.dtb</span></span><br><span class="line"><span class="string">APPEND initrd=/initramfs-linux.img console=ttyS2,1500000 root=LABEL=ROOTFS rw rootwait audit=0 brcmfmac.feature_disable=0x82000</span></span><br><span class="line"><span class="string">MEOW</span></span><br></pre></td></tr></table></figure><p><code>brcmfmac.feature_disable=0x82000</code> is important for the internet to work.</p><p>Exit the chroot</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">exit</span> <span class="comment"># exit chroot</span></span><br><span class="line"><span class="built_in">exit</span> <span class="comment"># exit root user</span></span><br><span class="line"><span class="built_in">sync</span></span><br></pre></td></tr></table></figure><p>extract SD card and enjoy it on the uConsole.</p><h2 id="Aftercare">Aftercare</h2><p>If you need the headers… just pack the kernel locally on your device again, it takes long, be patient.</p><h2 id="Credits">Credits</h2><p>Manjaro: <a href="https://gitlab.manjaro.org/manjaro-arm/packages/core?filter=clockworkpi-a06">https://gitlab.manjaro.org/manjaro-arm/packages/core?filter=clockworkpi-a06</a><br />Archlinux ARM: <a href="https://archlinuxarm.org/platforms/armv8/rockchip/rock64">https://archlinuxarm.org/platforms/armv8/rockchip/rock64</a><br />Yatao Li, Cole Smith: <a href="https://github.com/yatli/arch-linux-arm-clockworkpi">https://github.com/yatli/arch-linux-arm-clockworkpi</a></p>]]></content:encoded>
      
      
      
      
      <comments>https://blog.estela.moe/94d2cdd0fe8d/#disqus_thread</comments>
      
    </item>
    
    <item>
      <title>Linux用Lutris運行紅色警戒2（CnCNet/心靈終結）</title>
      <link>https://blog.estela.moe/626c5d699f92/</link>
      <guid>https://blog.estela.moe/626c5d699f92/</guid>
      <pubDate>Fri, 01 Mar 2024 19:20:01 GMT</pubDate>
      
      <description>&lt;p&gt;本文講述使用 Lutris 在 Linux 上遊玩紅色警戒 2 心靈終結 mod。&lt;/p&gt;</description>
      
      
      
      <content:encoded><![CDATA[<p>本文講述使用 Lutris 在 Linux 上遊玩紅色警戒 2 心靈終結 mod。</p><span id="more"></span><p>首先你需要有 <code>winetricks</code>，確定一個目錄來放 wine 之 prefix，譬如 <code>~/Games/MO/</code></p><p>初始化 Wine 目錄：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">WINEPREFIX=~/Games/MO/ WINEARCH=win32  winetricks xna40</span><br></pre></td></tr></table></figure><p>從 <a href="https://mentalomega.com/index.php?page=download">https://mentalomega.com/index.php?page=download</a> 按照指引獲得遊戲，你需要自備一份的原版尤里。將遊戲解包到某個目錄。</p><p>打開 Lutris，在側邊欄的 Wine 右邊點擊版本管理，安裝一個 7.* 的版本，如 lutris-7.2-2。</p><p>在 Lutris 裏選擇頂部的「+」新增遊戲，選擇 Add locally installed game。</p><p>輸入遊戲名字，Runner 選擇 Wine。</p><p>選項卡切換到 Runner options，Wine version 選擇 Proton 7.0 或 lutris-7.*，啓用 DXVK，VKD3D。</p><p>選項卡切換到 Game options，Executable 選擇 <code>遊戲目錄/Resources/clientxna.exe</code>，Working directory 選擇遊戲目錄，Wine prefix 選擇上面的<code>~/Games/MO/</code>，Prefix architecture 選擇 32 位。</p><p>現在應該可以在 Lutris 遊戲頁上選擇 MO 啓動。</p>]]></content:encoded>
      
      
      
      
      <comments>https://blog.estela.moe/626c5d699f92/#disqus_thread</comments>
      
    </item>
    
    <item>
      <title>在 RX 5500XT 上运行 Stable Diffusion</title>
      <link>https://blog.estela.moe/fc3aa6762aff/</link>
      <guid>https://blog.estela.moe/fc3aa6762aff/</guid>
      <pubDate>Sun, 05 Mar 2023 07:28:45 GMT</pubDate>
      
      <description>&lt;p&gt;当今的计算机技术和人工智能应用正以惊人的速度发展着。近年来，越来越多的人开始尝试使用 GPU 和 AI 进行创作，其中最受欢迎的之一就是 Stable Diffusion. 如果你正在试图自建 Stable Diffusion，并恰巧（很不幸地）拥有一张 RX 5000 系列的 AMD 显卡，那么你一定不能错过这篇文章，因为今天我将手把手介绍如何在 RX 5500XT 显卡上运行 Stable Diffusion，并且为你展示如何使用这种技术来创造出惊人的艺术作品。&lt;/p&gt;
&lt;p&gt;（以上内容由 ChatGPT 辅助写作）&lt;/p&gt;</description>
      
      
      
      <content:encoded><![CDATA[<p>当今的计算机技术和人工智能应用正以惊人的速度发展着。近年来，越来越多的人开始尝试使用 GPU 和 AI 进行创作，其中最受欢迎的之一就是 Stable Diffusion. 如果你正在试图自建 Stable Diffusion，并恰巧（很不幸地）拥有一张 RX 5000 系列的 AMD 显卡，那么你一定不能错过这篇文章，因为今天我将手把手介绍如何在 RX 5500XT 显卡上运行 Stable Diffusion，并且为你展示如何使用这种技术来创造出惊人的艺术作品。</p><p>（以上内容由 ChatGPT 辅助写作）</p><span id="more"></span><h2 id="安装主系统环境">安装主系统环境</h2><p>我这里以 Arch Linux 发行版为例，我们首先需要在宿主机上安装 ROCm 的基本支持，<a href="https://github.com/RadeonOpenCompute/ROCm">ROCm</a> 是 AMD 的 GPU 计算平台，ROCm 现已加入 Arch Linux 豪华午餐。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> pacman -S hip-runtime-amd rocm-hip-runtime rocm-hip-libraries rocm-smi-lib rocminfo</span><br></pre></td></tr></table></figure><p>如果你运行 Ubuntu, RedHat, 或 SUSE，则可以从 <a href="https://repo.radeon.com/amdgpu-install/">https://repo.radeon.com/amdgpu-install/</a> 寻找 AMD 提供的软件包。</p><p>在安装完成之后，运行 <code>opt/rocm/bin/rocminfo</code> 应该能够看到显卡信息，在我这里是：</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">ROCk module is loaded</span><br><span class="line">...</span><br><span class="line">*******</span><br><span class="line">Agent 2</span><br><span class="line">*******</span><br><span class="line">  Name:                    gfx1012</span><br><span class="line">  Uuid:                    GPU-XX</span><br><span class="line">  Marketing Name:          AMD Radeon RX 5500 XT</span><br><span class="line">...</span><br></pre></td></tr></table></figure><p>接下来，我们需要安装 podman 或 docker，如有请跳过</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> pacman -S podman podman-docker</span><br></pre></td></tr></table></figure><p>或</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">sudo</span> pacman -S docker</span><br><span class="line"><span class="built_in">sudo</span> groupadd docker</span><br><span class="line"><span class="built_in">sudo</span> usermod -aG docker <span class="variable">$USER</span></span><br><span class="line"><span class="built_in">sudo</span> systemctl <span class="built_in">enable</span> --now docker</span><br><span class="line"><span class="built_in">sudo</span> su <span class="variable">$USER</span></span><br></pre></td></tr></table></figure><p>主系统准备完毕</p><h2 id="配置容器">配置容器</h2><h3 id="下载-Stable-Diffusion">下载 Stable Diffusion</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> --depth=1 https://github.com/AUTOMATIC1111/stable-diffusion-webui.git</span><br></pre></td></tr></table></figure><h3 id="配置启动脚本">配置启动脚本</h3><p>在 <code>stable-diffusion-webui</code> 下创建 <code>run.sh</code> 并写入以下内容，然后给予可执行权限：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#!/bin/bash</span></span><br><span class="line"><span class="built_in">cd</span> /stable-diffusion-webui</span><br><span class="line">[ -f venv ] || python -m venv venv</span><br><span class="line"><span class="built_in">source</span> venv/bin/activate</span><br><span class="line">TORCH_COMMAND=<span class="string">&#x27;pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.2&#x27;</span> \</span><br><span class="line">REQS_FILE=<span class="string">&#x27;requirements.txt&#x27;</span> PYTORCH_HIP_ALLOC_CONF=<span class="string">&#x27;garbage_collection_threshold:0.9,max_split_size_mb:512&#x27;</span> \</span><br><span class="line">python launch.py --precision full --no-half --opt-sub-quad-attention --listen</span><br></pre></td></tr></table></figure><p>此处的 <code>rocm5.2</code> 版本非常重要，如果你使用较新的版本如 <code>rocm5.4</code>，可能将无法在 RX 5000 系列上运行！</p><h3 id="下载模型">下载模型</h3><p>从 <a href="https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt">https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt</a> 下载模型，并放到 <code>stable-diffusion-webui/models/Stable-diffusion/</code> 目录下</p><h3 id="启动容器">启动容器</h3><p>确认你在 <code>stable-diffusion-webui</code> 的上一级目录，或者手动修改下方代码中的 <code>-v</code> 参数。</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">docker run -d --security-opt seccomp=unconfined \</span><br><span class="line">--device=/dev/kfd --device=/dev/dri --group-add video \</span><br><span class="line">--ipc=host --name stable-diffusion \</span><br><span class="line">-v ./stable-diffusion-webui:/stable-diffusion-webui \</span><br><span class="line">-p 7860:7860 \</span><br><span class="line">-e HSA_OVERRIDE_GFX_VERSION=10.3.0 \</span><br><span class="line">docker.io/rocm/pytorch:latest-base \</span><br><span class="line">/stable-diffusion-webui/run.sh</span><br></pre></td></tr></table></figure><p>此处 <code>-e HSA_OVERRIDE_GFX_VERSION=10.3.0</code> 是重点内容，需要这个环境变量来越级使用非官方支持的 GPU.</p><p>我们只需要使用 <code>rocm/pytorch:latest-base</code>，因为我们 Stable Diffusion 会自行安装 PyTorch-ROCm5.2</p><p>首次启动需要一点时间来安装相关包。</p><p>启动容器后，如果没有错误，你应该能通过浏览器访问主机的 7860 端口打开网页前端，首次合成图片时间稍长，请耐心等候。</p><p><code>watch -n 0.1 /opt/rocm/bin/rocm-smi</code> 可以查看显卡负载等信息。</p><p><img src="stable-diffusion.png" alt="a screenshot of stable diffusion running" /></p>]]></content:encoded>
      
      
      
      
      <comments>https://blog.estela.moe/fc3aa6762aff/#disqus_thread</comments>
      
    </item>
    
    <item>
      <title>飞腾 ARM PC Linux 踩坑记</title>
      <link>https://blog.estela.moe/a8fec2c1fdef/</link>
      <guid>https://blog.estela.moe/a8fec2c1fdef/</guid>
      <pubDate>Wed, 05 Oct 2022 08:50:00 GMT</pubDate>
      
      <description>&lt;p&gt;最近组装了一台&lt;a href=&quot;https://www.phytium.com.cn/&quot;&gt;飞腾&lt;/a&gt;处理器的电脑，因笔记本送修，也被动把飞腾作为主力机使用了一段时间，在使用过程中踩了不少坑，大概零零散散记录在这里。啊对了，系统是 Arch Linux ARM.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;phytium_photo.jpg&quot; alt=&quot;A Phytium ARM computer&quot; /&gt;&lt;/p&gt;</description>
      
      
      
      <content:encoded><![CDATA[<p>最近组装了一台<a href="https://www.phytium.com.cn/">飞腾</a>处理器的电脑，因笔记本送修，也被动把飞腾作为主力机使用了一段时间，在使用过程中踩了不少坑，大概零零散散记录在这里。啊对了，系统是 Arch Linux ARM.</p><p><img src="phytium_photo.jpg" alt="A Phytium ARM computer" /></p><span id="more"></span><h2 id="飞腾处理器">飞腾处理器</h2><p>虽然飞腾处理器能直接用主线 Linux 内核点亮，但你很快会发现板载网卡无了，飞腾集成的是群辉的 stmmac，大概是缺少 ACPI 方面的支持。</p><p>带补丁的 PKGBUILD 请自取：<a href="https://github.com/saeziae/pkgbuild-linux-phytium">https://github.com/saeziae/pkgbuild-linux-phytium</a>，想用二进制包也可以用<a href="https://repo.estela.moe/readme.html">我的源</a></p><p>还有个问题是板载声卡，还没搞定，不过可以直接用显卡的 HDMI 输出。</p><h2 id="RIME-输入法">RIME 输入法</h2><p>我使用的是 <code>fcitx5-rime</code>，当我发现 ALARM 的源中没有 <code>fcitx5-rime</code> 尚未意识到问题的严重性，手动 build 时才发现，ALARM 中整个 RIME 相关的全都炸了，librime 还停留在 1.5 （两年前的版本）。究其原因大概是一些循环依赖导致需要手动 bootstrap，我也在论坛中提到了<a href="https://archlinuxarm.org/forum/viewtopic.php?f=15&amp;t=16159#p69999">解决方案</a>，可以参照着自己打包。</p><p>如果想直接用打好的包，可以用<a href="https://repo.estela.moe/readme.html">我的源</a>，指定安装 <code>saeziae/librime</code> 后再安装 <code>fcitx5-rime</code>.</p><p><img src="fcitx5-rime.jpg" alt="fcitx5-rime on archlinux arm" /></p><h2 id="Minecraft">Minecraft</h2><p>Minecraft 官方的起动器并没有 ARM 架构的二进制分发，我这里使用 <a href="https://hmcl.huangyuhui.net/">HMCL</a> 起动器。</p><p>当然，首先你的系统里要有 Java 环境。</p><p>直接运行 HMCL，自动下载 Minecraft 本体然后运行，果不其然，会报错，大概就是和 LWJGL 相关，可能有 x86 之类的关键词，猜测需要解决 LWJGL 的原生库问题。</p><p>从 <a href="https://www.lwjgl.org/browse/stable/linux/arm64">https://www.lwjgl.org/browse/stable/linux/arm64</a> 下载 <code>libglfw.so</code> <code>liblwjgl_opengl.so</code> <code>liblwjgl_stb.so</code> <code>liblwjgl.so</code> <code>libopenal.so</code> 五个文件放到 <code>.minecraft/natives</code> 里面，然后在 HMCL 的设置中找到 「本地库路径」，选择自定义，填入 <code>natives</code> 目录的路径。</p><p><img src="minecraft.png" alt="Minecraft running on Phytium ARM computer" /></p><h2 id="Discord">Discord</h2><p>Discord 虽然是 Electron 的，但是包含了原生的模块，我试图绕过这些模块启动，但是失败了。目前的解决方案是 <a href="https://github.com/ArmCord/ArmCord">ArmCord</a>.</p>]]></content:encoded>
      
      
      
      
      <comments>https://blog.estela.moe/a8fec2c1fdef/#disqus_thread</comments>
      
    </item>
    
  </channel>
</rss>
