RSS Feed

Category Archives: annoyance

AAC file re-visit

In my previous post, I mentioned about AAC and the ID3 tag. And I mentoined that

I have an AAC audio file (technically M4A) […]

I used Audacious previously, then change to DeadBeef. The main reason I changed was because I kept failing to play AAC audio file. What’s wrong? FFplay can play it, SMPlayer can play it, DeadBeef can play it, Clementine can play it, but Audacious cannot. Audacious has a AAC plugin, it should support AAC format.

But if I play the AAC file with Audacious, I will get this error,

Unknown playback error (check the console for detailed error information)
ERROR [play]: No valid frame header found.

Seach online and found that, it is the file extension issue. So, what is it?

Using the “exiftool”, I found that the MIME Type is video/mp4. That is the fix!!

I renamed the AAC file to Mp4. Now Audacious can play the file well.

Now, when it was in the AAC extension, in order to view the audio metadata such as author, title, ablum, I used Kid3 to edit the APE instead of ID3v2, so that FFplay can play it. ID3v2 is actually for the MP3 format. If use ID3v2 on the AAC extension audio file, FFmpeg cannot convert it and FFplay and SMPlayer both failed to play the audio file properly.

But after I rename the file into MP4, there is an issue. MP4 metadata (I think it is also ID3v2) cannot be written using Kid3, due to the existence of APE tag. (Kid3 doesn’t mention anything about this, I solve this heuristically.)

  1. So, I need to remove the APE tag using Kid3 by naming the file as AAC first.
  2. Then, I rename it to MP4 and use Kid3 to edit the ID3v2

As a conclusion, I use back Audacious as my primary audio player. It is the best!

(Why not DeadBeef? DeadBeef lack of the feature to copy-paste the songs from one playlist to another.)

AAC audio file and ID3 tag

I just found that, if I have an AAC audio file (technically M4A), and if I added the ID3 tag 2 (aka ID3v2), then the audio file will failed to be converted by ffmpeg.

It can be either converted to mp3

  • using DeadBeef audio player, or
  • remove the ID3v2 tag then convert

So, how to add the metadata like ID3 tag? Use the Kid3 and add the Tag 3 (aka APE tag). This will not affect how ffmpeg to read the file.

Linux no sound after boot into Windows

Just now was trying to boot into Windows, by plugged in the HDMI cable, which supports for video only. But then, I rebooted into Linux without plugged out the HDMI cable. Then, it caused no sound in Linux.

Try 1: I killed the pulseaudio, then delete the ~/.config/pulse, and rebooted Linux. Failed.

Try 2: Run alsamixer, turned on everything, and do Try 1 again. Failed.

Then I guessed it was caused by the HDMI cable, which the Windows may assume there is audio, then caused my computer somehow ouptut the audio through the HDMI, even I rebooted into Linux.

Try 3: Plugged out the HDMI, booted into Windows. I checked the audio in Windows. It plays well. Then rebooted into Linux without plugged in HDMI. Yeah! It works. Passed.

Next level

Then I found that, though the sound works fine, my headphones doesn’t work. Tried out many methods as I asked in forum.

At the end, it is solved by shutdown, and boot again.

MIUI 7 Google Calendar sync problem

Recently, I found that, the calendar item (agenda) created in MIUI 7 Calendar does not sync to my Google Calendar. Then I ignore it.

And until today, I found that, the agenda from Google Calendar does not sync to MIUI7 Calendar too. Then this will be serious. So, I search around the forum, and finally get this solution.

Install Google Calendar! This will solve the calendar syncing problem. Enjoy!

Xfce4 Power Manager, NVIDIA, Nouveau backlight issue

Recently I move back to use my (around) 4 years old laptop, HP Pavilion dv3. It has NVIDIA graphic card. But since I (re-)installed Arch Linux 64 bit on it, I failed to run the X11 with the proprietary NVIDIA driver. As a result, I used the Nouveau module instead. Then, I tried several times and finally successfully run the X11 with NVIDIA driver.

To use the Nouveau module, in the mkinitcpio.conf, we have to add in “nouveau” module, then build the initramfs (refer to wiki page). And use the “Xorg -configure” to generate the xorg.conf.

But in order to use the NVIDIA driver, firstly, has to identify the NVIDIA graphic card and download the related drivers. Secondly, since I am using 64 bit, but also running 32 bit packages, so I have to install all the corresponding lib32 NVIDIA packages. Moreover, the nvidia*-libgl are conflicted to mesa-libgl, which is used by Nouveau. After installing NVIDIA, use “nvidia-xconfig” to generate the xorg.conf.

We can also disable the splash screen (logo) when starting the X11, by adding

Options "NoLogo" "1"

in the “Device” section in the xorg.conf.

Then after using the NVIDIA, I face a serious problem, that is the xrandr (in fact I am usign ARandR) cannot change the screen resolution. This is troublesome as I need to make the changes towards the projector (2nd screen) frequently, such as two screens (left screen and right screen), laptop only (disable the projector), or clone (both laptop and the projector share the same screen). With the NVIDIA, xrandr cannot detect other resolutions, consequently I cannot make clone of the screen. So, I decided to use back Nouveau.

However, I have another serious problem with Nouveau module, that is, adjusting the backlight brightness (screen brightness). When I use xbacklight, it shows

No outputs have backlight property

I cannot adjust the backlight brightness using the usual keyboard key with Xfce4 Power Manager. Some forums stated that adding “acpi_backlight=xxxx” to the kernel parameter. But none of them works.

