Skip to main content

Magibook VTech Explor@ Park under Linux with Wine

7 min read

Download the Explor@ Park exe file from the official website

Run the installer with wine

I got this error:

00c0:err:module:open_builtin_file failed to load .so lib "/usr/lib32/wine/wldap32.dll.so" 
00c0:err:module:import_dll Loading library WLDAP32.dll (which is needed by L"C:\\users\\cedric\\Temp\\qt_temp.XRUs3219097\\SetupLoader.exe") failed (error c000007a).
00c0:err:module:LdrInitializeThunk Importing dlls for L"C:\\users\\cedric\\Temp\\qt_temp.XRUs3219097\\SetupLoader.exe" failed, status c0000135

Turns out I needed to upgrade wine and install lib32-libldap.

App is installed correctly and run, but fails to connect to the MagiBook through USB despites it being detected by lsusb.

Bus 001 Device 033: ID 0f88:1785 VTech Holdings, Ltd LeapStart

At this point the battery died on me and I had to wait for the battery to charge again.

Reading the User's Manual under section 4.3.1 Serial and Parallel Ports gives this hint :

ls -l ~/.wine/dosdevices/ 
total 0
lrwxrwxrwx 1 cedric cedric 10 12 jan 2020 c: -> ../drive_c
lrwxrwxrwx 1 cedric cedric 10 10 sep 09:50 com1 -> /dev/ttyS0
lrwxrwxrwx 1 cedric cedric 10 10 sep 09:50 com2 -> /dev/ttyS1
lrwxrwxrwx 1 cedric cedric 10 10 sep 09:50 com3 -> /dev/ttyS2
lrwxrwxrwx 1 cedric cedric 10 10 sep 09:50 com4 -> /dev/ttyS3
lrwxrwxrwx 1 cedric cedric 8 12 jan 2020 d:: -> /dev/sda
lrwxrwxrwx 1 cedric cedric 1 12 jan 2020 z: -> /

Now I guess all I have to do is figure out which TTY is being used by the USB connection and make a symlink accordingly. Since folders up to com4 already exists I guess I can create a com5 folder for that.

usb-devices

(...)

T:  Bus=01 Lev=01 Prnt=01 Port=08 Cnt=04 Dev#= 33 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 =  1
P:  Vendor=0f88 ProdID=1785 Rev=01.00
S:  Manufacturer=LeapFrog Enterprises, Inc.
S:  Product=LeapStart
C:  = 1 Cfg#= 1 Atr=c0 MxPwr=100mA
I:  If#=0x0 Alt= 0 = 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

At this point I realize the MagiBook is considered as a mass-storage and is not mounted on my system yet, maybe I need to fix that first.

(to be continued)

(later)

Batteries are charged, I plug it back in and run dmesg just right after, this does not look good :

