Monday, November 01, 2021

Windows 11 installation affects wifi of linux installed as dual boot

I've upgraded my dell precision laptop to windows 11. However, when I use the Ubuntu linux installed on the same laptop, the wifi is missing. Having searched on the internet, it seems that the windows 11 enables fast startup for windows, which causes the following error for linux:

iwlwifi: probe of 0000:03:00.0 failed with error -110

Following the instruction on this link: https://askubuntu.com/questions/1083369/ubuntu-18-04-cannot-recognize-intel-wireless-ac-9260/1183101#1183101?s=0c0b330e14054b6fb889dec613f7f56e, I managed to turn off the fast startup for windows. Now the linux wifi works again!




Saturday, December 19, 2020

 My working laptop is Precision-7520 which has the audio device "Intel Corporation CM238 HD Audio Controller" as in the "lspci" output. Searched on internet for a while and finally found a working solution.

sudo vi /etc/modprobe.d/alsa-base.conf

Add the following two lines at the end:

options snd-hda-intel probe_mask=1

It fixes the error shown in the output of "dmesg"

no response from codec
Unable to sync register 0x2f0d00. -5

Saturday, November 11, 2017

Ubuntu 17.10 on surface pro 4

Today I tried to install Ubuntu 17.10 on my surface pro 4. At the beginning, I can't get the boot from USB to work. Later I realized in the UEFI setup page, there is a switch to enable boot from USB. Also swiping the "USB storage" item from the list can boot immediately from the USB device.

The installation itself runs smoothly since I already used the windows disk manager to shrink the volume to make some space for the linux installation.

During the installation, the typecover keyboard and mousepad works already, which means no USB hub is needed to have an external keyboard and mouse. After I've got the linux surface booted up, I find that The wifi works quite unstable. It drops the connections very frequently. I've tried to use the firmware under git://git.marvell.com/mwifiex-firmware.git. However, doesn't help much. I also tried the following suggestion from reddit

Edit /etc/NetworkManager/NetworkManager.conf and add the following lines at the bottom: [device] wifi.scan-rand-mac-address=no

Sadly, the problem still didn't seem to be completely solved. Finally, I've gone to this site https://github.com/jakeday/linux-surface, git-cloned the files and downloaded the patched kernel 4.14.0. Following the instructions, I've got the touch screen working and now the wifi is also quite stable. From time to time I still get lost typecover when the system sleeps.

Another strange issue I've got is the when connecting using openconnect to corporate network, the name can't be resolved by nds. I have to run "systemd-resolve -status" to find out the DNS used by corporate network and add the following line to /etc/network/interfaces:

dns-nameservers  [ip of coporate DNS]


Monday, July 24, 2017

Downgrade a package to fix package dependency issue

I've got the following error message when I tried to install g++ on ubuntu 17.10.

The following packages have unmet dependencies:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:5.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.













After checking that dependency using following command:
apt-cache policy libc6-dev

It looks like it depends on an earlier version.
libc6-dev:
  Installed: (none)
  Candidate: 2.24-9ubuntu2
  Version table:
     2.24-9ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu artful/main amd64 Packages



So I went ahead to downgrade this package
sudo apt install libc6=2.24-9ubuntu2
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Suggested packages:
  glibc-doc
The following packages will be DOWNGRADED:
  libc6

...
dpkg: warning: downgrading libc6:amd64 from 2.24-9ubuntu2.2 to 2.24-9ubuntu2

After this downgrading this package, I can install the g++ again!

Sunday, July 23, 2017

setup fcitx for xfce4 under WSL in Windows 10

After setting up xfce4 under WSL(Windows Subsystem for Linx) in Windows 10, I tried to add chinese input support.

Looks like the following steps need to be taken:
1. Install a Chinese font, for example:
    sudo apt install fonts-noto-cjk
2. Install fcitx
    sudo apt install fcitx fcitx-googlepinyin
3. Configure environment variable and start fcitx with xfce
    Create a file under /usr/bin/xfce4 with the following content
     #!/bin/sh   
     export GTK_IM_MODULE=fcitx
     export QT_IM_MODULE=fcitx
     export XMODIFIERS=@im=fcitx

     xfce4-session
     fcitx

   Add executable permission to the file
   sudo chmod a+x /usr/bin/xfce4
4. quit VcXSrv. Close WSL console
5. Start VcXSrv, run WSL console(i.e. BashOnWindows) and start xfce4 again.

    /usr/bin/xfce4
    

Upgrade from Ubuntu 16.04 LTS to 17.04

