Author Archives: csslayer

Gaps between Wayland and Fcitx (or all Input methods).

Though some people have no problem (or, only few problems) about using fcitx (to be more specifically version 4) with wayland, but the truth is there are still lots of problems left to be addressed. The truth is, wayland is … Continue reading

Posted in fcitx development | Tagged , , , | 2 Comments

最近的一个 Linux Intel 驱动问题和 Workaround

老实说一般我都不愿意写这种文章。因为这种文章基本上都是很有时效性的。但毕竟这个问题已经困扰了我好几个月,所以还是打算记录一下方便同样遇到问题的人。 具体表现是,开机正常,使用正常,但是如果放久了就会黑屏再也起不来。这时还能 ssh 进去,但是从 ssh 重启很大可能会等待很久。上游的 bug report 我也不好分辨到底是哪个,就随便列出几个我觉得相关的。 那么最后我的解决方案是什么呢……总之也是在某个 report 里面看到有人提到的方法。 在 /etc/modprobe.d/90-i915.conf 里面写上 options i915 enable_guc_loading=1 enable_guc_submission=1 disable_power_well=0 总之我加上这个参数之后好久都没有出过问题了。 顺带一提我正在使用的内核版本是 4.13.0 但是这个问题至少困扰我了好久好久大概从 4.9 之后升级了 BIOS 开始……

Posted in Linux | Tagged , , , | Leave a comment

一个关于 Pimpl 的小技巧

使用 Pimpl 很多时候是必须的,ABI 兼容的时候基本都要靠它。在 C++ 11 当中,通过 default member initializer 可以实现很多有趣的效果,加上宏的话很多时候可以利用来实现 Metadata 的效果,例如: #define PROPERTY(NAME) \ Property NAME{this, #NAME}; class Registry { friend class Property; public: int& getValueByName(const std::string &name) { return *values_[name]; } protected: void registerValue(const std::string name, int* … Continue reading

Posted in Linux | Tagged , , | Leave a comment

Shell script for Google TTS on Plasma desktop

My wife has extreme dry eye condition, so she want to avoid looking at the screen as much as possible. She asked me for a solution for Text-to-Speech on linux desktop. Basically her requirement is to press a key and … Continue reading

Posted in KDE | Tagged | 2 Comments

A new pinyin input method that might be slightly better than sunpinyin

What do I mean when I say “slightly better”? First of all, thanks to sunpinyin’s open-gram, I can use its data for free. So, on the pinyin side, libime IS using the exact same data from sunpinyin. So what’s the … Continue reading

Posted in fcitx development | Tagged , | 1 Comment