[12642.953280] usb 1-9: New USB device found, idVendor=0f88, idProduct=1785, bcdDevice= 1.00
[12642.953281] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[12642.953282] usb 1-9: Product: LeapStart
[12642.953283] usb 1-9: Manufacturer: LeapFrog Enterprises, Inc.
[12642.954172] usb-storage 1-9:1.0: USB Mass Storage device detected
[12642.954261] scsi host0: usb-storage 1-9:1.0
[12644.023007] scsi 0:0:0:0: Direct-Access     Leapfrog LeapStart        0100 PQ: 0 ANSI: 2
[12644.023364] sd 0:0:0:0: [sda] 415744 512-byte logical blocks: (213 MB/203 MiB)
[12644.023496] sd 0:0:0:0: [sda] Write Protect is off
[12644.023498] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[12644.023628] sd 0:0:0:0: [sda] No Caching mode page found
[12644.023629] sd 0:0:0:0: [sda] Assuming drive cache: write through
[12644.053663] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[12644.053665] sd 0:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current]
[12644.053666] sd 0:0:0:0: [sda] tag#0 Add. Sense: Logical block address out of range
[12644.053667] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[12644.053668] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[12644.053670] Buffer I/O error on dev sda, logical block 0, async page read
[12644.054004] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[12644.054005] sd 0:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current]
[12644.054006] sd 0:0:0:0: [sda] tag#0 Add. Sense: Logical block address out of range
[12644.054007] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[12644.054008] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[12644.054008] Buffer I/O error on dev sda, logical block 0, async page read
[12644.054012] ldm_validate_partition_table(): Disk read failed.
[12644.054352] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[12644.054353] sd 0:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current]
[12644.054353] sd 0:0:0:0: [sda] tag#0 Add. Sense: Logical block address out of range
[12644.054354] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[12644.054355] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[12644.054356] Buffer I/O error on dev sda, logical block 0, async page read
[12644.054680] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[12644.054681] sd 0:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current]
[12644.054682] sd 0:0:0:0: [sda] tag#0 Add. Sense: Logical block address out of range
[12644.054682] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[12644.054683] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[12644.054684] Buffer I/O error on dev sda, logical block 0, async page read
[12644.055036] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[12644.055037] sd 0:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current]
[12644.055038] sd 0:0:0:0: [sda] tag#0 Add. Sense: Logical block address out of range
[12644.055039] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[12644.055041] blk_update_request: critical target error, dev sda, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[12644.055042] Buffer I/O error on dev sda, logical block 0, async page read
[12644.055045]  sda: unable to read partition table
[12644.055682] sd 0:0:0:0: [sda] Attached SCSI disk
[12644.060462] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[12644.060463] sd 0:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current]
[12644.060464] sd 0:0:0:0: [sda] tag#0 Add. Sense: Logical block address out of range
[12644.060465] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 06 57 80 00 00 08 00
[12644.060466] blk_update_request: critical target error, dev sda, sector 415616 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[12644.060810] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=0s
[12644.060812] sd 0:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current]
[12644.060813] sd 0:0:0:0: [sda] tag#0 Add. Sense: Logical block address out of range
[12644.060814] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 06 57 80 00 00 08 00
[12644.060815] blk_update_request: critical target error, dev sda, sector 415616 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[12644.060816] Buffer I/O error on dev sda, logical block 51952, async page read

javaws - You are trying to get resource *.jar but it is not in cache and could not be downloaded

4 min read

Hello,I'm currently trying to get a jnlp file running with javaws under Linux. I successfully ran that same file via a virtual machine on VirtualBox, but when i run it from Linux, i keep getting an error complaining about external ressources not being downloaded - if I get it right, i don't know the first thing about Java and javaws.I seem to understand it could be an SSL error, so i tried to download the website's SSL certifcicate and added it in my keychain like this :gnutls-cli --print-cert www.whistenligne.com\ < /dev/null \ > www.whistenligne.com.cert keytool -import -alias mycertificate -keystore /etc/ssl/certs/java/cacerts -file www.whistenligne.com.cert I spent a fair amount of time trying to google the error I have, I think I understand it but have no idea how to solve it.Here's the error :$ javaws ~/.wine/drive_c/Program\ Files\ \(x86\)/Whistenligne/whist.jnlp selected jre: /usr/lib/jvm/default-runtime WARNING: package sun.applet not in java.desktop WARNING: package com.sun.net.ssl.internal.ssl not in java.base WARNING: package javax.jnlp not in java.desktop You are trying to get resource https://www.whistenligne.com/jar/wel-install.jar but it is not in cache and could not be downloaded. Attempting to continue, but you may expect failure You are trying to get resource https://www.whistenligne.com/jar/jdom.jar but it is not in cache and could not be downloaded. Attempting to continue, but you may expect failure You are trying to get resource https://www.whistenligne.com/jar/gson-2.3.1.jar but it is not in cache and could not be downloaded. Attempting to continue, but you may expect failure JAR https://www.whistenligne.com/jar/wel-install.jar not found. Continuing. JAR https://www.whistenligne.com/jar/jdom.jar not found. Continuing. JAR https://www.whistenligne.com/jar/gson-2.3.1.jar not found. Continuing. JAR https://www.whistenligne.com/jar/wel-install.jar not found. Continuing. JAR https://www.whistenligne.com/jar/jdom.jar not found. Continuing. JAR https://www.whistenligne.com/jar/gson-2.3.1.jar not found. Continuing. netx: Initialization Error: Could not initialize application. (Fatal: Initialization Error: Unknown Main-Class. Could not determine the main class for this application.) net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws from the command line. at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:822) at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:531) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:945) Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Unknown Main-Class. Could not determine the main class for this application. at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:774) at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:338) at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:421) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:495) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:468) at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:814) ... 2 more More information :$ java --version openjdk 13.0.2 2020-01-14 OpenJDK Runtime Environment (build 13.0.2 8) OpenJDK 64-Bit Server VM (build 13.0.2 8, mixed mode) $ javaws --version selected jre: /usr/lib/jvm/default-runtime WARNING: package sun.applet not in java.desktop WARNING: package com.sun.net.ssl.internal.ssl not in java.base WARNING: package javax.jnlp not in java.desktop icedtea-web 1.8.3 Is there anything I did wrong or anything else i could try?

