DPDK l2fwd and pktgen inside VMware virtual machine - linux

I am just playing with DPDK here to get some hands on experience of tools to generate packets for that i have setup tow VMs on VMware ESXi.
VM-A and VM-B are connected back to back with Internal_vSwitch
I have compiled DPDK and l2fwd on VM-B and pktgen on VM-A but when i run pktgen do start all doesn't showing generating any packets. because of my limited knowledge i am not able to debug what could be wrong.
Grub (i did configure hugepage from command line not grub)
root#VM-A:~/pktgen-dpdk-pktgen-20.11.3/usr/local/bin# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.4.0-91-generic root=/dev/mapper/vg0-root ro
HugePage
root#VM-A:~/pktgen-dpdk-pktgen-20.11.3/usr/local/bin# hugeadm --pool-list
Size Minimum Current Maximum Default
2097152 2048 2048 2048 *
1073741824 0 0 0
binding port
root#VM-B:~/pktgen-dpdk-pktgen-20.11.3/usr/local/bin# dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
0000:0b:00.0 'VMXNET3 Ethernet Controller 07b0' drv=uio_pci_generic unused=vmxnet3,vfio-pci
Network devices using kernel driver
===================================
0000:03:00.0 'VMXNET3 Ethernet Controller 07b0' if=ens160 drv=vmxnet3 unused=vfio-pci,uio_pci_generic *Active*
Pktgen not generating any packet. all the counters are zero.
root#VM-A:~/pktgen-dpdk-pktgen-20.11.3/usr/local/bin# ./pktgen -l 1-2 -n 1 -- -P -N -T -m "3.0"
Copyright (c) <2010-2020>, Intel Corporation. All rights reserved. Powered by DPDK
EAL: Detected 4 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: No available hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: Probe PCI driver: net_vmxnet3 (15ad:7b0) device: 0000:0b:00.0 (socket 0)
EAL: No legacy callbacks, legacy socket not created
*** Copyright (c) <2010-2020>, Intel Corporation. All rights reserved.
*** Pktgen created by: Keith Wiles -- >>> Powered by DPDK <<<
Port: Name IfIndex Alias NUMA PCI
0: net_vmxnet3 0 0 15ad:07b0/0b:00.0
Initialize Port 0 -- TxQ 1, RxQ 1
Src MAC 00:0c:29:ae:70:dc
<Promiscuous mode Enabled>
WARNING: Nothing to do on lcore 2: exiting
- Ports 0-0 of 1 <Main Page> Copyright (c) <2010-2020>, Intel Corporation
Flags:Port : P------Single :0
|ink State : <UP-10000-FD> ---Total Rate---
-kts/s Max/Rx : P------Single :0 0/0
| Ports 0-0 of 1 <Main Page> Copyright (c) <2010-2020>, Intel Corporation
/ Flags:Port : P------Single :0 3/1
Link State : P------Single :0 ---Total Rate---
Pkts/s Max/Rx : <UP-10000-FD> 3/0
Max/Tx : 3/0 3/0
MBits/s Rx/Tx : 0/0 0/0
Broadcast : 0/0 0/0
Multicast : 0
Sizes 64 : 0
65-127 : 0
128-255 : 0
256-511 : 0
512-1023 : 0
1024-1518 : 0
Runts/Jumbos : 0
ARP/ICMP Pkts : 0/0
Errors Rx/Tx : 0/0
Total Rx Pkts : 0/0
Tx Pkts : 10
Rx MBs : 0
Tx MBs : 0
TTL/Port Src/Dest : 0
Pattern Type : abcd...
Tx Count/% Rate : Forever /100%
Pkt Size/Tx Burst : 64 / 32
TTL/Port Src/Dest : 4/ 1234/ 5678
Pkt Type:VLAN ID : IPv4 / TCP:0001
802.1p CoS/DSCP/IPP : 0/ 0/ 0
VxLAN Flg/Grp/vid : 0000/ 0/ 0
IP Destination : 192.168.1.1y DPDK (pid:1957) -----------------
Source : 192.168.0.1/24rface without timers
MAC Destination : 00:00:00:00:00:00
Source : 00:0c:29:ae:70:dc
-- Pktgen 20.11.3 (D: 15ad:07b0/0b:00.0y DPDK (pid:1957) -----------------
Pktgen:/> start all
Pktgen:/>

The issue is related to the incorrect command-line configuration set for DPDK-PKTGEN.
Current: ./pktgen -l 1-2 -n 1 -- -P -N -T -m "3.0"
Correct: ./pktgen -l 1-2 -n 1 -- -P -N -T -m "2.0"
reason: pktgen option -m "3.0" stands for do RX and TX on CPU core 3. But as per DPDK lcore arguments, only core 1 and core 2 is passed as dpdk arguments. Hence rectifying the same to -m "2.0" solves the same.

Related

AF_XDP zero copy - Operation not supported error

I am trying to enable AF_XDP zero copy mode and i see the error in Cent OS 8(kernel 4.18), but SKB mode and DRV mode with copy works fine. The driver is ixgbe 5.6.5 which supports AF_XDP zero copy as per the documentation. strace shows the failure is during bind
./af_xdp_user -d eth2 -z -q 1
bind(3, {sa_family=0x2c /* AF_??? */, sa_data="\4\0006\1\0\0\0\0\0\0\0\0\0\0"}, 16) = -1 EOPNOTSUPP (Operation not supported)
The ethtool shows i have combined queues and not separate rx/tx queues. Is that a problem?
[root#localhost ~]# ethtool -l eth2
Channel parameters for eth2:
Pre-set maximums:
RX: 0
TX: 0
Other: 1
Combined: 63
Current hardware settings:
RX: 0
TX: 0
Other: 1
Combined: 9
[root#localhost ~]# ethtool -i eth2
driver:
ixgbe
version: 5.6.5
firmware-version: 0x61c10001
expansion-rom-version:
bus-info: 0000:00:06.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
Any ideas what is missing?

How to fix No sound on Ubuntu 18.04? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 months ago.
Improve this question
1) I've been using Ubuntu 18.04 with Windows 10 dual boot for some months now. Today suddenly my sound stopped working on Ubunutu. Activities -> Sound menu shows only "Dummy Output". All fine on Windows though.
2) Output of lsmod is:
rohit#rohitUb18043LTS:~$ lsmod | grep snd_
snd_seq_midi 20480 0
snd_seq_midi_event 16384 1 snd_seq_midi
snd_seq 69632 2 snd_seq_midi,snd_seq_midi_event
snd_rawmidi 36864 1 snd_seq_midi
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd_soc_dmic 16384 0
snd_hda_codec_realtek 118784 0
snd_hda_codec_generic 81920 1 snd_hda_codec_realtek
ledtrig_audio 16384 2 snd_hda_codec_generic,snd_hda_codec_realtek
snd_soc_hdac_hdmi 32768 0
snd_sof_intel_hda_common 73728 1 sof_pci_dev
snd_soc_hdac_hda 24576 1 snd_sof_intel_hda_common
snd_sof_intel_hda 20480 1 snd_sof_intel_hda_common
snd_sof_intel_byt 24576 1 sof_pci_dev
snd_sof_intel_ipc 20480 1 snd_sof_intel_byt
snd_sof 98304 4 snd_sof_intel_hda_common,snd_sof_intel_byt,snd_sof_intel_ipc,sof_pci_dev
snd_sof_xtensa_dsp 16384 1 sof_pci_dev
snd_hda_ext_core 28672 4 snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_soc_acpi_intel_match 32768 2 snd_sof_intel_hda_common,sof_pci_dev
snd_soc_acpi 16384 2 snd_soc_acpi_intel_match,sof_pci_dev
snd_soc_core 237568 5 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_dmic
snd_compress 24576 1 snd_soc_core
ac97_bus 16384 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_hda_codec_hdmi 57344 1
snd_hda_intel 53248 2
snd_intel_nhlt 20480 1 snd_hda_intel
snd_hda_codec 131072 5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
snd_hda_core 90112 10 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_sof_intel_hda
snd_hwdep 20480 1 snd_hda_codec
snd_pcm 102400 10 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_core,snd_hda_core,snd_pcm_dmaengine
snd_timer 36864 2 snd_seq,snd_pcm
snd 86016 17 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi
rohit#rohitUb18043LTS:~$
3) I installed all updates from Software updater but no luck.
4) No change by using: sudo alsa force-reload
5) Looking around, found this thread: https://askubuntu.com/questions/1059619/sound-card-shown-as-dummy-output-in-ubuntu-18-04 . User says found the "active profile was off" and links to a solution on this forum (https://forums.linuxmint.com/viewtopic.php?t=268499). I am pasting the output of the four commands as per that link:
rohit#rohitUb18043LTS:~$ sudo fuser -v /dev/snd/*
[sudo] password for rohit:
USER PID ACCESS COMMAND
/dev/snd/controlC0: gdm 1505 F.... pulseaudio
rohit 1878 F.... pulseaudio
rohit#rohitUb18043LTS:~$ pacmd list-cards
1 card(s) available.
index: 0
name: <alsa_card.pci-0000_01_00.1>
driver: <module-alsa-card.c>
owner module: 7
properties:
alsa.card = "0"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xb4000000 irq 17"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:01:00.1"
sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "0fb9"
device.product.name = "GP107GL High Definition Audio Controller"
device.string = "0"
device.description = "GP107GL High Definition Audio Controller"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: no)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: no)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: no)
off: Off (priority 0, available: unknown)
active profile: <off>
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
rohit#rohitUb18043LTS:~$ pacmd list-sinks
1 sink(s) available.
* index: 0
name: <auto_null>
driver: <module-null-sink.c>
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1000
volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 0,00 ms
max request: 344 KiB
max rewind: 344 KiB
monitor source: 0
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0,00 ms; range is 0,50 .. 2000,00 ms
module: 15
properties:
device.description = "Dummy Output"
device.class = "abstract"
device.icon_name = "audio-card"
rohit#rohitUb18043LTS:~$ pacmd list-sink-inputs
0 sink input(s) available.
rohit#rohitUb18043LTS:~$
6) I tried the suggested command but it says "No such profile".
rohit#rohitUb18043LTS:~$ pacmd set-card-profile alsa_card.pci-0000_01_00.1 output:analog-stereo+input:analog-stereo
No such profile: output:analog-stereo+input:analog-stereo
rohit#rohitUb18043LTS:~$
Please help - how do I proceed?
Similar issue with "Dummy Sound" on Ubuntu 18.04 also with a NVIDIA card. This solved it for me:
Edit /etc/modprobe.d/alsa-base.conf as root and add options snd-hda-intel dmic_detect=0
Edit /etc/modprobe.d/blacklist.conf as root and add blacklist snd_soc_skl at the end of the file.
After making these changes, reboot your system.
More details (and credits): https://www.linuxuprising.com/2018/06/fix-no-sound-dummy-output-issue-in.html
I had the same problem, and tried the solution given by #maartenor without success.
Eventually I got the sound back by upgrading linux kernel to the last HWE stack, for me it was 4.15.0-106-generic to 5.3.0-59-generic.
The command to do this :
$ sudo apt install linux-generic-hwe-18.04
Edit the file /etc/modprobe.d/alsa-base.conf and add the following lines:
options snd-hda-intel dmic_detect=0
options snd-hda-intel model=laptop-amic enable=yes
The first line is to enable the speaker, the second for the internal microphone.
Good luck!
Got this answer from Reddit. Worked like a charm for me!
Link : https://www.reddit.com/r/linuxmint/comments/fltlrl/no_sound_on_acer_swift_3_with_kernel_53/
Try this..
Open your terminal
sudo apt update && sudo apt install alsamixer
run alsamixer in your terminal.
press arrow right til you go to sound option (if headphone go to HEADPHONES bar).
press M to unmute.
press up/down to adjust the volume.
press Esc to exit alsamixer.
Following steps worked very reliably. It does not fix the audio-losing-after-suspend issue permanently, but instantly as a command to run after back from suspend.
Use lspci to get the audio card location (0000:00:1f.3). On my machine,
$ lspci
00:1f.0 ISA bridge: Intel Corporation H110 ...
00:1f.2 Memory controller: Intel ...
00:1f.3 Audio device: Intel Corporation 100 Series/C230 Series Chipset ...
00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset ...
Then, (make sure the directories below exist)
$ echo 1 | sudo tee /sys/bus/pci/devices/0000:00:1f.3/remove
$ echo 1 | sudo tee /sys/bus/pci/rescan
I believe the audio driver/hardware is stuck. So we remove the device driver, and rescan the PCI bus to get audio back.
i found answer above not work on my computer, and i solve this problem by accidient , this is script i use , most same as answer above, but at last, u need mute then unmute auidio. sleep a short moment after command is necessary here if you put script in sh file then excute it , use sh -c is for file redirection for root
REST=0.5
#make sure Audio always actived
sudo sh -c 'echo 1 >/sys/bus/pci/rescan'
sleep $REST
DEVICE_ID=$(lspci -D | grep Audio | awk '{print $1}')
sleep $REST
sudo sh -c 'echo 1 >/sys/bus/pci/devices/0000:00:1f.3/remove'
sleep $REST
sudo sh -c 'echo 1 >/sys/bus/pci/rescan'
sleep $REST
#mute then unmute to restart audio
amixer -D pulse sset Master mute
sleep $REST
amixer -D pulse sset Master unmute

