HOOKS=“base udev plymouth autodetect modconf block keymap gnupg plymouth-encrypt lvm2 resume filesystems keyboard fsck”
title Arch Linux efi \vmlinuz-linux initrd \intel-ucode.img initrd \initramfs-linux.img options gpg_decrypt=rootfs:/etc/keyfile.gpg:/tmp/keyfile options cryptdevice=/dev/sda2:cancey:allow-discards cryptkey=rootfs:/tmp/keyfile root=/dev/mapper/cancey-root ro resume=/dev/mapper/cancey-swap quiet splash
Since ArchLinux migrated to systemd, one has to look towards /etc/systemd/logind.conf
.
$ <in>sudo pacman -S cpupower</in> $ <in>sudo sed -i 's/^#\?governor/governor=performance/' /etc/default/cpupower</in> $ <in>sudo systemctl enable cpupower</in> $ <in>sudo systemctl start cpupower</in>
ENABLE_AUTO_HIBERNATION=1 HIBERNATE_COMMAND=/usr/bin/systemctl hibernate
Automatic method with the intel-ucode
package, https://wiki.archlinux.org/index.php/Microcode once set up.
From here: https://downloadcenter.intel.com/download/27591/Linux-Processor-Microcode-Data-File?product=873
These seem to be quite similar to those on the Dell Latitude E4300. See the AT command set for that broadband module, which seems to be similar. Generic support is being developed there.
From http://www.thinkwiki.org/wiki/Ericsson_F3507g_Mobile_Broadband_Module:
$ <in>for n in `ls /sys/class/*/*{ACM,wdm,wwan0}*/device/interface`;do echo $(echo $n|awk -F '/' '{print $5}') : $(cat $n);done</in> wwan0 : Dell Wireless 5550 HSPA+ Mobile Broadband Mini-Card Network Adapter ttyACM0 : Dell Wireless 5550 HSPA+ Mobile Broadband Mini-Card Modem ttyACM1 : Dell Wireless 5550 HSPA+ Mobile Broadband Mini-Card Data Modem ttyACM2 : Dell Wireless 5550 HSPA+ Mobile Broadband Mini-Card GPS Port cdc-wdm0 : Dell Wireless 5550 HSPA+ Mobile Broadband Mini-Card Device Management cdc-wdm1 : Dell Wireless 5550 HSPA+ Mobile Broadband Mini-Card USIM Port
Its status (RF-Kill/flight mode) is linked to the wireless button on the right side of the laptop. This is confirmed by the AT+CFUN command on ttyACM0
.
Wireless button on:
$ <in>sudo screen /dev/ttyACM0</in> *EMRDY: 1 <in>AT+CFUN?</in> +CFUN: 1 OK
and off:
$ <in>sudo screen /dev/ttyACM0</in> *EMRDY: 1 <in>AT+CFUN?</in> +CFUN: 4 OK
In that latter mode, many functions used below just return ERROR
.
The modem works with mmcli
from the ModemManager package.
$ <in>sudo pacman -S modemmanager</in> $ <in>sudo systemctl enable ModemManager</in> $ <in>sudo systemctl start ModemManager</in> $ <in>sudo mmcli -L</in> Found 1 modems: /org/freedesktop/ModemManager1/Modem/0 [Dell] DW5550 $ <in>sudo mmcli -m 0 --simple-connect apn=internet</in> # 0 comes from the list above
Note: ModemManager seemed to disrupt the functionning of another 3G dongle (Huawei E160) connected to the machine as a stop-gap measure, even though it didn't actually list it as another modem. That modem worked out of the box (without ModemManager) with netctl
's mobile_ppp
profile, once the right APN was set.
#!/bin/sh APN=internet DHCP="sudo dhcpcd" MODEM=`mmcli -L | sed -n 's#.*\(/org/.*/Modem/[0-9]\+\).*#\1#p'` echo "Using modem ${MODEM} to connect to APN ${APN}..." >&2 mmcli -m ${MODEM} --simple-connect apn=${APN} >/dev/null BEARER=`mmcli -m ${MODEM} | sed -n 's#.*\(/org/.*/Bearer/[0-9]\+\).*#\1#p'` echo "Bearer: ${BEARER}" >&2 IF=`mmcli -m ${MODEM} -b ${BEARER} | sed -n "s/.*interface: '\([^ \t]\+\)'.*/\1/p"` echo "Obtaining IP address on ${IF}..." >&2 ${DHCP} ${IF}
$ <in>mmcli -m 0</in> /org/freedesktop/ModemManager1/Modem/0 (device id '25cc83245aba9c8a5cee70f6c3b391fe9f1aef4a') ------------------------- Hardware | manufacturer: 'Dell' | model: 'DW5550' | revision: 'R2A07(R2A07)' | supported: 'gsm-umts' | current: 'gsm-umts' | equipment id: 'XXX' ------------------------- System | device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6' | drivers: 'cdc_acm, cdc_ncm, cdc_wdm' | plugin: 'Ericsson MBM' | primary port: 'ttyACM1' | ports: 'ttyACM1 (at), cdc-wdm0 (at), cdc-wdm1 (at), wwp0s29u1u6i6 (net), ttyACM2 (at), ttyACM0 (at)' ------------------------- Numbers | own : 'unknown' ------------------------- Status | lock: 'none' | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)' | state: 'connected' | power state: 'on' | access tech: 'umts' | signal quality: '80' (recent) ------------------------- Modes | supported: 'allowed: any; preferred: none' | current: 'allowed: any; preferred: none' ------------------------- Bands | supported: 'unknown' | current: 'unknown' ------------------------- IP | supported: 'ipv4, ipv6' ------------------------- 3GPP | imei: 'XXXX' | enabled locks: 'none' | operator id: '50502' | operator name: 'YES OPTUS' | subscription: 'unknown' | registration: 'home' ------------------------- SIM | path: '/org/freedesktop/ModemManager1/SIM/0' ------------------------- Bearers | paths: none $ <in>mmcli -m 0 -e</in> XXX: Missing output $ <in>mmcli -m 0 -w</in> /org/freedesktop/ModemManager1/Modem/0: Initial state, 'enabled' $ <in>^C</in>cancelling the operation... $ <in>mmcli -m 0 --create-bearer apn=internet</in> XXX: Missing output $ <in>mmcli -m 0 --list-bearers</in> Found 1 bearers: /org/freedesktop/ModemManager1/Bearer/0 615 mmcli -m 0 -b 0 -c 577 mmcli -L /org/freedesktop/ModemManager1/Modem/0 (device id '25cc83245aba9c8a5cee70f6c3b391fe9f1aef4a') ------------------------- Hardware | manufacturer: 'Dell' | model: 'DW5550' | revision: 'R2A07(R2A07)' | supported: 'gsm-umts' | current: 'gsm-umts' | equipment id: 'XXX' ------------------------- System | device: '/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6' | drivers: 'cdc_acm, cdc_ncm, cdc_wdm' | plugin: 'Ericsson MBM' | primary port: 'ttyACM1' | ports: 'ttyACM1 (at), cdc-wdm0 (at), cdc-wdm1 (at), wwp0s29u1u6i6 (net), ttyACM2 (at), ttyACM0 (at)' ------------------------- Numbers | own : 'unknown' ------------------------- Status | lock: 'none' | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)' | state: 'connected' | power state: 'on' | access tech: 'umts' | signal quality: '80' (recent) ------------------------- Modes | supported: 'allowed: any; preferred: none' | current: 'allowed: any; preferred: none' ------------------------- Bands | supported: 'unknown' | current: 'unknown' ------------------------- IP | supported: 'ipv4, ipv6' ------------------------- 3GPP | imei: 'XXX' | enabled locks: 'none' | operator id: '50502' | operator name: 'YES OPTUS' | subscription: 'unknown' | registration: 'home' ------------------------- SIM | path: '/org/freedesktop/ModemManager1/SIM/0' ------------------------- Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/0' $ <in>sudo dhclient wwp0s29u1u6i6</in> $ <in>ip a s dev wwp0s29u1u6i6</in> 45: wwp0s29u1u6i6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 02:80:37:ec:02:00 brd ff:ff:ff:ff:ff:ff inet 10.35.242.47/27 brd 10.35.242.63 scope global wwp0s29u1u6i6 valid_lft forever preferred_lft forever inet6 fe80::80:37ff:feec:200/64 scope link valid_lft forever preferred_lft forever
XXX FIXME: needs PreUp hook, then DHCP
$ <in>mmcli -m 0 --messaging-create-sms 'number=PHONNO,text="Message"'</in> Successfully created new SMS: /org/freedesktop/ModemManager1/SMS/6 (unknown) $ <in>$ mmcli -m 0 --messaging-list-sms</in> Found 4 SMS messages: /org/freedesktop/ModemManager1/SMS/3 (received) /org/freedesktop/ModemManager1/SMS/4 (received) /org/freedesktop/ModemManager1/SMS/5 (received) /org/freedesktop/ModemManager1/SMS/6 (unknown) $ <in>mmcli -m 0 -s 6 --messaging-status</in> SMS '/org/freedesktop/ModemManager1/SMS/7' ----------------------------------- Content | number: 'PHONNO' | text: 'Message' ----------------------------------- Properties | PDU type: 'submit' | state: 'unknown' | storage: 'unknown' | delivery report: 'not requested' $ <in>mmcli -m 0 -s 6 --send</in>
= Variation on the same theme: check Coles Mobile balance =
Sending 'BAL' to 9999.
$ <in>mmcli -m 0 --messaging-create-sms 'number=9999,text="BAL"'</in> Successfully created new SMS: /org/freedesktop/ModemManager1/SMS/14 (unknown) $ <in>mmcli -s /org/freedesktop/ModemManager1/SMS/14 --send</in> $ <in>mmcli --messaging-status -s 15</in> # wait a bit, then guess what the next SMS ID will be SMS '/org/freedesktop/ModemManager1/SMS/15' ----------------------------------- Content | number: '9999' | text: 'Coles Prepaid Your service number is XXXXXXXXXX Your rate plan is Coles Prepaid $10 for 10 Days Your service will expire 04/08/16 Your balance is $0.00 Your balance is made up of: 278MB Extra Data Exp 04/08/16 Recharge now at your local Coles Supermarket or Coles Express, or call 555' ----------------------------------- Properties | PDU type: 'deliver' | state: 'received' | storage: 'me' | smsc: '+61411990165' | timestamp: '160729125302+10'
$ <in>mmcli -m 0 --location-status</in> /org/freedesktop/ModemManager1/Modem/4 ---------------------------- Location | capabilities: '3gpp-lac-ci' | enabled: '3gpp-lac-ci' | signals: 'no' $ <in>mmcli -m 0 --location-get</in> /org/freedesktop/ModemManager1/Modem/4 ------------------------- 3GPP location | Mobile country code: 'XXX' | Mobile network code: 'X' | Location area code: 'XXXXX' | Cell ID: 'XXXXXXXX' ------------------------- GPS NMEA traces | Not available ------------------------- Raw GPS | Not available ------------------------- CDMA BS | Not available
This HSPA modem is supported through the cdc_mbim
module, which creates an Ethernet-like network interface named wwanX
. Before simply running DHCP on this interface, the underlying configuration can be set using mbimcli
, with something along the lines of (: to be tested):
$ <in>sudo mbimcli -d /dev/cdc-wdm0 --connect=[(APN),(PAP|CHAP|MSCHAPV2),(Username),(Password)]</in> $ <in>sudo mbim-network /dev/cdc-wdm0 status</in>
From https://github.com/vog/wwan-helper/blob/master/wwan-helper:
$ <in>export APN=internet</in> $ <in>export PIN=</in> $ <in>export AT_CFUN_START=1 # allow GPRS; 6: force UMTS</in> $ <in>export SERIAL_DEV=/dev/ttyACM1</in> $ <in>chat -v -T "$APN" -U "$PIN" \ TIMEOUT 2 \ '*EMRDY: 1' \ 'AT+CPIN?' '+CPIN: READY-AT+CPIN="\U"-' \ '\c' 'OK' \ 'AT+CFUN='"$AT_CFUN_START" 'OK' \ 'AT+CGDCONT=1,"IP","\T"' 'OK' \ 'AT*ENAP?' '*ENAP:1,""-AT*ENAP=1,1-' \ '\c' 'OK' \ < "$SERIAL_DEV" > "$SERIAL_DEV"</in> # On $ <in>chat -v \ TIMEOUT 2 \ '*EMRDY: 1' \ 'AT*ENAP?' '*ENAP:0,""-AT*ENAP=0-' \ '\c' 'OK' \ 'AT+CFUN=4' 'OK' \ < "$SERIAL_DEV" > "$SERIAL_DEV"</in> # Off
The ArchLinux Wiki has some documentation on the topic.
One major difference seems to lie in the fact that the module first needs to be activated with the AT+CFUN=1
(GSM+WCDMA) command. This however only appears to be successfull (as confirmed with AT+CFUN?
) when a SIM card is present; it remains at value 4 otherwise.
This might be fixed by adding
'OK' 'AT+CFUN=1
' to the chat script after the TIMEOUT 3
line (or maybe the PIN code).
We first adjust the default options.
ttyACM1 #921600 115200 lock crtscts modem passive novj defaultroute noipdefault usepeerdns noauth hide-password persist holdoff 10 maxfail 0 debug
Then the peers file.
file /etc/ppp/options.mobile connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat"
As mentionned on the ArchWiki, the chat scripts are not present, so me first mkdir /etc/ppp/chatscripts
, then add (copy/paste) the relevant chat script (the SIM card has no PIN code; had it had one, MBM would have taken care of it anyway; the same goes for the mode).
ABORT 'BUSY' ABORT 'NO CARRIER' ABORT 'VOICE' ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT 'DELAYED' REPORT CONNECT TIMEOUT 6 '' 'ATQ0' 'OK-AT-OK' 'ATZ' TIMEOUT 3 #'OK' @/etc/ppp/chatscripts/pin 'OK-AT-OK' 'ATI' 'OK' 'ATZ' 'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0' #'OK' @/etc/ppp/chatscripts/mode 'OK-AT-OK' @/etc/ppp/chatscripts/apn 'OK' 'ATDT*99***1#' TIMEOUT 30 CONNECT ''
Vodafone's APN is prepaid APN is 'live.vodafone.com
''vfprepaymbb
', which we put in '/etc/ppp/chatscripts/apn.au.vodafone
'
AT+CGDCONT=1,"IP","vfprepaymbb"
To which a symlink is created as 'ln -s '/etc/ppp/chatscripts/apn.au.vodafone /etc/ppp/chatscripts/apn
.
Finally, all this can be hooked into 'netcfg
' with '/etc/network.d/mobile
'.
CONNECTION='ppp' INTERFACE='ignore' PEER='mobile' PPP_TIMEOUT=30
There is an mbm-gpsd package in AUR which works out of the box to set the hardware up.
It creates three /dev/gps[012]
, which GPSd can then use. This is not the usual, hotplug way, of using GPSd, so we need to enable the systemd unit, and tell it where to look.
$ sudo cp /usr/lib/systemd/system/gpsd.service /etc/systemd/system $ sudo vim /etc/systemd/system/gpsd.service
[Unit] Description=GPS (Global Positioning System) Daemon Requires=gpsd.socket Requires=mbm-gpsd.service [Service] ExecStart=/usr/bin/gpsd -N /dev/gps0 [Install] Also=gpsd.socket Also=mbm-gpsd.service
$ sudo systemctl daemon-reload gpsd.service $ sudo systemctl enable gpsd.service # Start at boot, or... $ sudo systemctl start gpsd.service # ... topically start manually
The pseudo reference says the GPS's output is first configured through ttyACM0
. Experience here however shows that all the initialisation can be done on ttyACM2
(GPSD initialisation string, huh?). We set it on, with a period of 1 second, and enable DGPS.
$ <in>sudo screen /dev/ttyACM2</in> *EMRDY: 1 <in>AT+CFUN=1</in> OK <in>AT*E2GPSCTL=1,1,1</in> OK <in>AT*E2GPSNPD </in>
After the last command, NMEA strings will start outputing, which GPSD can happily munch on.
# Default settings for gpsd. START_DAEMON="true" GPSD_OPTIONS="" DEVICES="/dev/ttyACM2" USBAUTO="true"
$ <in>sudo rc.d start gpsd</in> :: Starting gpsd [DONE]
There is also an application, MBM-GPSD, which can do all that on our behalf. It is in AUR. Using it just requires starting it before gpsd, and pointing the latter to /dev/gps0
instead of /dev/ttyACM2
.
We follow the document about Using an OpenPGP SmartCard. The BCM5880, which support the CCID protocol, is supported through ArchLinux packages pcsclite
and ccid
.
As the key is already on the OpenPGP, it needs to be registered to the local GPG so it can use it. It seems to be sufficient to import the public key via GnuPG's –card-edit
command.
$ <in>gpg --card-edit</in> Application ID ...: [...] ssb# 2048R/72DDD6F1 created: 2009-05-11 expires: 2010-11-04 gpg/card> <in>fetch</in> gpg: requesting key 13912971 from http server olivier.mehani.name gpg: key 98C66655: "Olivier Mehani <shtrom@ssji.net>" not changed gpg: Total number processed: 1 gpg: unchanged: 1
The initramfs needs to support resuming. This is configured in the relevant file by adding the hook before filesystems.
... HOOKS="base udev autodetect pata scsi sata resume filesystems usbinput" ...
The initramfs can then be rebuilt.
$ <in>sudo mkinitcpio -p linux</in> ==> Building image from preset: 'default' -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img ==> Starting build: 3.0-ARCH -> Parsing hook: [base] -> Parsing hook: [udev] -> Parsing hook: [autodetect] -> Parsing hook: [pata] -> Parsing hook: [scsi] -> Parsing hook: [sata] -> Parsing hook: [resume] -> Parsing hook: [filesystems] -> Parsing hook: [usbinput] ==> Generating module dependencies ==> Creating gzip initcpio image: /boot/initramfs-linux.img ==> Image generation successful ==> Building image from preset: 'fallback' -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect ==> Starting build: 3.0-ARCH -> Parsing hook: [base] -> Parsing hook: [udev] -> Parsing hook: [pata] -> Parsing hook: [scsi] -> Parsing hook: [sata] -> Parsing hook: [resume] -> Parsing hook: [filesystems] -> Parsing hook: [usbinput] ==> Generating module dependencies ==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img ==> Image generation successful
Grub2 generates most of its configuration file automatically, and forgets about manual additions. Fortunately, it can be tweaked in /etc/default/grub
, by setting
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda2"
(the DEFAULT
variant is only appended to the kernel's command line on normal boots, while the non-DEFAULT
one is always added).
Then, grub can be reconfigured.
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
After suspend, with OpenNTPd running, the machine clock ends up being too fast by a few minutes. This is because suspend/hibernate disturbs NTP estimates.
Adding a script in /etc/pm/sleep.d/
seems to do the trick fix the problem. An issue has been openned with ArchLinux about that.
#!/bin/sh # # 90openntpd: suspend/wakeup OpenNTPd case "$1" in hibernate|suspend) ;; thaw|resume) systemctl restart openntpd.service ;; *) exit $NA ;; esac
Also, work out FVWM window placement.
00:1f.0 ISA bridge: Intel Corporation QM67 Express Chipset Family LPC Controller (rev 04)
From https://ark.intel.com/products/52813/Mobile-Intel-QM67-Express-Chipset
Intel® ME Firmware Version 7.x
No Intel Bootguard: https://github.com/corna/me_cleaner/wiki/Intel-Boot-Guard
coreboot/util/intelmetool (master * u+1)$ <in>sudo ./intelmetool -b</in> IO error couldn't read MSR.: Input/output error Bad news, you have a `QM67 Express Chipset Family LPC Controller` so you have ME hardware on board and you can't control or disable it, continuing... Error mapping physical memory 0x0000004275159040 [0x4000] ERRNO=1 Operation not permitted Could not map MEI PCI device memory ME Capability: BootGuard : OFF Your system isn't bootguard ready. You can flash other firmware!
coreboot/util/ifdtool (master u=)$ <in>./ifdtool -d ~/Test\ E6320\ A19\ 8MO.bin</in> File /home/shtrom/Test E6320 A19 8MO.bin is 8388608 bytes FLMAP0: 0x03040103 NR: 3 FRBA: 0x40 NC: 2 FCBA: 0x30 FLMAP1: 0x12100206 ISL: 0x12 FPSBA: 0x100 NM: 2 FMBA: 0x60 FLMAP2: 0x00210120 PSL: 0x2101 FMSBA: 0x200 FLUMAP1: 0x00002adf Intel ME VSCC Table Length (VTL): 42 Intel ME VSCC Table Base Address (VTBA): 0x000df0 ME VSCC table: JID0: 0x001530ef SPI Componend Device ID 1: 0x15 SPI Componend Device ID 0: 0x30 SPI Componend Vendor ID: 0xef VSCC0: 0x20052005 Lower Erase Opcode: 0x20 Lower Write Enable on Write Status: 0x50 Lower Write Status Required: No Lower Write Granularity: 64 bytes Lower Block / Sector Erase Size: 4KB Upper Erase Opcode: 0x20 Upper Write Enable on Write Status: 0x50 Upper Write Status Required: No Upper Write Granularity: 64 bytes Upper Block / Sector Erase Size: 4KB JID1: 0x001630ef SPI Componend Device ID 1: 0x16 SPI Componend Device ID 0: 0x30 SPI Componend Vendor ID: 0xef VSCC1: 0x20052005 Lower Erase Opcode: 0x20 Lower Write Enable on Write Status: 0x50 Lower Write Status Required: No Lower Write Granularity: 64 bytes Lower Block / Sector Erase Size: 4KB Upper Erase Opcode: 0x20 Upper Write Enable on Write Status: 0x50 Upper Write Status Required: No Upper Write Granularity: 64 bytes Upper Block / Sector Erase Size: 4KB JID2: 0x001730ef SPI Componend Device ID 1: 0x17 SPI Componend Device ID 0: 0x30 SPI Componend Vendor ID: 0xef VSCC2: 0x20052005 Lower Erase Opcode: 0x20 Lower Write Enable on Write Status: 0x50 Lower Write Status Required: No Lower Write Granularity: 64 bytes Lower Block / Sector Erase Size: 4KB Upper Erase Opcode: 0x20 Upper Write Enable on Write Status: 0x50 Upper Write Status Required: No Upper Write Granularity: 64 bytes Upper Block / Sector Erase Size: 4KB JID3: 0x001540ef SPI Componend Device ID 1: 0x15 SPI Componend Device ID 0: 0x40 SPI Componend Vendor ID: 0xef VSCC3: 0x20052005 Lower Erase Opcode: 0x20 Lower Write Enable on Write Status: 0x50 Lower Write Status Required: No Lower Write Granularity: 64 bytes Lower Block / Sector Erase Size: 4KB Upper Erase Opcode: 0x20 Upper Write Enable on Write Status: 0x50 Upper Write Status Required: No Upper Write Granularity: 64 bytes Upper Block / Sector Erase Size: 4KB JID4: 0x001640ef SPI Componend Device ID 1: 0x16 SPI Componend Device ID 0: 0x40 SPI Componend Vendor ID: 0xef VSCC4: 0x20052005 Lower Erase Opcode: 0x20 Lower Write Enable on Write Status: 0x50 Lower Write Status Required: No Lower Write Granularity: 64 bytes Lower Block / Sector Erase Size: 4KB Upper Erase Opcode: 0x20 Upper Write Enable on Write Status: 0x50 Upper Write Status Required: No Upper Write Granularity: 64 bytes Upper Block / Sector Erase Size: 4KB JID5: 0x001740ef SPI Componend Device ID 1: 0x17 SPI Componend Device ID 0: 0x40 SPI Componend Vendor ID: 0xef VSCC5: 0x20052005 Lower Erase Opcode: 0x20 Lower Write Enable on Write Status: 0x50 Lower Write Status Required: No Lower Write Granularity: 64 bytes Lower Block / Sector Erase Size: 4KB Upper Erase Opcode: 0x20 Upper Write Enable on Write Status: 0x50 Upper Write Status Required: No Upper Write Granularity: 64 bytes Upper Block / Sector Erase Size: 4KB JID6: 0x00157120 SPI Componend Device ID 1: 0x15 SPI Componend Device ID 0: 0x71 SPI Componend Vendor ID: 0x20 VSCC6: 0x20052005 Lower Erase Opcode: 0x20 Lower Write Enable on Write Status: 0x50 Lower Write Status Required: No Lower Write Granularity: 64 bytes Lower Block / Sector Erase Size: 4KB Upper Erase Opcode: 0x20 Upper Write Enable on Write Status: 0x50 Upper Write Status Required: No Upper Write Granularity: 64 bytes Upper Block / Sector Erase Size: 4KB JID7: 0x00167120 SPI Componend Device ID 1: 0x16 SPI Componend Device ID 0: 0x71 SPI Componend Vendor ID: 0x20 VSCC7: 0x20052005 Lower Erase Opcode: 0x20 Lower Write Enable on Write Status: 0x50 Lower Write Status Required: No Lower Write Granularity: 64 bytes Lower Block / Sector Erase Size: 4KB Upper Erase Opcode: 0x20 Upper Write Enable on Write Status: 0x50 Upper Write Status Required: No Upper Write Granularity: 64 bytes Upper Block / Sector Erase Size: 4KB OEM Section: 00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff Found Region Section FLREG0: 0x00000000 Flash Region 0 (Flash Descriptor): 00000000 - 00000fff FLREG1: 0x09ff0600 Flash Region 1 (BIOS): 00600000 - 009fffff FLREG2: 0x05ff0005 Flash Region 2 (Intel ME): 00005000 - 005fffff FLREG3: 0x00040001 Flash Region 3 (GbE): 00001000 - 00004fff FLREG4: 0x00001fff Flash Region 4 (Platform Data): 00fff000 - 00000fff (unused) Found Component Section FLCOMP 0x09300014 Dual Output Fast Read Support: not supported Read ID/Read Status Clock Frequency: 33MHz Write/Erase Clock Frequency: 33MHz Fast Read Clock Frequency: 33MHz Fast Read Support: supported Read Clock Frequency: 20MHz Component 2 Density: 2MB Component 1 Density: 8MB FLILL 0x00000000 Invalid Instruction 3: 0x00 Invalid Instruction 2: 0x00 Invalid Instruction 1: 0x00 Invalid Instruction 0: 0x00 FLPB 0x00000800 Flash Partition Boundary Address: 0x800000 Found PCH Strap Section PCHSTRP0: 0x0810d782 PCHSTRP1: 0x0000010f PCHSTRP2: 0x00570000 PCHSTRP3: 0x00000000 PCHSTRP4: 0x00c8e102 PCHSTRP5: 0x00000000 PCHSTRP6: 0x00000000 PCHSTRP7: 0x00000000 PCHSTRP8: 0x00000000 PCHSTRP9: 0x30000e80 PCHSTRP10: 0x00410044 PCHSTRP11: 0x95db0097 PCHSTRP12: 0x00000000 PCHSTRP13: 0x00000000 PCHSTRP14: 0x00000000 PCHSTRP15: 0x0000437e PCHSTRP16: 0x00000000 PCHSTRP17: 0x00000002 Found Master Section FLMSTR1: 0x0a0b0000 (Host CPU/BIOS) Platform Data Region Write Access: disabled GbE Region Write Access: enabled Intel ME Region Write Access: disabled Host CPU/BIOS Region Write Access: enabled Flash Descriptor Write Access: disabled Platform Data Region Read Access: disabled GbE Region Read Access: enabled Intel ME Region Read Access: disabled Host CPU/BIOS Region Read Access: enabled Flash Descriptor Read Access: enabled Requester ID: 0x0000 FLMSTR2: 0x0c0d0000 (Intel ME) Platform Data Region Write Access: disabled GbE Region Write Access: enabled Intel ME Region Write Access: enabled Host CPU/BIOS Region Write Access: disabled Flash Descriptor Write Access: disabled Platform Data Region Read Access: disabled GbE Region Read Access: enabled Intel ME Region Read Access: enabled Host CPU/BIOS Region Read Access: disabled Flash Descriptor Read Access: enabled Requester ID: 0x0000 FLMSTR3: 0x08080118 (GbE) Platform Data Region Write Access: disabled GbE Region Write Access: enabled Intel ME Region Write Access: disabled Host CPU/BIOS Region Write Access: disabled Flash Descriptor Write Access: disabled Platform Data Region Read Access: disabled GbE Region Read Access: enabled Intel ME Region Read Access: disabled Host CPU/BIOS Region Read Access: disabled Flash Descriptor Read Access: disabled Requester ID: 0x0118 Found Processor Strap Section ????: 0x00000000 ????: 0xffffffff ????: 0xffffffff ????: 0xffffffff ????: 0xffffffff ????: 0xffffffff ????: 0xffffffff ????: 0xffffffff
This looks like the expected output
me_cleaner (master u=)$ <in>python me_cleaner.py -c ~/Test\ E6320\ A19\ 8MO.bin</in> Full image detected The ME/TXE region goes from 0x5000 to 0x600000 Found FPT header at 0x5010 Found 19 partition(s) Found FTPR header: FTPR partition spans from 0xd1000 to 0x147000 ME/TXE firmware version 7.1.86.1221 Checking the FTPR RSA signature... VALID
me_cleaner (master u=)$ <in>python me_cleaner.py -O ~/e6320_a19_8m.bin ~/Test\ E6320\ A19\ 8MO.bin</in> Full image detected The ME/TXE region goes from 0x5000 to 0x600000 Found FPT header at 0x5010 Found 19 partition(s) Found FTPR header: FTPR partition spans from 0xd1000 to 0x147000 ME/TXE firmware version 7.1.86.1221 Removing extra partitions... Removing extra partition entries in FPT... Removing EFFS presence flag... Correcting checksum (0xed)... Reading FTPR modules list... UPDATE (LZMA , 0x115a32 - 0x115ac4): removed BUP (Huffman, fragmented data ): NOT removed, essential KERNEL (Huffman, fragmented data ): removed POLICY (Huffman, fragmented data ): removed HOSTCOMM (LZMA , 0x115ac4 - 0x11b05a): removed RSA (LZMA , 0x11b05a - 0x11fb17): removed CLS (LZMA , 0x11fb17 - 0x124529): removed TDT (LZMA , 0x124529 - 0x12a6d4): removed FTCS (Huffman, fragmented data ): removed The ME minimum size should be 921600 bytes (0xe1000 bytes) The ME region can be reduced up to: 00005000:000e5fff me Checking the FTPR RSA signature... VALID Done! Good luck! me_cleaner (master u=)$ <in>python me_cleaner.py -c ~/e6320_a19_8m.bin</in> Full image detected The ME/TXE region goes from 0x5000 to 0x600000 Found FPT header at 0x5010 Found 1 partition(s) Found FTPR header: FTPR partition spans from 0xd1000 to 0x147000 ME/TXE firmware version 7.1.86.1221 Checking the FTPR RSA signature... VALID
Down to 1 partition from 19.
me_cleaner (master u=)$ <in>hexdump -C ~/Test\ E6320\ A19\ 8MO.bin > ~/Test\ E6320\ A19\ 8MO.hex</in> me_cleaner (master u=)$ <in>hexdump -C ~/e6320_a19_8m.bin > ~/e6320_a19_8m.hex</in> me_cleaner (master u=)$ <in>vimdiff ~/Test\ E6320\ A19\ 8MO.hex ~/e6320_a19_8m.hex</in>
https://github.com/corna/me_cleaner/wiki/Check-the-integrity-of-the-ME-modules
Doesn't start well.
$ <in>flashrom -L | grep QM67</in> Intel QM67 8086:1c4f Config-dependent $ <in>sudo flashrom -p internal -r dump.bin</in> flashrom v0.9.9-r1955 on Linux 4.13.12-1-ARCH (x86_64) flashrom is free software, get the source code at https://flashrom.org Calibrating delay loop... OK. ======================================================================== WARNING! You seem to be running flashrom on an unsupported laptop. Laptops, notebooks and netbooks are difficult to support and we recommend to use the vendor flashing utility. The embedded controller (EC) in these machines often interacts badly with flashing. See the manpage and https://flashrom.org/Laptops for details. If flash is shared with the EC, erase is guaranteed to brick your laptop and write may brick your laptop. Read and probe may irritate your EC and cause fan failure, backlight failure and sudden poweroff. You have been warned. ======================================================================== Aborting. Error: Programmer initialization failed.
$ <in>./intelmetool -s</in> ME: Error Code : Image Failure OR ME: Progress Phase State : M0 kernel load
Error mapping physical memory 0x..... [0x4000] ERRNO=1 Operation not permitted Could not map MEI PCI device memory
Needs iomem=relaxed
Old and obsolete notes go here.
MODULES=(dell-laptop dell-wmi acpi_cpufreq) ... DAEMONS=(syslog-ng sensors healthd smartd sensord hddtemp acpid laptop-mode cpufreq iptables ip6tables !network net-profiles net-auto-wired net-auto-wireless @openntpd sshd ddclient cupsd crond dbus mbm-gpsd gpsd @avahi-daemon bluetooth alsa mpd mpdscribble pcscd gdm
When X11 starts with an external (full HD) screen attached, it clones the display, which seems to mess up XRandR afterwards.
As of gdm-3.4.1, this doesn't happen anymore, and this hack can be deactivated.
Investigating into diffed logs, it shows
(II) intel(0): Using fuzzy aspect match for initial modes (II) intel(0): Output LVDS1 using initial mode 1024x768 (II) intel(0): Output HDMI3 using initial mode 1024x768 ... (**) intel(0): DPI set to (89, 121) ... (II) intel(0): Allocated new frame buffer 1024x768 stride 4096, tiled
instead of
(II) intel(0): Using exact sizes for initial modes (II) intel(0): Output LVDS1 using initial mode 1366x768 ... (**) intel(0): DPI set to (119, 121) ... (II) intel(0): Allocated new frame buffer 1408x768 stride 5632, tiled
when no screen is attached, and the desired behaviour is observed.
To fix this, the built-in LCD screen (LVDS1
) is pinned to its nominal resolution with an xorg.conf snippet.
Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 Modes "1366x768" EndSubSection EndSection
As X11 starts in clone mode, all the others are pinned too, but it's not a big deal.
With a stock kernel, the trackpad on Dell Inspiron E6410 not recognized. The patch applies nicely and works on the ARCH kernel from ABS.
By default, only vertical two-finger scrolling is enabled. The horizontal one can be activated through some more X configuration. We also enable other niceties at the same time.
... Option "CornerCoasting" "1" Option "HorizEdgeScroll" "1" Option "HorizTwoFingerScroll" "1" Option "VertEdgeScroll" "1" ...
</file>
While we're at it, a dead-key international Dvorak mapping is also set as the default.
Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" ... # Keyboard layouts Option "XkbLayout" "us" Option "XkbVariant" "dvorak-intl" Option "XkbOptions" "terminate:ctrl_alt_bksp" EndSection
Dell still doesn't cater for us Dvorak users, and do not offer that keyboard layout on their laptops. Fortunately, some shops, such as this one, offer decently priced stickers to overlay on top of the keys, and make the laptop's in-built keyboard truly usable (apart, sadly, for the backlight which stills shows a QWERTY layout…).
At some point, GDM started behaving erratically and making my sessions freeze. I switched to SLiM, a simple and lightweight session manager. However, it doesn't expect exactly the same sessions as GDM, and doesn't set them exactly in the same way (no PulseaAudio, no .xsession-errors
redirection).
A quick fix was to add a custom .xinitrc
in my session.
#!/bin/bash mv .xsession-errors .xsession-errors.old pulseaudio --start & /etc/gdm/Xsession fvwm > .xsession-errors
The desired behaviour is a follows.
Add the relevant file to manage the power button.
event=button/power action=/etc/acpi/actions/lm_power.sh %e
And the related script.
#!/bin/bash /bin/sync if [ x`cat /sys/class/power_supply/AC/online` == x1 ]; then /usr/bin/logger "[$0] Suspending due to $1 event ($2)" /usr/sbin/pm-suspend else /usr/bin/logger "[$0] Hibernating due to $1 event ($2) on battery" /usr/sbin/pm-hibernate fi
Since May 19 (at least, on my machine) there is a
/etc/acpi/handler.sh
which “takes an entry for all actions.” It is also mentioned here. However, it races with the configuration above (both suspending AND powering the machine off). Simply renaming it out of the way seems to work.
We add another set of event and script tr manage the lid.
event=button/lid action=/etc/acpi/actions/lm_lid_e6320.sh %e
#!/bin/bash if [ x`cat /sys/class/power_supply/AC/online` == x1 ]; then if grep -q closed /proc/acpi/button/lid/LID/state; then /usr/bin/logger "[$0] Blanking and locking due to $1 event ($2) (or so should it be)" fi else if grep -q closed /proc/acpi/button/lid/LID/state; then /usr/bin/logger "[$0] Suspending due to $1 event ($2) on battery" /bin/sync /usr/sbin/pm-suspend fi fi
Sometimes, the ethernet interface (driven by e1000e
) does not see any carrier (NO-CARRIER
) despite being properly plugged in. This is a known bug, with a patch waiting in the pipe. This seems to be related to power management, and the device sleeping when it shouldn't.
In the meantime, forcibly waking the device works.
$ sudo -i # echo on > /sys/bus/pci/devices/0000\:00\:19.0/power/control