In my /sys/class/backlight, there are acpi_video0 and nv_backlight. Actually, I can change the backlight by echo the value to the acpi_video0/brightness, with “su”. Yet the nv_backlight does not show any effect.

I found that, I can use the keyboard key to adjust the brightness before start the Xfce4. Once the Xfce4 started (with Power Manager), the brightness change takes no effect. And the changes of the brightness is affecting the nv_backlight/brightness. So, I concluded that it is actually fixable by fixing the Xfce4 Power Manager.

As a result, I patched the Xfce4 Power Manager by editing the source code, to remove the “nv_backlight” from the priority. Install this patched package, restart the Xfce4, and now, it works!

MIUI upgrade

Today I just upgraded the MIUI to version 7. Actually, it prompted for the  upgrade since some times last week. But I failed to upgrade, expected to be server problem.

So, today I determined to find the solution for manual upgrade. The upgrade version is MIUI I visited the official site and searched the ROM, but the official site does not have this ROM. As a result, just did a search, and found the target ROM in the MIUI official forum. Then everything becomes easy now.

In order to upgrade manually, we have to identify the filename of the target ROM. If we can start downloading the ROM file partially, then we can get the filename from the folder downloaded_rom.

Then to download using our desktop web browser such as Firefox, make a search online for the filename. For my case, it is “”. Make sure you are downloading from the official forum, where the file is located in the true MIUI server.

After download the ROM file, copy it to the downloaded_rom folder, run the system upgrade, then the phone will use the ROM directly. The phone skips the step downloading the ROM which may be very time exhaustive.

Finally, reboot, and upgrade success.

今天升级了MIUI 7。事实上,前几天(上个星期那样)就已经有提示让我升级了。不过试了很多次,都升级失败。应该是服务器的问题。





LibreOffice Writer table tips


LibreOffice Writer is better than Microsoft Word. If you are a web developer, you should understand that there are class and style. Using LibreOffice is tended to using class-like style, instead of direct formatting, which causes a lot of inconsistent, troublesome, and time consuming modification throughout the word processing. And this is happened when the newbies are using Microsoft Word to create templates for the advanced user like me, and causes me full of trouble as being tortured.

The worst thing in Microsoft Word is the Numbering format. Microsoft Word sets the numbering format as properties of a paragraph. But LO Writer differentiates the paragraph style, character style, frame style, page style, and the list style. Thus, it is much more easier to use the list style in LO Writer.

I admit that LibreOffice Writer still has some limitations comparing to some features of Microsoft Word, but for the styles and formatting, it is much more easier than using Microsoft Word.

Now, let me go into the tips of the table in LO Writer. The LO version I am using is 5.0.

Table at the same line of paragraph

In Writer, unlike image, table by default cannot anchor as character. Therefore, it cannot have some text at the left or right of a table. This can be solved by using frame.

Table in the paragraph line

Table in the paragraph line

So, create a frame and set the properties,

  1. Type > Anchor as character
  2. Type > Vertical Top to Row (depend on your preference)
  3. Wrap > Spacing four sides to zero
  4. Borders > Set no border
  5. Insert table inside the frame.

Remove/add the empty line after table

As the image above, you can see within the frame, there is an empty line after the table. This line, you cannot delete or “backspace”. So, in order to solve this, at the last cell of the table, press Ctrl+Shift+Del will delete the empty line. In order to add the empty line, Alt+Enter.

Vertical text in the table

To create a vertical text, it has to create a new style (it can be based on the Table Contents). Then at the new style properties,

  • Position > Rotation / Scaling > 90 degrees or 270 degrees (based on your preference)

After creating this style, just select the content of the cell you want to have a vertical align, apply the created style, than it will work.

Vertical text in the table

Vertical text in the table

There are several things have to take note when using the style to rotate the text. The image above shows two different ways to rotate the text. The left bottom cell is using the method mentioned above, the right bottom cell is using the following method,

  1. Select the text in the cell, and go to Table Properties,
  2. Text Flow > Text orientation >Vertical

By using the Text Flow method, we cannot change the rotation direction as shown in the left bottom cell. But using this way, we can change the alignment and indent easily. When we choose align to the centre, the text will be centre as usual.

However, using the Style method, it is quite confusing. When using Style, if we align the text to centre, it is based on the view of the table, instead of make the text centre itself.

Centre text problem

Centre text problem

As the image above, the first cell has the following properties

  • Table Properties > Text Flow > Alignment > Top
  • Paragraph Properties > Alignment > Options > Centre

The second cell has the same properties as above.

In order to make our text at the left cell start from the left bottom corner, then we have to set

  • Table Properties > Text Flow > Alignment > Bottom
  • Paragraph Properties > Alignment > Options > Left
Align the table

Align the table (they left and bottom).

Padding in a specific cell or customise a cell

As the image above, we want to adjust the left cell of the text, so that the text and the bottom border has some spacing, this have to customise the cell specifically. However, LO Writer does not show any clue for you to edit the properties of a cell, and it only shows you “Table Properties”.

It is actually possible to customise a certain cell.

  1. Select a cell by highlight the content inside,librlibr then hold and move the cursor to next cell. We will discover that the cells are highlighted, instead of the text within.
  2. Since there are two cells being selected, we move our mouse back to the original cell. And we will get something like this,
Select a cell

Select a cell

Now, the cell can be edited with Table Properties (which is actually selected cell properties).


So, these are a few tips which are useful to manage the table in the Writer.