QuteBrowser and LastPass

2 min read

I've been using QuteBrowser for the past 2 days (more on that later), and the only thing I missed so far was a LastPass integration.

Now, QuteBrowser does not come with a plugin store like Firefox or Chrome, but it is still possible to use LastPass with it.

First we need to install lastpass-cli and login to the service. I'm running Manjaro Linux on my laptop so I use yaourt :

yaourt lasstpass-cli

Now we login to Lastpass :

lpass login <email@domain.tld>

A prompt pops-up, asking for your master password. If everything went right, the CLI should responds with

Success: Logged in as <email@domain.tld>.

Since we're good to go, we can now download the QuteBrowser userscripts :

mkdir -p $/.local/share/qutebrowser/userscripts && cd $_

wget https://raw.githubusercontent.com/welps/qutebrowser/9a85796ac30ef33218dd7dee9db6a3c28364f668/misc/us...

chmod +x qute-lastpass

The script is installed. We can restart QuteBrowser by typing :restart.

Now everytime you need to find your login/password for a given page type :spawn --userscript qute-lastpass

Troubleshooting

Process stderr:
Traceback (most recent call last):
File "/home/cedric/.local/share/qutebrowser/userscripts/qute-lastpass", line 50, in <module>
import tldextract
ModuleNotFoundError: No module named 'tldextract'

Solution : pip install tldextract --user

FileNotFoundError: [Errno 2] No such file or directory: 'lpass': 'lpass'

Solution : install lastpass-cli

FileNotFoundError: [Errno 2] No such file or directory: 'rofi': 'rofi'

Solution : install rofi

Mutt + ProtonMail

4 min read

Il y a maintenant plusieurs semaines que j'utilise ProtonMail. Bien que rassembler mes 7 adresses précédentes sur une seule m'a grandement simplifié la vie, je ne suis toujours pas satisfait des clients disponibles. Sous Linux, seul Thunderbird est actuellement disponible, à moins d'utiliser de webmail - ce que je fais pour l'instant.

Il y a quelques années, j'avais testé Mutt un peu comme un jeu. La raison pour laquelle j'avais arrêté de l'utiliser était justement le nombre d'adresse que je devais gérer : l'outil était certes intéressant, mais difficile à utiliser avec autant de compte.

Maintenant que j'ai résolu ce problème, j'avais envie de redonner une chance à ce client minimaliste et, par la même occasion, voir s'il était possible de faire cohabiter Mutt et ProtonMail.

Installation et premier lancement

Pour installer mutt, il suffit d'installer le paquet du même nom :

sudo apt install mutt

En lancant pour la première fois la commande mutt, je reçois une erreur :

/var/mail/cedric: Aucun fichier ou dossier de ce type (errno = 2)

Je crée le fichier en question et je lui donne les permissions nécessaire à mon utilisateur :

sudo mkdir -p /var/mail/$(whoami)
sudo chown $(whoami):$(whoami) /var/mail/$(whoami)

J'en profite pour initialiser le fichier de configuration .muttrc

vim ~/.muttrc
set realname = "Your Name"
set header_cache =~/.mutt/cache/headers
set certificate_file =~/.mutt/certificates
set message_cachedir =~/.mutt/cache/bodies

Lancer une nouvelle fois la commande mutt, ne donne plus d'erreur.

[caption id="attachment_4409" align="alignnone" width="1024"] Premier écran du logiciel Mutt - un client mail en ligne de commande. Au moins, c'est épuré :-)[/caption]

Configuration de mutt

Note : je pars du principe que le Bridge pour Linux est installé et lancé.

J'ajoute au fichier de configuration .muttrc les lignes suivantes:

# "+" substitutes for `folder`
set mbox_type=Maildir
set folder=/var/mail/cedric/
set spoolfile=+INBOX
set record=+Sent
set postponed=+Drafts
set trash=+Trash
set mail_check=2 # seconds

# smtp
source ~/docs/keys/mail
set smtp_url=smtp://$my_user:$my_pass@127.0.0.1:1025
set ssl_force_tls
set ssl_starttls