tinkerboard android - /sys/class/thermal/thermal_zone1/temp: No such file or directory

I am using a tinkerboard with an android + chroot linux. When I try to read temperature by the following command:
cat /sys/class/thermal/thermal_zone1/temp
I get the following error :
cat: /sys/class/thermal/thermal_zone1/temp: No such file or directory
If I run the tinkerboard directly with a linux distribution rather than android I am able to read the temperature by the above command.
The tinkerboard uses the RK3288 cpu which has a TS-ADC temperature sensor.
Any suggestions?
lsmod - linux:
Module Size Used by
fuse 94208 3
snd_soc_hdmi_codec 16384 1
mali_kbase 335872 0
dw_hdmi_i2s_audio 16384 0
rk_crypto 24576 0
dw_wdt 16384 0
syscon_reboot_mode 16384 0
reboot_mode 16384 1 syscon_reboot_mode
r8723bs 544768 0
zram 20480 5
ip_tables 20480 0
autofs4 28672 0
lsmod - android ( linux chroot ):
Module Size Used by
After some research by my colleague:
The kernel was missing the required drivers. Fortunately the newest updates to the kernel included the thermal sensor. It now works.

Re-scan LUN on Linux

We have expend existing LUN size on EMC Storage and now i want to re-scan on Host side but i don't know how to figure out SCSI ID of that specific LUN. I am new to storage.. This is what i am doing but don't know whether it is a right way or not
Pseudo name=emcpowerj
CLARiiON ID=APM00112500570 [Oracle_Cluster]
Logical device ID=200601602E002900B6BCA114C9F8E011 [LUN01]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A Array failover mode: 1
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
2 qla2xxx sdaj SP A1 active alive 0 1
2 qla2xxx sdaw SP B1 active alive 0 4
1 qla2xxx sdj SP A0 active alive 0 1
1 qla2xxx sdw SP B0 active alive 0 4
Here i am running find command on sdX device to find out SCSI ID to i can do echo 1 > /sys/bus/scsi/drivers/X:X:X:X/rescan to do re-scan LUN
$ find /sys/devices -name "*block*" | grep -e "sdaj" -e "sdaw" -e "sdj" -e "sdw"
/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.1/host2/rport-2:0-1/target2:0:1/**2:0:1:8**/block:sdaw
/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.1/host2/rport-2:0-0/target2:0:0/**2:0:0:8**/block:sdaj
/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.0/host1/rport-1:0-1/target1:0:1/**1:0:1:8**/block:sdw
/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.0/host1/rport-1:0-0/target1:0:0/**1:0:0:8**/block:sdj
or there is a alternative or other way to scan LUN?
I like to use the "lsscsi" program, which is probably available for your distribution.
% lsscsi
[0:0:0:0] cd/dvd NECVMWar VMware IDE CDR00 1.00 /dev/sr0
[2:0:0:0] disk VMware, VMware Virtual S 1.0 /dev/sda
[2:0:1:0] disk VMware, VMware Virtual S 1.0 /dev/sdb
As for rescanning the bus, that's pretty much it.

