https://wiki.archlinux.org/api.php?action=feedcontributions&user=Aitorpazos&feedformat=atomArchWiki - User contributions [en]2024-03-29T05:46:43ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Yoga_(Gen_3)&diff=655247Lenovo ThinkPad X1 Yoga (Gen 3)2021-03-17T17:08:01Z<p>Aitorpazos: Add additional method to fix touch screen activation after waking up from sleep</p>
<hr />
<div>[[Category:Lenovo]]<br />
{{Laptop style|Stub}}<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related articles end}}<br />
<br />
The Lenovo ThinkPad X1 Yoga, 3th generation is a 2-in-1 convertible laptop introduced in early 2018. Its design is closely related to the [[Lenovo ThinkPad X1 Carbon (Gen 6)]]. It features a 14" screen, 8th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# dmidecode -t system &#124; grep Version<br />
Version: ThinkPad X1 Yoga 3rd<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 included dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband || {{Yes}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| TouchScreen || {{Yes}} || x86-input-wacom, libwacom<br />
|-<br />
| Stylus || {{Yes}} || x86-input-wacom, libwacom<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| Fingerprint Reader || {{No}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}} || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| microSD card reader || {{Yes}} || scsi_mod<br />
|-<br />
| Keyboard Backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia Keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li><del>No working Linux driver for Fibocom L850-GL. See [https://forums.lenovo.com/t5/Linux-Discussion/X1C-gen-6-Fibocom-L850-GL-Ubuntu-18-04/m-p/4078413 this thread] and [https://forums.lenovo.com/t5/Linux-Discussion/Linux-support-for-WWAN-LTE-L850-GL-on-T580-T480/td-p/4067969 this thread] for more info.</del><br />
Works with https://github.com/xmm7360/xmm7360-usb-modeswitch</li><br />
<li>[https://github.com/nmikhailov/Validity90 The Validity90 project] began reverse engineering the reader, but updates have stopped recently.</li><br />
<br />
</ol><br />
|}<br />
<br />
== BIOS ==<br />
<br />
=== Thunderbolt BIOS assist potential brick issue ===<br />
<br />
Several linux users reported their systems were bricked after enabling "Thunderbolt BIOS assist" in the UEFI menu. Lenovo has released BIOS version 1.27 which prevents this issue. See this [https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/Thinkpad-X1-Yoga-3rd-Gen-Stuck-at-Black-Screen-After-Enabling/td-p/4106952 thread] on the Lenovo forums for details.<br />
<br />
=== EC Fan issues under Linux ===<br />
<br />
Under BIOS version 1.24 the embedded controller will no longer spin the fan up properly during high system load causing CPU throttling issues. Reverting to version 1.21 will restore normal functions or you can use the {{AUR|ThinkFan}} package to control it via the OS. See [[Fan speed control#ThinkPad laptops]] for details.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual ====<br />
<br />
Download the latest BIOS image from the [https://pcsupport.lenovo.com/ar/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-yoga-3rd-gen-type-20ld-20le-20lf-20lg/downloads Lenovo Thinkpad X1 Yoga 3rd Gen downloads page]. Obtain {{aur|geteltorito}} and run {{ic|geteltorito.pl -o bios-update.img xxxxxxxx.iso}} on the downloaded ISO file to create a valid [[wikipedia:El_Torito_(CD-ROM_standard)|El Torito]] image file, then flash this file on a USB drive via {{ic|dd}} like you would flash [[USB_flash_installation_media|Arch installation media]]. For further information see [[Flashing_BIOS_from_Linux#Bootable_optical_disk_emulation|flashing BIOS from Linux]].<br />
<br />
The ThinkPad X1 Yoga supports setting a custom splash image at the earliest boot stage (instead of the red "Lenovo" logo), more information can be found in the {{ic|README.TXT}} located in the {{ic|FLASH}} folder of the update image.<br />
<br />
== Suspend issues ==<br />
<br />
In the past 3rd Generation X1 Yoga supports S0i3 (also known as Windows Modern Standby), but not S3 by default. This changed as of May, 17, 2019. Lenovo included a BIOS option to enable S3 from BIOS 1.33 onward.<br />
<br />
=== Verifying S3 ===<br />
<br />
To check whether S3 is recognized and usable by Linux, run:<br />
<br />
dmesg | grep -i "acpi: (supports"<br />
<br />
and check for {{ic|S3}} in the list.<br />
<br />
=== Enabling S3 (with BIOS version 1.33 and after) ===<br />
<br />
Since of May 17, 2019, Lenovo released firmware 1.33, which let you enable legacy S3 sleep in UEFI/BIOS. You can find the option in ThinkPad Setup: Config -> Power and disable the option "Optimized Sleep State for Modern Standby". <br />
<br />
Optimized Sleep State for Modern Standby (after BIOS 1.35 the wording has changed to "Sleep State"):<br />
* Disabled: "legacy" S3 sleep (after BIOS 1.35 the wording has changed to "Linux")<br />
* Enabled: modern standby (after BIOS 1.35 the wording has changed to "Windows 10")<br />
<br />
By setting this option to "Disabled", a warning will appear. The warning describes that a reinstallation of your OS might be mandatory. Accept the warning and both Windows and Linux should work fine. You can do this step even if you already installed a patch to enable s3 sleep. After disabling the optimized sleep state in the bios, and if you did the method to enable s3 sleep before the 1.33 bios update, it is best to remove {{ic|1=<b>GRUB_EARLY_INITRD_LINUX_CUSTOM="/acpi_override"</b>}} in your /etc/default/grub (if you placed that there before), and regenerate the grub cfg using {{ic|sudo update-grub}}. Do not forget to remove the acpi_override file as well.<br />
<br />
Reboot and verify whether S3 is working by running:<br />
dmesg | grep -i "acpi: (supports"<br />
<br />
You should now see something like this:<br />
[ 0.230796] ACPI: (supports S0 S3 S4 S5)<br />
<br />
=== Enabling S3 (before BIOS version 1.33) ===<br />
<br />
There is an automated script called x1carbon2018s3 by [https://github.com/fiji-flo fiji-flo] that was originally intended for use for the X1 Carbon 6th Gen ([https://github.com/fiji-flo/x1carbon2018s3 source]). The script and documentation were updated and maintained by [https://github.com/lsmith77 lsmith77] to adapt it for the X1 Yoga 3rd Gen. The latest known version is in a fork by [https://github.com/ryankhart ryankhart] currently awaiting a pull request. These scripts are recommended for debian-based distributions because of the script including debian-based bash commands.<br />
<br />
(Optional) To check out this script and its history, visit these GitHub repositories:<br />
* https://github.com/fiji-flo/x1carbon2018s3<br />
** https://github.com/lsmith77/x1carbon2018s3<br />
*** https://github.com/ryankhart/x1carbon2018s3<br />
<br />
==== Manual method ====<br />
<br />
The manual method can be used in any distribution of Linux. Below is a modified version of [https://gist.github.com/javanna/38d019a373085e1ba0c784597bc7ec73/ the source instructions] because some things are hard to understand.<br />
<br />
1. Reboot, enter BIOS/UEFI. Go to Config - Thunderbolt (TM) 3 - set Thunderbolt BIOS Assist Mode to Enabled. Set also Security - Secure Boot to Disabled.<br />
<br />
2. Install iasl (Intel's compiler/decompiler for ACPI machine language) and cpio.<br />
iasl in Ubuntu and possibly other distributions probably do not have the latest release for it to fully work. To make sure you have the latest version, download the [https://acpica.org/downloads/ source code] and make install iasl. cpio can be installed normally with your distribution's package manager<br />
<br />
3. Get a dump of ACPI DSDT table: {{ic|cat /sys/firmware/acpi/tables/DSDT > dsdt.aml}}<br />
<br />
4. Decompile the dump, which will generate a .dsl source based on the .aml ACPI machine language dump: {{ic|iasl -d dsdt.aml}}<br />
<br />
5. Download the [patch](http://kernel.dk/acpi.patch) and apply it against dsdt.dsl: {{ic|patch --verbose < acpi.patch}}<br />
<br />
Hunk 2 failed for me, I manually looked for the following in dsdt.dsl:<br />
Name (SS1, 0x00)<br />
Name (SS2, 0x00)<br />
Name (SS3, One)<br />
One<br />
Name (SS4, One)<br />
One<br />
<br />
and replaced it with the following (removing the two "One" lines):<br />
Name (SS1, 0x00)<br />
Name (SS2, 0x00)<br />
Name (SS3, One)<br />
Name (SS4, One)<br />
<br />
6. Recompile your patched version of the .dsl source: {{ic|iasl -ve -tc dsdt.dsl}}<br />
<br />
7. Create a CPIO archive with the correct structure, which GRUB can load on boot. We name the final image acpi_override and copy it into /boot/:<br />
mkdir -p kernel/firmware/acpi<br />
cp dsdt.aml kernel/firmware/acpi<br />
find kernel | cpio -H newc --create > acpi_override<br />
cp acpi_override /boot<br />
<br />
8. GRUB needs to boot the kernel with a parameter setting the deep sleep state as default. Edit {{ic|/etc/default/grub}} and add the following:<br />
{{ic|1=GRUB_CMDLINE_LINUX_DEFAULT="mem_sleep_default=deep"}}<br />
{{ic|1=GRUB_EARLY_INITRD_LINUX_CUSTOM="/boot/acpi_override"}}<br />
<br />
9. Regenerate the GRUB configuration: {{ic|sudo update-grub}}<br />
<br />
<b>If the second line of the previous step does not generate the grub to make the initrd lines look like "initrd /boot/acpi_override" in the beginning, then follow the next steps as normal. If it does generate those lines, skip to step 11</b><br />
<br />
<br />
10. Tell GRUB to load the new DSDT table on boot in its configuration file usually located in {{ic|/boot/grub/grub.cfg}}. Find the relevant GRUB menu entry <br />
and add the new image {{ic|/boot/acpi_override}} to the initrd lines for the images that you want the s3 sleep to work in:<br />
<br />
Before:<br />
initrd /initramfs-4.17.4-200.fc28.x86_64.img<br />
<br />
After:<br />
initrd <b>/boot/acpi_override</b> /initramfs-4.17.4-200.fc28.x86_64.img<br />
11. Reboot and enjoy having a laptop running Linux again... close the lid and the battery does not get drained in a few hours, also the battery no longer stays warm in sleep mode.<br />
To verify that things are working:<br />
dmesg | grep ACPI | grep supports<br />
#[ 0.195933] ACPI: (supports S0 S3 S4 S5)<br />
<br />
cat /sys/power/mem_sleep<br />
#s2idle [deep]<br />
<br />
=== Fix touchscreen after resume ===<br />
<br />
These fixes were pulled from:<br />
[https://forums.lenovo.com/t5/Other-Linux-Discussions/X1Y3-Touchscreen-not-working-after-resume-on-Linux/td-p/4021200 Lenovo Linux Forums]<br />
<br />
==== Disabling Thunderbolt ====<br />
Some users have reported that disabling Thunderbolt in BIOS -> Security -> IO ports -> Thunderbolt permanently fixes the touchscreen issue. As a consequence, docking stations may have some features disabled.<br />
<br />
==== Using s2idle ====<br />
<br />
{{Note|This method requires S3 to be enabled in a very specific way:<br />
<br />
1. Select {{ic|Sleep State->Windows 10}} in bios. This by default will enable s2idle.<br />
{{hc|/sys/power/mem_sleep|2=<br />
[s2idle] deep}}<br />
<br />
2. To change default to S3 ({{ic|deep}}), append {{ic|1=mem_sleep_default=deep}} to the kernel boot line.<br />
<br />
3. Reboot and make sure {{ic|deep}} is default.<br />
{{hc|/sys/power/mem_sleep|2=<br />
s2idle [deep]}}<br />
}}<br />
<br />
When S3 suspend is enabled, the touchscreen will not work upon resume from sleep. <br />
<br />
The touchscreen functionality can be restored by freezing system (s2idle) after system comes out of suspend.<br />
<br />
===== Method 1 =====<br />
<br />
1. Create a script to be called by systemd-sleep<br />
<br />
{{hc|/usr/lib/systemd/system-sleep/wacom|2=<br />
#!/bin/sh<br />
<br />
case "$1" in<br />
post)<br />
rtcwake -m freeze -s 1<br />
;;<br />
esac<br />
}}<br />
<br />
2. Make sure the executable permissions are set<br />
<br />
# chmod a+x /usr/lib/systemd/system-sleep/wacom<br />
<br />
===== Method 2 =====<br />
<br />
1. Create a systemd system service file to force the system to enter {{ic|freeze}} momentarily<br />
<br />
{{hc|/etc/systemd/system/wake_wacom_hack.service|2=<br />
[Unit]<br />
Description= s2idle for 1 second after resume<br />
After=suspend.target<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/sbin/rtcwake -m freeze -s 1<br />
<br />
[Install]<br />
WantedBy=suspend.target<br />
}}<br />
<br />
2. [[Enable]] {{ic|wake_wacom_hack.service}}.<br />
<br />
===== Method 3 =====<br />
<br />
1. Install and enable acpi_call kernel module <br />
<br />
2. Add the following SystemD service:<br />
{{hc|/etc/systemd/system/activate-touch-hack.service|2=<br />
[Unit]<br />
Description=Touch wake Thinkpad X1 Yoga 3rd gen hack<br />
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target<br />
code<br />
[Service]<br />
ExecStart=/bin/sh -c "echo '\\_SB.PCI0.LPCB.EC._Q2A' > /proc/acpi/call"<br />
<br />
[Install]<br />
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target<br />
}}<br />
<br />
==== Other methods ====<br />
<br />
Some users have reported this temporary fix: quickly close and open the lid to enable sleep, and use the power button to resume from sleep.<br />
<br />
=== Enabling S2idle ===<br />
<br />
{{Note|Since [https://patchwork.kernel.org/patch/10550647/ kernel version 4.18] <nowiki>acpi.ec_no_wakeup=1</nowiki> is set by default}}<br />
<br />
From [https://forums.lenovo.com/t5/Linux-Discussion/X1-Carbon-Gen-6-cannot-enter-deep-sleep-S3-state-aka-Suspend-to/m-p/4016317/highlight/true#M10682 the Lenovo forums]{{Dead link|2020|12|27|status=404}}: Add the following [[kernel parameter]] to enable S2idle support:<br />
<br />
acpi.ec_no_wakeup=1<br />
<br />
For example, for GRUB, one might edit {{ic|/etc/default/grub}} and edit {{ic|GRUB_CMDLINE_LINUX_DEFAULT}}:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi.ec_no_wakeup=1"<br />
<br />
then perform<br />
<br />
# update-grub<br />
<br />
and restart the system.<br />
<br />
{{Note|This supports only S2idle state, not S0i3 state as some seem to have been led to believe!}}<br />
<br />
The power consumption might still be higher than that of the S3 state in this case.<br />
<br />
== Tablet Functions ==<br />
<br />
For the most part, the touch screen and stylus work under Xorg after installing {{Pkg|xf86-input-wacom}} package with no issues. See [[Tablet PC]] for further information.<br />
<br />
=== Stylus ===<br />
<br />
The default stylus buttons are mapped by the wacom driver as follows:<br />
<br />
{| class="wikitable"<br />
| '''Physical Button''' || '''Xorg mouse number'''<br />
|-<br />
| Top || 2<br />
|-<br />
| Bottom || "Eraser"<br />
|}<br />
<br />
These can be changed with xsetwacom. To set the top button of the stylus to the equivalent of a middle click or Xorg mouse button 3:<br />
<br />
# xsetwacom --set "Wacom Pen and multitouch sensor Pen stylus" Button 2 3<br />
<br />
To register the "eraser" as a right click use:<br />
<br />
# xsetwacom --set "Wacom Pen and multitouch sensor Pen eraser" Button 1 2<br />
<br />
=== Screen Rotation ===<br />
==== Automatic Screen Rotation in Gnome ====<br />
The {{Pkg|iio-sensor-proxy}} package provides automatic screen rotation for me in Gnome. Install {{Pkg|iio-sensor-proxy}}.<br />
<br />
No configuration was needed for my machine.<br />
<br />
==== With Screen Rotator ====<br />
Automatic screen rotation works well with ScreenRotator which has no configuration necessary. The touchscreen two finger swipe does not follow rotation at this time. Install {{AUR|iio-sensor-proxy-git}} and {{AUR|screenrotator-git}}.<br />
<br />
{{Note|[https://github.com/GuLinux/screenrotator ScreenRotator] is in early development stages.}}<br />
<br />
== Configuration ==<br />
<br />
Many of the configuration options can be found in [[Lenovo ThinkPad X1 Carbon (Gen 6)#Configuration]], as the X1 Carbon 6 has a very similar structure to the X1 Yoga 3.<br />
<br />
=== Fan Control ===<br />
<br />
See [[Fan speed control#ThinkPad laptops]]<br />
<br />
=== Keyboard Fn Shortcuts ===<br />
<br />
{| class="wikitable"<br />
! Keybind !! XF86 Event !! Keycode !! Keysym<br />
|-<br />
| Fn || XF86WakeUp || 151 || 0x1008ff2b<br />
|-<br />
| Fn+F1 || XF86AudioMute || 121 || 0x1008ff12<br />
|-<br />
| Fn+F2 || XF86AudioLowerVolume || 122 || 0x1008ff11<br />
|-<br />
| Fn+F3 || XF86AudioRaiseVolume || 123 || 0x1008ff13<br />
|-<br />
| Fn+F4 || XF86AudioMicMute || 198 || 0x1008ffb2<br />
|-<br />
| Fn+F5 || XF86MonBrightnessDown || 232 || 0x1008ff03<br />
|-<br />
| Fn+F6 || XF86MonBrightnessUp || 233 || 0x1008ff02<br />
|-<br />
| Fn+F7 || XF86Display || 235 || 0x1008ff59<br />
|-<br />
| Fn+F8 || XF86WLAN || 246 || 0x1008ff95<br />
|-<br />
| Fn+F9 || XF86Tools || 179 || 0x1008ff81<br />
|-<br />
| Fn+F10 || XF86Bluetooth || 245 || 0x1008ff94<br />
|-<br />
| Fn+F11 || ??<br />
|-<br />
| Fn+F12 || XF86Favorites || 164 || 0x1008ff30<br />
|}</div>Aitorpazoshttps://wiki.archlinux.org/index.php?title=Lenovo_ThinkPad_X1_Yoga_(Gen_3)&diff=581811Lenovo ThinkPad X1 Yoga (Gen 3)2019-09-08T17:10:06Z<p>Aitorpazos: Add notes to reflect the changes in wording for BIOS > 1.35</p>
<hr />
<div>[[Category:Lenovo]]<br />
{{Related articles start}}<br />
{{Related|Lenovo ThinkPad X1 Carbon (Gen 6)}}<br />
{{Related articles end}}<br />
<br />
The Lenovo ThinkPad X1 Yoga, 3th generation is a 2-in-1 convertible laptop introduced in early 2018. Its design is closely related to the [[Lenovo ThinkPad X1 Carbon (Gen 6)]]. It features a 14" screen, 8th-gen Intel Core processors and integrated [[Intel graphics|Intel UHD 620 graphics]].<br />
<br />
To ensure you have this version, [[install]] the package {{Pkg|dmidecode}} and run:<br />
<br />
{{bc|# dmidecode -t system &#124; grep Version<br />
Version: ThinkPad X1 Yoga 3rd<br />
}}<br />
<br />
{| class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 0.5em; max-width: 420px; width: 100%;"<br />
| '''Device''' || '''Working''' || '''Modules'''<br />
|-<br />
| [[Intel graphics]] || {{Yes}} || i915, (intel_agp)<br />
|-<br />
| [[Wireless network configuration#iwlwifi|Wireless network]] || {{Yes}} || iwlmvm<br />
|-<br />
| Native Ethernet with [https://www3.lenovo.com/us/en/accessories-and-monitors/cables-and-adapters/adapters/CABLE-BO-TP-OneLink%2B-to-RJ45-Adapter/p/4X90K06975 included dongle] || {{Yes}} || ?<br />
|-<br />
| Mobile broadband || {{No}}¹ || ?<br />
|-<br />
| Audio || {{Yes}} || snd_hda_intel<br />
|-<br />
| [[Touchpad]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| [[TrackPoint]] || {{Yes}} || psmouse, rmi_smbus, i2c_i801<br />
|-<br />
| TouchScreen || {{Yes}} || x86-input-wacom, libwacom<br />
|-<br />
| Stylus || {{Yes}} || x86-input-wacom, libwacom<br />
|-<br />
| Camera || {{Yes}} || uvcvideo<br />
|-<br />
| Fingerprint Reader || {{No}}² || ?<br />
|-<br />
| [[Power management]] || {{Yes}} || ?<br />
|-<br />
| [[Bluetooth]] || {{Yes}} || btusb<br />
|-<br />
| microSD card reader || {{Yes}} || scsi_mod<br />
|-<br />
| Keyboard Backlight || {{Yes}} || thinkpad_acpi<br />
|-<br />
| Function/Multimedia Keys || {{Yes}} || ?<br />
|-<br />
| colspan=3 style="font-size: 70%; border: none;" | <ol><br />
<li>No working Linux driver for Fibocom L850-GL. See [https://forums.lenovo.com/t5/Linux-Discussion/X1C-gen-6-Fibocom-L850-GL-Ubuntu-18-04/m-p/4078413 this thread] and [https://forums.lenovo.com/t5/Linux-Discussion/Linux-support-for-WWAN-LTE-L850-GL-on-T580-T480/td-p/4067969 this thread] for more info.</li><br />
<li>[https://github.com/nmikhailov/Validity90 The Validity90 project] began reverse engineering the reader, but updates have stopped recently.</li><br />
<br />
</ol><br />
|}<br />
<br />
== BIOS ==<br />
<br />
=== Thunderbolt BIOS assist potential brick issue ===<br />
<br />
Several linux users reported their systems were bricked after enabling "Thunderbolt BIOS assist" in the UEFI menu. Lenovo has released BIOS version 1.27 which prevents this issue. See this [https://forums.lenovo.com/t5/ThinkPad-X-Series-Laptops/Thinkpad-X1-Yoga-3rd-Gen-Stuck-at-Black-Screen-After-Enabling/td-p/4106952 thread] on the Lenovo forums for details.<br />
<br />
=== EC Fan issues under Linux ===<br />
<br />
Under BIOS version 1.24 the embedded controller will no longer spin the fan up properly during high system load causing CPU throttling issues. Reverting to version 1.21 will restore normal functions or you can use the {{AUR|ThinkFan}} package to control it via the OS. See [[Fan speed control#ThinkPad laptops]] for details.<br />
<br />
=== Updates ===<br />
<br />
==== Automatic (Linux Vendor Firmware Service) ====<br />
<br />
[https://blogs.gnome.org/hughsie/2018/08/06/please-welcome-lenovo-to-the-lvfs/ In August of 2018 Lenovo has joined] the [https://fwupd.org/ Linux Vendor Firmware Service (LVFS)] project, which enables firmware updates from within the OS.<br />
BIOS updates (and possibly other firmware such as the Thunderbolt controller) can be queried for and installed through [[fwupd]].<br />
<br />
==== Manual ====<br />
<br />
Download the latest BIOS image from the [https://pcsupport.lenovo.com/ar/en/products/laptops-and-netbooks/thinkpad-x-series-laptops/thinkpad-x1-yoga-3rd-gen-type-20ld-20le-20lf-20lg/downloads Lenovo Thinkpad X1 Yoga 3rd Gen downloads page]. Obtain {{aur|geteltorito}} and run {{ic|geteltorito.pl -o bios-update.img xxxxxxxx.iso}} on the downloaded ISO file to create a valid [[wikipedia:El_Torito_(CD-ROM_standard)|El Torito]] image file, then flash this file on a USB drive via {{ic|dd}} like you would flash [[USB_flash_installation_media|Arch installation media]]. For further information see [[Flashing_BIOS_from_Linux#Bootable_optical_disk_emulation|flashing BIOS from Linux]].<br />
<br />
The ThinkPad X1 Yoga supports setting a custom splash image at the earliest boot stage (instead of the red "Lenovo" logo), more information can be found in the {{ic|README.TXT}} located in the {{ic|FLASH}} folder of the update image.<br />
<br />
== Suspend issues ==<br />
<br />
In the past 3rd Generation X1 Yoga supports S0i3 (also known as Windows Modern Standby), but not S3 by default. This changed as of May, 17, 2019. Lenovo included a BIOS option to enable S3 from BIOS 1.33 onward.<br />
<br />
<br />
=== Verifying S3 ===<br />
<br />
To check whether S3 is recognized and usable by Linux, run:<br />
<br />
dmesg | grep -i "acpi: (supports"<br />
<br />
and check for {{ic|S3}} in the list.<br />
<br />
=== Enabling S3 (with BIOS version 1.33 and after) ===<br />
<br />
Since of May 17, 2019, Lenovo released firmware 1.33, which let you enable legacy S3 sleep in UEFI/BIOS. You can find the option in ThinkPad Setup: Config -> Power and disable the option "Optimized Sleep State for Modern Standby". <br />
<br />
Optimized Sleep State for Modern Standby (after BIOS 1.35 the wording has changed to "Sleep State"):<br />
* Disabled: "legacy" S3 sleep (after BIOS 1.35 the wording has changed to "Linux")<br />
* Enabled: modern standby (after BIOS 1.35 the wording has changed to "Windows 10")<br />
<br />
By setting this option to "Disabled", a warning will appear. The warning describes that a reinstallation of your OS might be mandatory. Accept the warning and both Windows and Linux should work fine. You can do this step even if you already installed a patch to enable s3 sleep. After disabling the optimized sleep state in the bios, and if you did the method to enable s3 sleep before the 1.33 bios update, it is best to remove {{ic|1=<b>GRUB_EARLY_INITRD_LINUX_CUSTOM="/acpi_override"</b>}} in your /etc/default/grub (if you placed that there before), and regenerate the grub cfg using {{ic|sudo update-grub}}. Don't forget to remove the acpi_override file as well.<br />
<br />
<br />
Reboot and verify whether S3 is working by running:<br />
dmesg | grep -i "acpi: (supports"<br />
<br />
You should now see something like this:<br />
[ 0.230796] ACPI: (supports S0 S3 S4 S5)<br />
<br />
=== Enabling S3 (before BIOS version 1.33) ===<br />
<br />
There is an automated script called x1carbon2018s3 by [https://github.com/fiji-flo fiji-flo] that was originally intended for use for the X1 Carbon 6th Gen ([https://github.com/fiji-flo/x1carbon2018s3 source]). The script and documentation were updated and maintained by [https://github.com/lsmith77 lsmith77] to adapt it for the X1 Yoga 3rd Gen. The latest known version is in a fork by [https://github.com/ryankhart ryankhart] currently awaiting a pull request. These scripts are recommended for debian-based distributions because of the script including debian-based bash commands.<br />
<br />
(Optional) To check out this script and its history, visit these GitHub repositories:<br />
* https://github.com/fiji-flo/x1carbon2018s3<br />
** https://github.com/lsmith77/x1carbon2018s3<br />
*** https://github.com/ryankhart/x1carbon2018s3<br />
<br />
==== Manual method ====<br />
<br />
The manual method can be used in any distribution of Linux. Below is a modified version of [https://gist.github.com/javanna/38d019a373085e1ba0c784597bc7ec73/ the source instructions] because some things are hard to understand.<br />
<br />
<br />
1. Reboot, enter BIOS/UEFI. Go to Config - Thunderbolt (TM) 3 - set Thunderbolt BIOS Assist Mode to Enabled. Set also Security - Secure Boot to Disabled.<br />
<br />
2. Install iasl (Intel's compiler/decompiler for ACPI machine language) and cpio.<br />
iasl in Ubuntu and possibly other distributions probably do not have the latest release for it to fully work. To make sure you have the latest version, download the [https://acpica.org/downloads/ source code] and make install iasl. cpio can be installed normally with your distribution's package manager<br />
<br />
<br />
3. Get a dump of ACPI DSDT table: {{ic|cat /sys/firmware/acpi/tables/DSDT > dsdt.aml}}<br />
<br />
4. Decompile the dump, which will generate a .dsl source based on the .aml ACPI machine language dump: {{ic|iasl -d dsdt.aml}}<br />
<br />
5. Download the [patch](http://kernel.dk/acpi.patch) and apply it against dsdt.dsl: {{ic|patch --verbose < acpi.patch}}<br />
<br />
Hunk 2 failed for me, I manually looked for the following in dsdt.dsl:<br />
Name (SS1, 0x00)<br />
Name (SS2, 0x00)<br />
Name (SS3, One)<br />
One<br />
Name (SS4, One)<br />
One<br />
<br />
<br />
and replaced it with the following (removing the two "One" lines):<br />
Name (SS1, 0x00)<br />
Name (SS2, 0x00)<br />
Name (SS3, One)<br />
Name (SS4, One)<br />
<br />
<br />
6. Recompile your patched version of the .dsl source: {{ic|iasl -ve -tc dsdt.dsl}}<br />
<br />
7. Create a CPIO archive with the correct structure, which GRUB can load on boot. We name the final image acpi_override and copy it into /boot/:<br />
mkdir -p kernel/firmware/acpi<br />
cp dsdt.aml kernel/firmware/acpi<br />
find kernel | cpio -H newc --create > acpi_override<br />
cp acpi_override /boot<br />
<br />
<br />
8. GRUB needs to boot the kernel with a parameter setting the deep sleep state as default. Edit {{ic|/etc/default/grub}} and add the following:<br />
{{ic|1=GRUB_CMDLINE_LINUX_DEFAULT="mem_sleep_default=deep"}}<br />
{{ic|1=GRUB_EARLY_INITRD_LINUX_CUSTOM="/boot/acpi_override"}}<br />
<br />
9. Regenerate the GRUB configuration: {{ic|sudo update-grub}}<br />
<br />
<b>If the second line of the previous step does not generate the grub to make the initrd lines look like "initrd /boot/acpi_override" in the beginning, then follow the next steps as normal. If it does generate those lines, skip to step 11</b><br />
<br />
<br />
10. Tell GRUB to load the new DSDT table on boot in its configuration file usually located in {{ic|/boot/grub/grub.cfg}}. Find the relevant GRUB menu entry <br />
and add the new image {{ic|/boot/acpi_override}} to the initrd lines for the images that you want the s3 sleep to work in:<br />
<br />
Before:<br />
initrd /initramfs-4.17.4-200.fc28.x86_64.img<br />
<br />
After:<br />
initrd <b>/boot/acpi_override</b> /initramfs-4.17.4-200.fc28.x86_64.img<br />
11. Reboot and enjoy having a laptop running Linux again... close the lid and the battery does not get drained in a few hours, also the battery no longer stays warm in sleep mode.<br />
To verify that things are working:<br />
dmesg | grep ACPI | grep supports<br />
#[ 0.195933] ACPI: (supports S0 S3 S4 S5)<br />
<br />
cat /sys/power/mem_sleep<br />
#s2idle [deep]<br />
<br />
=== Fix touchscreen after resume ===<br />
<br />
These fixes were pulled from:<br />
[https://forums.lenovo.com/t5/Other-Linux-Discussions/X1Y3-Touchscreen-not-working-after-resume-on-Linux/td-p/4021200 Lenovo Linux Forums]<br />
<br />
==== Using s2idle ====<br />
<br />
When the above fix is applied to allow S3 suspend, the touchscreen will not work upon resume from sleep. <br />
<br />
The touchscreen functionality can be restored by freezing system (s2idle):<br />
<br />
create a unit file: <br />
<br />
/etc/systemd/system/wake_wacom_hack.service <br />
<br />
with content:<br />
<br />
[Unit]<br />
Description= s2idle for 1 second after resume<br />
After=suspend.target<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/sbin/rtcwake -m freeze -s 1<br />
[Install]<br />
WantedBy=suspend.target<br />
<br />
enable in standard way: <br />
<br />
sudo systemctl enable wake_wacom_hack.service<br />
<br />
<br />
==== Other methods ====<br />
<br />
Some users have reported this temporary fix: quickly close and open the lid to enable sleep, and use the power button to resume from sleep.<br />
<br />
=== Enabling S2idle ===<br />
<br />
{{Note|Since [https://patchwork.kernel.org/patch/10550647/ kernel version 4.18] <nowiki>acpi.ec_no_wakeup=1</nowiki> is set by default}}<br />
<br />
From [https://forums.lenovo.com/t5/Linux-Discussion/X1-Carbon-Gen-6-cannot-enter-deep-sleep-S3-state-aka-Suspend-to/m-p/4016317/highlight/true#M10682 the Lenovo forums]: Add the following [[kernel parameter]] to enable S2idle support:<br />
<br />
acpi.ec_no_wakeup=1<br />
<br />
For example, for GRUB, one might edit <code>/etc/default/grub</code> and edit <code>GRUB_CMDLINE_LINUX_DEFAULT</code>:<br />
<br />
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi.ec_no_wakeup=1"<br />
<br />
then perform<br />
<br />
sudo update-grub<br />
<br />
and restart the system.<br />
<br />
{{Note|This supports only S2idle state, not S0i3 state as some seem to have been led to believe!}}<br />
<br />
The power consumption might still be higher than that of the S3 state in this case.<br />
<br />
== Tablet Functions ==<br />
<br />
For the most part, the touch screen and stylus work under Xorg after installing {{Pkg|xf86-input-wacom}} package with no issues. See [[Tablet PC]] for further information.<br />
<br />
=== Stylus ===<br />
<br />
The default stylus buttons are mapped by the wacom driver as follows:<br />
<br />
{| class="wikitable"<br />
| '''Physical Button''' || '''Xorg mouse number'''<br />
|-<br />
| Top || 2<br />
|-<br />
| Bottom || "Eraser"<br />
|}<br />
<br />
These can be changed with xsetwacom. To set the top button of the stylus to the equivalent of a middle click or Xorg mouse button 3:<br />
<br />
xsetwacom --set "Wacom Pen and multitouch sensor Pen stylus" Button 2 3<br />
<br />
To register the "eraser" as a right click use:<br />
<br />
xsetwacom --set "Wacom Pen and multitouch sensor Pen eraser" Button 1 2<br />
<br />
=== Screen Rotation ===<br />
==== Automatic Screen Rotation in Gnome ====<br />
The iio-sensor-proxy package provides automatic screen rotation for me in Gnome. The package is available in the community repo<br />
<br />
sudo pacman -S iio-sensor-proxy <br />
<br />
No configuration was needed for my machine.<br />
<br />
==== With Screen Rotator ====<br />
Automatic screen rotation works well with ScreenRotator which has no configuration necessary. The touchscreen two finger swipe does not follow rotation at this time. Install {{AUR|iio-sensor-proxy-git}} and {{AUR|screenrotator-git}}.<br />
<br />
{{Note|[https://github.com/GuLinux/screenrotator ScreenRotator] is in early development stages.}}<br />
<br />
== Configuration ==<br />
<br />
Many of the configuration options can be found in [[Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Configuration]], as the X1 Carbon 6 has a very similar structure to the X1 Yoga 3.<br />
<br />
=== Fan Control ===<br />
<br />
See [[Fan_speed_control#ThinkPad_laptops]]<br />
<br />
=== Keyboard Fn Shortcuts ===<br />
<br />
{| class="wikitable"<br />
! Keybind !! XF86 Event !! Keycode !! Keysym<br />
|-<br />
| Fn || XF86WakeUp || 151 || 0x1008ff2b<br />
|-<br />
| Fn+F1 || XF86AudioMute || 121 || 0x1008ff12<br />
|-<br />
| Fn+F2 || XF86AudioLowerVolume || 122 || 0x1008ff11<br />
|-<br />
| Fn+F3 || XF86AudioRaiseVolume || 123 || 0x1008ff13<br />
|-<br />
| Fn+F4 || XF86AudioMicMute || 198 || 0x1008ffb2<br />
|-<br />
| Fn+F5 || XF86MonBrightnessDown || 232 || 0x1008ff03<br />
|-<br />
| Fn+F6 || XF86MonBrightnessUp || 233 || 0x1008ff02<br />
|-<br />
| Fn+F7 || XF86Display || 235 || 0x1008ff59<br />
|-<br />
| Fn+F8 || XF86WLAN || 246 || 0x1008ff95<br />
|-<br />
| Fn+F9 || XF86Tools || 179 || 0x1008ff81<br />
|-<br />
| Fn+F10 || XF86Bluetooth || 245 || 0x1008ff94<br />
|-<br />
| Fn+F11 || ??<br />
|-<br />
| Fn+F12 || XF86Favorites || 164 || 0x1008ff30<br />
|}</div>Aitorpazoshttps://wiki.archlinux.org/index.php?title=SDDM&diff=471430SDDM2017-03-20T21:00:50Z<p>Aitorpazos: As suggested in SDDM github project readme only the two setfacl lines left are needed (I've tested that). I guess that the third setfacl line was a mistake</p>
<hr />
<div>[[Category:KDE]]<br />
[[Category:Display managers]]<br />
[[ja:SDDM]]<br />
[[ru:SDDM]]<br />
[[zh-hans:SDDM]]<br />
{{Related articles start}}<br />
{{Related|Display manager}}<br />
{{Related|KDE}}<br />
{{Related articles end}}<br />
The [[Wikipedia:Simple Desktop Display Manager|Simple Desktop Display Manager]] (SDDM) is the preferred [[display manager]] for [[KDE]] Plasma desktop. From Wikipedia:<br />
<br />
:''Simple Desktop Display Manager (SDDM) is a display manager (a graphical login program) for X11. SDDM was written from scratch in C++11 and supports theming via QML. It is the successor of the KDE Display Manager and is used in conjunction with KDE Frameworks 5, KDE Plasma 5 and KDE Applications 5.''<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|sddm}} package.<br />
<br />
Then follow [[Display manager#Loading the display manager]] to start SDDM at boot.<br />
<br />
== Configuration ==<br />
<br />
The configuration file for SDDM can be found at {{ic|/etc/sddm.conf}}. See {{man|5|sddm.conf|url=}} for all options.<br />
<br />
On systems controlled by [[systemd]], everything should work out of the box, since SDDM defaults to using {{ic|systemd-logind}} for session management. The configuration file will therefore not be created at package installation time. SDDM offers a command for generating a sample configuration file with the default settings if you really want one:<br />
<br />
# sddm --example-config > /etc/sddm.conf<br />
<br />
=== Autologin ===<br />
<br />
SDDM supports automatic login through its configuration file, for example:<br />
<br />
{{hc|<br />
1=/etc/sddm.conf|<br />
2=[Autologin]<br />
User=john<br />
Session=plasma.desktop<br />
}}<br />
<br />
This configuration causes a KDE Plasma session to be started for user {{ic|john}} when the system is booted. Available session types can be found in {{ic|/usr/share/xsessions/}} directory.<br />
<br />
An option to autologin into KDE Plasma while simultaneously locking the session is not available [https://github.com/sddm/sddm/issues/306]<br />
<br />
You can add a script that activates the screensaver of KDE to the autostart as a workaround:<br />
<br />
#!/bin/bash<br />
/usr/bin/qdbus-qt4 org.kde.screensaver /ScreenSaver SetActive true &<br />
exit 0<br />
<br />
=== Unlock KDE Wallet automatically on login ===<br />
<br />
See [[KDE Wallet#Unlock KDE Wallet automatically on login]].<br />
<br />
=== Theme settings ===<br />
<br />
Theme settings can be changed in the {{ic|[Theme]}} section.<br />
<br />
Set to {{ic|breeze}} for the default Plasma theme.<br />
<br />
Some themes are available in the [[AUR]], for example {{AUR|archlinux-themes-sddm}}.<br />
<br />
==== Current theme ====<br />
<br />
Set the current theme through the {{ic|Current}} value, e.g. {{ic|1=Current=archlinux-simplyblack}}.<br />
<br />
==== Editing themes ====<br />
<br />
The default SDDM theme directory is {{ic|/usr/share/sddm/themes/}}. You can add your custom made themes to that directory under a separate subdirectory. Note that SDDM requires these subdirectory names to be the same as the theme names. Study the files installed to modify or create your own theme.<br />
<br />
==== Mouse cursor ====<br />
<br />
To set the mouse cursor theme, set {{ic|CursorTheme}} to your preferred cursor theme.<br />
<br />
Valid [[Plasma]] mouse cursor theme names are {{ic|breeze_cursors}}, {{ic|Breeze_Snow}} and {{ic|breeze-dark}}.<br />
<br />
==== Changing your avatar ====<br />
<br />
You can simply put a png image named {{ic|username.face.icon}} into the default directory {{ic|/usr/share/sddm/faces/}}. Alternatively you can change the default directory to match your desires:<br />
<br />
{{hc|/etc/sddm.conf|2=<br />
[Theme]<br />
FacesDir=/var/lib/AccountsService/icons/<br />
}}<br />
<br />
You can also put a png image named {{ic|.face.icon}} at the root of your home directory. However, you need to make sure that {{ic|sddm}} user can read that file.<br />
<br />
{{Note|If avatar images are symlinks, you need to set proper file permissions to the target files.}}<br />
<br />
=== Numlock ===<br />
<br />
If you want to enforce Numlock to be enabled, set {{ic|1=Numlock=on}} in the {{ic|[General]}} section.<br />
<br />
=== Rotate display ===<br />
<br />
See [[Xrandr#Configuration]].<br />
<br />
=== Configuration GUI ===<br />
<br />
* KDE Frameworks' System Settings contains an SDDM configuration module. Install {{Pkg|sddm-kcm}} package to use it.<br />
* There is a Qt-based {{AUR|sddm-config-editor-git}} in the AUR.<br />
<br />
=== DPI settings ===<br />
<br />
Sometimes it's useful to set up correct monitor's PPI settings on a "Display Manager" level. To do so you need to find "ServerArguments" parameter in sdd.conf and add -dpi %YOUR RESOLUTION at the end of the string. <br />
<br />
For example:<br />
<br />
{{hc|head=/etc/sddm.conf|output=ServerArguments=-nolisten tcp -dpi 94}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== Hangs after login ===<br />
<br />
Try removing {{ic|~/.Xauthority}}.<br />
<br />
=== SDDM starts on tty1 instead of tty7 ===<br />
<br />
SDDM follows the [http://0pointer.de/blog/projects/serial-console.html systemd convention] of starting the first graphical session on tty1. If you prefer the old convention where tty1 through tty6 are reserved for text consoles, uncomment and edit the {{ic|MinimumVT}} variable, under the {{ic|[X11]}} section in {{ic|sddm.conf}}:<br />
<br />
{{hc|/etc/sddm.conf|2=<br />
[X11]<br />
...<br />
MinimumVT=7<br />
...<br />
}}<br />
<br />
=== One or more users do not show up on the greeter ===<br />
<br />
{{Warning|Users set with a lower or higher {{ic|UID}} range should generally not be exposed to a [[Display manager]].}}<br />
<br />
SDDM only displays users with a UID in the range of 1000 to 65000 by default, if the UIDs of the desired users are below this value then you will have to modify this range. Modify your {{ic|sddm.conf}} to (for a UID of 501, say):<br />
<br />
{{hc|/etc/sddm.conf|2=<br />
[Users]<br />
HideShells=/sbin/nologin,/bin/false<br />
# Hidden users, this is if any system users fall within your range, see /etc/passwd on your system.<br />
HideUsers=git,sddm,systemd-journal-remote,systemd-journal-upload<br />
<br />
# Maximum user id for displayed users<br />
MaximumUid=65000<br />
<br />
# Minimum user id for displayed users<br />
MinimumUid=500 #My UID is 501<br />
}}<br />
<br />
=== SDDM loads only US keyboard layout ===<br />
<br />
SDDM loads the keyboard layout specified in {{ic|/etc/X11/xorg.conf.d/00-keyboard.conf}}. You can generate this configuration file by {{ic|localectl set-x11-keymap}} command. See [[Keyboard configuration in Xorg]] for more information.<br />
<br />
=== No user Icon ===<br />
<br />
SDDM reads user icon from either {{ic|~/.face.icon}} or {{ic|''FacesDir''/username.face.icon}}<br />
<br />
You need to make sure that SDDM user have permissions to read those files.<br />
<br />
$ setfacl -m u:sddm:x /home/username<br />
$ setfacl -m u:sddm:r /home/username/.face.icon<br />
<br />
See [https://github.com/sgerbino/sddm#no-user-icon SDDM README: No User Icon].<br />
<br />
=== Screen resolution is too low ===<br />
<br />
Issue may be caused by HiDPI usage for monitors with corrupted EDID: [https://github.com/sddm/sddm/issues/692]<br />
<br />
Try disabling HiDPI in {{ic|sddm.conf}}:<br />
<br />
{{hc|/etc/sddm.conf|2=<br />
[General]<br />
# Enable Qt's automatic high-DPI scaling<br />
EnableHiDPI=false<br />
}}<br />
<br />
Installing {{AUR|sddm-git}} may be required.</div>Aitorpazoshttps://wiki.archlinux.org/index.php?title=GnuPG&diff=149602GnuPG2011-07-21T17:59:29Z<p>Aitorpazos: card-timeout added as reference config for scdaemon.conf as it solves some issues for me.</p>
<hr />
<div>[[Category:Security (English)]]<br />
GnuPG can be used to sign and encrypt files or mails.<br />
<br />
= Basic usage =<br />
<br />
You can use gnupg to encrypt your sensitive documents, but only individual files at a time, if you want to encrypt directories or a whole file-system you should consider use [[truecrypt|Truecrypt]], though you can always tarball various files and then encrypt them.<br />
<br />
== Symmetric Encryption ==<br />
<br />
= gpg-agent =<br />
<br />
{{Codeline|gpg-agent}} is mostly used as daemon to request and cache the password for the keychain. This is useful if GnuPG is used from an external program like a mail client. It can be activated by adding following line in {{Filename|~/.gnupg/gpg.conf}}:<br />
use-agent<br />
<br />
This tells GnuPG to use the agent whenever it needs the password. However, the agent needs to run already. To autostart it, create the following file and make it executable:<br />
{{File|name=/etc/profile.d/gpg-agent.sh|content=<nowiki><br />
#!/bin/sh<br />
<br />
envfile="${HOME}/.gnupg/gpg-agent.env"<br />
if test -f "$envfile" && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then<br />
eval "$(cat "$envfile")"<br />
else<br />
eval "$(gpg-agent --daemon --write-env-file "$envfile")"<br />
fi<br />
export GPG_AGENT_INFO # the env file does not contain the export statement<br />
</nowiki>}}<br />
<br />
If you want SSH support see [[Using SSH Keys#Using GnuPG Agent]].<br />
<br />
Finally, the agent needs to know how to ask the user for the password. This can be set in {{Filename|~/.gnupg/gpg-agent.conf}}:<br />
pinentry-program /usr/bin/pinentry-gtk-2<br />
<br />
For more options see {{Codeline|man gpg-agent}}.<br />
<br />
= Smartcards =<br />
GnuPG uses scdaemon as an interface to your smartcard reader, please refer to {{Codeline|scdaemon}} man page for details.<br />
<br />
== GnuPG only setups==<br />
If you don't plan to use other cards but those based on GnuPG you should check the {{Codeline|reader-port}} parameter in {{Filename|~/.gnupg/scdaemon.conf}}. The value '0' refers to the first available serial port reader and a value of '32768' (default) refers to the first usb reader.<br />
<br />
== GnuPG together with OpenSC == <br />
<br />
If you are using any smartcard with an opensc driver (e.g.: ID cards from some countries) you should pay some attention to GnuPG configuration. Out of the box you might receive a message like this when using {{Codeline|gpg --card-status}}<br />
<br />
gpg: selecting openpgp failed: ec=6.108<br />
<br />
By default, scdaemon will try to connect directly to the device. This connection will fail if the reader is being used by another process. For example: the pcscd daemon used by OpenSC. To cope with this situation we should use the same underlying driver as opensc so they can work well together.<br />
In order to point scdaemon to use pcscd you should remove {{Codeline|reader-port}} from {{Filename|~/gnupg/scdaemon.conf}}, specify the location to libpcsclite.so library and disable ccid so we make sure that we use pcscd.<br />
<br />
{{File|name=~/scdaemon.conf|content=<nowiki><br />
pcsc-driver /usr/lib/libpcsclite.so <br />
card-timeout 5<br />
disable-ccid<br />
</nowiki>}}<br />
<br />
Please check {{Codeline|man scdaemon}} if you don't use OpenSC.</div>Aitorpazoshttps://wiki.archlinux.org/index.php?title=GnuPG&diff=149601GnuPG2011-07-21T17:50:20Z<p>Aitorpazos: Add Smartcard related information</p>
<hr />
<div>[[Category:Security (English)]]<br />
GnuPG can be used to sign and encrypt files or mails.<br />
<br />
= Basic usage =<br />
<br />
You can use gnupg to encrypt your sensitive documents, but only individual files at a time, if you want to encrypt directories or a whole file-system you should consider use [[truecrypt|Truecrypt]], though you can always tarball various files and then encrypt them.<br />
<br />
== Symmetric Encryption ==<br />
<br />
= gpg-agent =<br />
<br />
{{Codeline|gpg-agent}} is mostly used as daemon to request and cache the password for the keychain. This is useful if GnuPG is used from an external program like a mail client. It can be activated by adding following line in {{Filename|~/.gnupg/gpg.conf}}:<br />
use-agent<br />
<br />
This tells GnuPG to use the agent whenever it needs the password. However, the agent needs to run already. To autostart it, create the following file and make it executable:<br />
{{File|name=/etc/profile.d/gpg-agent.sh|content=<nowiki><br />
#!/bin/sh<br />
<br />
envfile="${HOME}/.gnupg/gpg-agent.env"<br />
if test -f "$envfile" && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then<br />
eval "$(cat "$envfile")"<br />
else<br />
eval "$(gpg-agent --daemon --write-env-file "$envfile")"<br />
fi<br />
export GPG_AGENT_INFO # the env file does not contain the export statement<br />
</nowiki>}}<br />
<br />
If you want SSH support see [[Using SSH Keys#Using GnuPG Agent]].<br />
<br />
Finally, the agent needs to know how to ask the user for the password. This can be set in {{Filename|~/.gnupg/gpg-agent.conf}}:<br />
pinentry-program /usr/bin/pinentry-gtk-2<br />
<br />
For more options see {{Codeline|man gpg-agent}}.<br />
<br />
= Smartcards =<br />
GnuPG uses scdaemon as an interface to your smartcard reader, please refer to {{Codeline|scdaemon}} man page for details.<br />
<br />
== GnuPG only setups==<br />
If you don't plan to use other cards but those based on GnuPG you should check the {{Codeline|reader-port}} parameter in {{Filename|~/.gnupg/scdaemon.conf}}. The value '0' refers to the first available serial port reader and a value of '32768' (default) refers to the first usb reader.<br />
<br />
== GnuPG together with OpenSC == <br />
<br />
If you are using any smartcard with an opensc driver (e.g.: ID cards from some countries) you should pay some attention to GnuPG configuration. Out of the box you might receive a message like this when using {{Codeline|gpg --card-status}}<br />
<br />
gpg: selecting openpgp failed: ec=6.108<br />
<br />
By default, scdaemon will try to connect directly to the device. This connection will fail if the reader is being used by another process. For example: the pcscd daemon used by OpenSC. To cope with this situation we should use the same underlying driver as opensc so they can work well together.<br />
In order to point scdaemon to use pcscd you should remove {{Codeline|reader-port}} from {{Filename|~/gnupg/scdaemon.conf}}, specify the location to libpcsclite.so library and disable ccid so we make sure that we use pcscd.<br />
<br />
{{File|name=~/scdaemon.conf|content=<nowiki><br />
pcsc-driver /usr/lib/libpcsclite.so <br />
disable-ccid<br />
</nowiki>}}<br />
<br />
Please check {{Codeline|man scdaemon}} if you don't use OpenSC.</div>Aitorpazoshttps://wiki.archlinux.org/index.php?title=PulseAudio_(Espa%C3%B1ol)&diff=116262PulseAudio (Español)2010-09-01T22:56:38Z<p>Aitorpazos: podible por posible</p>
<hr />
<div>[[Category:HOWTOs (Español)]]<br />
[[Category:Audio/Video (Español)]]<br />
{{i18n|PulseAudio}}<br />
{{Translateme}}<br />
<br />
(Traducción al español en curso)<br />
<br />
'''PulseAudio''' es un servidor de sonido para sistemas POSIX y Win32 . Permite tener varios programas reproduciendo sonido en una maquina, entre otras características mas avanzadas. Se pretende que sea un reemplazo para el servidor Enlightened Sound Daemon. Este artículo se centra en las características más básicas de PulseAudio.<br />
<br />
Notar que Pulseaudio no es un reemplazo para aRts. Si usas KDE 3, no es posible usar PulseAudio.<br />
<br />
==Instalación==<br />
Todos los paquetes son del repositorio community, asi que debes tenerlo habilitado. Luego, para instalar PulseAudio:<br />
# pacman -S pulseaudio-alsa<br />
<br />
Opcionalmente puedes instalar algunos front-ends GTK para PulseAudio:<br />
# pacman -S paprefs pavucontrol pavumeter<br />
<br />
===Realtime scheduling===<br />
Es una buena idea permitir a PulseAudio correr con programación en tiempo real, lo que puede mejorar el rendimiento. Para realizar esto agrega las siguientes lineas en {{Filename|/etc/security/limits.conf}}:<br />
@pulse-rt - rtprio 9<br />
@pulse-rt - nice -11<br />
<br />
Después necesitas agregar tu usuario al grupo {{Codeline|pulse-rt}}:<br />
# gpasswd -a <user> pulse-rt<br />
<br />
==Ejecutandose==<br />
PulseAudio puede ser iniciado con:<br />
$ pulseaudio --start<br />
<br />
O si usas X11:<br />
$ start-pulseaudio-x11<br />
<br />
PulseAudio puede ser detenido con:<br />
$ pulseaudio --kill<br />
<br />
Tener en cuenta que en el caso de ciertos entornos X11, PulseAudio sera iniciado en el login. Ver la sección en Entornos de Escritorio para detalles.<br />
<br />
==Backend Configuration==<br />
<br />
===ALSA===<br />
Para las aplicaciones que no soportan PulseAudio y soportan ALSA es '''recomendable''' instalar el plugin PulseAudio para alsalibs. Este plugin está disponible en el paquete alsa-plugins.<br />
# pacman -S alsa-plugins<br />
<br />
Para que ALSA para usar PulseAudio es necesario modificar (o crear) {{Filename|/etc/asound.conf}} (configuración de todo el sistema) (recomendado) o {{Filename|~/.asoundrc}} (configuración de una base por usuario) para tener estas lineas:<br />
{{File|name=/etc/asound.conf|content=<br />
pcm.pulse {<br />
type pulse<br />
}<br />
ctl.pulse {<br />
type pulse<br />
}<br />
pcm.!default {<br />
type pulse<br />
}<br />
ctl.!default {<br />
type pulse<br />
}<br />
}}<br />
<br />
El paquete '''pulseaudio-alsa''' contiene contiene un adecuado archivo asound.conf.<br />
<br />
If you omit the last two groups, Pulseaudio will not be used by default. You will then need to change the ALSA device to "pulse" in the applications that you use to make it work.<br />
<br />
To prevent applications from using ALSA's OSS emulation and bypassing Pulseaudio (thereby preventing other applications from playing sound), remove the {{Codeline|snd-pcm-oss}} module by executing:<br />
$ rmmod snd-pcm-oss<br />
<br />
Afterwards, blacklist the module by adding {{Codeline|!snd-pcm-oss}} to MODULES in {{Filename|/etc/rc.conf}}.<br />
<br />
===OSS===<br />
There are multiple ways of making OSS-only programs play to PulseAudio:<br />
<br />
====padsp wrapper====<br />
If you have a program that uses OSS you can make it work with PulseAudio by starting it with padsp:<br />
$ padsp OSSprogram<br />
A few examples:<br />
$ padsp aumix<br />
$ padsp sox foo.wav -t ossdsp /dev/dsp<br />
<br />
If you prefer you can rename the program OSSprogram-real and replace it with a script like this: <br />
{{File|name=/usr/bin/OSSProgram|content=<br />
#!/bin/sh<br />
if test -x /usr/bin/padsp; then<br />
exec /usr/bin/padsp /usr/bin/OSSprogram-real "$@"<br />
else<br />
exec /usr/bin/OSSprogram "$@"<br />
fi<br />
}}<br />
<br />
====osspd====<br />
This method is more elaborate, but will allow you to avoid having to use a wrapper script.<br />
<br />
You will need to add {{Codeline|1=soundcore.preclaim_oss=0}} to the kernel parameters (/boot/grub/menu.lst) and also blacklist {{Codeline|snd-pcm-oss}} and {{Codeline|snd-mixer-oss}} in {{Filename|rc.conf}}.<br />
<br />
Install osspd (e.g. [http://aur.archlinux.org/packages.php?ID=31020 ossp] or [http://aur.archlinux.org/packages.php?ID=33455 ossp-git] from the AUR) and start it using:<br />
/etc/rc.d/osspd start<br />
<br />
Afterwards, add it to DAEMONS in rc.conf.<br />
<br />
===GStreamer===<br />
To make [[GStreamer]] use PulseAudio, you will need to install the gstreamer0.10-pulse package:<br />
# pacman -S gstreamer0.10-pulse<br />
<br />
Then, execute {{Filename|gstreamer-properties}} (part of ''gnome-media'' package) and select ''PulseAudio Sound Server'' in both Audio Input and Output. Alternatively, this can be done by setting the gconf variables {{Codeline|/system/gstreamer/0.10/default/audiosink}} to ''pulsesink'' and {{Codeline|/system/gstreamer/0.10/default/audiosrc}} to ''pulsesrc'':<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc<br />
<br />
Some applications (like Rhythmbox) ignore the ''audiosink'' property, but rely instead on ''musicaudiosink'', which can't be configured using {{Filename|gstreamer-properties}} but needs to be manually set using {{Filename|gconf-editor}} or the {{Filename|gconftool-2}}:<br />
$ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink<br />
<br />
===SDL===<br />
SDL in the extra repository does not provide Pulseaudio support. You will need to rebuild it from the [[ABS]]. No change to the PKGBUILD is neccessary.<br />
<br />
===OpenAL===<br />
OpenAL in the extra repository does not provide Pulseaudio support. You will need to rebuild it from the [[ABS]]. No change to the PKGBUILD is neccessary.<br />
<br />
OpenAL Soft should be configured to use PulseAudio: {{File|name=/etc/openal/alsoft.conf|content=drivers=pulse,alsa}}<br />
<br />
===libao===<br />
# pacman -Su libao-pulse<br />
<br />
Edit the libao configuration file:<br />
{{File|name=/etc/libao.conf|content=default_driver=pulse}}<br />
<br />
===PortAudio===<br />
The current binary of PortAudio in the community repository does not support PulseAudio and non-mmap audio devices. This can be remedied by building PortAudio from ABS and applying [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/portaudio/current/SOURCES/portaudio-19-alsa_pulse.patch?revision=313993 a patch] to the sources.<br />
<br />
===xine===<br />
Install [http://aur.archlinux.org/packages.php?ID=25978 xine-lib-pulse] from AUR - tested with Amarok 1.x<br />
<br />
==Desktop Environments==<br />
<br />
===General X11===<br />
Start Pulseaudio after X using:<br />
$ start-pulseaudio-x11<br />
<br />
This will start Pulseaudio and load the X11 plugins.<br />
<br />
If you use GNOME or KDE, Pulseaudio may already launch on login automatically.<br />
<br />
====X11 bell====<br />
To make Pulseaudio play a sample when an X11 bell event happens (e.g. to make your terminal go 'Ping!' instead of 'Beep!'), add the following to<br />
{{Filename|/etc/pulse/default.pa}}:<br />
load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/dialog-error.ogg<br />
load-module module-x11-bell sample=x11-bell <br />
<br />
You can also use another sample. {{Filename|dialog-error.ogg}} is provided by ''sound-theme-freedesktop''.<br />
<br />
===GNOME===<br />
Proper integration of PulseAudio into GNOME requires some special packages:<br />
* libcanberra-pulse<br />
* gnome-media-pulse<br />
* gnome-settings-daemon-pulse<br />
<br />
They are part of the ''pulseaudio-gnome'' group.<br />
<br />
===KDE 4===<br />
Add the following lines to your {{Filename|/etc/asound.conf}}:<br />
pcm.phononpulse {<br />
type plug<br />
slave.pcm {<br />
type pulse<br />
}<br />
hint {<br />
show on<br />
description "PulseAudio"<br />
}<br />
}<br />
<br />
Now you can change the output device in "System Settings -> Multimedia -> Device Preference" to ''PulseAudio''.<br />
<br />
Remember, if you have added the {{Codeline|pcm.!default}} lines to your {{filename|asound.conf}} you cannot switch between the ALSA and the PulseAudio playback.<br />
<br />
====Phonon====<br />
Due to compatibilty concerns there is no PulseAudio support for Phonon by default. There are two ways of making phonon work with PulseAudio. Either you have to make use of the xine backend by installing "phonon-xine". As xine has ESD support and PulseAudio is compatible with ESD it will work.<br />
<br />
If you want to stay with gstreamer as backend, you'll have to recompile the package with PulseAudio support. Therefore you'll have to get the PKGBUILD (e.g. with abs), and remove the line saying:<br />
-DWITH_PulseAudio=OFF<br />
<br />
Rebuild the package(s) and install them. Remember to setup gstreamer as mentioned above.<br />
<br />
An alternative way is to build phonon-git with pulseaudio support from AUR. Phonon 4.4.1 PulseAudio support don't work.<br />
<br />
==Applications==<br />
===VLC===<br />
If you are having audio problems with the audio playback of DVDs in VLC, uninstall VLC and install the vlc-nightly package from the AUR, and set the audio output method to ''Pulseaudio''.<br />
<br />
Alternative: [http://aur.archlinux.org/packages.php?ID=25257 vlc-pulse] from AUR.<br />
<br />
===mpd===<br />
There is a pulseaudio enabled version of mpd called [http://aur.archlinux.org/packages.php?ID=18722 mpd-pulse] in the AUR.Or you can rebuild the original updated package from ABS modifying the PKGBUILD. You can use yaourt either way.<br />
<br />
# from AUR<br />
yaourt -S mpd-pulse<br />
# also change to --disable-pulse --enable-pulse in the PKGBUILD from ABS<br />
yaourt -Sb mpd <br />
<br />
You will need to [http://mpd.wikia.com/wiki/PulseAudio configure] mpd to use Pulseaudio.<br />
<br />
<br />
If you run a system-wide daemon, you will need to add the ''mpd'' user to the ''pulse-access'' group in order for mpd to connect to the daemon.<br />
<br />
On a desktop, running mpd as yourself and not using the ''mpd'' user is preferred.<br />
<br />
===mplayer===<br />
The PulseAudio enabled version of mplayer is called [http://aur.archlinux.org/packages.php?ID=24344 mplayer-pulse] and is located in AUR. Alternatively, use SDL output: {{Codeline|1=ao=sdl:pulse}} or make use of abs and rebuild the package with "--enable-pulse".<br />
<br />
==Alternative configurations==<br />
===Surround sound systems===<br />
Many people have a surround card, but have speakers for just two channels, so PulseAudio cannot really default to a surround setup. To enable all the channels, edit {{Filename|/etc/pulse/daemon.conf}}: uncomment the default-sample-channels line (i.e. remove the semicolon from the beginning of the line) and set the value to '''6''' if you have a ''5.1'' setup, or '''8''' if you have ''7.1'' setup etc.<br />
# Default<br />
default-sample-channels=2<br />
# For 5.1<br />
default-sample-channels=6<br />
# For 7.1<br />
default-sample-channels=8<br />
<br />
After doing the edit, you will need to restart Pulseaudio.<br />
<br />
===ALSA Monitor source===<br />
To be able to record from a monitor source (a.k.a. "What-U-Hear", "Stereo Mix"), use {{Codeline|pactl list}} to find out the name of the source in Pulseaudio (e.g. {{Codeline|alsa_output.pci-0000_00_1b.0.analog-stereo.monitor}}). Then add lines like the following to {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:<br />
pcm.pulse_monitor {<br />
type pulse<br />
device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor<br />
}<br />
<br />
ctl.pulse_monitor {<br />
type pulse<br />
device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor<br />
}<br />
<br />
Now you can select {{Codeline|pulse_monitor}} as a recording source.<br />
<br />
===PulseAudio over network===<br />
One of PulseAudio's magnificent features is the possibility to stream audio from clients over TCP to the server running the PulseAudio daemon, allowing sound to be streamed through your LAN.<br />
<br />
To accomplish this, one needs to enable module-native-protocol-tcp, and copy the pulse-cookie to the clients. <br />
<br />
====System-wide daemon====<br />
<br />
{{Warning|System-wide mode is a '''bad idea''' on a desktop. By default, PulseAudio is run per-user and will be started automatically when it is needed; this is simpler, more efficient and more secure. Read [http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode What Is Wrong With System Mode] for more details.}}<br />
<br />
First you need to add the "pulseaudio" daemon to {{Filename|/etc/[[rc.conf]]}}. Example:<br />
DAEMONS=(syslog-ng network netfs crond '''pulseaudio''')<br />
<br />
Then you need to add each user (even root) that should be capable of using PulseAudio to the {{Codeline|pulse-access}} group: <br />
# gpasswd -a <user> pulse-access<br />
<br />
Edit {{Filename|/etc/pulse/system.pa}}, and change the following region:<br />
.ifexists module-hal-detect.so<br />
load-module module-hal-detect<br />
.else<br />
<br />
to the following:<br />
.ifexists module-udev-detect.so<br />
load-module module-udev-detect<br />
.else<br />
<br />
To enable the TCP module, add (or uncomment, if already there) this to {{Filename|/etc/pulse/system.pa}}:<br />
load-module module-native-protocol-tcp<br />
<br />
To allow remote connections to the TCP module, you also have to remember to unblock the service in {{Filename|/etc/hosts.allow}} with for example the following line:<br />
pulseaudio-native: ALL<br />
<br />
If you are running a system-wide PulseAudio instance, the cookie is located in {{Filename|/var/run/pulse/.pulse-cookie}}. This cookie needs to be sent to the client and placed somewhere the pulse-access group can read (and with permissions so only they can read it). Alternatively, you may add {{Codeline|1=auth-anonymous=1}} to the end of the {{Codeline|load-module module-native-protocol-tcp}} line to disable authentication. <br />
# scp /var/run/pulse/.pulse-cookie client:/etc/pulse-cookie<br />
<br />
# chown pulse:pulse-access /etc/pulse-cookie<br />
# chmod 640 /etc/pulse-cookie<br />
<br />
The pulse client needs to know where to look for the cookie.<br />
{{Filename|/etc/pulse/client.conf}}:<br />
### Cookie file<br />
cookie-file=/etc/pulse-cookie<br />
<br />
Then the client needs to be configured to connect to the specified server.<br />
{{Filename|/etc/pulse/client.conf}}:<br />
## The default server to connect to<br />
default-server=192.168.0.5<br />
<br />
To switch between servers on the client from within X, the {{Codeline|pax11publish}} command can be used. For example, to switch from the default server to the local server:<br />
<br />
$ pax11publish -e -S localhost<br />
<br />
Or to switch back to the default:<br />
<br />
$ pax11publish -e -r<br />
<br />
Note that for the switch to become apparent, the programs using Pulse must be restarted.<br />
<br />
To use the ESounD wrapper while using a system-wide daemon, you also need to enable auth-anonymous for the esound-unix module, or copy {{Filename|/var/run/pulse/.esd_auth}} into each home directory.<br />
<br />
====Zeroconf (Avahi) publishing====<br />
For the remote Pulseaudio server to appear in the PulseAudio Device Chooser ({{Filename|padevchooser}}), you will also need to add the {{Filename|avahi-daemon}} to the DAEMONS in rc.conf on both server and clients.<br />
<br />
===Pulseaudio through JACK===<br />
The JACK-Audio-Connection-Kit is popular for audio work, and is widely supported by Linux audio applications. It fills a similar niche as Pulseaudio, but with more of an emphasis on professional audio work. In particular, audio applications such as Ardour and Audacity (recently) work well with Jack.<br />
<br />
Pulseaudio provides module-jack-source and module-jack-sink which allow Pulseaudio to be run as a sound server above the JACK daemon. This allows the usage of per-volume adjustments and the like for the apps which need it, play-back apps for movies and audio, while allowing low-latency and inter-app connectivity for sound-processing apps which connect to JACK. However, this will prevent Pulseaudio from directly writing to the sound card buffers, which will increase overall CPU usage.<br />
<br />
To just try PA on top of jack you can have PA load the necessary modules on start:<br />
pulseaudio -L module-jack-sink -L module-jack-source<br />
<br />
To use pulseaudio with JACK, JACK must be started up before Pulseaudio, using whichever method you prefer. Pulseaudio then needs to be started loading the 2 relevant modules. Edit {{Filename|/etc/pulse/default.pa}}, and change the following region:<br />
### Load audio drivers statically (it is probably better to not load<br />
### these drivers manually, but instead use module-hal-detect --<br />
### see below -- for doing this automatically)<br />
#load-module module-alsa-sink<br />
#load-module module-alsa-source device=hw:1,0<br />
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-null-sink<br />
#load-module module-pipe-sink<br />
<br />
### Automatically load driver modules depending on the hardware available<br />
.ifexists module-udev-detect.so<br />
load-module module-udev-detect<br />
.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack udev support)<br />
load-module module-detect<br />
.endif<br />
<br />
to the following:<br />
### Load audio drivers statically (it is probably better to not load<br />
### these drivers manually, but instead use module-hal-detect --<br />
### see below -- for doing this automatically)<br />
#load-module module-alsa-sink<br />
#load-module module-alsa-source device=hw:1,0<br />
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input<br />
#load-module module-null-sink<br />
#load-module module-pipe-sink<br />
load-module module-jack-source<br />
load-module module-jack-sink<br />
<br />
### Automatically load driver modules depending on the hardware available<br />
#.ifexists module-udev-detect.so<br />
#load-module module-udev-detect<br />
#.else<br />
### Alternatively use the static hardware detection module (for systems that<br />
### lack udev support)<br />
#load-module module-detect<br />
#.endif<br />
<br />
Basically, this prevents module-udev-detect from loading. module-udev-detect will always try to grab your sound-card (JACK has already done that, so this will cause an error). Also, the jack source and sink must be explicitly loaded.<br />
<br />
====QjackCtl with Startup/Shutdown Scripts====<br />
Using the settings listed above you can use QjackCtl to execute a script upon startup and shutdown to load/unload PulseAudio. Part of the reason you may wish to do this is that the above changes disable PulseAudio's automatic hardware detection modules. This particular setup is for using PulseAudio in an exclusive fashion with JACK, though the scripts could be modified to unload and load an alternate non-JACK setup, but killing and starting PulseAudio while programs might be using it would become problematic.<br />
<br />
The following example could be used and modified as necessary as a startup script that daemonizes PulseAudio and loads the ''padevchooser'' program (optional, needs to be built from AUR) called {{Filename|jack_startup}}:<br />
#!/bin/bash<br />
#Load PulseAudio and PulseAudio Device Chooser<br />
<br />
pulseaudio -D<br />
padevchooser&<br />
<br />
as well as a shutdown script to kill PulseAudio and the Pulse Audio Device Chooser, as another example called {{Filename|jack_shutdown}} also in the home directory:<br />
#!/bin/bash<br />
#Kill PulseAudio and PulseAudio Device Chooser<br />
<br />
pulseaudio --kill<br />
killall padevchooser<br />
<br />
Both scripts need to be made executable:<br />
chmod +x jack_startup jack_shutdown<br />
<br />
then with QjackCtl loaded, click on the ''Setup'' button and then the ''Options'' tab and tick both "Execute Script after Startup:" And "Execute Script on Shutdown:" and put either use the ... button or type the path to the scripts (assuming the scripts are in the home directory) {{Filename|~/jack_startup}} and {{Filename|~/jack_shutdown}} making sure to save the changes you have made.<br />
<br />
===Pulseaudio through OSS===<br />
Add the following to {{Filename|/etc/pulse/default.pa}}:<br />
load-module module-oss<br />
<br />
Then start Pulseaudio as usual. You should have sinks and sources for your OSS devices.<br />
<br />
===Pulseaudio from within a chroot (ex. 32-bit chroot in 64-bit install)===<br />
Since a chroot sets up an alternative root for the running/jailing of applications, pulseaudio must be installed within the chroot itself ({{Codeline|pacman -S pulseaudio}} within the chroot environment).<br />
<br />
Pulseaudio, if not set up to connect to any specific server (this can be done in {{Filename|/etc/pulse/client.conf}}, through the PULSE_SERVER environment variable, or through publishing to the local X11 properties using module-x11-publish), will attempt to connect to the local pulse server, failing which it will spawn a new pulse server. Each pulse server has a unique ID based on the machine-id value in {{Filename|/var/lib/dbus}}. To allow for chrooted apps to access the pulse server, the following directories must be mounted within the chroot:-<br />
/var/run<br />
/var/lib/dbus<br />
/tmp<br />
~/.pulse<br />
<br />
{{Filename|/dev/shm}} should also be mounted for efficiency and good performance. Note that mounting /home would normally also allow sharing of the {{Filename|~/.pulse}} folder.<br />
<br />
For specific direction on accomplishing the appropriate mounts, please refer to the wiki on installing a bundled 32-bit system, especially the [http://wiki.archlinux.org/index.php?title=Arch64_Install_bundled_32bit_system#Additional_mount_option_to_allow_32-bit_apps_to_access_the_64-bit_Pulseaudio_server additional section] specific to Pulseaudio.<br />
<br />
==Troubleshooting==<br />
===No sound after install===<br />
====No cards====<br />
If PulseAudio starts, run {{Codeline|pacmd list}}. If no cards are reported, make sure that your ALSA devices are not in use:<br />
$ fuser -v /dev/snd/*<br />
$ fuser -v /dev/dsp<br />
<br />
Make sure any applications using the pcm or dsp files are shut down before restarting PulseAudio.<br />
<br />
====Muted audio device====<br />
If you experience no audio output via any means while using ALSA as your default device, you may have to unmute your sound card. To do this, you will want to launch alsamixer and make sure each column has a green 00 under it (this can be toggled by pressing 'm')<br />
$ alsamixer -c 0<br />
<br />
Sometimes the snd_pcsp driver conflicts with the snd_hda_intel driver (for those of you<br />
using Intel cards) and no sound output is experienced. To fix this, you can blacklist the<br />
snd_pcsp driver in the MODULES array of {{Filename|/etc/rc.conf}} (by appending {{Codeline|!snd_pcsp}}).<br />
<br />
===Daemon startup failed===<br />
Try resetting PulseAudio. To do that:<br />
$ pulseaudio --kill<br />
$ killall pulseaudio<br />
$ killall -9 pulseaudio<br />
$ rm -rf ~/.pulse*<br />
$ rm -rf /tmp/pulse*<br />
<br />
Afterwards, start PulseAudio again.<br />
<br />
===padevchooser===<br />
If you cannot launch the PulseAudio Device Chooser, first (re)start the Avahi daemon as follows:<br />
$ /etc/rc.d/avahi-daemon restart<br />
<br />
===Glitches and high CPU usage since 0.9.14===<br />
The PulseAudio sound server has been rewritten to use timer-based audio scheduling instead of the traditional interrupt-driven approach. Timer-based scheduling may expose issues in some Alsa drivers. To turn timer-based scheduling off, replace the line:<br />
load-module module-udev-detect <br />
in {{Filename|/etc/pulse/default.pa}} by:<br />
load-module module-udev-detect tsched=0<br />
<br />
===Choppy sound===<br />
Choppy sound in pulsaudio can result from wrong settings for the sample rate in /etc/pulse/deamon.conf. Try changing the line <br />
; default-sample-rate = 44100<br />
to <br />
default-sample-rate = 48000<br />
and restart the pulsaudio server by executing<br />
pulseaudio --kill && pulseaudio --start<br />
<br />
==See also==<br />
*[[Allow multiple programs to play sound at once]]<br />
<br />
==External links==<br />
*[http://www.pulseaudio.org/wiki/PerfectSetup http://www.pulseaudio.org/wiki/PerfectSetup] - A good guide to make your configuration perfect<br />
*[http://www.alsa-project.org/main/index.php/Asoundrc http://www.alsa-project.org/main/index.php/Asoundrc] - Alsa wiki on .asoundrc<br />
*[http://www.pulseaudio.org/ http://www.pulseaudio.org/] - PulseAudio official site<br />
*[http://www.pulseaudio.org/wiki/FAQ http://www.pulseaudio.org/wiki/FAQ] - PulseAudio FAQ</div>Aitorpazos