Et dans le fichier ~/docs/keys/mail:

set my_user=EMAIL
set my_pass=MOT_DE_PASSE_DU_BRIDGE

Installation et configuration de OfflineIMAP

J'installe OfflineIMAP :

sudo pip install offlineimap

Puis je crée un fichier de configuration .offlineimaprc :

[general]
accounts = main

[Account main]
localrepository = main-local
remoterepository = main-remote

# full refresh, in min
autorefresh = 0.2

# quick refreshs between each full refresh
quick = 10

# update notmuch index after sync
postsynchook = notmuch new


[Repository main-local]
type = Maildir
localfolders = /var/mail/cedric

# delete remote mails that were deleted locally
sync_deletes = yes


[Repository main-remote]
type = IMAP
remoteport = 1143
remotehost = 127.0.0.1
remoteuser = EMAIL
remotepass = MOT_DE_PASSE_DU_BRIDGE
keepalive = 60
holdconnectionopen = yes

# delete local mails that were deleted on the remote server
expunge = yes

# sync only these folders
folderfilter = lambda foldername: foldername in ['INBOX', 'Archive', 'Sent']

# is broken, but connecting locally to bridge so should be ok
ssl = no

On lance la commande offlineimap, et, si tout s'est bien passé, on peut commencer à voir la progression de la synchronisation avec ProtonMail :

OfflineIMAP 7.2.1
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v2.7.14, OpenSSL 1.0.2g  1 Mar 2016
Account sync main:
 *** Processing account main
 Establishing connection to 127.0.0.1:1143 (main-remote)
 Creating folder INBOX[main-local]
 Creating new Local Status db for main-local:INBOX
 Creating folder Archive[main-local]
 Creating new Local Status db for main-local:Archive
 Creating folder Sent[main-local]
 Creating new Local Status db for main-local:Sent
Folder Archive [acc: main]:
 Syncing Archive: IMAP -> Maildir
Folder INBOX [acc: main]:
 Syncing INBOX: IMAP -> Maildir
Folder Archive [acc: main]:
 Copy message UID 1 (1/263) main-remote:Archive -> main-local:Archive
Folder INBOX [acc: main]:
 Copy message UID 1 (1/49) main-remote:INBOX -> main-local:INBOX
Folder Archive [acc: main]:
 Copy message UID 2 (2/263) main-remote:Archive -> main-local:Archive
Folder INBOX [acc: main]:
 Copy message UID 2 (2/49) main-remote:INBOX -> main-local:INBOX

Il ne reste plus maintenant qu'à relancer la commande mutt pour visualiser ses mails.

[caption id="attachment_4413" align="alignnone" width="1024"]Mutt est maintenant configuré pour fonctionner avec ProtonMail L'interface de Mutt une fois la configuration terminée[/caption]

Laptop sous Linux : gestion de l'énergie

10 min read

tlp est un outil en ligne de commande qui va se charger d’optimiser au mieux les paramètres de votre système dans le but de réduire la consommation de la batterie.

Installation

sudo apt-get install tlp

Dans mon cas, sur mon Lenovo Thinkpad, j’ai également installé les paquets suivants :

sudo apt-get install tp-smapi-dkms acpi-call-dkms

Utilisation

La commande tlp-stat renvoie une série d’information sur l’état de votre machine.

--- TLP 0.9 --------------------------------------------

+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
TLP_DEFAULT_MODE=AC
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1
NMI_WATCHDOG=0
ENERGY_PERF_POLICY_ON_AC=performance
ENERGY_PERF_POLICY_ON_BAT=powersave
DISK_DEVICES="sda sdb"
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=min_power
AHCI_RUNTIME_PM_TIMEOUT=15
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave
RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low
RADEON_DPM_STATE_ON_AC=performance
RADEON_DPM_STATE_ON_BAT=battery
RADEON_DPM_PERF_LEVEL_ON_AC=auto
RADEON_DPM_PERF_LEVEL_ON_BAT=auto
WIFI_PWR_ON_AC=off
WIFI_PWR_ON_BAT=on
WOL_DISABLE=Y
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1
SOUND_POWER_SAVE_CONTROLLER=Y
BAY_POWEROFF_ON_BAT=0
BAY_DEVICE="sr0"
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto
RUNTIME_PM_ALL=1
RUNTIME_PM_DRIVER_BLACKLIST="radeon nouveau"
USB_AUTOSUSPEND=1
USB_BLACKLIST_WWAN=1
RESTORE_DEVICE_STATE_ON_STARTUP=0

