Friday, November 20, 2020

Lenovo Slim 7i Carbon Linux Mint 20 MATE Quick Fix

Touchpad

The touchpad does not work after booting up with Linux Mint 20 MATE, you have few options here:

- Install Ubuntu 20.10 or Fedora 33 (anything with 5.8 kernel)

- Install kernel 5.8 or above from the Ubuntu Kernel PPA Mainline

Install 5.9.8 deb

Pick the 5.9.8 (that is the one I tested) or above from the kernel.ubuntu.com and download to a directory:

$ cd /tmp

$ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.8/amd64/linux-headers-5.9.8-050908-generic_5.9.8-050908.202011101634_amd64.deb

$ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.8/amd64/linux-headers-5.9.8-050908_5.9.8-050908.202011101634_all.deb

$ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.8/amd64/linux-image-unsigned-5.9.8-050908-generic_5.9.8-050908.202011101634_amd64.deb

$ wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.8/amd64/ linux-modules-5.9.8-050908-generic_5.9.8-050908.202011101634_amd64.deb

# dpkg -i *.deb

# systemctl reboot

The touchpad should be activated after booting up with the new kernel:

# uname -r
5.9.8-050908-generic

# dmidecode | grep -A3 '^System Information'
System Information
    Manufacturer: LENOVO
    Product Name: 82EV
    Version: Yoga Slim 7 Carbon 13ITL5