Today I want to upgrade my linux 16.04 LTS to 17.04. However, even I've chosen "For any new version" in the "Updates" tab of "Software & Updates", when I run
sudo do-release-upgrade 
It still always says "No new release found".

Finally found an article mentions an alternative way to check new release.
sudo /usr/lib/ubuntu-release-upgrader/check-new-release-gtk

This one works wonderfully for me!

Saturday, May 28, 2016

Ubuntu 16.04下使用网易云音乐

看到网易发布了云音乐的Linux版,就想在Ubuntu 16.04下试一下。弄了半天,终于听到歌了。下面分享一下搞定的步骤。

1.先到官方网站 http://music.163.com/#/download 下载一个Linux的安装包。现在支持deepin,Ubuntu 14.04和16.04。

2.由于海外ip有限制,得把以下列表加到/etc/hosts里。否则,就会提示网络错误。
知乎上这个链接 https://www.zhihu.com/question/46732449/answer/102685954 提供这个列表。
198.47.104.134 m1.music.126.net 
198.47.104.134 m2.music.126.net 
198.47.104.134 m3.music.126.net 
198.47.104.134 m4.music.126.net 
198.47.104.134 m5.music.126.net 
198.47.104.134 m6.music.126.net 
198.47.104.134 m7.music.126.net 
198.47.104.134 m8.music.126.net 
198.47.104.134 m9.music.126.net 
198.47.104.134 m10.music.126.net

Tuesday, February 26, 2013

Here maps display toll roads and under-construction roads


If you go to here.com, and click the "blue man" at the bottom middle, it shows the panorama image's coverage in some transparent blue blobs. This view also gives you a preview what's coming next. It's using a slightly newer map data and potentially more features that will come to the main map view.

In the following example, it's showing a new feature that display the toll roads in a reddish color and the roads under construction will be displayed in a dashed line style.



Thursday, August 07, 2008

PuyoMobile 0.4 release

A new version of Puyo Mobile is now available.

Highlight in this release is
(1) Game level support. The level will be increased when you win every 50 points. The falling speed of the balls will be faster. The level is saved together with your points in the scoreboard.
(2) Multiple language support. Initially you can switch to English or Chinese.
(3) Blinking effects when the balls are going to be removed.

The download link contains the JAR file for installation. Anyone interested in the code can download the source here.

Tuesday, May 20, 2008

Installed Ubuntu 8.04

Just installed ubuntu 8.04 as my 3rd OS on my 3.5-year-old laptop. The installation went quite smoothly. Even my bluetooth dongle works out of box. I can open my N95's directory quite easiy and copy back and forth files.

The only annoyance was that the firefox 3.0b5 didn't work with the Adobe flash player 9. However, today I manually installed 3.0 rc1 and flash player 10. It works like a charm!

Friday, December 28, 2007

Puyo Mobile 0.3 has been released.

At last I've got some time to add the sound features to Puyo Mobile. Various minor issues on Nokia phones have also been ironed out. In addition, the project file is updated so that you can download the source file and load it in Netbeans 6.0.

This is the direct download link for the zipped jar and jad if you're eager to try it.

Have fun!

Thursday, December 27, 2007

Update from Netbeans 5.5 to Netbeans 6.0

When I update from Netbeans 5.5 to 6.0, I can't start the emulator for J2ME development anymore. Later I've found that the problem is that Netbeans 6.0 is bundled with WTK(Wireless ToolKits) 2.5.2, whereas the 5.5 uses WTK 2.2. Then I go to the menu "Tools"->"java platforms" and remove the WTK 2.2. After removal, you'll see the project icons using J2ME show some errors in the "Project Navigator" view. Don't panic. Just go to the "Project Properties" dialog to ensure the "Emulator Platform" is WTK 2.5.2. Click OK button and you're done!

Wednesday, December 26, 2007

autostart scim under KDE4

Yesterday I installed KDE4 on my linux system. I wanted to automatically start the chinese input method support scim after log into the KDE4 desktop from kdm. I took some advices from internet and added .xim in my home directry. The content of the .xim is as follows:

export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE=scim
export QT_IM_SWITCHER=imsw-multi
export QT_IM_MODULE=scim
scim -d


However it didn't work. I checked the .xsession and found that the .xim was not called at all. After grepping in /etc, I found that KDE4 uses its own Xsession under /etc/kde4/kdm instead of the standard one under /etc/X11/xdm. After I added this line

[ -f $HOME/.xim ] && . $HOME/.xim

before calling startkde in the Xsession file, it worked like a charm!

Sunday, November 04, 2007

crysis demo looks nice.