+++ System Info
System         = LENOVO ThinkPad T420s 4174CN5
BIOS           = 8CET50WW (1.30 )
Release        = Debian GNU/Linux 8.7 (jessie)
Kernel         = 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64
/proc/cmdline  = BOOT_IMAGE=/vmlinuz-3.16.0-4-amd64 root=UUID=9a478dc2-0e42-40d7-b493-914abc99363e ro initrd=/install/gtk/initrd.gz quiet
Init system    = systemd v215
Boot mode      = BIOS (CSM, Legacy)

+++ TLP Status
State          = enabled
Last run       = unknown
Mode           = unknown
Power source   = AC

+++ Processor
CPU model      = Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz

/sys/devices/system/cpu/cpu0/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq  =  3500000 [kHz]

/sys/devices/system/cpu/cpu1/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu1/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq  =  3500000 [kHz]

/sys/devices/system/cpu/cpu2/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu2/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq  =  3500000 [kHz]

/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver    = intel_pstate
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor  = powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_available_governors = performance powersave
/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq  =   800000 [kHz]
/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq  =  3500000 [kHz]

/sys/devices/system/cpu/intel_pstate/min_perf_pct      = 22
/sys/devices/system/cpu/intel_pstate/max_perf_pct      = 100
/sys/devices/system/cpu/intel_pstate/no_turbo          = 0
/sys/devices/system/cpu/intel_pstate/turbo_pct         = (not available)
/sys/devices/system/cpu/intel_pstate/num_pstates       = (not available)

x86_energy_perf_policy: program not installed.

/proc/sys/kernel/nmi_watchdog                          = 1

+++ Undervolting
PHC kernel not available.

+++ Temperatures
CPU temp               =    47 [°C]
/proc/acpi/ibm/fan     =  1956 [/min]

+++ File System
/proc/sys/vm/laptop_mode               =     0
/proc/sys/vm/dirty_writeback_centisecs =   500
/proc/sys/vm/dirty_expire_centisecs    =  3000
/proc/sys/vm/dirty_ratio               =    20
/proc/sys/vm/dirty_background_ratio    =    10
/proc/sys/fs/xfs/age_buffer_centisecs  = (not available)
/proc/sys/fs/xfs/xfssyncd_centisecs    = (not available)
/proc/sys/fs/xfs/xfsbufd_centisecs     = (not available)

+++ Storage Devices
/dev/sda:
  Model     = SAMSUNG MZ7PA128HMCD-010L1
  Firmware  = AXM08L1Q
  APM Level = none/disabled
  Status    = active/idle
  TRIM      = supported
  Scheduler = cfq

  Runtime PM: control = on, autosuspend_delay =   -1

  SMART info:
      9 Power_On_Hours            =    17723 [h]
     12 Power_Cycle_Count         =     1510
    177 Wear_Leveling_Count       =       88 [%]
    178 Used_Rsvd_Blk_Cnt_Chip    =      452
    179 Used_Rsvd_Blk_Cnt_Tot     =      748
    180 Unused_Rsvd_Blk_Cnt_Tot   =     3284
    190 Airflow_Temperature_Cel   =       32 [°C]
    233 Media_Wearout_Indicator   =      199 [%]


+++ SATA Aggressive Link Power Management
/sys/class/scsi_host/host0/link_power_management_policy  = max_performance
/sys/class/scsi_host/host1/link_power_management_policy  = max_performance
/sys/class/scsi_host/host2/link_power_management_policy  = max_performance
/sys/class/scsi_host/host3/link_power_management_policy  = max_performance
/sys/class/scsi_host/host4/link_power_management_policy  = max_performance
/sys/class/scsi_host/host5/link_power_management_policy  = max_performance

+++ AHCI Host Controller Runtime Power Management
/sys/bus/pci/devices/0000:00:1f.2/ata1/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata2/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata3/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata4/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata5/power/control = on
/sys/bus/pci/devices/0000:00:1f.2/ata6/power/control = on

+++ PCIe Active State Power Management
/sys/module/pcie_aspm/parameters/policy = default (using bios preferences)