AVR ISP MKII, avrdude, Ubuntu 11.10

So, I have had this working on Ubuntu before. But then I upgraded to 11.10. Now, no such luck.
Note: if you are still messing with getting this to work on eclipse, you might want to try this command line stuff... if it doesnt work here, its not going to work in eclipse.
I have this error:
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
I have tried with all different configurations.
ie: -B 1 ,10, 1000,
-F doesn't help becuase then you just get back 000000 or whatever as your serial.
Also, I should mention, clearly from the output below, you can see that it gets to the programmer and even to the target board and reads its voltage out.
You can also see the target chip reset. (ie: i have tested on a number of devices includeing a DB101 and you can see when it resets)
The full output is like this:
> avrdude -c avrispmkII -P usb -p m1281 -B 100 -v
avrdude: Version 5.10, compiled on Jun 29 2010 at 03:44:14
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/david/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : avrispmkII
Setting bit clk period : 100.0
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200037289
AVR Part : ATMEGA1281
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 131072 256 512 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel AVR ISP mkII
Programmer Model: AVRISP mkII
Hardware Version: 1
Firmware Version Master : 1.13
Vtarget : 5.1 V
SCK period : 100.37 us
avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
I already have the udev stuff set up:
ie:
cat /etc/udev/rules.d/60-avrisp.rules
SUBSYSTEM!="usb_device", ACTION!="add", GOTO="avrisp_end"
# Atmel Corp. JTAG ICE mkII
ATTR{idVendor}=="03eb", SYSFS{idProduct}=="2103", MODE="660", GROUP="dialout"
# Atmel Corp. AVRISP mkII
ATTR{idVendor}=="03eb", SYSFS{idProduct}=="2104", MODE="660", GROUP="dialout"
# Atmel Corp. Dragon
ATTR{idVendor}=="03eb", SYSFS{idProduct}=="2107", MODE="660", GROUP="dialout"
LABEL="avrisp_end"
The board AND the programmer work with AVR studio on another machine.
Apparently a lot of people have this issue on Linux. :(
Dont really want to have to dig up a winblows box.
I had a really hard time getting mine to work as well. In the end, I tripped over http://wiki.dataflow.ws/Electronix/AvrIsp2OnOSX and found that I had actually missed a package. After installing uisp
sudo apt-get install uisp
I ran
sudo avrdude -c avrispmkII -p m168 -P usb: -B 8 -v -U lock:w:0x3f:m -U lfuse:w:0xff:m -U hfuse:w:0xdf:m -U efuse:w:0x0:m
And got a nice pretty green LED.
Just for the record (same error message) and because I also spent some time fiddling with my AVR ISP MKII:
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
It did work OK for me only after adjusting the timing using the -B parameter! Looks like even a current mini PC is just too fast.
Avrdude now works for me reliably under straight Debian 7. Also, it works under Windows 8 with WinAVR driver installed, then VirtualBox VM running a Debian 7 non-UI installation, after passing through the AVRISP to the VM in VirtualBox.
avrdude -c avrispmkII -P usb -p t13 -B 10 -v
...

Resources