Yesterday I downloaded the crysis demo and played a little bit. The graphics and physics effects look great. On my 3-year old laptop with a 1.6G centrino CPU and Raedon 9700 graphics card it runs still quite fluently.

Some tips if you're new to this game:
1. Don't waste your ammo. It's limited! However you can pick up guns when killing an enemy and take their ammos.
2. Use the jeep equipped with a machine gun, which seems to have infinite ammo. Mind your driving!
3. Press "V" key and try some options there.

Good job, Crytek.

Thursday, September 27, 2007

general makesis

When I'm trying to pick up some dev work on my mirrlicht project, I came across a little annoying problem for Symbian development. That is to write a small tool which can take symbian package file containing relative paths. The relative paths make it easier to switch between different SDK installations.
There is a tip here suggesting to use option -d"Your epoc root dir" when you call makesis. However it would be better to pass the epoc root directory automatically.

I've found a way to do this using the command "devices" provided with the symbian SDK and a dos batch file.


@echo off
set filename=yourproject
if "%1"=="gcce" set filename=yourproject-GCCE
for /F "usebackq tokens=3 delims= " %%i in (`devices -default`) DO (
for /F "usebackq tokens=1,3 delims= " %%j in (`devices -info @%%i`) DO if "%%j"=="Root" makesis -d%%k %yourproject%.pkg
)
)

Note that the second "for" statement is in one line. I've tested this on S60 SDK. But it should also work for UIQ.

Friday, May 25, 2007

OpenGL ES problem on N73

I've recently got an N73 from my company. Since this phone (or mobile computer if you prefer to call it this way) includes a software OpenGL ES renderer, I'm eager to try if the sample programs included in the Nokia OpenGL ES 1.1 plugin run on a real device. After I compiled a very simple sample SimpleCube and installed it on my N73, the testing result is disappointing because the rotated cube flickered all the time. I googled but haven't found many useful information for this issue. Later I found that the problem is caused by fast periodic refreshing. The timer in the example is set to 100 microseconds. However it seems that the software renderer can't finish the rendering in such a short time. Therefore the next frame starts to render before the first rendering comes to an end. By setting the timer (the second argument of CPeriodic::Start) to 30000 microsecond, the animation now runs very smoothly. Hurah!

Tuesday, March 27, 2007

online siggraph presentation videos

2003-2006 siggraph presentation videos are online available at http://encore.siggraph.org/menu.asp. It's great! I find the courses presentations are very useful for graphics people.

Friday, March 09, 2007

Wedge

Recently I came across to the mesh library "vcg"(browse source , project page) developed by Visualization and Computer Graphics Lib in Italy. In one of the header file, I saw the term "wedge". Then I looked up in wikipedia and didn't find this term pertaining to computer graphics. After a short while googling, I found that this was originally described in the following paper.

Hugues Hoppe. Efficient implementation of progressive meshes. Computers and Graphics 22, 1 (1998), 27–36.

The main purpose of wedge is to allow represent discontinuities of material attributes on a mesh, as illustrated on the above image taken from the paper.

Wednesday, December 06, 2006

Irrlicht runs on Pocket PC emulator


The WinCE branch in the mirrlicht project now has the first screen shot. It's just a simple MD2 animated figure with a static text GUI element. The porting is developed using MS Visual Studio 2005. The rendering is performed by an OpenGL ES software implementation -- Rasteroid from Hybrid. It runs on a Pocket PC 2003 emulator. However, the frame rate is very low on the emulator (like showing slides). I've also encountered memory constraint and had to setup an emulator with 96M RAM and to increase the program memory( Start > Settings > System tab > Memory).

Note that if you want to try the program, you need to copy %VS2005_INSTALL_DIR%\vc\ce\dll\armv4\msvcr80.dll, rasteroid3.1\bin\wince\pp2003\device\libGLES_CM_NoE.dll, libEGL.dll
to the Windows directory on your device or emulator.

copy Branches\WinCE\examples\WinCE\HelloWorldStandAlone\Pocket PC 2003 (ARMV4)\Release\HelloWorld.exe to \Program Files\HellowWorld directory of the device or emulator.

copy Branches\WinCE\media\laalaa.md2, laalaa8.bmp to \media directory of the device or emulator.

I've packed those files together and you can downloaded at http://mirrlicht.googlepages.com/mIrrlicht-HelloWorld-WinCE.zip

Saturday, December 02, 2006

PuyoMobile update 0.1.1

The download link of PuyoMobile is updated to 0.1.1, which fixes the slugglish key response problem. The source code is also updated, accordingly. Check the project webpage http://limingchina.googlepages.com/puyopuyo.