+++ Intel Graphics
/sys/module/i915/parameters/powersave        =  1 (enabled)
/sys/module/i915/parameters/enable_rc6       =  1 (enabled)
/sys/module/i915/parameters/enable_dc        = (not available)
/sys/module/i915/parameters/enable_fbc       = -1 (use per-chip default)
/sys/module/i915/parameters/enable_psr       =  0 (disabled)
/sys/module/i915/parameters/lvds_downclock   =  1 (enabled)
/sys/module/i915/parameters/modeset          = -1 (use per-chip default)
/sys/module/i915/parameters/semaphores       = -1 (use per-chip default)

+++ Wireless
bluetooth = on
wifi      = on
wwan      = none (no device)

hci0(btusb)                   : bluetooth, not connected
wlan0(iwlwifi)                : wifi, connected, power management = off

+++ Audio
/sys/module/snd_hda_intel/parameters/power_save            = 0
/sys/module/snd_hda_intel/parameters/power_save_controller = Y

+++ Docks and Device Bays
/sys/devices/platform/dock.0: battery_bay   = no battery
/sys/devices/platform/dock.1: ata_bay       = drive present

+++ Runtime Power Management
Device classes   = all
Device blacklist = (not configured)
Driver blacklist = radeon nouveau

/sys/bus/pci/devices/0000:00:00.0/power/control = on   (0x060000, Host bridge, no driver)
/sys/bus/pci/devices/0000:00:01.0/power/control = on   (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:02.0/power/control = on   (0x030000, VGA compatible controller, i915)
/sys/bus/pci/devices/0000:00:16.0/power/control = on   (0x078000, Communication controller, mei_me)
/sys/bus/pci/devices/0000:00:16.3/power/control = on   (0x070002, Serial controller, serial)
/sys/bus/pci/devices/0000:00:19.0/power/control = on   (0x020000, Ethernet controller, e1000e)
/sys/bus/pci/devices/0000:00:1a.0/power/control = on   (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1b.0/power/control = on   (0x040300, Audio device, snd_hda_intel)
/sys/bus/pci/devices/0000:00:1c.0/power/control = on   (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.1/power/control = on   (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.3/power/control = on   (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1c.4/power/control = on   (0x060400, PCI bridge, pcieport)
/sys/bus/pci/devices/0000:00:1d.0/power/control = on   (0x0c0320, USB controller, ehci-pci)
/sys/bus/pci/devices/0000:00:1f.0/power/control = on   (0x060100, ISA bridge, lpc_ich)
/sys/bus/pci/devices/0000:00:1f.2/power/control = on   (0x010601, SATA controller, ahci)
/sys/bus/pci/devices/0000:00:1f.3/power/control = on   (0x0c0500, SMBus, i801_smbus)
/sys/bus/pci/devices/0000:01:00.0/power/control = on   (0x030000, VGA compatible controller, no driver)
/sys/bus/pci/devices/0000:03:00.0/power/control = on   (0x028000, Network controller, iwlwifi)
/sys/bus/pci/devices/0000:05:00.0/power/control = on   (0x088000, System peripheral, sdhci-pci)
/sys/bus/pci/devices/0000:0d:00.0/power/control = on   (0x0c0330, USB controller, xhci_hcd)

+++ USB
Autosuspend        = enabled
Device whitelist   = (not configured)
Device blacklist   = (not configured)
WWAN blacklist     = enabled

Bus 004 Device 002 ID 8087:0024 control = auto, autosuspend_delay_ms =     0 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 004 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =     0 -- Linux Foundation 2.0 root hub (hub)
Bus 002 Device 001 ID 1d6b:0003 control = auto, autosuspend_delay_ms =     0 -- Linux Foundation 3.0 root hub (hub)
Bus 001 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =     0 -- Linux Foundation 2.0 root hub (hub)
Bus 003 Device 004 ID 04f2:b221 control = auto, autosuspend_delay_ms =  2000 -- Chicony Electronics Co., Ltd integrated camera (uvcvideo)
Bus 003 Device 003 ID 0a5c:217f control = on,   autosuspend_delay_ms =  2000 -- Broadcom Corp. BCM2045B (BDC-2.1) (btusb)
Bus 003 Device 002 ID 8087:0024 control = auto, autosuspend_delay_ms =     0 -- Intel Corp. Integrated Rate Matching Hub (hub)
Bus 003 Device 001 ID 1d6b:0002 control = auto, autosuspend_delay_ms =     0 -- Linux Foundation 2.0 root hub (hub)

+++ ThinkPad Extended Battery Functions
tp-smapi   = active
tpacpi-bat = active

+++ ThinkPad Battery Status: BAT0 (Main / Internal)
/sys/devices/platform/smapi/BAT0/manufacturer               = SANYO
/sys/devices/platform/smapi/BAT0/model                      = 42T4845
/sys/devices/platform/smapi/BAT0/manufacture_date           = 2011-12-30
/sys/devices/platform/smapi/BAT0/first_use_date             = 2012-02-21
/sys/devices/platform/smapi/BAT0/cycle_count                =    278
/sys/devices/platform/smapi/BAT0/design_capacity            =  44000 [mWh]
/sys/devices/platform/smapi/BAT0/last_full_capacity         =  38570 [mWh]
/sys/devices/platform/smapi/BAT0/remaining_capacity         =  38570 [mWh]
/sys/devices/platform/smapi/BAT0/remaining_percent          =    100 [%]
/sys/devices/platform/smapi/BAT0/remaining_running_time_now = not_discharging [min]
/sys/devices/platform/smapi/BAT0/remaining_charging_time    = not_charging [min]
/sys/devices/platform/smapi/BAT0/power_now                  =      0 [mW]
/sys/devices/platform/smapi/BAT0/power_avg                  =      0 [mW]
/sys/devices/platform/smapi/BAT0/state                      = idle

tpacpi-bat.BAT0.startThreshold                              =     96 [%]
tpacpi-bat.BAT0.stopThreshold                               =    100 [%]
tpacpi-bat.BAT0.forceDischarge                              =      0

Charge                                                      =  100.0 [%]
Capacity                                                    =   87.7 [%]


Loin d’être un expert, je tire deux conclusions de ces données :

  • La capacité de ma batterie reste honorable : 87% de la capacité initiale de 44000mWh est tout a fait acceptable pour une machine qui avait déjà plus de 5 ans lorsque je l’ai achetée
  • La vie de mon SSD n’est pas en danger immédiat (Wear Leveling Count à 88%)

Debian 8 Jessie sur un Lenovo T420s

2 min read

Il y a un peu moins d’un an, j’ai fais l’acquisition d’un Lenovo T420s de seconde main sur eBay.

Cet achat était motivé par deux facteurs :

  • Mon MacBook Pro (late-2011) commençait à montrer des signes de faiblesse - il tomba effectivement en rade quelques semaines plus tard, mais Apple prit tout de même en charge le remplacement de la carte mère.
  • Les mises à jours continuelles de OS X macOS poussent le consommateur à changer régulièrement de machine - les dernières versions du MBP ne permettant même plus un upgrade de la RAM ou même du disque dur.

Rajoutons également l’envie de retravailler sous Linux qui me chatouillait depuis un moment.

Choix d’une distribution

Ubuntu, qui était ma distribution de choix avant 2011, était définitivement hors circuit. L’Amazon-gate était un choix douteux de la part de Canonical, mais mon principal reproche est le même que pour OS X macOS : d’une release à l’autre, Ubuntu me semble de plus en plus surchargé.

ArchLinux semble être à la mode depuis un certain temps, j’avoue avoir été tenté - et l’avoir même installé pour le côté ludique. Installer Arch avec mon niveau de connaissance n’était pas un défi insurmontable, le configurer juste comme il faut était une autre affaire. Après plusieurs jours de tentatives, j’ai finalement abandonné mon défi. J’y reviendrai sans doute plus tard.

ElementaryOS a été une découverte intéressante : basée sur Ubuntu, ElementaryOS propose toutefois un environnement de bureau unique - Pantheon. J’ai joué avec la distributions plusieurs semaines avant d’abandonner. Même si l’initiative est intéressante, elle n’est pas encore prête pour un contexte professionel. L’installation par défaut est complètes, mais plusieurs problèmes lors de mise à jour un peu douteuses ont eu raison de ma motivation.

Pour finir, j’en suis revenu à mes premières amours : une Debian toute simple. La critique habituelle suggère que Debian ne suit pas suffisamment rapidement la mise à jour de ses paquets - ce point ne m’a jamais gêné dans la mesure ou je préfère un système stable qu’un ensemble de fonctionnalités neuves et hypes mais potentiellement buggées.

La suite

J’aurais certainement beaucoup à dire à propos de l’utilisation de Debian comme distro principale sur un laptop. Je listerai donc les articles connexes ci-dessous :