$ xinput
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ 06CBCD3E:00 06CB:CD3E Mouse                 id=11    [slave  pointer  (2)]
⎜   ↳ 06CBCD3E:00 06CB:CD3E Touchpad              id=12    [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
    ↳ Video Bus                                   id=6    [slave  keyboard (3)]
    ↳ Power Button                                id=7    [slave  keyboard (3)]
    ↳ Sleep Button                                id=8    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C             id=9    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated I             id=10    [slave  keyboard (3)]
    ↳ Ideapad extra buttons                       id=13    [slave  keyboard (3)]
    ↳ Intel HID events                            id=14    [slave  keyboard (3)]
    ↳ Intel HID 5 button array                    id=15    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=16    [slave  keyboard (3)]
$

Audio

Sound is not available, please change the following line in /etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="snd_hda_intel.dmic_detect=0"

then, issue the update-grub command:

# update-grub

# systemctl reboot

 

Video

The bundled kernel 5.4.0-[26|54]-generic is able to display 2560x1600 resolution with refresh rate 93 Hz. After fixing the touchpad with the mainline kernel 5.9.8-050908-generic, the display is still showing 2560x1600 resolution, with the refresh rate 60 Hz.

The same issue is found on Ubuntu MATE 20.10 and Fedora 33 MATE. As of writing I cannot find any information on how to fix this in Google searching. The trade off is to set to one of the 16:10 resolution:

16:10 resolution

1920x1200

1680x1050

1440x900

1280x800

Temporary Fix with xorg.conf (10-intel.conf)

This fix only applies for my current Linux Mint 20 MATE with a customized xorg.conf file saved in the location /etc/X11/xorg.conf/10-intel.conf

1. It sets the MATE desktop login screen to 1920x1200 resoluton

2. It creates the above four 16:10 resoluton options, i.e. Control Center | Displays The numbers are obtained from the cvt commands. Other details are from the log files and various commands output during trouble-shooting.

Section "ServerLayout"
    Identifier    "X.org Configured"
    Screen    0    "Screen 0" 0 0
EndSection

Section "Files"
    ModulePath    "/usr/lib/xorg/modules"
    FontPath    "/usr/share/fonts/X11/misc"
    FontPath    "/usr/share/fonts/X11/Type1"
    FontPath    "built-ins"
EndSection

Section "Monitor"
    Identifier    "e-DP1"
    VendorName    "AUO"
    ModelName    "B133QAN02.0"
    Modeline    "1920x1200"  193.25  1920 2056 2256 2592  1200 1203 1209 1245 -hsync +vsync
    Modeline    "1680x1050"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
    Modeline    "1440x900"   106.50  1440 1528 1672 1904   900  903  909  934 -hsync +vsync
    Modeline    "1280x800"    83.50  1280 1352 1480 1680   800  803  809  831 -hsync +vsync
EndSection

Section "Device"
    Identifier    "iris"
    Driver        "intel"
    BusID        "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier    "Screen 0"
    Device        "iris"
    Monitor        "e-DP1"
    DefaultColorDepth  24
    SubSection "Display"
        Depth  24
        Modes  "1920x1200" "1680x1050" "1440x900" "1280x800"
    EndSubSection
EndSection


Restart the lightdm:

# systemctl restart lightdm

Read the log if you are not exhausted!

# less /var/log/Xorg.0.log

Confirm with the xrandr:

$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 32767 x 32767
eDP1 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 290mm x 180mm
   1920x1200     59.88*+
   2560x1600     60.00 +
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
DP4 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
$

Mate panel disappears

This is something unexpected but it hits me. After logging in there is a Computer icon and a Home icon...

Apparently the mate-panel process is found dead. As long as you run the command mate-panel &, the Mate panel comes back.

For a not so permanent fix (Linux Mint 20.1 should arrive before this year X'mas), create a Startup Applications with the following settings:

Name: mate-panel

Command: /usr/bin/mate-panel

Comment: Quick Fix

Delay: 5 seconds


Hope you find the information posted here is helpful!


Thursday, December 27, 2018

Realtek RTL8111/8168/8411 slow transfer speed

scp works like this normally:
[penguin@alpha ~]$ scp linuxmint-19.1-mate-64bit.iso m715q3:/home/penguin/
penguin@m715q3's password:
linuxmint-19.1-mate-64bit.iso                                     100% 1936MB 110.8MB/s   00:17   
 

scp works something like this unexpectedly:
[penguin@alpha ~]$ scp linuxmint-19.1-mate-64bit.iso m715q3:/home/penguin/
linuxmint-19.1-mate-64bit.iso                                       0% 2832KB 390.4KB/s 1:24:30 ETA^


Fix:
Reboot the PC and go into the BIOS Setup
Disable the onboard Ethernet controller
Save and Exit from the BIOS Setup, during POST, turn off the PC
Power on the PC and enable the onboard Ethernet controller
Save and Exit from the BIOS, boot the OS

Rebuild OS does not fix this issue, for some reasons the Realtek onboard Ethernet has this issue occassionally, it happens on two of our Lenovo ThinkCenter M715Q Tiny.

Sunday, August 6, 2017

RHEL7.2 totem

Probably one of the easiest way to enable playback of .ts|.iso with totem player on RHEL 7.2

Install the following rpm from the fedoraproject.org:
# rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm 


Download and install the following rpm from rpmfusion.org:
rpmfusion-free-release-7.noarch.rpm
rpmfusion-nonfree-release-7.noarch.rpm

# rpm -ivh rpmfusion-free-release-7.noarch.rpm
# rpm -ivh rpmfusion-nonfree-release-7.noarch.rpm

Yum install banshee, this is the one that does the magic!
# yum install banshee

My box has the following packages logged in /var/log/yum.log:
Aug 05 20:32:00 Installed: media-player-info-17-4.el7.noarch
Aug 05 20:32:01 Installed: webkitgtk-2.4.9-1.el7.x86_64
Aug 05 20:32:01 Installed: libgpod-0.8.3-14.el7.x86_64
Aug 05 20:32:01 Installed: libgdiplus-2.10-9.el7.x86_64
Aug 05 20:32:02 Installed: mono-winforms-4.2.4-7.el7.x86_64
Aug 05 20:32:02 Installed: mono-extras-4.2.4-7.el7.x86_64
Aug 05 20:32:02 Installed: mono-data-4.2.4-7.el7.x86_64
Aug 05 20:32:03 Installed: mono-wcf-4.2.4-7.el7.x86_64
Aug 05 20:32:03 Installed: mono-mvc-4.2.4-7.el7.x86_64
Aug 05 20:32:03 Installed: mono-web-4.2.4-7.el7.x86_64
Aug 05 20:32:05 Installed: mono-core-4.2.4-7.el7.x86_64
Aug 05 20:32:05 Installed: mono-data-sqlite-4.2.4-7.el7.x86_64
Aug 05 20:32:05 Installed: gtk-sharp2-2.12.26-3.el7.x86_64
Aug 05 20:32:05 Installed: 1:dbus-sharp-0.7.0-15.el7.x86_64
Aug 05 20:32:05 Installed: dbus-sharp-glib-0.5.0-13.el7.x86_64
Aug 05 20:32:05 Installed: notify-sharp-0.4.0-0.26.20100411svn.el7.x86_64
Aug 05 20:32:05 Installed: gudev-sharp-0.1-18.el7.x86_64
Aug 05 20:32:05 Installed: gkeyfile-sharp-0.1-19.el7.x86_64
Aug 05 20:32:05 Installed: gnome-sharp-2.24.2-12.el7.x86_64
Aug 05 20:32:06 Installed: gio-sharp-0.3-14.el7.x86_64
Aug 05 20:32:06 Installed: mono-addins-1.1-3.el7.x86_64
Aug 05 20:32:06 Installed: taglib-sharp-2.1.0.0-3.el7.x86_64
Aug 05 20:32:06 Installed: gdata-sharp-1.4.0.2-18.el7.x86_64
Aug 05 20:32:06 Installed: mono-zeroconf-0.9.0-16.el7.x86_64
Aug 05 20:32:06 Installed: libgpod-sharp-0.8.3-14.el7.x86_64
Aug 05 20:32:07 Installed: banshee-2.6.2-11.el7.x86_64
Aug 05 20:32:07 Installed: gtk-sharp-beans-2.14.0-17.el7.x86_64

 

Now try to play .ts or .iso (mount it first) file under totem, it asks to download some other components.
According to the /var/log/yum.log...
Aug 05 20:46:37 Installed: lame-libs-3.99.5-8.el7.x86_64
Aug 05 20:46:37 Installed: libmad-0.15.1b-20.el7.x86_64
Aug 05 20:46:37 Installed: liba52-0.7.4-27.el7.x86_64
Aug 05 20:46:37 Installed: twolame-libs-0.3.13-5.el7.x86_64
Aug 05 20:46:37 Installed: opencore-amr-0.1.3-3.el7.x86_64
Aug 05 20:46:37 Installed: x264-libs-0.148-11.20160614gita5e06b9.el7.x86_64
Aug 05 20:46:37 Installed: libmpeg2-0.5.1-10.el7.x86_64
Aug 05 20:46:37 Installed: gstreamer1-plugins-ugly-1.4.5-1.el7.x86_64
Aug 05 20:46:38 Installed: gstreamer1-libav-1.2.4-4.el7.x86_64


The box is now capable of playing media files with RHEL 7!

Saturday, June 7, 2014

Cinnamon Wallpaper Shell Script

A little shell script to change wallpaper in Cinnamon

Copy the following script and modify it accordingly:
#!/bin/sh
# Script variables
DIR="/home/linuxmint/Pictures"               # Directory contains wallpaper

WALLPAPER=$(ls $DIR/*.png | shuf -n1)    # File extension is set to *.png
echo $WALLPAPER                          # Debug
gsettings set org.cinnamon.desktop.background picture-uri "file:$WALLPAPER"
 


Save the script as wallpaper.sh, and set the file permission to 755.
Then you can run it from your terminal and start debugging.
Once you are happy with it, add it to your crontab (including DISPLAY=:0)
The one below runs every 5 minutes:
*/5 * * * * DISPLAY=:0 /home/linuxmint/script/wallpaper.sh

To debug, you can run the following commands directly:
gsettings set org.cinnamon.desktop.background picture-uri "file:/home/linuxmint/Pictures/snsd01.png"
gsettings get org.cinnamon.desktop.background picture-uri
  
That's it!

Saturday, April 12, 2014

CrunchBang 11 "Waldorf" on VAIO P - VPCP115KG


An Aging Laptop
Released in June 2010 with an ATOM CPU Z540, VAIO P shows its age with Mate / Cinnamon desktop. At some point I planned to sell it out but after the announcement that Sony sold its VAIO division, I preferred to keep it and started looking for a lightweight, non Xfce Linux distro. Came across an article from LXF and then did a bit googling, I decided to give CrunchBang a try as it looks very promising with a simple desktop and a dark theme, a bit look like the old days of Linux Mint 5.

Installation
Download the 32-bit Waldorf for Modern PCs torrent and transfer the iso to a USB flash drive using USB image writer. The installation is straight forward and VAIO P displays everything correctly. The only problem I got was the LVM partitioning and poked around the menu for quite a while. In general the installation should finish everything in 10 minutes. Once CrunchBang starts, an interactive shell prompts and guides you through updates and packages installation.

Problem: Screen Flickers
The screen keeps flickering and the following errors are logged in /var/log/messages:
Apr 10 10:31:25 vpcp115kg kernel: [  187.040067] [drm] GMBUS timed out, falling back to bit banging on pin 0 [gma500 gmbus disabled]

The fix is to install latest kernel using smxi, the kernel I am using is:
root@vpcp115kg:~# uname -a
Linux vpcp115kg 3.12-10.dmz.1-liquorix-686 #1 ZEN SMP PREEMPT Fri Feb 7 04:09:24 UTC 2014 i686 GNU/Linux

 

Problem: Audio playing too fast
When playing flac using VLC player or Audacious, the audio playing is too fast. This problem emerges from the liquorix kernels. With the default kernel Linux 3.2.0-4-686-pae the playback of audio is fine.

The fix is to append the following line to /etc/modprobe.d/alsa-base.conf
options snd-hda-intel position_fix=1

Reboot and then run the following commands:
rm -rf ~/.pulse*
pulseaudio -k

< 30 seconds
From power up to Openbox login prompt it takes about 27.4 seconds from my stopwatch!

Thursday, July 19, 2012

SO-02D Upgraded to ICS

Background

I bought this phone and a SIM cutter from Amazon Japan in April. In order to use EMOBILE SIM I had it unlocked at local NTT Docomo shop. It was a very unpleasant experience as the staff took more than 10 minutes to check my identity... longer than the time to unlock the phone.

Since most of the bundled Docomo's apps do not run without Docomo's SIM card, and the most important function data-tethering is de-activated for the same reason. This SO-02D was flashed using FlashTool with Generic UK (1257-3921) LT26i ROM (6.0.A.3.67). I was so regret that I should flash it right after the phone was unlocked instead of waiting for 2 more weeks.


Upgrade to ICS

Follow this thread from xda and your SO-02D should have no issue to upgrade to ICS. The only difference from the instruction is my phone gets charge whenever it is connected to my laptop throughout the flash process.

Once upgrade completed, enter the following EMOBILE APNs:

EMnet
APN名 emnet.connect
ユーザー名 emobile
パスワード emobile
プロキシ wm.internal.emnet.ne.jp
ポート 8080
MMSC http://mms.internal.emnet.ne.jp
MMSプロキシ proxy.internal.emnet.ne.jp
MMSポート 8080
 

My EMOBILE
APN名 myemobile
ユーザー名 em
パスワード em
MCC 440
MNC 00
認証タイプ PAP
APNタイプ default,supl,mms
 

PROTOCOL制限ありB
APN名 emb2.ne.jp
ユーザー名 em
パスワード em
MCC 440
MNC 00
認証タイプ PAP
APNタイプ default,supl,mms
 

PROTOCOL制限なし
APN名 emb.ne.jp
ユーザー名 em
パスワード em
MCC 440
MNC 00
認証タイプ PAP
APMタイプ default,supl,mms
 

PROTOCOL制限なしN
APN名 emb3.ne.jp
ユーザー名 em
パスワード em
MCC 440
MNC 00
認証タイプ PAP
APMタイプ default,supl,mms



If it is too bothersome, just input the settings of EMnet and PROTOCOL制限なしN. I opt the latter as the default setting. The phone should now be able to connect to internet.


I installed EMnetメール and emobileメール to retrieve EMOBILE's email. emobileメール works without any issue. EMnetメール does not work without switching the APN to EMnet, which is a minor issue as I only receive one email monthly from EMOBILE (i.e. billing!).


Clean Up

With root privilege, I removed the following apps using Titanium Backup:
About PlayStation Certified 1.0
Androidライブ壁紙 4.0.4-O_5_zw
Anonymous Usage Stats 1.0
ANT Radio Service 2.7
ANT Wireless State Notifier 1.0.1
Backup-Restore 1.0
com.android.wallpaper.holospiral 4.0.4-O_5_zw
CrashMonitor 1.0.A.0.1
Exchange サービス 4.1
Eメール 7.1.A.0.1
FMラジオ 3.0.A.0.4
Google歌詞プラグイン 5.0.A.0.1
McAfee Security 1.2.0.141
Mono 2.0
MusicFX 1.4
NFCサービス 4.0.4-O_5_zw
OfficeSuite 6.0.830
PlayNow 1.10.1
POBox Touch 5.1
Sakura 2.0
TrackID 3.60.49
WALKMAN 2.0.A.0.17
WALKMAN 5.0.A.0.11
Wisepilot 4.5
Woody 2.0
Xperia SmartTags 1.1.8
お勧めのダウンロード 2.4.12
キーチェーン 4.0.4-O_5_zw
タグ 1.1
ツール 1.0.A.0.17
トップ連絡先 1.11.0
ニュースと天気 1.3.04
ノート 7.0.A.0.22
バックアップと復元 1.0
バブル 1.0
ビジュアライザー 1.0.A.0.6
ヘルプ 6.1.13
マジックスモーク壁紙 4.0.4-O_5_zw
メモ 1.0.A.0.3
中国語キーボード 7.0.A.0.13
友達の音楽 4.0.A.0.16
地球 3.0.1
天気ウィジェット 2.0.A.0.17
店頭用デモ 2.18.0
最近の通話履歴 1.0.A.0.3
魔法の森 1.6.A.0.6

 

Of course, make a backup before doing this!


I did the upgrade on 2nd July, preparation for the upgrade took about 2 hours (installed latest FlashTool and then intercepted by Windows Update), flashing the ROM took about an hour. Spent half day for post configuration.


That's it!

 
SO-02D with EMOBILE SIM Card





















My ICS UI
























Saturday, May 19, 2012

Backup copy-protected DVD using Linux but...

I like watching drama and movie DVD and it is simple to create an iso backup for my favourite on Linux Mint platform. Just use Brasero and it gets the job well done... until few days ago.

When an iso file is created using Brasero, I run the following commands for integrity check as well as generate a new volume ID (mkisofs -V), mkisofs failed to generate a new iso file:

 








Brasero did not report any error during the creation of iso from this DVD. When I opened the iso file from Totem Movie Player and tried to play it, the following error message box appeared:







VLC media player could not play the movie too.

Different programs have been tried but none of them could fix the error (vobcopy, dvdbackup, ddrescue, dd). I even read somewhere saying Linux is not able to cope with the latest DRM, Oops!

Interestingly, the file system from those DVDs tricks the Linux OS about its VOB files with total size closed to 60GB! Further investigation tells me the DVD deployed more than one copy-protected techniques (other than CSS). The article from Gentoo Wiki explains what the problem is and suggests to use IfoEdit to fix the broken IFOs on Windows. After trying to repair several IFO files few times (through wine), I couldn't fix them. In addition, the DVD has 99 chapters, it is too time-consuming to fix all those IFO files, and if I know how!

According to one of the forum I came across it suggested to use DVDFab to rip the DVD and then use imgBurn to take care the rest. Oh no! I need to use Windows (I use it mainly to flash my Xperia phones.)! Therefore, I tried to install DVDFab Qt 8 on Windows 7, then used it to rip the DVD and it did not report any error. Next I used imgBurn to generate iso files, Volia! It worked! I ported those 2 programs into Linux Mint and did similar tests and all were ok.

To install wine:
vpcf1 ~ # apt install wine
Then you need to configure wine to add CD/DVD ROM drive letter:
penguin@vpcf1 ~ $ winecfg


To install DVDFab and imgBurn on Linux, you can just use the following commands (I installed them under /opt directory):
vpcf1 ~ # wine DVDFab8178Qt.exe &
vpcf1 ~ # wine SetupImgBurn_2.5.7.0.exe &
  
Once both programs are installed, rip the DVD using DVDFab, in my case the ripped files are saved under E: (/bittorrent/FullDisc/DVD_VIDEO). Leave the ripped files intact. Next, use imgBurn to generate an iso file from /bittorrent/FullDisc/DVD_VIDEO. When it finishes, your backup is ready!



In summary, to backup a movie DVD, you can:
Method 1
Use bundled Brasero on latest Linux Mint to create an iso.

 
Method 2
Use DVDFab to rip those intentional sector corruption DVD, then use imgBurn to create an iso file. Both can run under Linux through wine. How to use both programs are straightforward.



This morning I bought DVDFab DVD Copy but the license code cannot be registered on Wine.