https://wiki.archlinux.org/api.php?action=feedcontributions&user=Mortan1961&feedformat=atomArchWiki - User contributions [en]2024-03-29T11:24:37ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:AMDGPU&diff=569191Talk:AMDGPU2019-03-20T04:15:16Z<p>Mortan1961: /* DC for Pre-Vega Cards */ Close</p>
<hr />
<div>== Supported Hardware ==<br />
I just crawled the product names "Radeon xyz" of VI/CI GPUs together and was going to go on for professional products "FirePro xzy", too.<br />
<br />
Afaik, there is no such complete listing on the web. There is a lot of confusion about the code and product names, due to AMD repeatedly rebranding their products and even change code names for same GPUs (Tonga = Antigua, Hawaii = Grenada, Carrizo = Bristol Ridge?, ...)<br />
<br />
When I started using gnu/linux, the arch wiki was a great help and there are still a lot of people struggling with graphics drivers. Now I know it is not hard to understand, but it is still confusing for beginners, coming from windows and just being used to install one software suite (not a drm driver, libdrm, mesa, gallium, etc.), supporting all the current hardware.<br />
<br />
now everyone has to go through all of this every time to determine 1) which hardware is really in their product and 2) which driver suits their hardware<br />
<br />
<br />
tl;dr I think maintaining such a list would be really useful for beginners, maybe not here but in a separate article?<br />
[[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 09:27, 16 February 2016 (UTC)<br />
<br />
:Well, [https://wiki.gentoo.org/wiki/Amdgpu#Feature_support Gentoo wiki] has a simple two-line summary. If it's still not sufficiently clear or the list is already much larger, I guess we could have a separate subpage to not clutter the main page... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:20, 16 February 2016 (UTC)<br />
<br />
:: yes, in the meantime I also found this table. It looks good but it is not complete. And completing the list would blow up the table cells a lot. I guess we should wait until vulkan and the new OpenCL driver has been released. Until then, there is no real reason for owners of pre-VI hardware to switch over to amdgpu. All vi and post-vi will be covered, so there is no need to list those separately. For the others I could create a subpage when switching to amdgpu gives you the opportunity for opencl 2.1 and vulkan -- [[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 10:50, 16 February 2016 (UTC)<br />
<br />
== Enable amdgpu for Sea Islands Cards ==<br />
testing my Hawaii card w/ amdgpu last week, sound did not work, even though 6 pcm/hdmi audio devices were listed. Might be added as an issue (as I think this is important deciding between radeon and amdgpu), but needs further investigation/confirmation from other testers.<br />
[[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 09:53, 16 February 2016 (UTC)<br />
:Please remember the AMDGPU is still in beta, and there's still info and knowledge/experience missing (e.g. most users use the Radeon driver).<br />
:AMD isn't that great in providing info and so far a lot of users are confused about their hardware support in use with amdgpu.<br />
:Remember there are flags like {{ic|exp_hw_support}}. More info need to be added, but it will take some time.<br />
:[[User:Francoism|Francoism]] ([[User talk:Francoism|talk]]) 13:14, 16 February 2016 (UTC)<br />
: It does indeed seem like that was no CI issue. Audio over hdmi is not supported by amdgpu atm, respectively only with the (upcoming) DAL changes[http://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/open-source-amd-linux/853189-audio-over-hdmi-tonga-and-amdgpu], although it is listed as 'done' [http://xorg.freedesktop.org/wiki/RadeonFeature/ here]. [[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 15:59, 22 February 2016 (UTC)<br />
<br />
== Sea Islands cards not working with 4.5.x? ==<br />
I stumbled across this wiki page in hopes of getting more performance after seeing Michael from Phoronix get his 290 working with this. Following through all the instructions, menuconfiging and compiling new kernels, in the end all I get is a blank screen with my r9 390. No errors on Xorg.0.log. Can anyone confirm that it isn't just me?<br />
[[User:Katorisenko|Katorisenko]] ([[User talk:Katorisenko|talk]]) 07:46, 24 April 2016 (UTC)<br />
<br />
== AMDGPU and HDMI Audio ==<br />
<br />
According to [https://bugzilla.freedesktop.org/show_bug.cgi?id=92827#c2 this Freedesktop.org bug comment], HDMI audio support in AMDGPU requires DAL which is "not upstream yet", and won't be anytime soon according to [http://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-DC-DRM-No this Phoronix article]. I'm currently struggling to make my HDMI audio work with my AMD Radeon R9 380; if this happens to be impossible with AMDGPU, should we mention it in the "Troubleshooting" section of this page? --[[User:Hellpe|Hellpe]] ([[User talk:Hellpe|talk]]) 23:26, 3 January 2017 (UTC)<br />
<br />
:I am in favor of adding the information notice to the troubleshooting section. I think users who do not keep up with the news will be confused when Pulseaudio seems to add the HDMI audio devices, despite them being non-functional until the DAL code is refactored and accepted upstream then pushed to regular users. I know it was not immediately clear to me when I upgraded from my radeonsi card to an RX series amdgpu card until I did some reading. I "think" currently the only way to get HDMI audio is to use the AMDGPU-PRO driver for the time being. [[User:Ase1590|Ase1590]] ([[User talk:Ase1590|talk]]) 15:48, 4 January 2017 (UTC)<br />
<br />
::I have it working with an R9 380 under Xorg. I did nothing special, simply disabled the built-in audio and enabled the HDMI audio. It does not work under Wayland however. Pavucontrol shows unavailable. [[User:Unit73e|Unit73e]] ([[User talk:Unit73e|talk]]) 12:22, 2 December 2017 (UTC)<br />
<br />
== Some experiments with integrated AMD graphics ==<br />
<br />
Some results after playing with "radeon" and "amdgpu" drivers and gnome (for AMD A10 7850K):<br />
<br />
- Having both drivers loaded causes systemd to hang at system shutdown (xorg). Using amdgpu and blacklisting radeon or using radeon and blacklisting amdgpu both fix this problem.<br />
<br />
- Having amdgpu driver without mkinitcpio.conf entry causes<br />
1. Wayland can't be enabled (always in xorg mode) and XDG_SESSION_TYPE shows "x11"<br />
2. HDMI sound output is shown only in rare cases<br />
<br />
- Having amdgpu driver with mkinitcpio.conf entry causes<br />
1. Wayland is enabled by default and XDG_SESSION_TYPE shows "wayland"<br />
2. HDMI sound is always disabled<br />
<br />
- Having radeon driver without mkinitcpio.conf entry causes<br />
1. Wayland can't be enabled (always in xorg mode) and XDG_SESSION_TYPE shows "x11"<br />
2. HDMI sound is always correctly detected and working<br />
<br />
- Having radeon driver with mkinitcpio.conf entry<br />
1. Wayland is enabled by default and XDG_SESSION_TYPE shows "wayland"<br />
2. HDMI sound is always correctly detected and working<br />
<br />
[[User:Beoldhin|Beoldhin]] ([[User talk:Beoldhin|talk]]) 19:07, 23 May 2017 (UTC)<br />
<br />
Update: with kernel 4.11.2-1: HDMI sound output is now working with "amdgpu" but only in as "Gnome in xorg" login option (still no sound with Wayland). There are still some graphical glitches when running Wayland with the radeon driver: external screen doesn't turn off after timeout, windows can't be maximized with the "wmctrl" command and updating text in terminal causes some text updating problems (these don't exist with xorg, amdgpu and radeon both work fine). So in summary: I can now select either amdgpu or radeon driver but Wayland is still unstable.<br />
<br />
[[User:Beoldhin|Beoldhin]] ([[User talk:Beoldhin|talk]]) 19:07, 23 May 2017 (UTC)<br />
<br />
== Vega Changes for Wiki ==<br />
<br />
With Vega releasing around the end of the month, the DC/DAL is still not it the kernel. Should we just put a note for users to use the AMDGPU-PRO drivers if they have VEGA cards? We could possibly add a note saying that in the AUR, there is an alternate kernel built from their repos with the DC/DAL code. <br />
Alternate kernel--> https://aur.archlinux.org/packages/linux-amd-staging-git/ [[User:Sesese9|Sesese9]] ([[User talk:Sesese9|talk]]) 00:40, 10 July 2017 (UTC)<br />
<br />
== Moving "Enable GPU display scaling" to xrandr ==<br />
<br />
I thought about it to put this under xrandr directly, but for example for my integrated Intel 6th gen GPU I don't have the "scaling mode" option, and I don't know about NVIDIA.<br />
And even if the "scaling mode" option exists for other vendors and or cards, I don't know if the possible values for "scaling mode" are the same everywhere, as far as I remember there are not.<br />
That was the reason I did put it here. [[User:Bertl|Bertl]] ([[User talk:Bertl|talk]]) 16:01, 18 February 2018 (UTC)<br />
:Ok, looks like [[Intel_graphics#Setting_scaling_mode|Intel]] uses the same settings, but it's only available for internal (LVDS, eDP) ports, but at least according to https://bugs.freedesktop.org/show_bug.cgi?id=90989 it also uses "None, Full, Center, Full aspect".<br />
:I know that radeonsi uses the same commands, but still don't know about NVIDIA.<br />
:But yea, now I also think that it should be moved and the [[Intel_graphics#Setting_scaling_mode|Intel]] section should be merged into it. [[User:Bertl|Bertl]] ([[User talk:Bertl|talk]]) 18:37, 18 February 2018 (UTC)<br />
<br />
== Update on kernel parameters ==<br />
<br />
this part does not seems to be required on 4.17:<br />
<br />
>> Also, since kernel 4.13, adding the amdgpu.si_support=1 radeon.si_support=0 or amdgpu.cik_support=1 radeon.cik_support=0 kernel parameter is required. Otherwise, AMDGPU will not start and you will end up with either radeon being used instead or the display being frozen during the boot.<br />
<br />
{{unsigned|12:10, 22 April 2018|Lesto}}<br />
<br />
== Renaming AMDGPU-PRO to Radeon Software for Linux? ==<br />
<br />
So AMD basically changed the name of their AMDGPU-PRO driver as simply Radeon™ Software for Linux, see [https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx 17.40], [https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-Release-Notes.aspx 18.10] and [https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-18.20-Early-Preview-Release-Notes.aspx 18.20 preview] release notes. With that in mind, should the names on wiki be slowly changed, or the alternative name/note being added somewhere? I'm not sure if AMDGPU-PRO is still used by AMD officially and whether AMDGPU (without PRO) term is being used as well, but the name sure definitely stuck among community – any ideas? [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 17:33, 11 May 2018 (UTC)<br />
<br />
EDIT: Probably worth noticing is the similar situation happened between [[Fglrx]] and [[AMD Catalyst]] naming back then. [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 17:38, 11 May 2018 (UTC)<br />
<br />
== AMDGPU PRO downgrade versions ==<br />
There is information in page that "A downgrade of the linux (4.9) and Xorg (1.18) packages is required to use AMDGPU PRO 17.10." Is it still true? Did not AMDGPU PRO driver got updated? Afaik, ubuntu provides this proprietary driver, but has more recent kernel.<br />
[[User:Ashark|Ashark]] ([[User talk:Ashark|talk]]) 12:48, 16 November 2018 (UTC)<br />
<br />
: Currently, Yes. The [https://aur.archlinux.org/packages/amdgpu-pro/ AMDGPU-Pro AUR] has not been updated in some time and (as of this post) is still at version 17.40. [[User:Taurolyon|<span style="text-shadow: 0.1em 0.1em 0.09em #FFFF00; font-family:times; font-size:14px; FONT-WEIGHT: bold; color: #FF7C00; background-color:transparent">''"Tauro"''</span>]] ([[Special:Contributions/Taurolyon|Contributions]] <span style{{=}}"color: #FF7F00;">&bull;</span> [[User_talk:Taurolyon|Message]]) 20:40, 29 December 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:AMDGPU&diff=569190Talk:AMDGPU2019-03-20T04:14:38Z<p>Mortan1961: /* No 120hz with 4.15 kernel and DC enabled */ Close</p>
<hr />
<div>== Supported Hardware ==<br />
I just crawled the product names "Radeon xyz" of VI/CI GPUs together and was going to go on for professional products "FirePro xzy", too.<br />
<br />
Afaik, there is no such complete listing on the web. There is a lot of confusion about the code and product names, due to AMD repeatedly rebranding their products and even change code names for same GPUs (Tonga = Antigua, Hawaii = Grenada, Carrizo = Bristol Ridge?, ...)<br />
<br />
When I started using gnu/linux, the arch wiki was a great help and there are still a lot of people struggling with graphics drivers. Now I know it is not hard to understand, but it is still confusing for beginners, coming from windows and just being used to install one software suite (not a drm driver, libdrm, mesa, gallium, etc.), supporting all the current hardware.<br />
<br />
now everyone has to go through all of this every time to determine 1) which hardware is really in their product and 2) which driver suits their hardware<br />
<br />
<br />
tl;dr I think maintaining such a list would be really useful for beginners, maybe not here but in a separate article?<br />
[[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 09:27, 16 February 2016 (UTC)<br />
<br />
:Well, [https://wiki.gentoo.org/wiki/Amdgpu#Feature_support Gentoo wiki] has a simple two-line summary. If it's still not sufficiently clear or the list is already much larger, I guess we could have a separate subpage to not clutter the main page... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:20, 16 February 2016 (UTC)<br />
<br />
:: yes, in the meantime I also found this table. It looks good but it is not complete. And completing the list would blow up the table cells a lot. I guess we should wait until vulkan and the new OpenCL driver has been released. Until then, there is no real reason for owners of pre-VI hardware to switch over to amdgpu. All vi and post-vi will be covered, so there is no need to list those separately. For the others I could create a subpage when switching to amdgpu gives you the opportunity for opencl 2.1 and vulkan -- [[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 10:50, 16 February 2016 (UTC)<br />
<br />
== Enable amdgpu for Sea Islands Cards ==<br />
testing my Hawaii card w/ amdgpu last week, sound did not work, even though 6 pcm/hdmi audio devices were listed. Might be added as an issue (as I think this is important deciding between radeon and amdgpu), but needs further investigation/confirmation from other testers.<br />
[[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 09:53, 16 February 2016 (UTC)<br />
:Please remember the AMDGPU is still in beta, and there's still info and knowledge/experience missing (e.g. most users use the Radeon driver).<br />
:AMD isn't that great in providing info and so far a lot of users are confused about their hardware support in use with amdgpu.<br />
:Remember there are flags like {{ic|exp_hw_support}}. More info need to be added, but it will take some time.<br />
:[[User:Francoism|Francoism]] ([[User talk:Francoism|talk]]) 13:14, 16 February 2016 (UTC)<br />
: It does indeed seem like that was no CI issue. Audio over hdmi is not supported by amdgpu atm, respectively only with the (upcoming) DAL changes[http://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/open-source-amd-linux/853189-audio-over-hdmi-tonga-and-amdgpu], although it is listed as 'done' [http://xorg.freedesktop.org/wiki/RadeonFeature/ here]. [[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 15:59, 22 February 2016 (UTC)<br />
<br />
== Sea Islands cards not working with 4.5.x? ==<br />
I stumbled across this wiki page in hopes of getting more performance after seeing Michael from Phoronix get his 290 working with this. Following through all the instructions, menuconfiging and compiling new kernels, in the end all I get is a blank screen with my r9 390. No errors on Xorg.0.log. Can anyone confirm that it isn't just me?<br />
[[User:Katorisenko|Katorisenko]] ([[User talk:Katorisenko|talk]]) 07:46, 24 April 2016 (UTC)<br />
<br />
== AMDGPU and HDMI Audio ==<br />
<br />
According to [https://bugzilla.freedesktop.org/show_bug.cgi?id=92827#c2 this Freedesktop.org bug comment], HDMI audio support in AMDGPU requires DAL which is "not upstream yet", and won't be anytime soon according to [http://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-DC-DRM-No this Phoronix article]. I'm currently struggling to make my HDMI audio work with my AMD Radeon R9 380; if this happens to be impossible with AMDGPU, should we mention it in the "Troubleshooting" section of this page? --[[User:Hellpe|Hellpe]] ([[User talk:Hellpe|talk]]) 23:26, 3 January 2017 (UTC)<br />
<br />
:I am in favor of adding the information notice to the troubleshooting section. I think users who do not keep up with the news will be confused when Pulseaudio seems to add the HDMI audio devices, despite them being non-functional until the DAL code is refactored and accepted upstream then pushed to regular users. I know it was not immediately clear to me when I upgraded from my radeonsi card to an RX series amdgpu card until I did some reading. I "think" currently the only way to get HDMI audio is to use the AMDGPU-PRO driver for the time being. [[User:Ase1590|Ase1590]] ([[User talk:Ase1590|talk]]) 15:48, 4 January 2017 (UTC)<br />
<br />
::I have it working with an R9 380 under Xorg. I did nothing special, simply disabled the built-in audio and enabled the HDMI audio. It does not work under Wayland however. Pavucontrol shows unavailable. [[User:Unit73e|Unit73e]] ([[User talk:Unit73e|talk]]) 12:22, 2 December 2017 (UTC)<br />
<br />
== Some experiments with integrated AMD graphics ==<br />
<br />
Some results after playing with "radeon" and "amdgpu" drivers and gnome (for AMD A10 7850K):<br />
<br />
- Having both drivers loaded causes systemd to hang at system shutdown (xorg). Using amdgpu and blacklisting radeon or using radeon and blacklisting amdgpu both fix this problem.<br />
<br />
- Having amdgpu driver without mkinitcpio.conf entry causes<br />
1. Wayland can't be enabled (always in xorg mode) and XDG_SESSION_TYPE shows "x11"<br />
2. HDMI sound output is shown only in rare cases<br />
<br />
- Having amdgpu driver with mkinitcpio.conf entry causes<br />
1. Wayland is enabled by default and XDG_SESSION_TYPE shows "wayland"<br />
2. HDMI sound is always disabled<br />
<br />
- Having radeon driver without mkinitcpio.conf entry causes<br />
1. Wayland can't be enabled (always in xorg mode) and XDG_SESSION_TYPE shows "x11"<br />
2. HDMI sound is always correctly detected and working<br />
<br />
- Having radeon driver with mkinitcpio.conf entry<br />
1. Wayland is enabled by default and XDG_SESSION_TYPE shows "wayland"<br />
2. HDMI sound is always correctly detected and working<br />
<br />
[[User:Beoldhin|Beoldhin]] ([[User talk:Beoldhin|talk]]) 19:07, 23 May 2017 (UTC)<br />
<br />
Update: with kernel 4.11.2-1: HDMI sound output is now working with "amdgpu" but only in as "Gnome in xorg" login option (still no sound with Wayland). There are still some graphical glitches when running Wayland with the radeon driver: external screen doesn't turn off after timeout, windows can't be maximized with the "wmctrl" command and updating text in terminal causes some text updating problems (these don't exist with xorg, amdgpu and radeon both work fine). So in summary: I can now select either amdgpu or radeon driver but Wayland is still unstable.<br />
<br />
[[User:Beoldhin|Beoldhin]] ([[User talk:Beoldhin|talk]]) 19:07, 23 May 2017 (UTC)<br />
<br />
== Vega Changes for Wiki ==<br />
<br />
With Vega releasing around the end of the month, the DC/DAL is still not it the kernel. Should we just put a note for users to use the AMDGPU-PRO drivers if they have VEGA cards? We could possibly add a note saying that in the AUR, there is an alternate kernel built from their repos with the DC/DAL code. <br />
Alternate kernel--> https://aur.archlinux.org/packages/linux-amd-staging-git/ [[User:Sesese9|Sesese9]] ([[User talk:Sesese9|talk]]) 00:40, 10 July 2017 (UTC)<br />
<br />
==<s> DC for Pre-Vega Cards </s>==<br />
<br />
As far as I can tell, the Arch Linux kernel config enables DC by default for all (supported?) cards: https://git.archlinux.org/svntogit/packages.git/tree/trunk/config?h=packages/linux#n5725<br />
Should the section on enabling DC be removed or changed? [[User:Aereaux|Aereaux]] ([[User talk:Aereaux|talk]]) 23:39, 6 February 2018 (UTC)<br />
:Can't check at the moment, but doesn't that require setting the kernel parameter as well? Also, keep in mind the custom [[kernels]]. [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 02:51, 10 February 2018 (UTC)<br />
::I'm not sure how to check, but according to https://cateee.net/lkddb/web-lkddb/DRM_AMD_DC_PRE_VEGA.html , CONFIG_DRM_AMD_DC_PRE_VEGA=y enables it by default. It looks like it was already changed in the wiki, though. [[User:Aereaux|Aereaux]] ([[User talk:Aereaux|talk]]) 03:06, 10 February 2018 (UTC)<br />
<br />
== Moving "Enable GPU display scaling" to xrandr ==<br />
<br />
I thought about it to put this under xrandr directly, but for example for my integrated Intel 6th gen GPU I don't have the "scaling mode" option, and I don't know about NVIDIA.<br />
And even if the "scaling mode" option exists for other vendors and or cards, I don't know if the possible values for "scaling mode" are the same everywhere, as far as I remember there are not.<br />
That was the reason I did put it here. [[User:Bertl|Bertl]] ([[User talk:Bertl|talk]]) 16:01, 18 February 2018 (UTC)<br />
:Ok, looks like [[Intel_graphics#Setting_scaling_mode|Intel]] uses the same settings, but it's only available for internal (LVDS, eDP) ports, but at least according to https://bugs.freedesktop.org/show_bug.cgi?id=90989 it also uses "None, Full, Center, Full aspect".<br />
:I know that radeonsi uses the same commands, but still don't know about NVIDIA.<br />
:But yea, now I also think that it should be moved and the [[Intel_graphics#Setting_scaling_mode|Intel]] section should be merged into it. [[User:Bertl|Bertl]] ([[User talk:Bertl|talk]]) 18:37, 18 February 2018 (UTC)<br />
<br />
== Update on kernel parameters ==<br />
<br />
this part does not seems to be required on 4.17:<br />
<br />
>> Also, since kernel 4.13, adding the amdgpu.si_support=1 radeon.si_support=0 or amdgpu.cik_support=1 radeon.cik_support=0 kernel parameter is required. Otherwise, AMDGPU will not start and you will end up with either radeon being used instead or the display being frozen during the boot.<br />
<br />
{{unsigned|12:10, 22 April 2018|Lesto}}<br />
<br />
== Renaming AMDGPU-PRO to Radeon Software for Linux? ==<br />
<br />
So AMD basically changed the name of their AMDGPU-PRO driver as simply Radeon™ Software for Linux, see [https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx 17.40], [https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-Release-Notes.aspx 18.10] and [https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-18.20-Early-Preview-Release-Notes.aspx 18.20 preview] release notes. With that in mind, should the names on wiki be slowly changed, or the alternative name/note being added somewhere? I'm not sure if AMDGPU-PRO is still used by AMD officially and whether AMDGPU (without PRO) term is being used as well, but the name sure definitely stuck among community – any ideas? [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 17:33, 11 May 2018 (UTC)<br />
<br />
EDIT: Probably worth noticing is the similar situation happened between [[Fglrx]] and [[AMD Catalyst]] naming back then. [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 17:38, 11 May 2018 (UTC)<br />
<br />
== AMDGPU PRO downgrade versions ==<br />
There is information in page that "A downgrade of the linux (4.9) and Xorg (1.18) packages is required to use AMDGPU PRO 17.10." Is it still true? Did not AMDGPU PRO driver got updated? Afaik, ubuntu provides this proprietary driver, but has more recent kernel.<br />
[[User:Ashark|Ashark]] ([[User talk:Ashark|talk]]) 12:48, 16 November 2018 (UTC)<br />
<br />
: Currently, Yes. The [https://aur.archlinux.org/packages/amdgpu-pro/ AMDGPU-Pro AUR] has not been updated in some time and (as of this post) is still at version 17.40. [[User:Taurolyon|<span style="text-shadow: 0.1em 0.1em 0.09em #FFFF00; font-family:times; font-size:14px; FONT-WEIGHT: bold; color: #FF7C00; background-color:transparent">''"Tauro"''</span>]] ([[Special:Contributions/Taurolyon|Contributions]] <span style{{=}}"color: #FF7F00;">&bull;</span> [[User_talk:Taurolyon|Message]]) 20:40, 29 December 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=ATI&diff=567431ATI2019-02-27T06:31:45Z<p>Mortan1961: /* Enable early KMS */ Link to Kernel mode setting#Early KMS start instead duplicating section.</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:ATI]]<br />
[[es:ATI]]<br />
[[fr:ATI]]<br />
[[it:ATI]]<br />
[[ja:ATI]]<br />
[[pl:ATI]]<br />
[[ru:ATI]]<br />
[[zh-hans:ATI]]<br />
{{Related articles start}}<br />
{{Related|AMD Catalyst}}<br />
{{Related|AMDGPU}}<br />
{{Related|Xorg}}<br />
{{Related|Vulkan}}<br />
{{Related articles end}}<br />
<br />
This article covers the [https://wiki.freedesktop.org/xorg/radeon/ radeon] open source driver which supports the majority of AMD (previously ATI) GPUs.<br />
<br />
== Selecting the right driver ==<br />
<br />
Depending on the card you have, find the right driver in [[Xorg#AMD]]. This page has instructions for '''ATI'''.<br />
<br />
If unsure, try this open source driver first, it will suit most needs and is generally less problematic. See the [https://www.x.org/wiki/RadeonFeature feature matrix] to know what is supported and the [https://www.x.org/wiki/RadeonFeature/#index5h2 decoder ring] to translate marketing names (e.g. Radeon HD4330) to chip names (e.g. R700).<br />
<br />
== Installation ==<br />
<br />
{{Note|If coming from the proprietary Catalyst driver, see [[AMD Catalyst#Uninstallation]] first.}}<br />
<br />
[[Install]] the {{Pkg|mesa}} package, which provides the DRI driver for 3D acceleration.<br />
<br />
* For 32-bit application support, also install the {{Pkg|lib32-mesa}} package from the [[multilib]] repostory.<br />
* For the DDX driver (which provides 2D acceleration in [[Xorg]]), install the {{Pkg|xf86-video-ati}} package.<br />
<br />
Support for [[#Enabling video acceleration|accelerated video decoding]] is provided by {{Pkg|mesa-vdpau}} and {{Pkg|lib32-mesa-vdpau}} packages.<br />
<br />
== Loading ==<br />
<br />
The radeon kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since radeon requires [[KMS]].<br />
* Also, check that you have not disabled radeon by using any [[Kernel_modules#Blacklisting|kernel module blacklisting]].<br />
<br />
=== Enable early KMS ===<br />
<br />
See [[Kernel mode setting#Early KMS start]].<br />
<br />
== Xorg configuration ==<br />
<br />
Xorg will automatically load the driver and it will use your monitor's EDID to set the native resolution. Configuration is only required for tuning the driver.<br />
<br />
If you want manual configuration, create {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}, and add the following:<br />
<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
EndSection<br />
<br />
Using this section, you can enable features and tweak the driver settings.<br />
<br />
== Performance tuning ==<br />
=== Enabling video acceleration ===<br />
<br />
See [[Hardware video acceleration]].<br />
<br />
=== Graphical tools ===<br />
<br />
* {{App|WattmanGTK|A GTK3 user-interface written in Python 3, which allows you to view, monitor Radeon performance, fan speeds and power states and the ability to overclock the graphics processor. It uses the AMDGPU kernel driver.|https://github.com/BoukeHaarsma23/WattmanGTK|{{AUR|wattman-gtk-git}}}}<br />
: {{Note|It is required to set a kernel parameter ({{ic|amdgpu.ppfeaturemask}}) in order to enable the AMD Overdrive technology within GNU/Linux. Which is necessary to use WattmanGTK.}}<br />
<br />
* {{App|radeon-profile|Qt application for displaying info about a Radeon card.|https://github.com/marazmista/radeon-profile|{{AUR|radeon-profile-git}}}}<br />
<br />
=== Driver options ===<br />
The following options apply to {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}.<br />
<br />
Please read {{man|4|radeon}} and [https://www.x.org/wiki/RadeonFeature/#index4h2 RadeonFeature] first before applying driver options.<br />
<br />
'''Acceleration architecture'''; Glamor is available as a 2D acceleration method implemented through OpenGL, and it [https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=f11531c99fcd6473f58b4d10efaf3efd84304d8e is the default] for R600 (Radeon HD2000 series) and newer graphic cards. Older cards use EXA.<br />
<br />
Option "AccelMethod" "glamor"<br />
<br />
'''DRI3''' is enabled by default [https://www.phoronix.com/scan.php?page=news_item&px=Radeon-AMDGPU-1.19-Updates since xf86-video-ati 7.8.0]. For older drivers, which use DRI2 by default, switch to DRI3 with the following option:<br />
<br />
Option "DRI" "3"<br />
<br />
'''TearFree''' is a tearing prevention option which prevents tearing by using the hardware page flipping mechanism:<br />
<br />
Option "TearFree" "on"<br />
<br />
'''ColorTiling''' and '''ColorTiling2D''' are supposed to be enabled by default. Tiled mode can provide significant performance benefits with 3D applications. It is disabled if the DRM module is too old or if the current display configuration does not support it. KMS ColorTiling2D is only supported on R600 (Radeon HD2000 series) and newer chips:<br />
<br />
Option "ColorTiling" "on"<br />
Option "ColorTiling2D" "on"<br />
<br />
When using Glamor as acceleration architecture, it is possible to enable the '''ShadowPrimary''' option, which enables a so-called "shadow primary" buffer for fast CPU access to pixel data, and separate scanout buffers for each display controller (CRTC). This may improve performance for some 2D workloads, potentially at the expense of other (e.g. 3D, video) workloads. Note that enabling this option currently disables Option "EnablePageFlip":<br />
<br />
Option "ShadowPrimary" "on"<br />
<br />
'''EXAVSync ''' is only available when using EXA and can be enabled to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been known to cause instability on some chips:<br />
<br />
Option "EXAVSync" "yes"<br />
<br />
Below is a sample configuration file of {{ic|/etc/X11/xorg.conf.d/'''20-radeon.conf'''}}:<br />
<br />
{{bc|<br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "AccelMethod" "glamor"<br />
Option "DRI" "3"<br />
Option "TearFree" "on"<br />
Option "ColorTiling" "on"<br />
Option "ColorTiling2D" "on"<br />
EndSection<br />
}}<br />
<br />
{{Tip|{{Pkg|driconf}} is a tool which allows several settings to be modified: vsync, anisotropic filtering, texture compression, etc. Using this tool it is also possible to "disable Low Impact fallback" needed by some programs (e.g. Google Earth).}}<br />
<br />
=== Kernel parameters ===<br />
{{Tip|You may want to debug the new parameters with {{ic|systool}} as stated in [[Kernel modules#Obtaining information]].}}<br />
<br />
Defining the '''gartsize''', if not autodetected, can be done by adding {{ic|1=radeon.gartsize=32}} as a [[kernel parameter]].<br />
<br />
{{Note|Setting this parameter should not be needed anymore with modern AMD video cards:<br />
{{bc|<nowiki><br />
[drm] Detected VRAM RAM=2048M, BAR=256M<br />
[drm] radeon: 2048M of VRAM memory ready<br />
[drm] radeon: 2048M of GTT memory ready.<br />
</nowiki>}}<br />
}}<br />
<br />
The changes take effect at the next reboot.<br />
<br />
==== Deactivating PCIe 2.0 ====<br />
<br />
Since kernel 3.6, PCI Express 2.0 in '''radeon''' is turned on by default.<br />
<br />
It may be unstable with some motherboards. It can be deactivated by adding {{ic|1=radeon.pcie_gen2=0}} as a [[kernel parameter]].<br />
<br />
See [https://www.phoronix.com/scan.php?page=article&item=amd_pcie_gen2&num=1 Phoronix article] for more information.<br />
<br />
=== Gallium Heads-Up Display ===<br />
<br />
The radeon driver supports the activation of a heads-up display (HUD) which can draw transparent graphs and text on top of applications that are rendering, such as games. These can show values such as the current frame rate or the CPU load for each CPU core or an average of all of them. The HUD is controlled by the GALLIUM_HUD environment variable, and can be passed the following list of parameters among others:<br />
*"fps" - displays current frames per second<br />
*"cpu" - displays the average CPU load<br />
*"cpu0" - displays the CPU load for the first CPU core<br />
*"cpu0+cpu1" - displays the CPU load for the first two CPU cores<br />
*"draw-calls" - displays how many times each material in an object is drawn to the screen<br />
*"requested-VRAM" - displays how much VRAM is being used on the GPU<br />
*"pixels-rendered" - displays how many pixels are being displayed<br />
<br />
To see a full list of parameters, as well as some notes on operating GALLIUM_HUD, you can also pass the "help" parameter to a simple application such as glxgears and see the corresponding terminal output:<br />
{{bc|1=# GALLIUM_HUD="help" glxgears }}<br />
<br />
More information can be found from this [https://lists.freedesktop.org/archives/mesa-dev/2013-March/036586.html mailing list post] or [https://kparal.wordpress.com/2014/03/03/fraps-like-fps-overlay-for-linux/ this blog post].<br />
<br />
== Hybrid graphics/AMD Dynamic Switchable Graphics ==<br />
<br />
It is the technology used on recent laptops equiped with two GPUs, one power-efficent (generally Intel integrated card) and one more powerful and more power-hungry (generally Radeon or Nvidia). There are two ways to get it work:<br />
<br />
* If it is not required to run 'GPU-hungry' applications, it is possible to disable the discrete card (see [https://help.ubuntu.com/community/HybridGraphics#Using_vga_switcheroo Ubuntu wiki]): {{ic|echo OFF > /sys/kernel/debug/vgaswitcheroo/switch}}.<br />
* [[PRIME]]: Is a proper way to use hybrid graphics on Linux, but still requires a bit of manual intervention from the user.<br />
<br />
== Powersaving ==<br />
{{Note|Power management is supported on all chips that include the appropriate power state tables in the vbios (R1xx and newer). "dpm" is only supported on R6xx and newer chips.}}<br />
<br />
With the radeon driver, power saving is disabled by default and has to be enabled manually if desired.<br />
<br />
You can choose between three different methods:<br />
<br />
# [[#Dynamic power management|dpm]] (enabled by default since kernel 3.13)<br />
# [[#Dynamic frequency switching|dynpm]]<br />
# [[#Profile-based frequency switching|profile]]<br />
<br />
See https://www.x.org/wiki/RadeonFeature/#index3h2 for more details.<br />
<br />
=== Dynamic power management ===<br />
<br />
Since kernel 3.13, DPM is enabled by default for [https://kernelnewbies.org/Linux_3.13#head-f95c198f6fdc7defe36f470dc8369cf0e16898df lots of AMD Radeon hardware]. If you want to disable it, add the parameter {{ic|1=radeon.dpm=0}} to the [[kernel parameters]].<br />
<br />
{{Tip| DPM works on R6xx gpus, but is not enabled by default in the kernel (only R7xx and up). Setting the {{ic|1=radeon.dpm=1}} kernel parameter will enable dpm.}}<br />
<br />
Unlike [[#Dynamic frequency switching|dynpm]], the "dpm" method uses hardware on the GPU to dynamically change the clocks and voltage based on GPU load. It also enables clock and power gating.<br />
<br />
There are 3 operation modes to choose from:<br />
<br />
* {{ic|battery}} lowest power consumption<br />
* {{ic|balanced}} sane default<br />
* {{ic|performance}} highest performance<br />
<br />
They can be changed via sysfs<br />
# echo battery > /sys/class/drm/card0/device/power_dpm_state<br />
<br />
For testing or debugging purposes, you can force the card to run in a set performance mode:<br />
<br />
* {{ic|auto}} default; uses all levels in the power state<br />
* {{ic|low}} enforces the lowest performance level<br />
* {{ic|high}} enforces the highest performance level<br />
<br />
# echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level<br />
<br />
==== Commandline Tools ====<br />
<br />
* [https://github.com/superjamie/snippets/blob/master/radcard radcard] - A script to get and set DPM power states and levels<br />
<br />
=== Old methods ===<br />
<br />
==== Dynamic frequency switching ====<br />
<br />
This method dynamically changes the frequency depending on GPU load, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The re-clocking is attempted during vertical blanking periods, but due to the timing of the re-clocking functions, does not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.<br />
<br />
It can be activated by simply running the following command:<br />
<br />
# echo dynpm > /sys/class/drm/card0/device/power_method<br />
<br />
==== Profile-based frequency switching ====<br />
<br />
This method will allow you to select one of the five profiles (described below). Different profiles, for the most part, end up changing the frequency/voltage of the GPU. This method is not as aggressive, but is more stable and flicker free and works with multiple heads active.<br />
<br />
To activate the method, run the following command:<br />
<br />
# echo profile > /sys/class/drm/card0/device/power_method<br />
<br />
Select one of the available profiles:<br />
* {{ic|default}} uses the default clocks and does not change the power state. This is the default behaviour.<br />
* {{ic|auto}} selects between {{ic|mid}} and {{ic|high}} power states based on the whether the system is on battery power or not.<br />
* {{ic|low}} forces the gpu to be in the {{ic|low}} power state all the time. Note that {{ic|low}} can cause display problems on some laptops, which is why {{ic|auto}} only uses {{ic|low}} when monitors are off. Selected on other profiles when the monitors are in the [[DPMS]]-off state.<br />
* {{ic|mid}} forces the gpu to be in the {{ic|mid}} power state all the time.<br />
* {{ic|high}} forces the gpu to be in the {{ic|high}} power state all the time.<br />
<br />
As an example, we will activate the {{ic|low}} profile (replace {{ic|low}} with any of the aforementioned profiles as necessary):<br />
<br />
# echo low > /sys/class/drm/card0/device/power_profile<br />
<br />
=== Persistent configuration ===<br />
<br />
The methods described above are not persistent. To make them persistent, you may create a [[udev]] rule (example for [[#Profile-based frequency switching]]):<br />
<br />
{{hc|/etc/udev/rules.d/30-radeon-pm.rules|<nowiki><br />
KERNEL=="dri/card0", SUBSYSTEM=="drm", DRIVERS=="radeon", ATTR{device/power_method}="profile", ATTR{device/power_profile}="low"<br />
</nowiki>}}<br />
<br />
As another example, [[#Dynamic power management|dynamic power management]] can be permanently forced to a certain performance level:<br />
<br />
{{hc|/etc/udev/rules.d/30-radeon-pm.rules|<nowiki><br />
KERNEL=="dri/card0", SUBSYSTEM=="drm", DRIVERS=="radeon", ATTR{device/power_dpm_force_performance_level}="high"<br />
</nowiki>}}<br />
<br />
{{Note|If the above rules are failing, try removing the {{ic|dri/}} prefix.}}<br />
<br />
=== Graphical tools ===<br />
<br />
* {{App|Radeon-tray|A small program to control the power profiles of your Radeon card via systray icon. It is written in PyQt4 and is suitable for non-Gnome users.|https://github.com/StuntsPT/Radeon-tray|{{AUR|radeon-tray}}}}<br />
<br />
=== Other notes ===<br />
<br />
To view the speed that the GPU is running at, perform the following command and you will get something like this output:<br />
<br />
{{hc|# cat /sys/kernel/debug/dri/0/radeon_pm_info|<nowiki><br />
state: PM_STATE_ENABLED<br />
default engine clock: 300000 kHz<br />
current engine clock: 300720 kHz<br />
default memory clock: 200000 kHz<br />
</nowiki>}}<br />
<br />
It depends on which GPU line yours is, however. Along with the radeon driver versions, kernel versions, etc. So it may not have much/any voltage regulation at all.<br />
<br />
Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only). To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via [[lm_sensors]] tools or via sysfs in {{ic|/sys/class/hwmon}}.<br />
<br />
== Fan Speed ==<br />
<br />
While the power saving features above should handle fan speeds quite well, some cards may still be too noisy in their idle state. In this case, and when your card supports it, you can change the fan speed manually.<br />
<br />
{{Warning|<br />
* Keep in mind that the following method sets the fan speed to a fixed value, hence it will not adjust with the stress of the GPU, which can lead to overheating under heavy load.<br />
* Check GPU temperature when applying lower than standard values.<br />
}}<br />
<br />
To control the GPU fan, see [[Fan speed control#AMDGPU sysfs fan control]] (amdgpu and radeon share the same controls for this).<br />
<br />
For persistence, see the example in [[#Persistent configuration]].<br />
<br />
If a fixed value is not desired, there are possibilities to define a custom fan curve manually by, for example, writing a script in which fan speeds are set depending on the current temperature (current value in {{ic|/sys/class/drm/card0/device/hwmon/hwmon0/temp1_input}}).<br />
<br />
A GUI solution is available by installing {{AUR|radeon-profile-git}}.<br />
<br />
== TV out ==<br />
<br />
First, check that you have an S-video output: {{ic|xrandr}} should give you something like<br />
Screen 0: minimum 320x200, current 1024x768, maximum 1280x1200<br />
...<br />
S-video disconnected (normal left inverted right x axis y axis)<br />
<br />
Now we should tell Xorg that it is actually connected (it ''is'', right?)<br />
xrandr --output S-video --set "load detection" 1<br />
<br />
Setting TV standard to use:<br />
xrandr --output S-video --set "tv standard" ntsc<br />
<br />
Adding a mode for it (currently supports only 800x600):<br />
xrandr --addmode S-video 800x600<br />
<br />
Clone mode:<br />
xrandr --output S-video --same-as VGA-0<br />
<br />
Now let us try to see what we have:<br />
xrandr --output S-video --mode 800x600<br />
<br />
At this point you should see a 800x600 version of your desktop on your TV.<br />
<br />
To disable the output, do<br />
xrandr --output S-video --off<br />
<br />
=== Force TV-out in KMS ===<br />
<br />
The kernel can recognize {{ic|1=video=}} parameter in following form (see [[KMS]] for more details):<br />
<br />
video=<conn>:<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m][eDd]<br />
<br />
For example:<br />
<br />
video=DVI-I-1:1280x1024-24@60e<br />
<br />
Parameters with whitespaces must be quoted:<br />
<br />
"video=9-pin DIN-1:1024x768-24@60e"<br />
<br />
Current mkinitcpio implementation also requires {{ic|#}} in front. For example:<br />
<br />
root=/dev/disk/by-uuid/d950a14f-fc0c-451d-b0d4-f95c2adefee3 ro quiet radeon.modeset=1 security=none # video=DVI-I-1:1280x1024-24@60e "video=9-pin DIN-1:1024x768-24@60e"<br />
<br />
* [[GRUB Legacy]] can pass such command line as is.<br />
* [[LILO]] needs backslashes for doublequotes (append {{ic|1=# \"video=9-pin DIN-1:1024x768-24@60e\"}})<br />
<br />
You can get list of your video outputs with following command:<br />
<br />
{{bc|<nowiki>$ ls -1 /sys/class/drm/ | grep -E '^card[[:digit:]]+-' | cut -d- -f2-</nowiki>}}<br />
<br />
== HDMI audio ==<br />
<br />
HDMI audio is supported in the {{Pkg|xf86-video-ati}} video driver. To disable HDMI audio add {{ic|1=radeon.audio=0}} to your [[kernel parameters]].<br />
<br />
If there is no video after boot up, the driver option has to be disabled.<br />
<br />
{{Note|<br />
* If HDMI audio does not work after installing the driver, test your setup with the procedure at [[Advanced Linux Sound Architecture/Troubleshooting#HDMI Output does not work]].<br />
* If the sound is distorted in PulseAudio try setting {{ic|1=tsched=0}} as described in [[PulseAudio/Troubleshooting#Glitches, skips or crackling]] and make sure {{ic|rtkit}} daemon is running.<br />
* Your sound card might use the same module, since HDA compliant hardware is pretty common. [[Advanced Linux Sound Architecture#Set the default sound card]] using one of the suggested methods, which include using the {{ic|defaults}} node in alsa configuration.<br />
}}<br />
<br />
== Multihead setup ==<br />
<br />
=== Using the RandR extension ===<br />
<br />
See [[Multihead#RandR]] how to setup multiple monitors by using [[Wikipedia:RandR|RandR]].<br />
<br />
=== Independent X screens ===<br />
<br />
Independent dual-headed setups can be configured the usual way. However you might want to know that the radeon driver has a {{ic|"ZaphodHeads"}} option which allows you to bind a specific device section to an output of your choice:<br />
{{hc|/etc/X11/xorg.conf.d/20-radeon.conf|<br />
Section "Device"<br />
Identifier "Device0"<br />
Driver "radeon"<br />
Option "ZaphodHeads" "VGA-0"<br />
VendorName "ATI"<br />
BusID "PCI:1:0:0"<br />
Screen 0<br />
EndSection<br />
}}<br />
<br />
This can be a life-saver, when using videocards that have more than two outputs. For instance one HDMI out, one DVI, one VGA, will only select and use HDMI+DVI outputs for the dual-head setup, unless you explicitly specify {{ic|"ZaphodHeads" "VGA-0"}}.<br />
<br />
== Turn vsync off ==<br />
<br />
The radeon driver will probably enable vsync by default, which is perfectly fine except for benchmarking. To turn it off try the {{ic|1=vblank_mode=0}} [[environment variable]] or create {{ic|~/.drirc}} (edit it if it already exists) and add the following:<br />
{{hc|~/.drirc|<nowiki><br />
<driconf><br />
<device screen="0" driver="dri2"><br />
<application name="Default"><br />
<option name="vblank_mode" value="0" /><br />
</application><br />
</device><br />
<!-- Other devices ... --><br />
</driconf><br />
</nowiki>}}<br />
<br />
{{Note|Make sure the driver is '''dri2''', not your video card code (like r600).}}<br />
<br />
If vsync is still enabled, you can disable it by editing {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}}. See [[#Driver options]].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Performance and/or artifacts issues when using EXA ===<br />
{{Note|This only applies to cards older than R600 (Radeon X1000 series and older). Newer cards you should use Glamor instead of EXA.}}<br />
<br />
If having 2D performance issues, like slow scrolling in a terminal or webbrowser, adding {{ic|Option "MigrationHeuristic" "greedy"}} as device option may solve the issue.<br />
<br />
In addition disabling EXAPixmaps may solve artifacts issues, although this is generally not recommended and may cause other issues.<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-radeon.conf|<nowiki><br />
Section "Device"<br />
Identifier "Radeon"<br />
Driver "radeon"<br />
Option "AccelMethod" "exa"<br />
Option "MigrationHeuristic" "greedy"<br />
#Option "EXAPixmaps" "off"<br />
EndSection<br />
</nowiki>}}<br />
<br />
=== Adding undetected/unsupported resolutions ===<br />
<br />
See [[Xrandr#Adding undetected resolutions]].<br />
<br />
=== TV showing a black border around the screen ===<br />
{{Note|Make sure the tv has been setup correctly (see manual) before attempting the following solution.}}<br />
<br />
When connecting a TV using the HDMI port, the TV may show a blurry picture with a 2-3cm border around it. This protects against overscanning (see [[Wikipedia:Overscan]]), but can be turned off using xrandr:<br />
xrandr --output HDMI-0 --set underscan off<br />
<br />
=== Black screen and no console, but X works in KMS ===<br />
<br />
This is a solution to the no-console problem that might come up, when using two or more ATI cards on the same PC. Fujitsu Siemens Amilo PA 3553 laptop for example has this problem. This is due to fbcon console driver mapping itself to the wrong framebuffer device that exists on the wrong card. This can be fixed by adding this to the kernel boot line:<br />
fbcon=map:1<br />
This will tell the fbcon to map itself to the {{ic|/dev/fb1}} framebuffer dev and not the {{ic|/dev/fb0}}, that in our case exists on the wrong graphics card. If that does not fix your problem, try booting with<br />
fbcon=map:0<br />
instead.<br />
<br />
=== ATI X1600 (RV530 series) 3D application show black windows ===<br />
<br />
There are three possible solutions:<br />
* Try adding {{ic|<nowiki>pci=nomsi</nowiki>}} to your boot loader [[Kernel parameters]].<br />
* If this does not work, you can try adding {{ic|noapic}} instead of {{ic|<nowiki>pci=nomsi</nowiki>}}.<br />
* If none of the above work, then you can try running {{ic|<nowiki>vblank_mode=0 glxgears</nowiki>}} or {{ic|<nowiki>vblank_mode=1 glxgears</nowiki>}} to see which one works for you, then install {{pkg|driconf}} and set that option in {{ic|~/.drirc}}.<br />
<br />
=== Cursor corruption after coming out of sleep ===<br />
<br />
If the cursor becomes corrupted like it's repeating itself vertically after the monitor(s) comes out of sleep, set {{ic|"SWCursor" "True"}} in the {{ic|"Device"}} section of the {{ic|/etc/X11/xorg.conf.d/20-radeon.conf}} configuration file.<br />
<br />
=== DisplayPort stays black on multimonitor mode ===<br />
<br />
Try booting with the [[kernel parameter]] {{ic|1=radeon.audio=0}}.<br />
<br />
=== R9-390 Poor Performance and/or Instability ===<br />
<br />
Firmware issues with R9-390 series cards include poor performance and crashes (frequently caused by gaming or using Google Maps) possibly related DPM. Comment 115 of this bug [https://bugs.freedesktop.org/show_bug.cgi?id=91880 report] includes instructions for a fix.<br />
<br />
=== QHD / UHD / 4k support over HDMI for older Radeon cards ===<br />
<br />
Older cards have their pixel clock limited to 165MHz for HDMI. Hence, they do not support QHD or 4k only via dual-link DVI but not over HDMI.<br />
<br />
One possibility to work around this is to use [https://www.elstel.org/software/hunt-for-4K-UHD-2160p.html.en custom modes with lower refresh rate], e.g. 30Hz.<br />
<br />
Another one is a kernel patch removing the pixel clock limit, but this may damage the card! <br />
<br />
Official kernel bug ticket with patch for 4.8: https://bugzilla.kernel.org/show_bug.cgi?id=172421<br />
<br />
The patch introduces a new kernel parameter {{ic|radeon.hdmimhz}} which alters the pixel clock limit. <br />
<br />
Be sure to use a high speed HDMI cable for this.<br />
<br />
== See also ==<br />
<br />
[https://www.phoronix.com/scan.php?page=article&item=radeonsi-cat-wow&num=1 Benchmark] showing the open source driver is on par performance-wise with the proprietary driver for many cards.</div>Mortan1961https://wiki.archlinux.org/index.php?title=AMDGPU&diff=567430AMDGPU2019-02-27T06:28:32Z<p>Mortan1961: /* Enable early KMS */ Link to Kernel mode setting#Early KMS start instead duplicating section.</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:AMDGPU]]<br />
[[ja:AMDGPU]]<br />
[[ru:AMDGPU]]<br />
{{Related articles start}}<br />
{{Related|AMD Catalyst}}<br />
{{Related|ATI}}<br />
{{Related|Xorg}}<br />
{{Related|Vulkan}}<br />
{{Related articles end}}<br />
<br />
'''amdgpu''' is the open source graphics driver for the latest AMD Radeon graphics cards.<br />
<br />
== Selecting the right driver ==<br />
<br />
Depending on the card you have, find the right driver in [[Xorg#AMD]]. This page has instructions for '''AMDGPU''' and '''AMDGPU PRO'''.<br />
<br />
At the moment there is support for [https://www.x.org/wiki/RadeonFeature/ Volcanic Islands (VI)] (and newer) and experimental support for [https://www.phoronix.com/scan.php?page=news_item&px=AMD-AMDGPU-Released Sea Islands (CI)] and [https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-SI-Experimental-Code Southern Islands (SI)] cards. AMD has no plans to support pre-GCN GPUs.<br />
<br />
Owners of unsupported GPUs may use the open source [[radeon]] or the [[AMD Catalyst]] driver instead.<br />
<br />
== Installation ==<br />
<br />
{{Note|If coming from the proprietary Catalyst driver, see [[AMD Catalyst#Uninstallation]] first.}}<br />
<br />
[[Install]] the {{Pkg|mesa}} package, which provides the DRI driver for 3D acceleration.<br />
<br />
* For 32-bit application support, also install the {{Pkg|lib32-mesa}} package from the [[multilib]] repostory.<br />
* For the DDX driver (which provides 2D acceleration in [[Xorg]]), install the {{Pkg|xf86-video-amdgpu}} package.<br />
* For [[Vulkan]] support, install the {{Pkg|vulkan-radeon}} package. Optionally install the {{Pkg|lib32-vulkan-radeon}} package for 32-bit application support.<br />
<br />
Support for [[#Video acceleration|accelerated video decoding]] is provided by {{Pkg|libva-mesa-driver}} and {{Pkg|lib32-libva-mesa-driver}} for VA-API and {{Pkg|mesa-vdpau}} and {{Pkg|lib32-mesa-vdpau}} packages for VDPAU.<br />
<br />
=== Enable Southern Islands (SI) and Sea Islands (CIK) support ===<br />
<br />
The {{Pkg|linux}} package enables AMDGPU support for cards of the Southern Islands (SI) and Sea Islands (CIK). When building or compiling a [[kernel]], {{ic|1=CONFIG_DRM_AMDGPU_SI=Y}} and/or {{ic|1=CONFIG_DRM_AMDGPU_CIK=Y}} should be be set in the config.<br />
<br />
Even when AMDGPU support for SI/CIK has been enabled by the kernel, the [[radeon]] driver may be used instead of the AMDGPU driver.<br />
<br />
To make sure the {{ic|amdgpu}} is loaded first use the following [[Mkinitcpio#MODULES]] array, e.g. {{ic|1=MODULES=(amdgpu radeon)}}.<br />
<br />
==== Set required module parameters ====<br />
<br />
To enable full support for SI/CIK when using the {{ic|amdgpu}}, set the following [[kernel parameters]] to prevent the {{ic|radeon}} module from being used [http://www.phoronix.com/scan.php?page=article&item=linux-413-gcn101&num=1]:<br />
<br />
{{hc|$ dmesg|2=<br />
[..] amdgpu 0000:01:00.0: CIK support provided by radeon.<br />
[..] amdgpu 0000:01:00.0: Use radeon.cik_support=0 amdgpu.cik_support=1 to override.<br />
}}<br />
<br />
The flags depend on the cards GCN version: <br />
<br />
* Southern Islands (SI): {{ic|1=radeon.si_support=0 amdgpu.si_support=1}}<br />
* Sea Islands (CIK): {{ic|1=radeon.cik_support=0 amdgpu.cik_support=1}}<br />
<br />
=== AMDGPU PRO ===<br />
<br />
{{Warning|Arch Linux is officially not supported.}}<br />
{{Out of date|AMDGPU-PRO 18.50 driver [https://www.amd.com/en/support/kb/release-notes/rn-rad-lin-18-50-unified released]. Required downgrade versions may differ.}}<br />
{{Note|<br />
*To use the proprietary OpenCL component without AMDGPU PRO, [[install]] {{AUR|opencl-amd}} instead.<br />
*A [[downgrade]] of the {{pkg|linux}} (4.9) and [[Xorg]] (1.18) packages is required to use AMDGPU PRO 17.10.<br />
}}<br />
<br />
AMD provides a proprietary, binary userland driver called ''AMDGPU PRO'', which works on top of the open-source AMDGPU kernel driver. The driver provides OpenGL, [[OpenCL]], [[Vulkan]], [[VA-API]] and [[VDPAU]] support (although this is also supported by the open-source driver). For some workloads it provides better performance than the open-source driver ([https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-PRO-16.40-Deus-MD example benchmark]), while for others the contrary is true ([https://openbenchmarking.org/prospect/1610315-TA-AMDGPUPRO08/998ba9b677230564e0fbca342a8e1b9a7e85b6ab example benchmark]).<br />
<br />
See the [https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx release notes] and the [https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/amd-linux/855699-amd-representative-says-their-vulkan-linux-driver-will-be-here-soon/page6 announcement at the Phoronix forum] for more information.<br />
<br />
A patched version of the official AMDGPU PRO driver is available as {{AUR|amdgpu-pro}}.<br />
<br />
== Loading ==<br />
<br />
The {{ic|amdgpu}} kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure to [[#Enable Southern Islands (SI) and Sea Islands (CIK) support]] when needed.<br />
* Make sure you have the latest {{Pkg|linux-firmware}} package installed. This driver requires the latest firmware for each model to successfully boot.<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since {{ic|amdgpu}} requires [[KMS]].<br />
* Check that you have not disabled {{ic|amdgpu}} by using any [[Kernel_modules#Blacklisting|kernel module blacklisting]].<br />
<br />
=== Enable early KMS ===<br />
See [[Kernel mode setting#Early KMS start]].<br />
<br />
== Xorg configuration ==<br />
<br />
[[Xorg]] will automatically load the driver and it will use your monitor's EDID to set the native resolution. Configuration is only required for tuning the driver.<br />
<br />
If you want manual configuration, create {{ic|/etc/X11/xorg.conf.d/20-amdgpu.conf}}, and add the following:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-amdgpu.conf|2=<br />
Section "Device"<br />
Identifier "AMD"<br />
Driver "amdgpu"<br />
EndSection<br />
}}<br />
<br />
Using this section, you can enable features and tweak the driver settings, see {{man|4|amdgpu}} first before setting driver options.<br />
<br />
=== Tear Free Rendering ===<br />
''TearFree'' controls tearing prevention using the hardware page flipping mechanism. If this option is set, the default value of the property is 'on' or 'off' accordingly. If this option isn't set, the default value of the property is auto, which means that TearFree is on for rotated outputs, outputs with RandR transforms applied and for RandR 1.4 slave outputs, otherwise off:<br />
<br />
Option "TearFree" "true"<br />
<br />
=== DRI level ===<br />
<br />
''DRI'' sets the maximum level of DRI to enable. Valid values are ''2'' for DRI2 or ''3'' for DRI3. The default is ''3'' for DRI3 if the [[Xorg]] version is >= 1.18.3, otherwise DRI2 is used:<br />
<br />
Option "DRI" "3" <br />
<br />
== Features ==<br />
=== Video acceleration ===<br />
<br />
See [[Hardware video acceleration]].<br />
<br />
=== Overclocking ===<br />
<br />
Since Linux 4.17, it is possible to adjust clocks and voltages of the graphics card via {{Ic|1=/sys/class/drm/card0/device/pp_od_clk_voltage}}. It is however required to unlock access to it in sysfs by appending the boot parameter {{Ic|1=amdgpu.ppfeaturemask=0xffffffff}}.<br />
<br />
{{Note|In sysfs, paths like {{Ic|1=/sys/class/drm/...}} are just symlinks and may change between reboots. Persistent locations can be found in {{Ic|1=/sys/devices/}}, e.g. {{Ic|1=/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/}}. Adjust the commands accordingly for a reliable result.}}<br />
<br />
To set the GPU clock for the maximum pstate 7 on e.g. a Polaris GPU to 1209MHz and 900mV voltage, run:<br />
# echo "s 7 1209 900" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
The same procedure can be applied to the VRAM, e.g. maximum pstate 2 on Polaris 5xx series cards:<br />
# echo "m 2 1850 850" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
{{Warning|1=Double check the entered values, as mistakes might instantly cause fatal hardware damage!}}<br />
To apply, run<br />
# echo "c" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
To check if it worked out, read out clocks and voltage under 3D load:<br />
# watch -n 0.5 cat /sys/kernel/debug/dri/0/amdgpu_pm_info<br />
You can reset to the default values using this:<br />
# echo "r" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
<br />
It is also possible to forbid the driver so switch to certain pstates, e.g. to workaround problems with deep powersaving pstates like flickering artifacts or stutter. To force the highest VRAM pstate on a Polaris RX 5xx card, while still allowing the GPU itself to run with lower clocks, run:<br />
# echo "manual" > /sys/class/drm/card0/device/power_dpm_force_performance_level<br />
# echo "2" > /sys/class/drm/card0/device/pp_dpm_mclk<br />
Allow only the three highest GPU pstates:<br />
# echo "5 6 7" > /sys/class/drm/card0/device/pp_dpm_sclk<br />
<br />
To set the allowed maximum power consumption of the GPU to e.g. 50 Watts, run<br />
# echo 50000000 > /sys/class/drm/card0/device/hwmon/hwmon0/power1_cap<br />
Until Linux kernel 4.20, it will only be possible to decrease the value, not increase.<br />
<br />
{{Note|The above procedure was tested with a Polaris RX 560 card. There may be different behavior or bugs with different GPUs.}}<br />
<br />
=== Enable GPU display scaling ===<br />
<br />
{{Move|xrandr|Not specific to AMDGPU.|section=Moving "Enable GPU display scaling" to xrandr}}<br />
<br />
To avoid the usage of the scaler which is built in the display, and use the GPU own scaler instead, when not using the native resolution of the monitor, execute:<br />
$ xrandr --output "<output>" --set "scaling mode" "<scaling mode>"<br />
Possible values for {{ic|"scaling mode"}} are: {{ic|None, Full, Center, Full aspect}}<br />
<br />
* To show the available outputs and settings, execute:<br />
$ xrandr --prop<br />
<br />
* To set {{ic|1=scaling mode = Full aspect}} for just every available output, execute:<br />
$ for output in $(xrandr --prop | grep -E -o -i "^[A-Z\-]+-[0-9]+"); do xrandr --output "$output" --set "scaling mode" "Full aspect"; done<br />
<br />
== Troubleshooting ==<br />
<br />
=== Xorg or applications won't start ===<br />
<br />
* "(EE) AMDGPU(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?" error after opening glxgears, can open Xorg server but OpenGL apps crash.<br />
* "(EE) AMDGPU(0): Given depth (32) is not supported by amdgpu driver" error, Xorg won't start.<br />
<br />
Setting the screen's depth under Xorg to 16 or 32 will cause problems/crash. To avoid that, you should use a standard screen depth of 24 by adding this to your "screen" section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-screen.conf|<br />
Section "Screen"<br />
Identifier "Screen"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
=== Screen artifacts and frequency problem ===<br />
<br />
[[ATI#Dynamic power management|Dynamic power management]] may cause screen artifacts to appear when displaying to monitors at higher frequencies (120+Hz) due to issues in the way GPU clock speeds are managed[https://bugs.freedesktop.org/show_bug.cgi?id=96868][https://bugs.freedesktop.org/show_bug.cgi?id=102646].<br />
<br />
A workaround [https://bugs.freedesktop.org/show_bug.cgi?id=96868#c13] is saving {{ic|high}} or {{ic|low}} in {{ic|/sys/class/drm/card0/device/power_dpm_force_performance_level}}.<br />
<br />
There is also a GUI solution [https://github.com/marazmista/radeon-profile] where you can manage the "power_dpm" with {{aur|radeon-profile-git}} and {{aur|radeon-profile-daemon-git}}.<br />
<br />
=== R9 390 series Poor Performance and/or Instability ===<br />
<br />
If you experience issues [https://bugs.freedesktop.org/show_bug.cgi?id=91880] with a AMD R9 390 series graphics card, set {{ic|1=radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1 amdgpu.dpm=1 amdgpu.dc=1}} as [[kernel parameters]] to force the use of amdgpu driver instead of radeon.<br />
<br />
If it still does not work, try disabling DPM, by setting the [[kernel parameters]] to: {{ic|1=radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1}}<br />
<br />
=== Freezes with "[drm] IP block:gmc_v8_0 is hung!" kernel error ===<br />
<br />
If you experience freezes and kernel crashes during a GPU intensive task with the kernel error " [drm] IP block:gmc_v8_0 is hung!" [https://bugs.freedesktop.org/show_bug.cgi?id=102322], a workaround is to set {{ic|1=amggpu.vm_update_mode=3}} as [[kernel parameters]] to force the GPUVM page tables update to be done using the CPU. Downsides are listed here [https://bugs.freedesktop.org/show_bug.cgi?id=102322#c15].<br />
<br />
=== Cursor corruption ===<br />
<br />
If you experience issues with the mouse cursor sometimes not rendering properly, set {{ic|Option "SWCursor" "True"}} in the {{ic|"Device"}} section of the {{ic|/etc/X11/xorg.conf.d/20-amdgpu.conf}} configuration file.</div>Mortan1961https://wiki.archlinux.org/index.php?title=AMDGPU&diff=567429AMDGPU2019-02-27T06:20:17Z<p>Mortan1961: /* Screen flickering */ Remove section. Fixed in Linux 4.16.4. https://bugzilla.kernel.org/show_bug.cgi?id=199101#c26</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:AMDGPU]]<br />
[[ja:AMDGPU]]<br />
[[ru:AMDGPU]]<br />
{{Related articles start}}<br />
{{Related|AMD Catalyst}}<br />
{{Related|ATI}}<br />
{{Related|Xorg}}<br />
{{Related|Vulkan}}<br />
{{Related articles end}}<br />
<br />
'''amdgpu''' is the open source graphics driver for the latest AMD Radeon graphics cards.<br />
<br />
== Selecting the right driver ==<br />
<br />
Depending on the card you have, find the right driver in [[Xorg#AMD]]. This page has instructions for '''AMDGPU''' and '''AMDGPU PRO'''.<br />
<br />
At the moment there is support for [https://www.x.org/wiki/RadeonFeature/ Volcanic Islands (VI)] (and newer) and experimental support for [https://www.phoronix.com/scan.php?page=news_item&px=AMD-AMDGPU-Released Sea Islands (CI)] and [https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-SI-Experimental-Code Southern Islands (SI)] cards. AMD has no plans to support pre-GCN GPUs.<br />
<br />
Owners of unsupported GPUs may use the open source [[radeon]] or the [[AMD Catalyst]] driver instead.<br />
<br />
== Installation ==<br />
<br />
{{Note|If coming from the proprietary Catalyst driver, see [[AMD Catalyst#Uninstallation]] first.}}<br />
<br />
[[Install]] the {{Pkg|mesa}} package, which provides the DRI driver for 3D acceleration.<br />
<br />
* For 32-bit application support, also install the {{Pkg|lib32-mesa}} package from the [[multilib]] repostory.<br />
* For the DDX driver (which provides 2D acceleration in [[Xorg]]), install the {{Pkg|xf86-video-amdgpu}} package.<br />
* For [[Vulkan]] support, install the {{Pkg|vulkan-radeon}} package. Optionally install the {{Pkg|lib32-vulkan-radeon}} package for 32-bit application support.<br />
<br />
Support for [[#Video acceleration|accelerated video decoding]] is provided by {{Pkg|libva-mesa-driver}} and {{Pkg|lib32-libva-mesa-driver}} for VA-API and {{Pkg|mesa-vdpau}} and {{Pkg|lib32-mesa-vdpau}} packages for VDPAU.<br />
<br />
=== Enable Southern Islands (SI) and Sea Islands (CIK) support ===<br />
<br />
The {{Pkg|linux}} package enables AMDGPU support for cards of the Southern Islands (SI) and Sea Islands (CIK). When building or compiling a [[kernel]], {{ic|1=CONFIG_DRM_AMDGPU_SI=Y}} and/or {{ic|1=CONFIG_DRM_AMDGPU_CIK=Y}} should be be set in the config.<br />
<br />
Even when AMDGPU support for SI/CIK has been enabled by the kernel, the [[radeon]] driver may be used instead of the AMDGPU driver.<br />
<br />
To make sure the {{ic|amdgpu}} is loaded first use the following [[Mkinitcpio#MODULES]] array, e.g. {{ic|1=MODULES=(amdgpu radeon)}}.<br />
<br />
==== Set required module parameters ====<br />
<br />
To enable full support for SI/CIK when using the {{ic|amdgpu}}, set the following [[kernel parameters]] to prevent the {{ic|radeon}} module from being used [http://www.phoronix.com/scan.php?page=article&item=linux-413-gcn101&num=1]:<br />
<br />
{{hc|$ dmesg|2=<br />
[..] amdgpu 0000:01:00.0: CIK support provided by radeon.<br />
[..] amdgpu 0000:01:00.0: Use radeon.cik_support=0 amdgpu.cik_support=1 to override.<br />
}}<br />
<br />
The flags depend on the cards GCN version: <br />
<br />
* Southern Islands (SI): {{ic|1=radeon.si_support=0 amdgpu.si_support=1}}<br />
* Sea Islands (CIK): {{ic|1=radeon.cik_support=0 amdgpu.cik_support=1}}<br />
<br />
=== AMDGPU PRO ===<br />
<br />
{{Warning|Arch Linux is officially not supported.}}<br />
{{Out of date|AMDGPU-PRO 18.50 driver [https://www.amd.com/en/support/kb/release-notes/rn-rad-lin-18-50-unified released]. Required downgrade versions may differ.}}<br />
{{Note|<br />
*To use the proprietary OpenCL component without AMDGPU PRO, [[install]] {{AUR|opencl-amd}} instead.<br />
*A [[downgrade]] of the {{pkg|linux}} (4.9) and [[Xorg]] (1.18) packages is required to use AMDGPU PRO 17.10.<br />
}}<br />
<br />
AMD provides a proprietary, binary userland driver called ''AMDGPU PRO'', which works on top of the open-source AMDGPU kernel driver. The driver provides OpenGL, [[OpenCL]], [[Vulkan]], [[VA-API]] and [[VDPAU]] support (although this is also supported by the open-source driver). For some workloads it provides better performance than the open-source driver ([https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-PRO-16.40-Deus-MD example benchmark]), while for others the contrary is true ([https://openbenchmarking.org/prospect/1610315-TA-AMDGPUPRO08/998ba9b677230564e0fbca342a8e1b9a7e85b6ab example benchmark]).<br />
<br />
See the [https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx release notes] and the [https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/amd-linux/855699-amd-representative-says-their-vulkan-linux-driver-will-be-here-soon/page6 announcement at the Phoronix forum] for more information.<br />
<br />
A patched version of the official AMDGPU PRO driver is available as {{AUR|amdgpu-pro}}.<br />
<br />
== Loading ==<br />
<br />
The {{ic|amdgpu}} kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure to [[#Enable Southern Islands (SI) and Sea Islands (CIK) support]] when needed.<br />
* Make sure you have the latest {{Pkg|linux-firmware}} package installed. This driver requires the latest firmware for each model to successfully boot.<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since {{ic|amdgpu}} requires [[KMS]].<br />
* Check that you have not disabled {{ic|amdgpu}} by using any [[Kernel_modules#Blacklisting|kernel module blacklisting]].<br />
<br />
=== Enable early KMS ===<br />
<br />
{{Tip|If you have problems with the resolution, [[Kernel mode setting#Forcing modes and EDID]] may help.}}<br />
<br />
[[Kernel mode setting]] (KMS) is supported by the amdgpu driver, is mandatory and enabled by default. <br />
<br />
KMS is typically initialized after the [[Arch boot process#initramfs|initramfs stage]]. It is possible, however, to enable KMS during the initramfs stage. To do this, add the {{ic|amdgpu}} module to the {{ic|MODULES}} line in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
MODULES=(amdgpu radeon)<br />
<br />
Now, regenerate the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
The change takes effect at the next reboot.<br />
<br />
== Xorg configuration ==<br />
<br />
[[Xorg]] will automatically load the driver and it will use your monitor's EDID to set the native resolution. Configuration is only required for tuning the driver.<br />
<br />
If you want manual configuration, create {{ic|/etc/X11/xorg.conf.d/20-amdgpu.conf}}, and add the following:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-amdgpu.conf|2=<br />
Section "Device"<br />
Identifier "AMD"<br />
Driver "amdgpu"<br />
EndSection<br />
}}<br />
<br />
Using this section, you can enable features and tweak the driver settings, see {{man|4|amdgpu}} first before setting driver options.<br />
<br />
=== Tear Free Rendering ===<br />
''TearFree'' controls tearing prevention using the hardware page flipping mechanism. If this option is set, the default value of the property is 'on' or 'off' accordingly. If this option isn't set, the default value of the property is auto, which means that TearFree is on for rotated outputs, outputs with RandR transforms applied and for RandR 1.4 slave outputs, otherwise off:<br />
<br />
Option "TearFree" "true"<br />
<br />
=== DRI level ===<br />
<br />
''DRI'' sets the maximum level of DRI to enable. Valid values are ''2'' for DRI2 or ''3'' for DRI3. The default is ''3'' for DRI3 if the [[Xorg]] version is >= 1.18.3, otherwise DRI2 is used:<br />
<br />
Option "DRI" "3" <br />
<br />
== Features ==<br />
=== Video acceleration ===<br />
<br />
See [[Hardware video acceleration]].<br />
<br />
=== Overclocking ===<br />
<br />
Since Linux 4.17, it is possible to adjust clocks and voltages of the graphics card via {{Ic|1=/sys/class/drm/card0/device/pp_od_clk_voltage}}. It is however required to unlock access to it in sysfs by appending the boot parameter {{Ic|1=amdgpu.ppfeaturemask=0xffffffff}}.<br />
<br />
{{Note|In sysfs, paths like {{Ic|1=/sys/class/drm/...}} are just symlinks and may change between reboots. Persistent locations can be found in {{Ic|1=/sys/devices/}}, e.g. {{Ic|1=/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/}}. Adjust the commands accordingly for a reliable result.}}<br />
<br />
To set the GPU clock for the maximum pstate 7 on e.g. a Polaris GPU to 1209MHz and 900mV voltage, run:<br />
# echo "s 7 1209 900" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
The same procedure can be applied to the VRAM, e.g. maximum pstate 2 on Polaris 5xx series cards:<br />
# echo "m 2 1850 850" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
{{Warning|1=Double check the entered values, as mistakes might instantly cause fatal hardware damage!}}<br />
To apply, run<br />
# echo "c" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
To check if it worked out, read out clocks and voltage under 3D load:<br />
# watch -n 0.5 cat /sys/kernel/debug/dri/0/amdgpu_pm_info<br />
You can reset to the default values using this:<br />
# echo "r" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
<br />
It is also possible to forbid the driver so switch to certain pstates, e.g. to workaround problems with deep powersaving pstates like flickering artifacts or stutter. To force the highest VRAM pstate on a Polaris RX 5xx card, while still allowing the GPU itself to run with lower clocks, run:<br />
# echo "manual" > /sys/class/drm/card0/device/power_dpm_force_performance_level<br />
# echo "2" > /sys/class/drm/card0/device/pp_dpm_mclk<br />
Allow only the three highest GPU pstates:<br />
# echo "5 6 7" > /sys/class/drm/card0/device/pp_dpm_sclk<br />
<br />
To set the allowed maximum power consumption of the GPU to e.g. 50 Watts, run<br />
# echo 50000000 > /sys/class/drm/card0/device/hwmon/hwmon0/power1_cap<br />
Until Linux kernel 4.20, it will only be possible to decrease the value, not increase.<br />
<br />
{{Note|The above procedure was tested with a Polaris RX 560 card. There may be different behavior or bugs with different GPUs.}}<br />
<br />
=== Enable GPU display scaling ===<br />
<br />
{{Move|xrandr|Not specific to AMDGPU.|section=Moving "Enable GPU display scaling" to xrandr}}<br />
<br />
To avoid the usage of the scaler which is built in the display, and use the GPU own scaler instead, when not using the native resolution of the monitor, execute:<br />
$ xrandr --output "<output>" --set "scaling mode" "<scaling mode>"<br />
Possible values for {{ic|"scaling mode"}} are: {{ic|None, Full, Center, Full aspect}}<br />
<br />
* To show the available outputs and settings, execute:<br />
$ xrandr --prop<br />
<br />
* To set {{ic|1=scaling mode = Full aspect}} for just every available output, execute:<br />
$ for output in $(xrandr --prop | grep -E -o -i "^[A-Z\-]+-[0-9]+"); do xrandr --output "$output" --set "scaling mode" "Full aspect"; done<br />
<br />
== Troubleshooting ==<br />
<br />
=== Xorg or applications won't start ===<br />
<br />
* "(EE) AMDGPU(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?" error after opening glxgears, can open Xorg server but OpenGL apps crash.<br />
* "(EE) AMDGPU(0): Given depth (32) is not supported by amdgpu driver" error, Xorg won't start.<br />
<br />
Setting the screen's depth under Xorg to 16 or 32 will cause problems/crash. To avoid that, you should use a standard screen depth of 24 by adding this to your "screen" section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-screen.conf|<br />
Section "Screen"<br />
Identifier "Screen"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
=== Screen artifacts and frequency problem ===<br />
<br />
[[ATI#Dynamic power management|Dynamic power management]] may cause screen artifacts to appear when displaying to monitors at higher frequencies (120+Hz) due to issues in the way GPU clock speeds are managed[https://bugs.freedesktop.org/show_bug.cgi?id=96868][https://bugs.freedesktop.org/show_bug.cgi?id=102646].<br />
<br />
A workaround [https://bugs.freedesktop.org/show_bug.cgi?id=96868#c13] is saving {{ic|high}} or {{ic|low}} in {{ic|/sys/class/drm/card0/device/power_dpm_force_performance_level}}.<br />
<br />
There is also a GUI solution [https://github.com/marazmista/radeon-profile] where you can manage the "power_dpm" with {{aur|radeon-profile-git}} and {{aur|radeon-profile-daemon-git}}.<br />
<br />
=== R9 390 series Poor Performance and/or Instability ===<br />
<br />
If you experience issues [https://bugs.freedesktop.org/show_bug.cgi?id=91880] with a AMD R9 390 series graphics card, set {{ic|1=radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1 amdgpu.dpm=1 amdgpu.dc=1}} as [[kernel parameters]] to force the use of amdgpu driver instead of radeon.<br />
<br />
If it still does not work, try disabling DPM, by setting the [[kernel parameters]] to: {{ic|1=radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1}}<br />
<br />
=== Freezes with "[drm] IP block:gmc_v8_0 is hung!" kernel error ===<br />
<br />
If you experience freezes and kernel crashes during a GPU intensive task with the kernel error " [drm] IP block:gmc_v8_0 is hung!" [https://bugs.freedesktop.org/show_bug.cgi?id=102322], a workaround is to set {{ic|1=amggpu.vm_update_mode=3}} as [[kernel parameters]] to force the GPUVM page tables update to be done using the CPU. Downsides are listed here [https://bugs.freedesktop.org/show_bug.cgi?id=102322#c15].<br />
<br />
=== Cursor corruption ===<br />
<br />
If you experience issues with the mouse cursor sometimes not rendering properly, set {{ic|Option "SWCursor" "True"}} in the {{ic|"Device"}} section of the {{ic|/etc/X11/xorg.conf.d/20-amdgpu.conf}} configuration file.</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:AMDGPU&diff=567428Talk:AMDGPU2019-02-27T06:16:40Z<p>Mortan1961: /* DC for Pre-Vega Cards */ Strike</p>
<hr />
<div>== Supported Hardware ==<br />
I just crawled the product names "Radeon xyz" of VI/CI GPUs together and was going to go on for professional products "FirePro xzy", too.<br />
<br />
Afaik, there is no such complete listing on the web. There is a lot of confusion about the code and product names, due to AMD repeatedly rebranding their products and even change code names for same GPUs (Tonga = Antigua, Hawaii = Grenada, Carrizo = Bristol Ridge?, ...)<br />
<br />
When I started using gnu/linux, the arch wiki was a great help and there are still a lot of people struggling with graphics drivers. Now I know it is not hard to understand, but it is still confusing for beginners, coming from windows and just being used to install one software suite (not a drm driver, libdrm, mesa, gallium, etc.), supporting all the current hardware.<br />
<br />
now everyone has to go through all of this every time to determine 1) which hardware is really in their product and 2) which driver suits their hardware<br />
<br />
<br />
tl;dr I think maintaining such a list would be really useful for beginners, maybe not here but in a separate article?<br />
[[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 09:27, 16 February 2016 (UTC)<br />
<br />
:Well, [https://wiki.gentoo.org/wiki/Amdgpu#Feature_support Gentoo wiki] has a simple two-line summary. If it's still not sufficiently clear or the list is already much larger, I guess we could have a separate subpage to not clutter the main page... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:20, 16 February 2016 (UTC)<br />
<br />
:: yes, in the meantime I also found this table. It looks good but it is not complete. And completing the list would blow up the table cells a lot. I guess we should wait until vulkan and the new OpenCL driver has been released. Until then, there is no real reason for owners of pre-VI hardware to switch over to amdgpu. All vi and post-vi will be covered, so there is no need to list those separately. For the others I could create a subpage when switching to amdgpu gives you the opportunity for opencl 2.1 and vulkan -- [[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 10:50, 16 February 2016 (UTC)<br />
<br />
== Enable amdgpu for Sea Islands Cards ==<br />
testing my Hawaii card w/ amdgpu last week, sound did not work, even though 6 pcm/hdmi audio devices were listed. Might be added as an issue (as I think this is important deciding between radeon and amdgpu), but needs further investigation/confirmation from other testers.<br />
[[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 09:53, 16 February 2016 (UTC)<br />
:Please remember the AMDGPU is still in beta, and there's still info and knowledge/experience missing (e.g. most users use the Radeon driver).<br />
:AMD isn't that great in providing info and so far a lot of users are confused about their hardware support in use with amdgpu.<br />
:Remember there are flags like {{ic|exp_hw_support}}. More info need to be added, but it will take some time.<br />
:[[User:Francoism|Francoism]] ([[User talk:Francoism|talk]]) 13:14, 16 February 2016 (UTC)<br />
: It does indeed seem like that was no CI issue. Audio over hdmi is not supported by amdgpu atm, respectively only with the (upcoming) DAL changes[http://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/open-source-amd-linux/853189-audio-over-hdmi-tonga-and-amdgpu], although it is listed as 'done' [http://xorg.freedesktop.org/wiki/RadeonFeature/ here]. [[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 15:59, 22 February 2016 (UTC)<br />
<br />
== Sea Islands cards not working with 4.5.x? ==<br />
I stumbled across this wiki page in hopes of getting more performance after seeing Michael from Phoronix get his 290 working with this. Following through all the instructions, menuconfiging and compiling new kernels, in the end all I get is a blank screen with my r9 390. No errors on Xorg.0.log. Can anyone confirm that it isn't just me?<br />
[[User:Katorisenko|Katorisenko]] ([[User talk:Katorisenko|talk]]) 07:46, 24 April 2016 (UTC)<br />
<br />
== AMDGPU and HDMI Audio ==<br />
<br />
According to [https://bugzilla.freedesktop.org/show_bug.cgi?id=92827#c2 this Freedesktop.org bug comment], HDMI audio support in AMDGPU requires DAL which is "not upstream yet", and won't be anytime soon according to [http://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-DC-DRM-No this Phoronix article]. I'm currently struggling to make my HDMI audio work with my AMD Radeon R9 380; if this happens to be impossible with AMDGPU, should we mention it in the "Troubleshooting" section of this page? --[[User:Hellpe|Hellpe]] ([[User talk:Hellpe|talk]]) 23:26, 3 January 2017 (UTC)<br />
<br />
:I am in favor of adding the information notice to the troubleshooting section. I think users who do not keep up with the news will be confused when Pulseaudio seems to add the HDMI audio devices, despite them being non-functional until the DAL code is refactored and accepted upstream then pushed to regular users. I know it was not immediately clear to me when I upgraded from my radeonsi card to an RX series amdgpu card until I did some reading. I "think" currently the only way to get HDMI audio is to use the AMDGPU-PRO driver for the time being. [[User:Ase1590|Ase1590]] ([[User talk:Ase1590|talk]]) 15:48, 4 January 2017 (UTC)<br />
<br />
::I have it working with an R9 380 under Xorg. I did nothing special, simply disabled the built-in audio and enabled the HDMI audio. It does not work under Wayland however. Pavucontrol shows unavailable. [[User:Unit73e|Unit73e]] ([[User talk:Unit73e|talk]]) 12:22, 2 December 2017 (UTC)<br />
<br />
== Some experiments with integrated AMD graphics ==<br />
<br />
Some results after playing with "radeon" and "amdgpu" drivers and gnome (for AMD A10 7850K):<br />
<br />
- Having both drivers loaded causes systemd to hang at system shutdown (xorg). Using amdgpu and blacklisting radeon or using radeon and blacklisting amdgpu both fix this problem.<br />
<br />
- Having amdgpu driver without mkinitcpio.conf entry causes<br />
1. Wayland can't be enabled (always in xorg mode) and XDG_SESSION_TYPE shows "x11"<br />
2. HDMI sound output is shown only in rare cases<br />
<br />
- Having amdgpu driver with mkinitcpio.conf entry causes<br />
1. Wayland is enabled by default and XDG_SESSION_TYPE shows "wayland"<br />
2. HDMI sound is always disabled<br />
<br />
- Having radeon driver without mkinitcpio.conf entry causes<br />
1. Wayland can't be enabled (always in xorg mode) and XDG_SESSION_TYPE shows "x11"<br />
2. HDMI sound is always correctly detected and working<br />
<br />
- Having radeon driver with mkinitcpio.conf entry<br />
1. Wayland is enabled by default and XDG_SESSION_TYPE shows "wayland"<br />
2. HDMI sound is always correctly detected and working<br />
<br />
[[User:Beoldhin|Beoldhin]] ([[User talk:Beoldhin|talk]]) 19:07, 23 May 2017 (UTC)<br />
<br />
Update: with kernel 4.11.2-1: HDMI sound output is now working with "amdgpu" but only in as "Gnome in xorg" login option (still no sound with Wayland). There are still some graphical glitches when running Wayland with the radeon driver: external screen doesn't turn off after timeout, windows can't be maximized with the "wmctrl" command and updating text in terminal causes some text updating problems (these don't exist with xorg, amdgpu and radeon both work fine). So in summary: I can now select either amdgpu or radeon driver but Wayland is still unstable.<br />
<br />
[[User:Beoldhin|Beoldhin]] ([[User talk:Beoldhin|talk]]) 19:07, 23 May 2017 (UTC)<br />
<br />
== Vega Changes for Wiki ==<br />
<br />
With Vega releasing around the end of the month, the DC/DAL is still not it the kernel. Should we just put a note for users to use the AMDGPU-PRO drivers if they have VEGA cards? We could possibly add a note saying that in the AUR, there is an alternate kernel built from their repos with the DC/DAL code. <br />
Alternate kernel--> https://aur.archlinux.org/packages/linux-amd-staging-git/ [[User:Sesese9|Sesese9]] ([[User talk:Sesese9|talk]]) 00:40, 10 July 2017 (UTC)<br />
<br />
==<s> DC for Pre-Vega Cards </s>==<br />
<br />
As far as I can tell, the Arch Linux kernel config enables DC by default for all (supported?) cards: https://git.archlinux.org/svntogit/packages.git/tree/trunk/config?h=packages/linux#n5725<br />
Should the section on enabling DC be removed or changed? [[User:Aereaux|Aereaux]] ([[User talk:Aereaux|talk]]) 23:39, 6 February 2018 (UTC)<br />
:Can't check at the moment, but doesn't that require setting the kernel parameter as well? Also, keep in mind the custom [[kernels]]. [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 02:51, 10 February 2018 (UTC)<br />
::I'm not sure how to check, but according to https://cateee.net/lkddb/web-lkddb/DRM_AMD_DC_PRE_VEGA.html , CONFIG_DRM_AMD_DC_PRE_VEGA=y enables it by default. It looks like it was already changed in the wiki, though. [[User:Aereaux|Aereaux]] ([[User talk:Aereaux|talk]]) 03:06, 10 February 2018 (UTC)<br />
<br />
== Moving "Enable GPU display scaling" to xrandr ==<br />
<br />
I thought about it to put this under xrandr directly, but for example for my integrated Intel 6th gen GPU I don't have the "scaling mode" option, and I don't know about NVIDIA.<br />
And even if the "scaling mode" option exists for other vendors and or cards, I don't know if the possible values for "scaling mode" are the same everywhere, as far as I remember there are not.<br />
That was the reason I did put it here. [[User:Bertl|Bertl]] ([[User talk:Bertl|talk]]) 16:01, 18 February 2018 (UTC)<br />
:Ok, looks like [[Intel_graphics#Setting_scaling_mode|Intel]] uses the same settings, but it's only available for internal (LVDS, eDP) ports, but at least according to https://bugs.freedesktop.org/show_bug.cgi?id=90989 it also uses "None, Full, Center, Full aspect".<br />
:I know that radeonsi uses the same commands, but still don't know about NVIDIA.<br />
:But yea, now I also think that it should be moved and the [[Intel_graphics#Setting_scaling_mode|Intel]] section should be merged into it. [[User:Bertl|Bertl]] ([[User talk:Bertl|talk]]) 18:37, 18 February 2018 (UTC)<br />
<br />
==<s> No 120hz with 4.15 kernel and DC enabled </s>==<br />
<br />
AMDGPU with DC on in kernel 4.15 was not showing all resolutions and frequencies available. This bug is already fixed on staging: https://bugs.freedesktop.org/show_bug.cgi?id=105039<br />
[[User:Unit73e|Unit73e]] ([[User talk:Unit73e|talk]]) 09:54, 2 March 2018 (UTC) unit73e<br />
:Fixed since Linux 4.16 [[User:Unit73e|Unit73e]] ([[User talk:Unit73e|talk]]) 18:23, 23 April 2018 (UTC)<br />
<br />
== Update on kernel parameters ==<br />
<br />
this part does not seems to be required on 4.17:<br />
<br />
>> Also, since kernel 4.13, adding the amdgpu.si_support=1 radeon.si_support=0 or amdgpu.cik_support=1 radeon.cik_support=0 kernel parameter is required. Otherwise, AMDGPU will not start and you will end up with either radeon being used instead or the display being frozen during the boot.<br />
<br />
{{unsigned|12:10, 22 April 2018|Lesto}}<br />
<br />
== Renaming AMDGPU-PRO to Radeon Software for Linux? ==<br />
<br />
So AMD basically changed the name of their AMDGPU-PRO driver as simply Radeon™ Software for Linux, see [https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx 17.40], [https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-Release-Notes.aspx 18.10] and [https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-18.20-Early-Preview-Release-Notes.aspx 18.20 preview] release notes. With that in mind, should the names on wiki be slowly changed, or the alternative name/note being added somewhere? I'm not sure if AMDGPU-PRO is still used by AMD officially and whether AMDGPU (without PRO) term is being used as well, but the name sure definitely stuck among community – any ideas? [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 17:33, 11 May 2018 (UTC)<br />
<br />
EDIT: Probably worth noticing is the similar situation happened between [[Fglrx]] and [[AMD Catalyst]] naming back then. [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 17:38, 11 May 2018 (UTC)<br />
<br />
== AMDGPU PRO downgrade versions ==<br />
There is information in page that "A downgrade of the linux (4.9) and Xorg (1.18) packages is required to use AMDGPU PRO 17.10." Is it still true? Did not AMDGPU PRO driver got updated? Afaik, ubuntu provides this proprietary driver, but has more recent kernel.<br />
[[User:Ashark|Ashark]] ([[User talk:Ashark|talk]]) 12:48, 16 November 2018 (UTC)<br />
<br />
: Currently, Yes. The [https://aur.archlinux.org/packages/amdgpu-pro/ AMDGPU-Pro AUR] has not been updated in some time and (as of this post) is still at version 17.40. [[User:Taurolyon|<span style="text-shadow: 0.1em 0.1em 0.09em #FFFF00; font-family:times; font-size:14px; FONT-WEIGHT: bold; color: #FF7C00; background-color:transparent">''"Tauro"''</span>]] ([[Special:Contributions/Taurolyon|Contributions]] <span style{{=}}"color: #FF7F00;">&bull;</span> [[User_talk:Taurolyon|Message]]) 20:40, 29 December 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:AMDGPU&diff=567427Talk:AMDGPU2019-02-27T06:15:08Z<p>Mortan1961: /* No 120hz with 4.15 kernel and DC enabled */ Strike</p>
<hr />
<div>== Supported Hardware ==<br />
I just crawled the product names "Radeon xyz" of VI/CI GPUs together and was going to go on for professional products "FirePro xzy", too.<br />
<br />
Afaik, there is no such complete listing on the web. There is a lot of confusion about the code and product names, due to AMD repeatedly rebranding their products and even change code names for same GPUs (Tonga = Antigua, Hawaii = Grenada, Carrizo = Bristol Ridge?, ...)<br />
<br />
When I started using gnu/linux, the arch wiki was a great help and there are still a lot of people struggling with graphics drivers. Now I know it is not hard to understand, but it is still confusing for beginners, coming from windows and just being used to install one software suite (not a drm driver, libdrm, mesa, gallium, etc.), supporting all the current hardware.<br />
<br />
now everyone has to go through all of this every time to determine 1) which hardware is really in their product and 2) which driver suits their hardware<br />
<br />
<br />
tl;dr I think maintaining such a list would be really useful for beginners, maybe not here but in a separate article?<br />
[[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 09:27, 16 February 2016 (UTC)<br />
<br />
:Well, [https://wiki.gentoo.org/wiki/Amdgpu#Feature_support Gentoo wiki] has a simple two-line summary. If it's still not sufficiently clear or the list is already much larger, I guess we could have a separate subpage to not clutter the main page... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 10:20, 16 February 2016 (UTC)<br />
<br />
:: yes, in the meantime I also found this table. It looks good but it is not complete. And completing the list would blow up the table cells a lot. I guess we should wait until vulkan and the new OpenCL driver has been released. Until then, there is no real reason for owners of pre-VI hardware to switch over to amdgpu. All vi and post-vi will be covered, so there is no need to list those separately. For the others I could create a subpage when switching to amdgpu gives you the opportunity for opencl 2.1 and vulkan -- [[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 10:50, 16 February 2016 (UTC)<br />
<br />
== Enable amdgpu for Sea Islands Cards ==<br />
testing my Hawaii card w/ amdgpu last week, sound did not work, even though 6 pcm/hdmi audio devices were listed. Might be added as an issue (as I think this is important deciding between radeon and amdgpu), but needs further investigation/confirmation from other testers.<br />
[[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 09:53, 16 February 2016 (UTC)<br />
:Please remember the AMDGPU is still in beta, and there's still info and knowledge/experience missing (e.g. most users use the Radeon driver).<br />
:AMD isn't that great in providing info and so far a lot of users are confused about their hardware support in use with amdgpu.<br />
:Remember there are flags like {{ic|exp_hw_support}}. More info need to be added, but it will take some time.<br />
:[[User:Francoism|Francoism]] ([[User talk:Francoism|talk]]) 13:14, 16 February 2016 (UTC)<br />
: It does indeed seem like that was no CI issue. Audio over hdmi is not supported by amdgpu atm, respectively only with the (upcoming) DAL changes[http://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/open-source-amd-linux/853189-audio-over-hdmi-tonga-and-amdgpu], although it is listed as 'done' [http://xorg.freedesktop.org/wiki/RadeonFeature/ here]. [[User:Iuno|Iuno]] ([[User talk:Iuno|talk]]) 15:59, 22 February 2016 (UTC)<br />
<br />
== Sea Islands cards not working with 4.5.x? ==<br />
I stumbled across this wiki page in hopes of getting more performance after seeing Michael from Phoronix get his 290 working with this. Following through all the instructions, menuconfiging and compiling new kernels, in the end all I get is a blank screen with my r9 390. No errors on Xorg.0.log. Can anyone confirm that it isn't just me?<br />
[[User:Katorisenko|Katorisenko]] ([[User talk:Katorisenko|talk]]) 07:46, 24 April 2016 (UTC)<br />
<br />
== AMDGPU and HDMI Audio ==<br />
<br />
According to [https://bugzilla.freedesktop.org/show_bug.cgi?id=92827#c2 this Freedesktop.org bug comment], HDMI audio support in AMDGPU requires DAL which is "not upstream yet", and won't be anytime soon according to [http://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-DC-DRM-No this Phoronix article]. I'm currently struggling to make my HDMI audio work with my AMD Radeon R9 380; if this happens to be impossible with AMDGPU, should we mention it in the "Troubleshooting" section of this page? --[[User:Hellpe|Hellpe]] ([[User talk:Hellpe|talk]]) 23:26, 3 January 2017 (UTC)<br />
<br />
:I am in favor of adding the information notice to the troubleshooting section. I think users who do not keep up with the news will be confused when Pulseaudio seems to add the HDMI audio devices, despite them being non-functional until the DAL code is refactored and accepted upstream then pushed to regular users. I know it was not immediately clear to me when I upgraded from my radeonsi card to an RX series amdgpu card until I did some reading. I "think" currently the only way to get HDMI audio is to use the AMDGPU-PRO driver for the time being. [[User:Ase1590|Ase1590]] ([[User talk:Ase1590|talk]]) 15:48, 4 January 2017 (UTC)<br />
<br />
::I have it working with an R9 380 under Xorg. I did nothing special, simply disabled the built-in audio and enabled the HDMI audio. It does not work under Wayland however. Pavucontrol shows unavailable. [[User:Unit73e|Unit73e]] ([[User talk:Unit73e|talk]]) 12:22, 2 December 2017 (UTC)<br />
<br />
== Some experiments with integrated AMD graphics ==<br />
<br />
Some results after playing with "radeon" and "amdgpu" drivers and gnome (for AMD A10 7850K):<br />
<br />
- Having both drivers loaded causes systemd to hang at system shutdown (xorg). Using amdgpu and blacklisting radeon or using radeon and blacklisting amdgpu both fix this problem.<br />
<br />
- Having amdgpu driver without mkinitcpio.conf entry causes<br />
1. Wayland can't be enabled (always in xorg mode) and XDG_SESSION_TYPE shows "x11"<br />
2. HDMI sound output is shown only in rare cases<br />
<br />
- Having amdgpu driver with mkinitcpio.conf entry causes<br />
1. Wayland is enabled by default and XDG_SESSION_TYPE shows "wayland"<br />
2. HDMI sound is always disabled<br />
<br />
- Having radeon driver without mkinitcpio.conf entry causes<br />
1. Wayland can't be enabled (always in xorg mode) and XDG_SESSION_TYPE shows "x11"<br />
2. HDMI sound is always correctly detected and working<br />
<br />
- Having radeon driver with mkinitcpio.conf entry<br />
1. Wayland is enabled by default and XDG_SESSION_TYPE shows "wayland"<br />
2. HDMI sound is always correctly detected and working<br />
<br />
[[User:Beoldhin|Beoldhin]] ([[User talk:Beoldhin|talk]]) 19:07, 23 May 2017 (UTC)<br />
<br />
Update: with kernel 4.11.2-1: HDMI sound output is now working with "amdgpu" but only in as "Gnome in xorg" login option (still no sound with Wayland). There are still some graphical glitches when running Wayland with the radeon driver: external screen doesn't turn off after timeout, windows can't be maximized with the "wmctrl" command and updating text in terminal causes some text updating problems (these don't exist with xorg, amdgpu and radeon both work fine). So in summary: I can now select either amdgpu or radeon driver but Wayland is still unstable.<br />
<br />
[[User:Beoldhin|Beoldhin]] ([[User talk:Beoldhin|talk]]) 19:07, 23 May 2017 (UTC)<br />
<br />
== Vega Changes for Wiki ==<br />
<br />
With Vega releasing around the end of the month, the DC/DAL is still not it the kernel. Should we just put a note for users to use the AMDGPU-PRO drivers if they have VEGA cards? We could possibly add a note saying that in the AUR, there is an alternate kernel built from their repos with the DC/DAL code. <br />
Alternate kernel--> https://aur.archlinux.org/packages/linux-amd-staging-git/ [[User:Sesese9|Sesese9]] ([[User talk:Sesese9|talk]]) 00:40, 10 July 2017 (UTC)<br />
<br />
== DC for Pre-Vega Cards ==<br />
<br />
As far as I can tell, the Arch Linux kernel config enables DC by default for all (supported?) cards: https://git.archlinux.org/svntogit/packages.git/tree/trunk/config?h=packages/linux#n5725<br />
Should the section on enabling DC be removed or changed? [[User:Aereaux|Aereaux]] ([[User talk:Aereaux|talk]]) 23:39, 6 February 2018 (UTC)<br />
:Can't check at the moment, but doesn't that require setting the kernel parameter as well? Also, keep in mind the custom [[kernels]]. [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 02:51, 10 February 2018 (UTC)<br />
::I'm not sure how to check, but according to https://cateee.net/lkddb/web-lkddb/DRM_AMD_DC_PRE_VEGA.html , CONFIG_DRM_AMD_DC_PRE_VEGA=y enables it by default. It looks like it was already changed in the wiki, though. [[User:Aereaux|Aereaux]] ([[User talk:Aereaux|talk]]) 03:06, 10 February 2018 (UTC)<br />
<br />
== Moving "Enable GPU display scaling" to xrandr ==<br />
<br />
I thought about it to put this under xrandr directly, but for example for my integrated Intel 6th gen GPU I don't have the "scaling mode" option, and I don't know about NVIDIA.<br />
And even if the "scaling mode" option exists for other vendors and or cards, I don't know if the possible values for "scaling mode" are the same everywhere, as far as I remember there are not.<br />
That was the reason I did put it here. [[User:Bertl|Bertl]] ([[User talk:Bertl|talk]]) 16:01, 18 February 2018 (UTC)<br />
:Ok, looks like [[Intel_graphics#Setting_scaling_mode|Intel]] uses the same settings, but it's only available for internal (LVDS, eDP) ports, but at least according to https://bugs.freedesktop.org/show_bug.cgi?id=90989 it also uses "None, Full, Center, Full aspect".<br />
:I know that radeonsi uses the same commands, but still don't know about NVIDIA.<br />
:But yea, now I also think that it should be moved and the [[Intel_graphics#Setting_scaling_mode|Intel]] section should be merged into it. [[User:Bertl|Bertl]] ([[User talk:Bertl|talk]]) 18:37, 18 February 2018 (UTC)<br />
<br />
==<s> No 120hz with 4.15 kernel and DC enabled </s>==<br />
<br />
AMDGPU with DC on in kernel 4.15 was not showing all resolutions and frequencies available. This bug is already fixed on staging: https://bugs.freedesktop.org/show_bug.cgi?id=105039<br />
[[User:Unit73e|Unit73e]] ([[User talk:Unit73e|talk]]) 09:54, 2 March 2018 (UTC) unit73e<br />
:Fixed since Linux 4.16 [[User:Unit73e|Unit73e]] ([[User talk:Unit73e|talk]]) 18:23, 23 April 2018 (UTC)<br />
<br />
== Update on kernel parameters ==<br />
<br />
this part does not seems to be required on 4.17:<br />
<br />
>> Also, since kernel 4.13, adding the amdgpu.si_support=1 radeon.si_support=0 or amdgpu.cik_support=1 radeon.cik_support=0 kernel parameter is required. Otherwise, AMDGPU will not start and you will end up with either radeon being used instead or the display being frozen during the boot.<br />
<br />
{{unsigned|12:10, 22 April 2018|Lesto}}<br />
<br />
== Renaming AMDGPU-PRO to Radeon Software for Linux? ==<br />
<br />
So AMD basically changed the name of their AMDGPU-PRO driver as simply Radeon™ Software for Linux, see [https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx 17.40], [https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-Release-Notes.aspx 18.10] and [https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-18.20-Early-Preview-Release-Notes.aspx 18.20 preview] release notes. With that in mind, should the names on wiki be slowly changed, or the alternative name/note being added somewhere? I'm not sure if AMDGPU-PRO is still used by AMD officially and whether AMDGPU (without PRO) term is being used as well, but the name sure definitely stuck among community – any ideas? [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 17:33, 11 May 2018 (UTC)<br />
<br />
EDIT: Probably worth noticing is the similar situation happened between [[Fglrx]] and [[AMD Catalyst]] naming back then. [[User:Faalagorn|Faalagorn]] [[User talk:Faalagorn|☎]]/[[Special:Contributions/Faalagorn|✓]] 17:38, 11 May 2018 (UTC)<br />
<br />
== AMDGPU PRO downgrade versions ==<br />
There is information in page that "A downgrade of the linux (4.9) and Xorg (1.18) packages is required to use AMDGPU PRO 17.10." Is it still true? Did not AMDGPU PRO driver got updated? Afaik, ubuntu provides this proprietary driver, but has more recent kernel.<br />
[[User:Ashark|Ashark]] ([[User talk:Ashark|talk]]) 12:48, 16 November 2018 (UTC)<br />
<br />
: Currently, Yes. The [https://aur.archlinux.org/packages/amdgpu-pro/ AMDGPU-Pro AUR] has not been updated in some time and (as of this post) is still at version 17.40. [[User:Taurolyon|<span style="text-shadow: 0.1em 0.1em 0.09em #FFFF00; font-family:times; font-size:14px; FONT-WEIGHT: bold; color: #FF7C00; background-color:transparent">''"Tauro"''</span>]] ([[Special:Contributions/Taurolyon|Contributions]] <span style{{=}}"color: #FF7F00;">&bull;</span> [[User_talk:Taurolyon|Message]]) 20:40, 29 December 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=AMDGPU&diff=567426AMDGPU2019-02-27T06:07:39Z<p>Mortan1961: /* AMD DC */ Remove section. Since Linux 4.17 AMDGPU DC is enabled by default for all supported GPUs. https://lists.freedesktop.org/archives/dri-devel/2018-March/169774.html</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[de:AMDGPU]]<br />
[[ja:AMDGPU]]<br />
[[ru:AMDGPU]]<br />
{{Related articles start}}<br />
{{Related|AMD Catalyst}}<br />
{{Related|ATI}}<br />
{{Related|Xorg}}<br />
{{Related|Vulkan}}<br />
{{Related articles end}}<br />
<br />
'''amdgpu''' is the open source graphics driver for the latest AMD Radeon graphics cards.<br />
<br />
== Selecting the right driver ==<br />
<br />
Depending on the card you have, find the right driver in [[Xorg#AMD]]. This page has instructions for '''AMDGPU''' and '''AMDGPU PRO'''.<br />
<br />
At the moment there is support for [https://www.x.org/wiki/RadeonFeature/ Volcanic Islands (VI)] (and newer) and experimental support for [https://www.phoronix.com/scan.php?page=news_item&px=AMD-AMDGPU-Released Sea Islands (CI)] and [https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-SI-Experimental-Code Southern Islands (SI)] cards. AMD has no plans to support pre-GCN GPUs.<br />
<br />
Owners of unsupported GPUs may use the open source [[radeon]] or the [[AMD Catalyst]] driver instead.<br />
<br />
== Installation ==<br />
<br />
{{Note|If coming from the proprietary Catalyst driver, see [[AMD Catalyst#Uninstallation]] first.}}<br />
<br />
[[Install]] the {{Pkg|mesa}} package, which provides the DRI driver for 3D acceleration.<br />
<br />
* For 32-bit application support, also install the {{Pkg|lib32-mesa}} package from the [[multilib]] repostory.<br />
* For the DDX driver (which provides 2D acceleration in [[Xorg]]), install the {{Pkg|xf86-video-amdgpu}} package.<br />
* For [[Vulkan]] support, install the {{Pkg|vulkan-radeon}} package. Optionally install the {{Pkg|lib32-vulkan-radeon}} package for 32-bit application support.<br />
<br />
Support for [[#Video acceleration|accelerated video decoding]] is provided by {{Pkg|libva-mesa-driver}} and {{Pkg|lib32-libva-mesa-driver}} for VA-API and {{Pkg|mesa-vdpau}} and {{Pkg|lib32-mesa-vdpau}} packages for VDPAU.<br />
<br />
=== Enable Southern Islands (SI) and Sea Islands (CIK) support ===<br />
<br />
The {{Pkg|linux}} package enables AMDGPU support for cards of the Southern Islands (SI) and Sea Islands (CIK). When building or compiling a [[kernel]], {{ic|1=CONFIG_DRM_AMDGPU_SI=Y}} and/or {{ic|1=CONFIG_DRM_AMDGPU_CIK=Y}} should be be set in the config.<br />
<br />
Even when AMDGPU support for SI/CIK has been enabled by the kernel, the [[radeon]] driver may be used instead of the AMDGPU driver.<br />
<br />
To make sure the {{ic|amdgpu}} is loaded first use the following [[Mkinitcpio#MODULES]] array, e.g. {{ic|1=MODULES=(amdgpu radeon)}}.<br />
<br />
==== Set required module parameters ====<br />
<br />
To enable full support for SI/CIK when using the {{ic|amdgpu}}, set the following [[kernel parameters]] to prevent the {{ic|radeon}} module from being used [http://www.phoronix.com/scan.php?page=article&item=linux-413-gcn101&num=1]:<br />
<br />
{{hc|$ dmesg|2=<br />
[..] amdgpu 0000:01:00.0: CIK support provided by radeon.<br />
[..] amdgpu 0000:01:00.0: Use radeon.cik_support=0 amdgpu.cik_support=1 to override.<br />
}}<br />
<br />
The flags depend on the cards GCN version: <br />
<br />
* Southern Islands (SI): {{ic|1=radeon.si_support=0 amdgpu.si_support=1}}<br />
* Sea Islands (CIK): {{ic|1=radeon.cik_support=0 amdgpu.cik_support=1}}<br />
<br />
=== AMDGPU PRO ===<br />
<br />
{{Warning|Arch Linux is officially not supported.}}<br />
{{Out of date|AMDGPU-PRO 18.50 driver [https://www.amd.com/en/support/kb/release-notes/rn-rad-lin-18-50-unified released]. Required downgrade versions may differ.}}<br />
{{Note|<br />
*To use the proprietary OpenCL component without AMDGPU PRO, [[install]] {{AUR|opencl-amd}} instead.<br />
*A [[downgrade]] of the {{pkg|linux}} (4.9) and [[Xorg]] (1.18) packages is required to use AMDGPU PRO 17.10.<br />
}}<br />
<br />
AMD provides a proprietary, binary userland driver called ''AMDGPU PRO'', which works on top of the open-source AMDGPU kernel driver. The driver provides OpenGL, [[OpenCL]], [[Vulkan]], [[VA-API]] and [[VDPAU]] support (although this is also supported by the open-source driver). For some workloads it provides better performance than the open-source driver ([https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-PRO-16.40-Deus-MD example benchmark]), while for others the contrary is true ([https://openbenchmarking.org/prospect/1610315-TA-AMDGPUPRO08/998ba9b677230564e0fbca342a8e1b9a7e85b6ab example benchmark]).<br />
<br />
See the [https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx release notes] and the [https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/amd-linux/855699-amd-representative-says-their-vulkan-linux-driver-will-be-here-soon/page6 announcement at the Phoronix forum] for more information.<br />
<br />
A patched version of the official AMDGPU PRO driver is available as {{AUR|amdgpu-pro}}.<br />
<br />
== Loading ==<br />
<br />
The {{ic|amdgpu}} kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure to [[#Enable Southern Islands (SI) and Sea Islands (CIK) support]] when needed.<br />
* Make sure you have the latest {{Pkg|linux-firmware}} package installed. This driver requires the latest firmware for each model to successfully boot.<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since {{ic|amdgpu}} requires [[KMS]].<br />
* Check that you have not disabled {{ic|amdgpu}} by using any [[Kernel_modules#Blacklisting|kernel module blacklisting]].<br />
<br />
=== Enable early KMS ===<br />
<br />
{{Tip|If you have problems with the resolution, [[Kernel mode setting#Forcing modes and EDID]] may help.}}<br />
<br />
[[Kernel mode setting]] (KMS) is supported by the amdgpu driver, is mandatory and enabled by default. <br />
<br />
KMS is typically initialized after the [[Arch boot process#initramfs|initramfs stage]]. It is possible, however, to enable KMS during the initramfs stage. To do this, add the {{ic|amdgpu}} module to the {{ic|MODULES}} line in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
MODULES=(amdgpu radeon)<br />
<br />
Now, regenerate the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
The change takes effect at the next reboot.<br />
<br />
== Xorg configuration ==<br />
<br />
[[Xorg]] will automatically load the driver and it will use your monitor's EDID to set the native resolution. Configuration is only required for tuning the driver.<br />
<br />
If you want manual configuration, create {{ic|/etc/X11/xorg.conf.d/20-amdgpu.conf}}, and add the following:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/20-amdgpu.conf|2=<br />
Section "Device"<br />
Identifier "AMD"<br />
Driver "amdgpu"<br />
EndSection<br />
}}<br />
<br />
Using this section, you can enable features and tweak the driver settings, see {{man|4|amdgpu}} first before setting driver options.<br />
<br />
=== Tear Free Rendering ===<br />
''TearFree'' controls tearing prevention using the hardware page flipping mechanism. If this option is set, the default value of the property is 'on' or 'off' accordingly. If this option isn't set, the default value of the property is auto, which means that TearFree is on for rotated outputs, outputs with RandR transforms applied and for RandR 1.4 slave outputs, otherwise off:<br />
<br />
Option "TearFree" "true"<br />
<br />
=== DRI level ===<br />
<br />
''DRI'' sets the maximum level of DRI to enable. Valid values are ''2'' for DRI2 or ''3'' for DRI3. The default is ''3'' for DRI3 if the [[Xorg]] version is >= 1.18.3, otherwise DRI2 is used:<br />
<br />
Option "DRI" "3" <br />
<br />
== Features ==<br />
=== Video acceleration ===<br />
<br />
See [[Hardware video acceleration]].<br />
<br />
=== Overclocking ===<br />
<br />
Since Linux 4.17, it is possible to adjust clocks and voltages of the graphics card via {{Ic|1=/sys/class/drm/card0/device/pp_od_clk_voltage}}. It is however required to unlock access to it in sysfs by appending the boot parameter {{Ic|1=amdgpu.ppfeaturemask=0xffffffff}}.<br />
<br />
{{Note|In sysfs, paths like {{Ic|1=/sys/class/drm/...}} are just symlinks and may change between reboots. Persistent locations can be found in {{Ic|1=/sys/devices/}}, e.g. {{Ic|1=/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/}}. Adjust the commands accordingly for a reliable result.}}<br />
<br />
To set the GPU clock for the maximum pstate 7 on e.g. a Polaris GPU to 1209MHz and 900mV voltage, run:<br />
# echo "s 7 1209 900" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
The same procedure can be applied to the VRAM, e.g. maximum pstate 2 on Polaris 5xx series cards:<br />
# echo "m 2 1850 850" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
{{Warning|1=Double check the entered values, as mistakes might instantly cause fatal hardware damage!}}<br />
To apply, run<br />
# echo "c" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
To check if it worked out, read out clocks and voltage under 3D load:<br />
# watch -n 0.5 cat /sys/kernel/debug/dri/0/amdgpu_pm_info<br />
You can reset to the default values using this:<br />
# echo "r" > /sys/class/drm/card0/device/pp_od_clk_voltage<br />
<br />
It is also possible to forbid the driver so switch to certain pstates, e.g. to workaround problems with deep powersaving pstates like flickering artifacts or stutter. To force the highest VRAM pstate on a Polaris RX 5xx card, while still allowing the GPU itself to run with lower clocks, run:<br />
# echo "manual" > /sys/class/drm/card0/device/power_dpm_force_performance_level<br />
# echo "2" > /sys/class/drm/card0/device/pp_dpm_mclk<br />
Allow only the three highest GPU pstates:<br />
# echo "5 6 7" > /sys/class/drm/card0/device/pp_dpm_sclk<br />
<br />
To set the allowed maximum power consumption of the GPU to e.g. 50 Watts, run<br />
# echo 50000000 > /sys/class/drm/card0/device/hwmon/hwmon0/power1_cap<br />
Until Linux kernel 4.20, it will only be possible to decrease the value, not increase.<br />
<br />
{{Note|The above procedure was tested with a Polaris RX 560 card. There may be different behavior or bugs with different GPUs.}}<br />
<br />
=== Enable GPU display scaling ===<br />
<br />
{{Move|xrandr|Not specific to AMDGPU.|section=Moving "Enable GPU display scaling" to xrandr}}<br />
<br />
To avoid the usage of the scaler which is built in the display, and use the GPU own scaler instead, when not using the native resolution of the monitor, execute:<br />
$ xrandr --output "<output>" --set "scaling mode" "<scaling mode>"<br />
Possible values for {{ic|"scaling mode"}} are: {{ic|None, Full, Center, Full aspect}}<br />
<br />
* To show the available outputs and settings, execute:<br />
$ xrandr --prop<br />
<br />
* To set {{ic|1=scaling mode = Full aspect}} for just every available output, execute:<br />
$ for output in $(xrandr --prop | grep -E -o -i "^[A-Z\-]+-[0-9]+"); do xrandr --output "$output" --set "scaling mode" "Full aspect"; done<br />
<br />
== Troubleshooting ==<br />
<br />
=== Xorg or applications won't start ===<br />
<br />
* "(EE) AMDGPU(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?" error after opening glxgears, can open Xorg server but OpenGL apps crash.<br />
* "(EE) AMDGPU(0): Given depth (32) is not supported by amdgpu driver" error, Xorg won't start.<br />
<br />
Setting the screen's depth under Xorg to 16 or 32 will cause problems/crash. To avoid that, you should use a standard screen depth of 24 by adding this to your "screen" section:<br />
<br />
{{hc|/etc/X11/xorg.conf.d/10-screen.conf|<br />
Section "Screen"<br />
Identifier "Screen"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
}}<br />
<br />
=== Screen artifacts and frequency problem ===<br />
<br />
[[ATI#Dynamic power management|Dynamic power management]] may cause screen artifacts to appear when displaying to monitors at higher frequencies (120+Hz) due to issues in the way GPU clock speeds are managed[https://bugs.freedesktop.org/show_bug.cgi?id=96868][https://bugs.freedesktop.org/show_bug.cgi?id=102646].<br />
<br />
A workaround [https://bugs.freedesktop.org/show_bug.cgi?id=96868#c13] is saving {{ic|high}} or {{ic|low}} in {{ic|/sys/class/drm/card0/device/power_dpm_force_performance_level}}.<br />
<br />
There is also a GUI solution [https://github.com/marazmista/radeon-profile] where you can manage the "power_dpm" with {{aur|radeon-profile-git}} and {{aur|radeon-profile-daemon-git}}.<br />
<br />
=== Screen flickering ===<br />
<br />
If you experience flickering [https://bugzilla.kernel.org/show_bug.cgi?id=199101] add {{ic|1=amdgpu.dc=0}} to your kernel parameters.<br />
<br />
=== R9 390 series Poor Performance and/or Instability ===<br />
<br />
If you experience issues [https://bugs.freedesktop.org/show_bug.cgi?id=91880] with a AMD R9 390 series graphics card, set {{ic|1=radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1 amdgpu.dpm=1 amdgpu.dc=1}} as [[kernel parameters]] to force the use of amdgpu driver instead of radeon.<br />
<br />
If it still does not work, try disabling DPM, by setting the [[kernel parameters]] to: {{ic|1=radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1}}<br />
<br />
=== Freezes with "[drm] IP block:gmc_v8_0 is hung!" kernel error ===<br />
<br />
If you experience freezes and kernel crashes during a GPU intensive task with the kernel error " [drm] IP block:gmc_v8_0 is hung!" [https://bugs.freedesktop.org/show_bug.cgi?id=102322], a workaround is to set {{ic|1=amggpu.vm_update_mode=3}} as [[kernel parameters]] to force the GPUVM page tables update to be done using the CPU. Downsides are listed here [https://bugs.freedesktop.org/show_bug.cgi?id=102322#c15].<br />
<br />
=== Cursor corruption ===<br />
<br />
If you experience issues with the mouse cursor sometimes not rendering properly, set {{ic|Option "SWCursor" "True"}} in the {{ic|"Device"}} section of the {{ic|/etc/X11/xorg.conf.d/20-amdgpu.conf}} configuration file.</div>Mortan1961https://wiki.archlinux.org/index.php?title=Arduino&diff=561850Arduino2019-01-05T10:19:41Z<p>Mortan1961: /* Accessing serial */ Replace gpasswd with usermod</p>
<hr />
<div>[[Category:Development]]<br />
[[Category:Science]]<br />
[[ja:Arduino]]<br />
[[Wikipedia:Arduino|Arduino]] is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It is intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.<br />
<br />
== Installation ==<br />
<br />
* Install {{Pkg|arduino}} and {{Pkg|arduino-docs}} for its offline documentation.<br />
* Add your user to the {{ic|uucp}} and {{ic|lock}} [[user group]]s (more information in the [[#Accessing serial]] section).<br />
* You may need to [[Kernel modules|load]] the {{ic|cdc_acm}} module.<br />
<br />
=== AVR Boards ===<br />
To use AVR boards such as the Arduino Uno you can install {{Pkg|arduino-avr-core}} optionally to use archlinux upstream avr-gcc instead of the bundled older avr-core. If you still want to use the older arduino-core you need to [https://www.arduino.cc/en/Guide/Cores install it in the board manager]. You can always switch between the different cores in the "Tools>Board" menu.<br />
<br />
=== Pinoccio Scout ===<br />
<br />
[https://pinocc.io/ Pinoccio Scouts] can also be programmed using the Arduino IDE. Instructions can be found [https://pinocc.io/solo here].<br />
Alternative you can install {{AUR|arduino-pinoccio}} from the [[AUR]].<br />
<br />
=== Intel Galileo ===<br />
<br />
To use the Intel Galileo boards with Archlinux install the Arduino IDE and download the Galileo tools package via "Tools->Board->Boards Manager".<br />
To fix the installation you can follow [https://github.com/arduino/Arduino/issues/5523 this github post].<br />
<br />
=== On Arm7 devices ===<br />
<br />
See [http://blog.tklee.org/2014/10/arduino-ide-158-on-banana-pi.html here] for a work around.<br />
<br />
=== RedBear Duo ===<br />
<br />
You might need to install {{Pkg|perl-archive-zip}} or you'll get an error about missing crc32.<br />
<br />
== Configuration ==<br />
<br />
=== Accessing serial ===<br />
<br />
The arduino board communicates with the computer via a serial connection or a serial-over-USB connection, so the user needs read/write access to the serial device file. [[Udev]] creates files such as {{ic|/dev/ttyUSB0}} owned by group {{ic|uucp}} so adding the user to the {{ic|uucp}} group gives the required read/write access. Also, if you are planning to use the default Java IDE, add your user to the lock group for {{ic|/var/lock/lockdev}} access.<br />
<br />
# usermod -aG lock,uucp "$USER"<br />
{{Note|You will have to logout and login again for this to take effect.}}<br />
<br />
Before uploading to the Arduino, be sure to set the correct serial port, board, and processor from the Tools menu.<br />
<br />
== stty ==<br />
<br />
Preparing:<br />
# stty -F /dev/ttyACM0 cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts<br />
<br />
Sending commands through Terminal without new line after command<br />
# echo -n "Hello World" > /dev/ttyACM0<br />
{{Note| As autoreset on serial connection is activated by default on most boards, you need to disable this feature if you want to communicate directly with your board with the last command instead of a terminal emulator (arduino IDE, screen, picocom...). If you have a Leonardo board, you are not concerned by this, because it does not autoreset. If you have an Uno board, connect a 10 µF capacitor between the RESET and GND pins. If you have another board, connect a 120 ohms resistor between the RESET and 5V pins. See http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection for more details.}}<br />
<br />
Reading what your Arduino has to tell you<br />
$ cat /dev/ttyACM0<br />
<br />
== Arduino-Builder ==<br />
You can also build Arduino sketches with the {{Pkg|arduino-builder}} command line tool. In order to use the provided {{Pkg|arduino-avr-core}} with upstream {{Pkg|avr-gcc}} and {{Pkg|avrdude}} you need to create a small settings file:<br />
<br />
{{hc|head=build.options.json |output=<br />
{<br />
"fqbn": "archlinux-arduino:avr:uno",<br />
"hardwareFolders": "/usr/share/arduino/hardware",<br />
"toolsFolders": "/usr/bin"<br />
}<br />
}}<br />
<br />
Compile a sketch with:<br />
$ arduino-builder -build-options-file build.options.json blink.ino<br />
<br />
Or pass all options via command line:<br />
$ arduino-builder -fqbn archlinux-arduino:avr:uno -hardware /usr/share/arduino/hardware -tools /usr/bin blink.ino<br />
<br />
== Alternatives for IDE ==<br />
<br />
=== ArduIDE ===<br />
<br />
ArduIDE is a Qt-based IDE for Arduino. {{AUR|arduide-git}} is available in the [[AUR]].<br />
<br />
=== gnoduino ===<br />
<br />
{{AUR|gnoduino}} is an implementation of original Arduino IDE for GNOME available in the [[AUR]]. The original Arduino IDE software is written in Java. This is a Python implementation and it is targeted at GNOME but will work on xfce4 and other WM. Its purpose is to be light, while maintaining compatibility with the original Arduino IDE. The source editor is based on gtksourceview.<br />
<br />
<br />
If you prefer working from terminal, below there are some other options to choose from.<br />
<br />
=== Arduino-CMake ===<br />
<br />
Using [https://github.com/arduino-cmake/arduino-cmake arduino-cmake] and [http://www.cmake.org/cmake/resources/software.html CMake] you can build Arduino firmware from the command line using multiple build systems. CMake lets you generate the build system that fits your needs, using the tools you like. It can generate any type of build system, from simple Makefiles, to complete projects for Eclipse, Visual Studio, XCode, etc.<br />
<br />
Requirements: {{Pkg|cmake}}, {{Pkg|arduino}}, {{Pkg|avr-gcc}}, {{Pkg|avr-binutils}}, {{Pkg|avr-libc}}, {{Pkg|avrdude}}.<br />
<br />
=== Ino ===<br />
<br />
[https://github.com/amperka/ino Ino] is a command line toolkit for working with arduino hardware. {{AUR|ino}} is available in the [[AUR]].<br />
<br />
=== Makefile ===<br />
<br />
{{Note|Update 2015-03-23. Due to recent changes in Arduino ≥v1.5, many old Makefiles do not work without some modification. A simple Makefile for Arduino version 1.5+ can be found [https://github.com/tomswartz07/arduino-makefile on GitHub].}}<br />
<br />
Instead of using the Arduino IDE it is possible to use another editor and a Makefile.<br />
<br />
Set up a directory to program your Arduino and copy the Makefile into this directory. A copy of the Makefile can be obtained from {{ic|/usr/share/arduino/hardware/cores/arduino/Makefile}}<br />
<br />
You will have to modify this a little bit to reflect your settings. The makefile should be pretty self explanatory. Here are some lines you may have to edit.<br />
<br />
PORT = usually /dev/ttyUSBx, where x is the usb serial port your arduino is plugged into<br />
TARGET = your sketch's name<br />
ARDUINO = /usr/share/arduino/lib/targets/arduino<br />
<br />
Depending on which library functions you call in your sketch, you may need to compile parts of the library. To do that you need to edit your SRC and CXXSRC to include the required libraries.<br />
<br />
Now you should be able to {{ic|make && make upload}} to your board to execute your sketch.<br />
<br />
=== Arduino-mk ===<br />
<br />
{{AUR|arduino-mk}} is another alternative Makefile approach. It allows users to have a local Makefile that includes Arduino.mk. See [https://github.com/sudar/Arduino-Makefile project page] for usage.<br />
<br />
For Arduino 1.5, try the following local Makefile (because Arduino 1.5's library directory structure is slightly different):<br />
<br />
ARDUINO_DIR = /usr/share/arduino<br />
ARDMK_DIR = /usr/share/arduino<br />
AVR_TOOLS_DIR = /usr<br />
AVRDUDE_CONF = /etc/avrdude.conf<br />
ARDUINO_CORE_PATH = /usr/share/arduino/hardware/archlinux-arduino/avr/cores/arduino<br />
BOARDS_TXT = /usr/share/arduino/hardware/archlinux-arduino/avr/boards.txt<br />
ARDUINO_VAR_PATH = /usr/share/arduino/hardware/archlinux-arduino/avr/variants<br />
BOOTLOADER_PARENT = /usr/share/arduino/hardware/archlinux-arduino/avr/bootloaders<br />
<br />
<br />
BOARD_TAG = uno<br />
ARDUINO_LIBS =<br />
<br />
include /usr/share/arduino/Arduino.mk<br />
<br />
In some cases you could need to install {{pkg|avr-libc}} and {{pkg|avrdude}}.<br />
<br />
=== Scons ===<br />
<br />
Using [http://www.scons.org/ scons] together with [https://github.com/suapapa/arscons arscons] it is very easy to use to compile and upload Arduino projects from the command line. Scons is based on python and you will need python-pyserial to use the serial interface. Install {{pkg|python-pyserial}} and {{pkg|scons}}.<br />
<br />
That will get the dependencies you need too. You will also need Arduino itself so install it as described above. Create project directory (eg. test), then create a arduino project file in your new directory. Use the same name as the directory and add .ino (eg. test.ino). Get the [https://github.com/suapapa/arscons/blob/master/SConstruct SConstruct] script from arscons and put it in your directory. Have a peek in it and, if necessary, edit it. It is a python script. Edit your project as you please, then run<br />
<br />
$ scons # This will build the project<br />
$ scons upload # This will upload the project to your Arduino<br />
<br />
=== PlatformIO ===<br />
<br />
[http://docs.platformio.ikravets.com/en/latest/quickstart.html PlatformIO] is a python tool to build and upload sketches for multiple Hardware Platforms, at the moment of writing these are Arduino/AVR based boards, TI MSP430 and TI TM4C12x Boards. In the near future the author plans to add a library function that allows to search and include libraries directly from GitHub.<br />
<br />
==== Installation ====<br />
<br />
Install the {{AUR|platformio}} or {{AUR|platformio-git}} package.<br />
<br />
==== Usage ====<br />
<br />
$ platformio platforms install atmelavr<br />
$ platformio init<br />
$ vim platformio.ini<br />
<br />
#<br />
# Atmel AVR based board + Arduino Wiring Framework<br />
#<br />
[env:ArduinoMega2560]<br />
platform = atmelavr<br />
framework = arduino<br />
board = megaatmega2560 <br />
upload_port = /dev/ttyACM0 <br />
targets = upload<br />
<br />
$ platformio run<br />
<br />
===Emacs===<br />
<br />
It is possible to configure [[Emacs]] as IDE.<br />
<br />
Install the package {{aur|emacs-arduino-mode-git}} from the [[AUR]] in order to enable the {{ic|arduino-mode}} in emacs.<br />
<br />
Add to the init script:<br />
{{hc|~/.emacs|<br />
;; arduino-mode<br />
(require 'cl)<br />
(autoload 'arduino-mode "arduino-mode" "Arduino editing mode." t)<br />
(add-to-list 'auto-mode-alist '("\.ino$" . arduino-mode))}}<br />
<br />
You can compile and upload the sketches using {{ic|Arduino-mk}} (see above) with {{ic|M-x compile}} {{ic|make upload}}.<br />
<br />
Main resource: [http://www.emacswiki.org/emacs/ArduinoSupport here].<br />
<br />
== Troubleshooting ==<br />
<br />
=== Version 1.6 ===<br />
<br />
Some older 3rd party tools may only work with Arduino 1.0 ({{AUR|arduino10}}). Some of the tools may partially work for Arduino version 1.6 ({{Pkg|arduino}}) and after. Check the version if the tools do not work. Note that some newer boards do not work with the old Arduino IDE.<br />
<br />
=== Consistent naming of Arduino devices ===<br />
<br />
If you have more than one arduino you may have noticed that they names /dev/ttyUSB[0-9] are assigned in the order of connection. In the IDE this is not so much of a problem, but when you have programmed your own software to communicate with an arduino project in the background this can be annoying. Use the following udev rules to assign static symlinks to your arduino's:<br />
{{hc|/etc/udev/rules.d/52-arduino.rules|<nowiki><br />
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="sensors/ftdi_%s{serial}"<br />
</nowiki>}}<br />
Your arduino's will be available under names like "/dev/sensors/ftdi_A700dzaF". If you want you can also assign more meaningfull names to several devices like this:<br />
{{hc|/etc/udev/rules.d/52-arduino.rules|<nowiki><br />
SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A700dzaF", SYMLINK+="arduino/nano"<br />
</nowiki>}}<br />
which will create a symlink in /dev/arduino/nano to the device with the specified serialnumber.<br />
You do need to unplug and replug your arduino for this to take effect or run<br />
udevadm trigger<br />
<br />
Common {{ic|idVendor}}/{{ic|idProduct}} pairs can be found in {{ic|hardware/arduino/avr/boards.txt}} in the distribution package. Note that some of them (notably [[wikipedia:FTDI|FTDI]] ones) are not unique to the Arduino platform. Using {{ic|serial}} attribute is a good way to distinguish between various devices.<br />
<br />
=== Error opening serial port ===<br />
<br />
You may see the serial port initially when the IDE starts, but the TX/RX leds do nothing when uploading. You may have previously changed the baudrate in the serial monitor to something it does not like. Edit ~/.arduino/preferences.txt so that serial.debug_rate is a different speed, like 115200.<br />
<br />
=== Working with Uno/Mega2560 ===<br />
<br />
The Arduino Uno and Mega2560 have an onboard USB interface (an Atmel 8U2) that accepts serial data, so they are accessed through /dev/ttyACM0 created by the cdc-acm kernel module when it is plugged in.<br />
<br />
The 8U2 firmware may need an update to ease serial communications. See [http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286350399] for more details and reply #11 for a fix. The original arduino bbs, where you can find an image explaining how to get your Uno into DFU, is now in a read-only state. If you do not have an account to view the image, see [http://www.scribd.com/doc/45913857/Arduino-UNO].<br />
<br />
You can perform a general function test of the Uno by putting it in loopback mode and typing characters into the arduino serial monitor at 115200 baud. It should echo the characters back to you. To put it in loopback, short pins 0 -> 1 on the digital side and either hold the reset button or short the GND -> RESET pins while you type.<br />
<br />
=== Application not resizing with WM, menus immediately closing ===<br />
see [[Java#Applications not resizing with WM, menus immediately closing]]<br />
<br />
== See also ==<br />
<br />
* [https://www.arduino.cc/ Official website]<br />
* https://bbs.archlinux.org/viewtopic.php?pid=295312<br />
* https://bbs.archlinux.org/viewtopic.php?pid=981348<br />
* http://answers.ros.org/question/9097/how-can-i-get-a-unique-device-path-for-my-arduinoftdi-device/</div>Mortan1961https://wiki.archlinux.org/index.php?title=Java&diff=551465Java2018-10-27T03:04:03Z<p>Mortan1961: Replace HTTP with HTTPS</p>
<hr />
<div>[[Category:Programming languages]]<br />
[[Category:Oracle]]<br />
[[cs:Java]]<br />
[[de:Java]]<br />
[[es:Java]]<br />
[[fa:Java]]<br />
[[fr:Java]]<br />
[[it:Java]]<br />
[[ja:Java]]<br />
[[pt:Java]]<br />
[[ru:Java]]<br />
[[zh-hans:Java]]<br />
{{Related articles start}}<br />
{{Related|Java Package Guidelines}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related articles end}}<br />
<br />
From the [[Wikipedia:Java (programming language)|Wikipedia article]]:<br />
<br />
:Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java virtual machine ([[Wikipedia:Java virtual machine|JVM]]) regardless of computer architecture.<br />
<br />
Arch Linux officially supports the open source [https://openjdk.java.net/ OpenJDK] versions 7, 8, 10, and 11. All these JVM can be installed without conflict and switched between using helper script {{Ic|archlinux-java}}. Several other Java environments are available in [[AUR]] but are not officially supported.<br />
<br />
== Installation ==<br />
<br />
{{Note|<br />
* Arch Linux officially only supports the [[#OpenJDK|OpenJDK]] implementation.<br />
* After installation, the Java environment will need to be recognized by the shell ({{Ic|$PATH}} variable). This can be done by sourcing {{Ic|/etc/profile}} from the command line or by logging out/in again of a Desktop Environment.}}<br />
<br />
Two ''common'' packages are respectively pulled as dependency, named {{Pkg|java-runtime-common}} (containing common files for Java Runtime Environments) and {{Pkg|java-environment-common}} (containing common files for Java Development Kits). The provided environment file {{Ic|/etc/profile.d/jre.sh}} points to a linked location {{Ic|/usr/lib/jvm/default/bin}}, set by the {{ic|archlinux-java}} helper script. The links {{Ic|/usr/lib/jvm/default}} and {{Ic|/usr/lib/jvm/default-runtime}} should '''always''' be edited with {{Ic|archlinux-java}}. This is used to display and point to a working default Java environment in {{Ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}</nowiki>}} or a Java runtime in {{Ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}/jre</nowiki>}}.<br />
<br />
Most executables of the Java installation are provided by direct links in {{Ic|/usr/bin}}, while others are available in {{Ic|$PATH}}.<br />
<br />
{{Warning|File {{Ic|/etc/profile.d/jdk.sh}} is not provided any more by any package.}}<br />
<br />
=== OpenJDK ===<br />
<br />
[[Wikipedia:OpenJDK|OpenJDK]] is an open-source implementation of the Java Platform, Standard Edition (Java SE).<br />
<br />
;Headless JRE: The minimal Java runtime - needed for executing non-GUI Java programs.<br />
;Full JRE: Full Java runtime environment - needed for executing Java GUI programs, depends on headless JRE.<br />
;JDK:[[Wikipedia:Java Development Kit|Java Development Kit]] - needed for Java development, depends on full JRE.<br />
<br />
{| class="wikitable"<br />
! Version !! Headless JRE !! Full JRE !! JDK !! Documentation !! Sources<br />
|-<br />
| [https://openjdk.java.net/projects/jdk/11/ OpenJDK 11] || {{Pkg|jre-openjdk-headless}} || {{Pkg|jre-openjdk}} || {{Pkg|jdk-openjdk}} || {{Pkg|openjdk-doc}} || {{Pkg|openjdk-src}}<br />
|-<br />
| [https://openjdk.java.net/projects/jdk/10/ OpenJDK 10] || {{Pkg|jre10-openjdk-headless}} || {{Pkg|jre10-openjdk}} || {{Pkg|jdk10-openjdk}} || {{Pkg|openjdk10-doc}} || {{Pkg|openjdk10-src}}<br />
|-<br />
| [https://openjdk.java.net/projects/jdk8/ OpenJDK 8] || {{Pkg|jre8-openjdk-headless}} || {{Pkg|jre8-openjdk}} || {{Pkg|jdk8-openjdk}} || {{Pkg|openjdk8-doc}} || {{Pkg|openjdk8-src}}<br />
|-<br />
| [https://openjdk.java.net/projects/jdk7/ OpenJDK 7] || {{Pkg|jre7-openjdk-headless}} || {{Pkg|jre7-openjdk}} || {{Pkg|jdk7-openjdk}} || {{Pkg|openjdk7-doc}} || {{Pkg|openjdk7-src}}<br />
|}<br />
<br />
{{App|IcedTea-Web|Java Web Start and the deprecated Java browser plugin.|https://icedtea.classpath.org/wiki/IcedTea-Web|{{Pkg|icedtea-web}}}}<br />
{{App|OpenJFX 8|The open-source implementation of JavaFX. You [https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases do not need] to install this package if you are making use of Java SE (the Oracle's implementation of JRE and JDK described below). This package only concerns users of the open source implementation of Java (OpenJDK project).|https://openjdk.java.net/projects/openjfx/|{{Pkg|java-openjfx}}, {{Pkg|java-openjfx-doc}}, {{Pkg|java-openjfx-src}}}}<br />
{{App|OpenJDK EA|Oracle's OpenJDK Early-Access Build for latest development version.|https://jdk.java.net|{{AUR|openjdk-devel}}}}<br />
{{App|OpenJFX EA|Oracle's OpenJFX Early-Access Build for latest development version.|https://jdk.java.net/openjfx/|{{AUR|java-openjfx-devel}}}}<br />
<br />
=== Other implementations ===<br />
<br />
{{App|Java SE|Oracle's implementation of JRE and JDK.|https://www.oracle.com/technetwork/java/javase/downloads/index.html|{{AUR|jre}} {{AUR|jre9}} {{AUR|jre8}} {{AUR|jre7}} {{AUR|jre6}} {{AUR|jdk}} {{AUR|jdk9}} {{AUR|jdk8}} {{AUR|jdk7}} {{AUR|jdk6}} {{AUR|jdk5}} {{AUR|jdk-devel}}}}<br />
{{App|OpenJ9|Eclipse's implementation of JRE, contributed by IBM.|https://www.eclipse.org/openj9/|{{AUR|jdk9-openj9-bin}} {{AUR|jdk8-openj9-bin}}}}<br />
{{App|IBM J9|IBM's implementation of the eighth edition of JRE.|https://developer.ibm.com/javasdk/|{{AUR|jdk8-j9-bin}} {{AUR|jdk7-j9-bin}} {{AUR|jdk7r1-j9-bin}}}}<br />
{{App|Parrot VM|a VM with experimental support for Java [http://trac.parrot.org/parrot/wiki/Languages] through two different methods: either as a [https://code.google.com/p/parrot-jvm/ Java VM bytecode translator], or as a [https://github.com/chrisdolan/perk Java compiler targeting the Parrot VM].|http://www.parrot.org/|{{AUR|parrot}}}}<br />
<br />
{{Note|32-bit versions of Java SE can be found by prefixing {{ic|bin32-}}, e.g. {{AUR|bin32-jre}} and {{AUR|bin32-jdk}}. They use {{AUR|java32-runtime-common}}, which functions as {{Pkg|java-runtime-common}} by suffixing with {{ic|32}}, e.g. {{ic|java32}}. The same analogy applies to {{AUR|java32-environment-common}}, which is only used by 32-bit JDK packages.}}<br />
<br />
== Switching between JVM ==<br />
<br />
The helper script {{Ic|archlinux-java}} provides such functionalities:<br />
<br />
archlinux-java <COMMAND><br />
<br />
COMMAND:<br />
status List installed Java environments and enabled one<br />
get Return the short name of the Java environment set as default<br />
set <JAVA_ENV> Force <JAVA_ENV> as default<br />
unset Unset current default Java environment<br />
fix Fix an invalid/broken default Java environment configuration<br />
<br />
=== List compatible Java environments installed ===<br />
<br />
$ archlinux-java status<br />
<br />
Example:<br />
<br />
$ archlinux-java status<br />
Available Java environments:<br />
java-7-openjdk (default)<br />
java-8-openjdk/jre<br />
<br />
Note the ''(default)'' denoting that {{Ic|java-7-openjdk}} is currently set as default. Invocation of {{Ic|java}} and other binaries will rely on this Java install. Also note on the previous output that only the ''JRE'' part of OpenJDK 8 is installed here.<br />
<br />
=== Change default Java environment ===<br />
<br />
# archlinux-java set <JAVA_ENV_NAME><br />
<br />
Example:<br />
<br />
# archlinux-java set java-8-openjdk/jre<br />
<br />
{{Tip|To see possible {{ic|<JAVA_ENV_NAME>}} names, use {{ic|archlinux-java status}}.}}<br />
<br />
Note that {{Ic|archlinux-java}} will not let you set an invalid Java environment. In the previous example, {{pkg|jre8-openjdk}} is installed but {{pkg|jdk8-openjdk}} is '''not''' so trying to set {{Ic|java-8-openjdk}} will fail:<br />
<br />
# archlinux-java set java-8-openjdk<br />
'/usr/lib/jvm/java-8-openjdk' is not a valid Java environment path<br />
<br />
=== Unsetting the default Java environment ===<br />
<br />
There should be no need to unset a Java environment as packages providing them should take care of this. Still should you want to do so, just use command {{Ic|unset}}:<br />
<br />
# archlinux-java unset<br />
<br />
=== Fixing the default Java environment ===<br />
<br />
If an invalid Java environment link is set, calling the {{Ic|archlinux-java fix}} command tries to fix it. Also note that if no default Java environment is set, this will look for valid ones and try to set it for you. Officially supported package "OpenJDK 8" will be considered first in this order, then other installed environments.<br />
<br />
# archlinux-java fix<br />
<br />
=== Launching an application with the non-default java version ===<br />
<br />
If you want to launch an application with another version of java than the default one (for example if you have both version jre7 and jre8 installed on your system), you can wrap your application in a small bash script to locally change the default PATH of java. For example if the default version is jre7 and you want use jre8:<br />
<br />
#!/bin/sh <br />
<br />
export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH<br />
exec /path/to/application "$@"<br />
<br />
== Package pre-requisites to support {{Ic|archlinux-java}} ==<br />
<br />
{{Note|This info also applies to {{ic|archlinux32-java}} for 32-bit Java packages, with the proper inclusion of {{ic|32}} to the package/executable names, where applicable.}}<br />
<br />
This section is targeted at packager willing to provide packages in [[AUR]] for an alternate JVM and be able to integrate with Arch Linux JVM scheme to use {{Ic|archlinux-java}}. To do so, packages should:<br />
<br />
* Place all files under {{Ic|/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME} }}<br />
* Ensure all executables for which [https://www.archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://www.archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common] provide links are available in the corresponding package <br />
* Ship links from {{Ic|/usr/bin}} to executables, only if these links do not already belong to [https://www.archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://www.archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common]<br />
* Suffix man pages with {{Ic|-${VENDOR_NAME}${JAVA_MAJOR_VERSION} }} to prevent conflicts (see [https://www.archlinux.org/packages/extra/x86_64/jre8-openjdk/files/ jre8-openjdk file list] where man pages are suffixed with {{Ic|-openjdk8}})<br />
* Do not declare any [[PKGBUILD#conflicts|conflicts]] nor [[PKGBUILD#replaces|replaces]] with other JDKs, {{Ic|java-runtime}}, {{Ic|java-runtime-headless}} nor {{Ic|java-environment}}<br />
* Use script {{Ic|archlinux-java}} in ''install functions'' to set the Java environment as default '''if no other valid Java environment is already set''' (ie: package should not '''force''' install as default). See [https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/java7-openjdk officially supported Java environment package sources] for examples<br />
<br />
Also please note that:<br />
* Packages that need '''any''' Java environment should declare dependency on {{Ic|java-runtime}}, {{Ic|java-runtime-headless}} or {{Ic|java-environment}} as usual<br />
* Packages that need a '''specific Java vendor''' should declare dependency on the corresponding package<br />
* OpenJDK packages now declare {{Ic|1=provides="java-runtime-openjdk=${pkgver}"}} etc. This enables a third-party package to declare dependency on an OpenJDK without specifying a version<br />
<br />
== Troubleshooting ==<br />
<br />
=== MySQL ===<br />
<br />
Due to the fact that the JDBC-drivers often use the port in the URL to establish a connection to the database, it is considered "remote" (i.e., MySQL does not listen to the port as per its default settings) despite the fact that they are possibly running on the same host, Thus, to use JDBC and MySQL you should enable remote access to MySQL, following the instructions in [[MySQL#Grant remote access]].<br />
<br />
=== Impersonate another window manager ===<br />
<br />
You may use the {{pkg|wmname}} from [https://tools.suckless.org/x/wmname suckless.org] to make the JVM believe you are running a different window manager. This may solve a rendering issue of Java GUIs occurring in window managers like [[Awesome]] or [[Dwm]] or [[Ratpoison]].<br />
<br />
$ wmname LG3D<br />
<br />
You must restart the application in question after issuing the wmname command.<br />
<br />
This works because the JVM contains a hard-coded list of known, non-re-parenting window managers. For maximum irony, some users prefer to impersonate {{ic|LG3D}}, the non-re-parenting window manager [[wikipedia:Project_Looking_Glass|written by Sun, in Java]].<br />
<br />
=== Illegible fonts ===<br />
<br />
In addition to the suggestions mentioned below in [[#Better font rendering]], some fonts may still not be legible afterwards. If this is the case, there is a good chance Microsoft fonts are being used. Install {{AUR|ttf-ms-fonts}} from the [[AUR]].<br />
<br />
=== Missing text in some applications ===<br />
<br />
If some applications are completely missing texts it may help to use the options under [[#Tips and tricks]] as suggested in {{Bug|40871}}.<br />
<br />
=== Applications not resizing with WM, menus immediately closing ===<br />
The standard Java GUI toolkit has a hard-coded list of "non-reparenting" window managers. If using one that is not on that list, there can be some problems with running some Java applications. One of the most common problems is "gray blobs", when the Java application renders as a plain gray box instead of rendering the GUI. Another one might be menus responding to your click, but closing immediately.<br />
<br />
There are several things that may help:<br />
<br />
* For {{Pkg|jre7-openjdk}} or {{Pkg|jre8-openjdk}}, append the line {{Ic|1=export _JAVA_AWT_WM_NONREPARENTING=1}} in {{ic|/etc/profile.d/jre.sh}}. Then, source the file {{ic|/etc/profile.d/jre.sh}} or log out and log back in.<br />
* For Oracle's JRE/JDK, use [https://wiki.haskell.org/Xmonad/Frequently_asked_questions#Using_SetWMName SetWMName.] However, its effect may be canceled when also using {{ic|XMonad.Hooks.EwmhDesktops}}. In this case, appending<br />
<br />
>> setWMName "LG3D"<br />
<br />
to the {{ic|LogHook}} may help.<br />
<br />
See [https://wiki.haskell.org/Xmonad/Frequently_asked_questions#Problems_with_Java_applications.2C_Applet_java_console] for more information.<br />
<br />
=== System freezes when debugging JavaFX Applications ===<br />
<br />
If your system freezes while debugging a JavaFX Application, you can try to supply the JVM option {{Ic|1=-Dsun.awt.disablegrab=true}}.<br />
<br />
See https://bugs.java.com/view_bug.do?bug_id=6714678<br />
<br />
=== JavaFX's MediaPlayer constructor throws an exception ===<br />
<br />
Creating instance of MediaPlayer class from JavaFX's sound modules might throw following exception (both Oracle JDK and OpenJDK)<br />
<br />
... (i.e. FXMLLoader construction exceptions) ...<br />
Caused by: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!<br />
at javafx.scene.media.MediaException.exceptionToMediaException(MediaException.java:146)<br />
at javafx.scene.media.MediaPlayer.init(MediaPlayer.java:511)<br />
at javafx.scene.media.MediaPlayer.<init>(MediaPlayer.java:414)<br />
at <constructor call><br />
...<br />
<br />
which is a result of some incompatibilities of JavaFX with modern {{pkg|ffmpeg}} build delivered within Arch Linux repository.<br />
<br />
Working solution is to install {{AUR|ffmpeg-compat-55}}.<br />
<br />
See https://www.reddit.com/r/archlinux/comments/70o8o6/using_a_javafx_mediaplayer_in_arch/<br />
<br />
=== Java applications cannot open external links ===<br />
If a Java application is not able to open a link to, for example, your web browser, install {{Pkg|gvfs}}. This is required by the Desktop.Action.BROWSE method. See [https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1574879/comments/2]<br />
<br />
== Tips and tricks ==<br />
<br />
{{Note|Suggestions in this section are applicable to all applications, using explicitly installed (external) Java runtime. Some applications are bundled with own (private) runtime or use own mechanics for GUI, font rendering, etc., so none of written below is guaranteed to work.}}<br />
<br />
Behavior of most Java applications can be controlled by supplying predefined variables to Java runtime. From [https://bbs.archlinux.org/viewtopic.php?id=72892 this forum post], a way to do it consists of adding the following line in your {{Ic|~/.bashrc}} (or {{Ic|/etc/profile.d/jre.sh}} to affect programs that are not run by sourcing {{Ic|~/.bashrc}}, e.g., launching a program from Gnome's Applications view):<br />
<br />
export _JAVA_OPTIONS="-D'''<option 1>''' -D'''<option 2>'''..."<br />
<br />
For example, to use system anti-aliased fonts and make swing use the GTK look and feel:<br />
<br />
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'<br />
<br />
=== Better font rendering ===<br />
<br />
Both closed source and open source implementations of Java are known to have improperly implemented anti-aliasing of fonts. This can be fixed with the following options: {{Ic|1=-Dawt.useSystemAAFontSettings=on}}, {{Ic|1=-Dswing.aatext=true}}<br />
<br />
See [[Java Runtime Environment fonts]] for more detailed information.<br />
<br />
=== Silence 'Picked up _JAVA_OPTIONS' message on command line ===<br />
<br />
Setting the _JAVA_OPTIONS environment variables makes java (openjdk) write to stderr messages of the form: 'Picked up _JAVA_OPTIONS=...'. To suppress those messages in your terminal you can unset the environment variable in your shell startup files and alias java to pass those same options as command line arguments:<br />
<br />
_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS"<br />
unset _JAVA_OPTIONS<br />
alias java='java "$_SILENT_JAVA_OPTIONS"'<br />
<br />
=== GTK LookAndFeel ===<br />
<br />
If your Java programs look ugly, you may want to set up the default look and feel for the swing components:<br />
<br />
{{Ic|1=swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}.<br />
<br />
Some Java programs insist on using the cross platform Metal look and feel. In some of these cases you can force these apps to use the GTK look and feel by setting the following property:<br />
<br />
{{Ic|1=swing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}.<br />
<br />
==== GTK3 Support ====<br />
<br />
In Java releases prior to version 9, the GTK LookAndFeel is linked against GTK2, whilst many newer desktop applications use GTK3. This incompatibility between GTK versions may break applications utilizing Java plugins with GUI, as the mixing of GTK2 and GTK3 in the same process is not supported (for example, LibreOffice 5.0). <br />
<br />
Since [https://openjdk.java.net/jeps/283 Java 9], the GTK LookAndFeel can be run against GTK versions {{Ic|2}}, {{Ic|2.2}} and {{Ic|3}}, defaulting to GTK2. This can be overridden by setting the following property:<br />
<br />
{{Ic|1=jdk.gtk.version=3}}<br />
<br />
=== Better 2D performance ===<br />
<br />
Switching to OpenGL-based hardware acceleration pipeline will improve 2D performance<br />
<br />
export _JAVA_OPTIONS='-Dsun.java2d.opengl=true'<br />
<br />
{{Note|Enabling this option may cause the UI of software like JetBrains IDEs misbehave, making them drawing windows, popups and toolbars partially.}}<br />
<br />
=== Non-reparenting window managers / Grey window / Programs not drawing properly ===<br />
<br />
Non-reparenting window managers user should set the following environment variable in their {{Ic|.xinitrc}}<br />
<br />
export _JAVA_AWT_WM_NONREPARENTING=1<br />
<br />
Not setting this may result in java programs not being drawn properly.<br />
<br />
== See also ==<br />
<br />
* [https://math.hws.edu/javanotes/ Introduction to Programming Using Java]</div>Mortan1961https://wiki.archlinux.org/index.php?title=Java&diff=551464Java2018-10-27T02:57:56Z<p>Mortan1961: Add OpenJDK 11</p>
<hr />
<div>[[Category:Programming languages]]<br />
[[Category:Oracle]]<br />
[[cs:Java]]<br />
[[de:Java]]<br />
[[es:Java]]<br />
[[fa:Java]]<br />
[[fr:Java]]<br />
[[it:Java]]<br />
[[ja:Java]]<br />
[[pt:Java]]<br />
[[ru:Java]]<br />
[[zh-hans:Java]]<br />
{{Related articles start}}<br />
{{Related|Java Package Guidelines}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related articles end}}<br />
<br />
From the [[Wikipedia:Java (programming language)|Wikipedia article]]:<br />
<br />
:Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java virtual machine ([[Wikipedia:Java virtual machine|JVM]]) regardless of computer architecture.<br />
<br />
Arch Linux officially supports the open source [http://openjdk.java.net/ OpenJDK] versions 7, 8, 10, and 11. All these JVM can be installed without conflict and switched between using helper script {{Ic|archlinux-java}}. Several other Java environments are available in [[AUR]] but are not officially supported.<br />
<br />
== Installation ==<br />
<br />
{{Note|<br />
* Arch Linux officially only supports the [[#OpenJDK|OpenJDK]] implementation.<br />
* After installation, the Java environment will need to be recognized by the shell ({{Ic|$PATH}} variable). This can be done by sourcing {{Ic|/etc/profile}} from the command line or by logging out/in again of a Desktop Environment.}}<br />
<br />
Two ''common'' packages are respectively pulled as dependency, named {{Pkg|java-runtime-common}} (containing common files for Java Runtime Environments) and {{Pkg|java-environment-common}} (containing common files for Java Development Kits). The provided environment file {{Ic|/etc/profile.d/jre.sh}} points to a linked location {{Ic|/usr/lib/jvm/default/bin}}, set by the {{ic|archlinux-java}} helper script. The links {{Ic|/usr/lib/jvm/default}} and {{Ic|/usr/lib/jvm/default-runtime}} should '''always''' be edited with {{Ic|archlinux-java}}. This is used to display and point to a working default Java environment in {{Ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}</nowiki>}} or a Java runtime in {{Ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}/jre</nowiki>}}.<br />
<br />
Most executables of the Java installation are provided by direct links in {{Ic|/usr/bin}}, while others are available in {{Ic|$PATH}}.<br />
<br />
{{Warning|File {{Ic|/etc/profile.d/jdk.sh}} is not provided any more by any package.}}<br />
<br />
=== OpenJDK ===<br />
<br />
[[Wikipedia:OpenJDK|OpenJDK]] is an open-source implementation of the Java Platform, Standard Edition (Java SE).<br />
<br />
;Headless JRE: The minimal Java runtime - needed for executing non-GUI Java programs.<br />
;Full JRE: Full Java runtime environment - needed for executing Java GUI programs, depends on headless JRE.<br />
;JDK:[[Wikipedia:Java Development Kit|Java Development Kit]] - needed for Java development, depends on full JRE.<br />
<br />
{| class="wikitable"<br />
! Version !! Headless JRE !! Full JRE !! JDK !! Documentation !! Sources<br />
|-<br />
| [https://openjdk.java.net/projects/jdk/11/ OpenJDK 11] || {{Pkg|jre-openjdk-headless}} || {{Pkg|jre-openjdk}} || {{Pkg|jdk-openjdk}} || {{Pkg|openjdk-doc}} || {{Pkg|openjdk-src}}<br />
|-<br />
| [http://openjdk.java.net/projects/jdk/10/ OpenJDK 10] || {{Pkg|jre10-openjdk-headless}} || {{Pkg|jre10-openjdk}} || {{Pkg|jdk10-openjdk}} || {{Pkg|openjdk10-doc}} || {{Pkg|openjdk10-src}}<br />
|-<br />
| [http://openjdk.java.net/projects/jdk8/ OpenJDK 8] || {{Pkg|jre8-openjdk-headless}} || {{Pkg|jre8-openjdk}} || {{Pkg|jdk8-openjdk}} || {{Pkg|openjdk8-doc}} || {{Pkg|openjdk8-src}}<br />
|-<br />
| [http://openjdk.java.net/projects/jdk7/ OpenJDK 7] || {{Pkg|jre7-openjdk-headless}} || {{Pkg|jre7-openjdk}} || {{Pkg|jdk7-openjdk}} || {{Pkg|openjdk7-doc}} || {{Pkg|openjdk7-src}}<br />
|}<br />
<br />
{{App|IcedTea-Web|Java Web Start and the deprecated Java browser plugin.|https://icedtea.classpath.org/wiki/IcedTea-Web|{{Pkg|icedtea-web}}}}<br />
{{App|OpenJFX 8|The open-source implementation of JavaFX. You [https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases do not need] to install this package if you are making use of Java SE (the Oracle's implementation of JRE and JDK described below). This package only concerns users of the open source implementation of Java (OpenJDK project).|http://openjdk.java.net/projects/openjfx/|{{Pkg|java-openjfx}}, {{Pkg|java-openjfx-doc}}, {{Pkg|java-openjfx-src}}}}<br />
{{App|OpenJDK EA|Oracle's OpenJDK Early-Access Build for latest development version.|http://jdk.java.net|{{AUR|openjdk-devel}}}}<br />
{{App|OpenJFX EA|Oracle's OpenJFX Early-Access Build for latest development version.|http://jdk.java.net/openjfx/|{{AUR|java-openjfx-devel}}}}<br />
<br />
=== Other implementations ===<br />
<br />
{{App|Java SE|Oracle's implementation of JRE and JDK.|http://www.oracle.com/technetwork/java/javase/downloads/index.html|{{AUR|jre}} {{AUR|jre9}} {{AUR|jre8}} {{AUR|jre7}} {{AUR|jre6}} {{AUR|jdk}} {{AUR|jdk9}} {{AUR|jdk8}} {{AUR|jdk7}} {{AUR|jdk6}} {{AUR|jdk5}} {{AUR|jdk-devel}}}}<br />
{{App|OpenJ9|Eclipse's implementation of JRE, contributed by IBM.|https://www.eclipse.org/openj9/|{{AUR|jdk9-openj9-bin}} {{AUR|jdk8-openj9-bin}}}}<br />
{{App|IBM J9|IBM's implementation of the eighth edition of JRE.|https://developer.ibm.com/javasdk/|{{AUR|jdk8-j9-bin}} {{AUR|jdk7-j9-bin}} {{AUR|jdk7r1-j9-bin}}}}<br />
{{App|Parrot VM|a VM with experimental support for Java [http://trac.parrot.org/parrot/wiki/Languages] through two different methods: either as a [http://code.google.com/p/parrot-jvm/ Java VM bytecode translator], or as a [https://github.com/chrisdolan/perk Java compiler targeting the Parrot VM].|http://www.parrot.org/|{{AUR|parrot}}}}<br />
<br />
{{Note|32-bit versions of Java SE can be found by prefixing {{ic|bin32-}}, e.g. {{AUR|bin32-jre}} and {{AUR|bin32-jdk}}. They use {{AUR|java32-runtime-common}}, which functions as {{Pkg|java-runtime-common}} by suffixing with {{ic|32}}, e.g. {{ic|java32}}. The same analogy applies to {{AUR|java32-environment-common}}, which is only used by 32-bit JDK packages.}}<br />
<br />
== Switching between JVM ==<br />
<br />
The helper script {{Ic|archlinux-java}} provides such functionalities:<br />
<br />
archlinux-java <COMMAND><br />
<br />
COMMAND:<br />
status List installed Java environments and enabled one<br />
get Return the short name of the Java environment set as default<br />
set <JAVA_ENV> Force <JAVA_ENV> as default<br />
unset Unset current default Java environment<br />
fix Fix an invalid/broken default Java environment configuration<br />
<br />
=== List compatible Java environments installed ===<br />
<br />
$ archlinux-java status<br />
<br />
Example:<br />
<br />
$ archlinux-java status<br />
Available Java environments:<br />
java-7-openjdk (default)<br />
java-8-openjdk/jre<br />
<br />
Note the ''(default)'' denoting that {{Ic|java-7-openjdk}} is currently set as default. Invocation of {{Ic|java}} and other binaries will rely on this Java install. Also note on the previous output that only the ''JRE'' part of OpenJDK 8 is installed here.<br />
<br />
=== Change default Java environment ===<br />
<br />
# archlinux-java set <JAVA_ENV_NAME><br />
<br />
Example:<br />
<br />
# archlinux-java set java-8-openjdk/jre<br />
<br />
{{Tip|To see possible {{ic|<JAVA_ENV_NAME>}} names, use {{ic|archlinux-java status}}.}}<br />
<br />
Note that {{Ic|archlinux-java}} will not let you set an invalid Java environment. In the previous example, {{pkg|jre8-openjdk}} is installed but {{pkg|jdk8-openjdk}} is '''not''' so trying to set {{Ic|java-8-openjdk}} will fail:<br />
<br />
# archlinux-java set java-8-openjdk<br />
'/usr/lib/jvm/java-8-openjdk' is not a valid Java environment path<br />
<br />
=== Unsetting the default Java environment ===<br />
<br />
There should be no need to unset a Java environment as packages providing them should take care of this. Still should you want to do so, just use command {{Ic|unset}}:<br />
<br />
# archlinux-java unset<br />
<br />
=== Fixing the default Java environment ===<br />
<br />
If an invalid Java environment link is set, calling the {{Ic|archlinux-java fix}} command tries to fix it. Also note that if no default Java environment is set, this will look for valid ones and try to set it for you. Officially supported package "OpenJDK 8" will be considered first in this order, then other installed environments.<br />
<br />
# archlinux-java fix<br />
<br />
=== Launching an application with the non-default java version ===<br />
<br />
If you want to launch an application with another version of java than the default one (for example if you have both version jre7 and jre8 installed on your system), you can wrap your application in a small bash script to locally change the default PATH of java. For example if the default version is jre7 and you want use jre8:<br />
<br />
#!/bin/sh <br />
<br />
export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH<br />
exec /path/to/application "$@"<br />
<br />
== Package pre-requisites to support {{Ic|archlinux-java}} ==<br />
<br />
{{Note|This info also applies to {{ic|archlinux32-java}} for 32-bit Java packages, with the proper inclusion of {{ic|32}} to the package/executable names, where applicable.}}<br />
<br />
This section is targeted at packager willing to provide packages in [[AUR]] for an alternate JVM and be able to integrate with Arch Linux JVM scheme to use {{Ic|archlinux-java}}. To do so, packages should:<br />
<br />
* Place all files under {{Ic|/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME} }}<br />
* Ensure all executables for which [https://www.archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://www.archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common] provide links are available in the corresponding package <br />
* Ship links from {{Ic|/usr/bin}} to executables, only if these links do not already belong to [https://www.archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://www.archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common]<br />
* Suffix man pages with {{Ic|-${VENDOR_NAME}${JAVA_MAJOR_VERSION} }} to prevent conflicts (see [https://www.archlinux.org/packages/extra/x86_64/jre8-openjdk/files/ jre8-openjdk file list] where man pages are suffixed with {{Ic|-openjdk8}})<br />
* Do not declare any [[PKGBUILD#conflicts|conflicts]] nor [[PKGBUILD#replaces|replaces]] with other JDKs, {{Ic|java-runtime}}, {{Ic|java-runtime-headless}} nor {{Ic|java-environment}}<br />
* Use script {{Ic|archlinux-java}} in ''install functions'' to set the Java environment as default '''if no other valid Java environment is already set''' (ie: package should not '''force''' install as default). See [https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/java7-openjdk officially supported Java environment package sources] for examples<br />
<br />
Also please note that:<br />
* Packages that need '''any''' Java environment should declare dependency on {{Ic|java-runtime}}, {{Ic|java-runtime-headless}} or {{Ic|java-environment}} as usual<br />
* Packages that need a '''specific Java vendor''' should declare dependency on the corresponding package<br />
* OpenJDK packages now declare {{Ic|1=provides="java-runtime-openjdk=${pkgver}"}} etc. This enables a third-party package to declare dependency on an OpenJDK without specifying a version<br />
<br />
== Troubleshooting ==<br />
<br />
=== MySQL ===<br />
<br />
Due to the fact that the JDBC-drivers often use the port in the URL to establish a connection to the database, it is considered "remote" (i.e., MySQL does not listen to the port as per its default settings) despite the fact that they are possibly running on the same host, Thus, to use JDBC and MySQL you should enable remote access to MySQL, following the instructions in [[MySQL#Grant remote access]].<br />
<br />
=== Impersonate another window manager ===<br />
<br />
You may use the {{pkg|wmname}} from [http://tools.suckless.org/x/wmname suckless.org] to make the JVM believe you are running a different window manager. This may solve a rendering issue of Java GUIs occurring in window managers like [[Awesome]] or [[Dwm]] or [[Ratpoison]].<br />
<br />
$ wmname LG3D<br />
<br />
You must restart the application in question after issuing the wmname command.<br />
<br />
This works because the JVM contains a hard-coded list of known, non-re-parenting window managers. For maximum irony, some users prefer to impersonate {{ic|LG3D}}, the non-re-parenting window manager [[wikipedia:Project_Looking_Glass|written by Sun, in Java]].<br />
<br />
=== Illegible fonts ===<br />
<br />
In addition to the suggestions mentioned below in [[#Better font rendering]], some fonts may still not be legible afterwards. If this is the case, there is a good chance Microsoft fonts are being used. Install {{AUR|ttf-ms-fonts}} from the [[AUR]].<br />
<br />
=== Missing text in some applications ===<br />
<br />
If some applications are completely missing texts it may help to use the options under [[#Tips and tricks]] as suggested in {{Bug|40871}}.<br />
<br />
=== Applications not resizing with WM, menus immediately closing ===<br />
The standard Java GUI toolkit has a hard-coded list of "non-reparenting" window managers. If using one that is not on that list, there can be some problems with running some Java applications. One of the most common problems is "gray blobs", when the Java application renders as a plain gray box instead of rendering the GUI. Another one might be menus responding to your click, but closing immediately.<br />
<br />
There are several things that may help:<br />
<br />
* For {{Pkg|jre7-openjdk}} or {{Pkg|jre8-openjdk}}, append the line {{Ic|1=export _JAVA_AWT_WM_NONREPARENTING=1}} in {{ic|/etc/profile.d/jre.sh}}. Then, source the file {{ic|/etc/profile.d/jre.sh}} or log out and log back in.<br />
* For Oracle's JRE/JDK, use [https://wiki.haskell.org/Xmonad/Frequently_asked_questions#Using_SetWMName SetWMName.] However, its effect may be canceled when also using {{ic|XMonad.Hooks.EwmhDesktops}}. In this case, appending<br />
<br />
>> setWMName "LG3D"<br />
<br />
to the {{ic|LogHook}} may help.<br />
<br />
See [http://wiki.haskell.org/Xmonad/Frequently_asked_questions#Problems_with_Java_applications.2C_Applet_java_console] for more information.<br />
<br />
=== System freezes when debugging JavaFX Applications ===<br />
<br />
If your system freezes while debugging a JavaFX Application, you can try to supply the JVM option {{Ic|1=-Dsun.awt.disablegrab=true}}.<br />
<br />
See http://bugs.java.com/view_bug.do?bug_id=6714678<br />
<br />
=== JavaFX's MediaPlayer constructor throws an exception ===<br />
<br />
Creating instance of MediaPlayer class from JavaFX's sound modules might throw following exception (both Oracle JDK and OpenJDK)<br />
<br />
... (i.e. FXMLLoader construction exceptions) ...<br />
Caused by: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!<br />
at javafx.scene.media.MediaException.exceptionToMediaException(MediaException.java:146)<br />
at javafx.scene.media.MediaPlayer.init(MediaPlayer.java:511)<br />
at javafx.scene.media.MediaPlayer.<init>(MediaPlayer.java:414)<br />
at <constructor call><br />
...<br />
<br />
which is a result of some incompatibilities of JavaFX with modern {{pkg|ffmpeg}} build delivered within Arch Linux repository.<br />
<br />
Working solution is to install {{AUR|ffmpeg-compat-55}}.<br />
<br />
See http://www.reddit.com/r/archlinux/comments/70o8o6/using_a_javafx_mediaplayer_in_arch/<br />
<br />
=== Java applications cannot open external links ===<br />
If a Java application is not able to open a link to, for example, your web browser, install {{Pkg|gvfs}}. This is required by the Desktop.Action.BROWSE method. See [https://bugs.launchpad.net/ubuntu/+source/openjdk-8/+bug/1574879/comments/2]<br />
<br />
== Tips and tricks ==<br />
<br />
{{Note|Suggestions in this section are applicable to all applications, using explicitly installed (external) Java runtime. Some applications are bundled with own (private) runtime or use own mechanics for GUI, font rendering, etc., so none of written below is guaranteed to work.}}<br />
<br />
Behavior of most Java applications can be controlled by supplying predefined variables to Java runtime. From [https://bbs.archlinux.org/viewtopic.php?id=72892 this forum post], a way to do it consists of adding the following line in your {{Ic|~/.bashrc}} (or {{Ic|/etc/profile.d/jre.sh}} to affect programs that are not run by sourcing {{Ic|~/.bashrc}}, e.g., launching a program from Gnome's Applications view):<br />
<br />
export _JAVA_OPTIONS="-D'''<option 1>''' -D'''<option 2>'''..."<br />
<br />
For example, to use system anti-aliased fonts and make swing use the GTK look and feel:<br />
<br />
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'<br />
<br />
=== Better font rendering ===<br />
<br />
Both closed source and open source implementations of Java are known to have improperly implemented anti-aliasing of fonts. This can be fixed with the following options: {{Ic|1=-Dawt.useSystemAAFontSettings=on}}, {{Ic|1=-Dswing.aatext=true}}<br />
<br />
See [[Java Runtime Environment fonts]] for more detailed information.<br />
<br />
=== Silence 'Picked up _JAVA_OPTIONS' message on command line ===<br />
<br />
Setting the _JAVA_OPTIONS environment variables makes java (openjdk) write to stderr messages of the form: 'Picked up _JAVA_OPTIONS=...'. To suppress those messages in your terminal you can unset the environment variable in your shell startup files and alias java to pass those same options as command line arguments:<br />
<br />
_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS"<br />
unset _JAVA_OPTIONS<br />
alias java='java "$_SILENT_JAVA_OPTIONS"'<br />
<br />
=== GTK LookAndFeel ===<br />
<br />
If your Java programs look ugly, you may want to set up the default look and feel for the swing components:<br />
<br />
{{Ic|1=swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}.<br />
<br />
Some Java programs insist on using the cross platform Metal look and feel. In some of these cases you can force these apps to use the GTK look and feel by setting the following property:<br />
<br />
{{Ic|1=swing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}.<br />
<br />
==== GTK3 Support ====<br />
<br />
In Java releases prior to version 9, the GTK LookAndFeel is linked against GTK2, whilst many newer desktop applications use GTK3. This incompatibility between GTK versions may break applications utilizing Java plugins with GUI, as the mixing of GTK2 and GTK3 in the same process is not supported (for example, LibreOffice 5.0). <br />
<br />
Since [http://openjdk.java.net/jeps/283 Java 9], the GTK LookAndFeel can be run against GTK versions {{Ic|2}}, {{Ic|2.2}} and {{Ic|3}}, defaulting to GTK2. This can be overridden by setting the following property:<br />
<br />
{{Ic|1=jdk.gtk.version=3}}<br />
<br />
=== Better 2D performance ===<br />
<br />
Switching to OpenGL-based hardware acceleration pipeline will improve 2D performance<br />
<br />
export _JAVA_OPTIONS='-Dsun.java2d.opengl=true'<br />
<br />
{{Note|Enabling this option may cause the UI of software like JetBrains IDEs misbehave, making them drawing windows, popups and toolbars partially.}}<br />
<br />
=== Non-reparenting window managers / Grey window / Programs not drawing properly ===<br />
<br />
Non-reparenting window managers user should set the following environment variable in their {{Ic|.xinitrc}}<br />
<br />
export _JAVA_AWT_WM_NONREPARENTING=1<br />
<br />
Not setting this may result in java programs not being drawn properly.<br />
<br />
== See also ==<br />
<br />
* [http://math.hws.edu/javanotes/ Introduction to Programming Using Java]</div>Mortan1961https://wiki.archlinux.org/index.php?title=USBGuard&diff=547742USBGuard2018-10-15T04:21:18Z<p>Mortan1961: /* Installation */ Moved from AUR to Community</p>
<hr />
<div>[[Category:Hardware detection and troubleshooting]]<br />
[[Category:Security]]<br />
[[ja:Usbguard]]<br />
[https://github.com/dkopecek/usbguard USBGuard] offers a white/black-listing mechanism for USB-devices. Inspiration for this is drawn from exploits like BadUSB.<br />
It makes use of a device blocking infrastructure included in the Linux kernel and consists of a daemon and some front-ends.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{Pkg|usbguard}} package, or {{Aur|usbguard-git}} for the development version.<br />
<br />
== Configuration ==<br />
<br />
The main configuration file is found in {{ic|/etc/usbguard/usbguard-daemon.conf}}. To edit it, you need root privileges.<br />
<br />
If you want to control the daemon via IPC, be sure to add your username to {{ic|IPCAllowedUsers}} or your group to {{ic|IPCAllowedGroups}} to make rules persistent. In most cases, you want this.<br />
<br />
Per default, usbguard blocks all newly connected devices and devices connected before daemon startup are left as is. This can be changed with the {{ic|PresentDevicePolicy}} option. Setting this key to {{ic|apply-policy}} is the most secure setting, which ensures security even when the daemon hits a restart.<br />
<br />
With the key {{ic|ImplicitPolicyTarget}} you can configure the default treatment of devices, if no rules match. The most secure option here is {{ic|block}}.<br />
<br />
For an in-depth documentation of configuration see the very well commented configuration file.<br />
<br />
== Usage ==<br />
<br />
USBGuard has a core daemon, a CLI, a QT GUI, a DBUS interface and an API via libusbguard.<br />
<br />
If you want to use the QT GUI or another program communicating via DBUS, [[enable]] and [[start]] {{ic|usbguard-dbus.service}}.<br />
<br />
If you only want to communicate via API (with the CLI tool or another software using libusbguard) [[enable]] and [[start]] {{ic|usbguard.service}}.<br />
<br />
{{Warning|Make sure to actually configure the daemon before starting/enabling it or all USB devices will immediately be blocked!}}<br />
<br />
The CLI is available via {{ic|usbguard}}.<br />
<br />
See the according man pages for more info.<br />
<br />
A QT applet can be started with {{ic|usbguard-applet-qt}} and provides an interactive graphical interface.<br />
<br />
=== Rules ===<br />
<br />
To configure usbguard to your needs, you can edit {{ic|/etc/usbguard/rules.conf}}. However manual editing of the rules is normally not necessary. You can generate a ruleset based on your currently attached USB devices by executing {{ic|usbguard generate-policy > /etc/usbguard/rules.conf}} as root.<br />
<br />
The rules syntax is formally explained [https://github.com/USBGuard/usbguard/blob/master/doc/man/usbguard-rules.conf.5.adoc here].<br />
An example for a hp printer connected via USB can look like this:<br />
<br />
allow id 03f0:0c17 serial "00CNFD234631" name "hp LaserJet 2020" hash "a0ef07fceb6fb77698f79a44a450121m" parent-hash "69d19c1a5733a31e7e6d9530e6k434a6" with-interface { 07:01:03 07:01:02 07:01:01 }<br />
<br />
A rule begins with a policy. {{ic|allow}} whitelists a device, {{ic|block}} stops the device from being processed now and {{ic|reject}} removes the device from the system.<br />
Then follows a set of attributes with their options, as detailed below.<br />
<br />
{| class="wikitable"<br />
! Attribute || Description<br />
|-<br />
| id usb-device-id || Match a USB device ID. <br />
|-<br />
| id [operator] { usb-device-id ... } || Match a set of USB device IDs.<br />
|-<br />
| hash "value" || Match a hash computed from the device attribute values and the USB descriptor data. The hash is computed for every device by USBGuard.<br />
|-<br />
| hash [operator] { "value" ... } || Match a set of device hashes.<br />
|-<br />
| parent-hash "value" || Match a hash of the parent device.<br />
|-<br />
| parent-hash [operator] { "value" ... } || Match a set of parent device hashes.<br />
|-<br />
| name "device-name" || Match the USB device name attribute.<br />
|-<br />
| name [operator] { "device-name" ... } || Match a set of USB device names.<br />
|-<br />
| serial "serial-number" || Match the USB iSerial device attribute.<br />
|-<br />
| serial [operator] { "serial-number" ... } || Match a set of USB iSerial device attributes.<br />
|-<br />
| via-port "port-id" || Match the USB port through which the device is connected. Note that some systems have unstable port numbering which change after the system reboots or certain kernel modules are reloaded (and maybe in other cases). Use the parent-hash attribute if you want to ensure that a device is connected via a specific parent device. <br />
|-<br />
| via-port [operator] { "port-id" ... } || Match a set of USB ports.<br />
|-<br />
| with-interface interface-type || Match an interface type that the USB device provides.<br />
|-<br />
| with-interface [operator] { interface-type interface-type ... } || Match a set of interface types against the set of interfaces that the USB device provides.<br />
<br />
|}<br />
<br />
== See also ==<br />
<br />
* [https://github.com/dkopecek/usbguard/ USBGuard Website]<br />
* [https://raw.githubusercontent.com/dkopecek/usbguard/master/doc/usbguard-component-diagram.png USBGuard component diagram]<br />
* [https://srlabs.de/bites/usb-peripherals-turn/ BadUSB background info]<br />
* [https://www.kernel.org/doc/Documentation/usb/authorization.txt Kernel interface for USB device control]</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:PulseAudio&diff=547000Talk:PulseAudio2018-10-10T14:44:02Z<p>Mortan1961: /* Restore package list */ Close</p>
<hr />
<div>== Abandoned draft ==<br />
<br />
[[PulseAudio/Configuration]] was initially created to discuss PA configuration; then its goal was changed to be a replacement for this whole article; then it was abandoned. Currently it's marked for merge in [[PulseAudio#Configuration]]: is there anything worth being merged from there? -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 04:44, 30 November 2014 (UTC)<br />
<br />
:It seems to focus more on generic explanation/configuration, where the main article is mostly about troubleshooting (considering the size of that section, you'd consider moving it to [[PulseAudio/Troubleshooting]] ...) -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:40, 30 November 2014 (UTC)<br />
<br />
::How much sense would it make to actually merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] and then simply redirect [[PulseAudio/Configuration]] to [[PulseAudio#Configuration]]?<br />
::I'd agree with moving Troubleshooting to [[PulseAudio/Troubleshooting]].<br />
::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 12:01, 2 December 2014 (UTC)<br />
<br />
:::I do agree it makes sense to merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] in [[PulseAudio/Configuration]]. I made an attempt in this way. [[User:Gabx|Gabx]] ([[User talk:Gabx|talk]]) 18:24, 28 December 2014 (UTC)<br />
<br />
::::I like what I see so far, more extensive configuration in the main article also allows to cut back on [[PulseAudio/Troubleshooting]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 23:29, 28 December 2014 (UTC)<br />
<br />
== Equalizer module is unsupported ==<br />
<br />
As of {{pkg|pulseaudio}}-7.0-2, loading the {{ic|module-equalizer-sink}} module results in the following warning:<br />
<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased latency or audible artifacts.<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: If you're facing audio problems, try unloading this module as a potential workaround.<br />
<br />
Running ''qpaeq'' then makes PulseAudio crash with this error:<br />
<br />
pulseaudio[535]: E: [pulseaudio] iface-module.c: Assertion 'pa_dbus_protocol_add_interface(m->dbus_protocol, m->path, &module_interface_info, m) >= 0' failed at modules/dbus/iface-module.c:309, function pa_dbusiface_module_new(). Aborting.<br />
<br />
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:43, 28 September 2015 (UTC)<br />
<br />
:This is not correct. Recently installed {{pkg|pulseaudio}}-7.0-2 and following the instructions in the wiki am successfully running the equalizer.<br />
<br />
:[[User:Brettski|brettski]] ([[User talk:Brettski|talk]]) 03:46, 13 October 2015 (UTC)<br />
<br />
::This is odd. You should have at least seen the first warning in your journal... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:01, 13 October 2015 (UTC)<br />
<br />
== Adding User to Audio Group ==<br />
<br />
Currently, the article says, "There is no need to add your user to audio group, as it uses udev and logind to dynamically give access to the currently "active" user". That is a little heavy-handed; perhaps a wording like "There is '''usually''' no need..."? For instance, on one of my machines running pulse audio, I was unable to play any sounds as "me", but could using root. The server is running headless, and I access it over SSH. It's understandable that udev doesn't consider "me" the currently "active" user in this scenario. It is essential to know that adding a user to the audio group helps in this circumstance, so I appreciate the explicit mention of that group. Does my rewording make sense, or is there a better rewording? [[User:Lmat|Lmat]] ([[User talk:Lmat|talk]]) 14:29, 1 March 2016 (UTC)<br />
:This looks like a reasonable rewording. Additionally I would considering explicitly describing in which cases it might make sense in the Wiki. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 14:56, 1 March 2016 (UTC)<br />
<br />
== Default sink @DEFAULT_SINK@ and keyboard control ==<br />
<br />
I got a hard time finding {{ic|pactl set-sink-volume @DEFAULT_SINK@ -5%}}.<br />
<br />
{{ic|@DEFAULT_SINK@}} comes very handy and fixes a long time frustration with PulseAudio (with sink indices changing each time I plug unplug a jack, or to get commands working across multiple machines with different sinks).<br />
<br />
It will probably help more people to make some changes or add a Tip about {{ic|@DEFAULT_SINK@}} somewhere ([[PulseAudio#Keyboard volume control]] ?).<br />
<br />
Only after finding about it, I found [[Xbindkeys#Xbindkeysrc]]. Maybe [[PulseAudio#Keyboard volume control]] could also Tip about [[Xbindkeys#Xbindkeysrc]].<br />
<br />
(I would have edit the page, if only I knew which changes was best: add a Tip and/or change the command lines and/or something else ?)<br />
<br />
-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 09:55, 4 September 2016 (UTC)<br />
<br />
: I suppose changing the commands is the best approach. However for those who want to edit a specific sink a small note should be added. This is just my personal opinion on this matter. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 10:11, 4 September 2016 (UTC)<br />
<br />
:: I think it is better suited as a tip, because if you start directly with {{ic|@DEFAULT_SINK@}}, it's not clear at all what the shortcut is for. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:07, 4 September 2016 (UTC)<br />
<br />
:: I've added the tip and edited the [[xbindkeys]] page to link to both [[PulseAudio]] and [[ALSA]] pages for alternative commands. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:37, 4 September 2016 (UTC)<br />
<br />
::: Thanks. I also discovered {{ic|@DEFAULT_SOURCE@}} (for microphone) and I've added tips in [[PulseAudio/Examples#Set default input sources]] and [[PulseAudio/Examples#Set the default output source]] -- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:55, 4 September 2016 (UTC)<br />
<br />
: Hey, Gravemind2a, does {{ic|amixer -q -D pulse sset Master 5%+ unmute}} work for you? Take a look at my comment right above yours, in this Talk page. --[[User:Denilsonsa|Denilsonsa]] ([[User talk:Denilsonsa|talk]]) 11:03, 4 September 2016 (UTC)<br />
<br />
:: Yes it works. But if it also works directly with PulseAudio {{ic|@DEFAULT_SINK@}}, why go through alsa amixer ? (and also long time ago I had issues with fast repeating asynchronous amixer volume commands making left/right speaker unbalanced, that actually made me drop Alsa in favor to PulseAudio)-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:29, 4 September 2016 (UTC)<br />
<br />
<br />
== Networked audio ==<br />
<br />
I have added a stub/[[PulseAudio#Networked_audio|section]] about sending/receiving audio through the network using PA. The relevant documentation is [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/ here]. I have a working networked PulseAudio setup, it's available [https://github.com/nodiscc/srv01/tree/master/roles/pulseaudio here] as an ansible playbook, please allow for some time for me to port the most important information here. --[[User:Nodiscc|Nodiscc]] ([[User talk:Nodiscc|talk]]) 14:45, 21 November 2017 (UTC)<br />
<br />
== Note: Some confusion may occur ==<br />
<br />
confusion is even bigger after reading this. be more explicit, give examples, what is the advatage and aim of doing what they do? --[[User:UBF6|UBF6]] ([[User talk:UBF6|talk]]) 10:11, 1 May 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:PulseAudio&diff=546999Talk:PulseAudio2018-10-10T14:43:10Z<p>Mortan1961: /* Configuration of the PulseAudio ALSA plugin */ Close</p>
<hr />
<div>== Abandoned draft ==<br />
<br />
[[PulseAudio/Configuration]] was initially created to discuss PA configuration; then its goal was changed to be a replacement for this whole article; then it was abandoned. Currently it's marked for merge in [[PulseAudio#Configuration]]: is there anything worth being merged from there? -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 04:44, 30 November 2014 (UTC)<br />
<br />
:It seems to focus more on generic explanation/configuration, where the main article is mostly about troubleshooting (considering the size of that section, you'd consider moving it to [[PulseAudio/Troubleshooting]] ...) -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:40, 30 November 2014 (UTC)<br />
<br />
::How much sense would it make to actually merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] and then simply redirect [[PulseAudio/Configuration]] to [[PulseAudio#Configuration]]?<br />
::I'd agree with moving Troubleshooting to [[PulseAudio/Troubleshooting]].<br />
::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 12:01, 2 December 2014 (UTC)<br />
<br />
:::I do agree it makes sense to merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] in [[PulseAudio/Configuration]]. I made an attempt in this way. [[User:Gabx|Gabx]] ([[User talk:Gabx|talk]]) 18:24, 28 December 2014 (UTC)<br />
<br />
::::I like what I see so far, more extensive configuration in the main article also allows to cut back on [[PulseAudio/Troubleshooting]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 23:29, 28 December 2014 (UTC)<br />
<br />
== <s>Restore package list</s> ==<br />
Why [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=381413&oldid=381339 revert the list]? I think Arch News is just a temp reminder. Arch Wiki should keep all needed info.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 09:37, 1 August 2015 (UTC)<br />
<br />
:I'm not sure what the right policy is for this (hence my query in my edit summary) but I would just point out that the [https://www.archlinux.org/news/?page=12 archive] does stretch back to 2002 so I don't think it's unsafe to link to that material. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 16:34, 1 August 2015 (UTC)<br />
<br />
::That's true, but the set of split packages can change in the future... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:37, 1 August 2015 (UTC)<br />
::: Exactly, so at that time, the news page is out of date and only wiki page could be updated to keep up.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
:::We should ask for a more extensive optdepends instead of maintaining this information here. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:03, 1 August 2015 (UTC)<br />
<br />
::::Alternatively creating a ''pulseaudio-modules'' group should be equally simple for the packager, more comprehensible to the user and most naturally referenceable from the wiki. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:14, 1 August 2015 (UTC)<br />
:::::Then before a group is created, should we restore the package list?--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
::::::I don't think any action need be taken until such a time that the set of split packages changes. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 17:14, 7 September 2015 (UTC)<br />
<br />
:::::::Considering [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=next&oldid=408749], I think including the list explicitly is useful already. Restored in [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=409861&oldid=409859]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:30, 22 November 2015 (UTC)<br />
<br />
== Equalizer module is unsupported ==<br />
<br />
As of {{pkg|pulseaudio}}-7.0-2, loading the {{ic|module-equalizer-sink}} module results in the following warning:<br />
<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased latency or audible artifacts.<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: If you're facing audio problems, try unloading this module as a potential workaround.<br />
<br />
Running ''qpaeq'' then makes PulseAudio crash with this error:<br />
<br />
pulseaudio[535]: E: [pulseaudio] iface-module.c: Assertion 'pa_dbus_protocol_add_interface(m->dbus_protocol, m->path, &module_interface_info, m) >= 0' failed at modules/dbus/iface-module.c:309, function pa_dbusiface_module_new(). Aborting.<br />
<br />
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:43, 28 September 2015 (UTC)<br />
<br />
:This is not correct. Recently installed {{pkg|pulseaudio}}-7.0-2 and following the instructions in the wiki am successfully running the equalizer.<br />
<br />
:[[User:Brettski|brettski]] ([[User talk:Brettski|talk]]) 03:46, 13 October 2015 (UTC)<br />
<br />
::This is odd. You should have at least seen the first warning in your journal... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:01, 13 October 2015 (UTC)<br />
<br />
== Adding User to Audio Group ==<br />
<br />
Currently, the article says, "There is no need to add your user to audio group, as it uses udev and logind to dynamically give access to the currently "active" user". That is a little heavy-handed; perhaps a wording like "There is '''usually''' no need..."? For instance, on one of my machines running pulse audio, I was unable to play any sounds as "me", but could using root. The server is running headless, and I access it over SSH. It's understandable that udev doesn't consider "me" the currently "active" user in this scenario. It is essential to know that adding a user to the audio group helps in this circumstance, so I appreciate the explicit mention of that group. Does my rewording make sense, or is there a better rewording? [[User:Lmat|Lmat]] ([[User talk:Lmat|talk]]) 14:29, 1 March 2016 (UTC)<br />
:This looks like a reasonable rewording. Additionally I would considering explicitly describing in which cases it might make sense in the Wiki. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 14:56, 1 March 2016 (UTC)<br />
<br />
== Default sink @DEFAULT_SINK@ and keyboard control ==<br />
<br />
I got a hard time finding {{ic|pactl set-sink-volume @DEFAULT_SINK@ -5%}}.<br />
<br />
{{ic|@DEFAULT_SINK@}} comes very handy and fixes a long time frustration with PulseAudio (with sink indices changing each time I plug unplug a jack, or to get commands working across multiple machines with different sinks).<br />
<br />
It will probably help more people to make some changes or add a Tip about {{ic|@DEFAULT_SINK@}} somewhere ([[PulseAudio#Keyboard volume control]] ?).<br />
<br />
Only after finding about it, I found [[Xbindkeys#Xbindkeysrc]]. Maybe [[PulseAudio#Keyboard volume control]] could also Tip about [[Xbindkeys#Xbindkeysrc]].<br />
<br />
(I would have edit the page, if only I knew which changes was best: add a Tip and/or change the command lines and/or something else ?)<br />
<br />
-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 09:55, 4 September 2016 (UTC)<br />
<br />
: I suppose changing the commands is the best approach. However for those who want to edit a specific sink a small note should be added. This is just my personal opinion on this matter. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 10:11, 4 September 2016 (UTC)<br />
<br />
:: I think it is better suited as a tip, because if you start directly with {{ic|@DEFAULT_SINK@}}, it's not clear at all what the shortcut is for. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:07, 4 September 2016 (UTC)<br />
<br />
:: I've added the tip and edited the [[xbindkeys]] page to link to both [[PulseAudio]] and [[ALSA]] pages for alternative commands. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:37, 4 September 2016 (UTC)<br />
<br />
::: Thanks. I also discovered {{ic|@DEFAULT_SOURCE@}} (for microphone) and I've added tips in [[PulseAudio/Examples#Set default input sources]] and [[PulseAudio/Examples#Set the default output source]] -- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:55, 4 September 2016 (UTC)<br />
<br />
: Hey, Gravemind2a, does {{ic|amixer -q -D pulse sset Master 5%+ unmute}} work for you? Take a look at my comment right above yours, in this Talk page. --[[User:Denilsonsa|Denilsonsa]] ([[User talk:Denilsonsa|talk]]) 11:03, 4 September 2016 (UTC)<br />
<br />
:: Yes it works. But if it also works directly with PulseAudio {{ic|@DEFAULT_SINK@}}, why go through alsa amixer ? (and also long time ago I had issues with fast repeating asynchronous amixer volume commands making left/right speaker unbalanced, that actually made me drop Alsa in favor to PulseAudio)-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:29, 4 September 2016 (UTC)<br />
<br />
<br />
== Networked audio ==<br />
<br />
I have added a stub/[[PulseAudio#Networked_audio|section]] about sending/receiving audio through the network using PA. The relevant documentation is [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/ here]. I have a working networked PulseAudio setup, it's available [https://github.com/nodiscc/srv01/tree/master/roles/pulseaudio here] as an ansible playbook, please allow for some time for me to port the most important information here. --[[User:Nodiscc|Nodiscc]] ([[User talk:Nodiscc|talk]]) 14:45, 21 November 2017 (UTC)<br />
<br />
== Note: Some confusion may occur ==<br />
<br />
confusion is even bigger after reading this. be more explicit, give examples, what is the advatage and aim of doing what they do? --[[User:UBF6|UBF6]] ([[User talk:UBF6|talk]]) 10:11, 1 May 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:PulseAudio&diff=546998Talk:PulseAudio2018-10-10T14:42:26Z<p>Mortan1961: /* Can't build package with modern glibc */ Close</p>
<hr />
<div>==<s>Configuration of the PulseAudio ALSA plugin</s>==<br />
Can anybody give an example where to use the ''pcm.pulse'' setting? --[[User:BertiBoeller|BertiBoeller]] 12:33, 17 October 2009 (EDT)<br />
<br />
== Abandoned draft ==<br />
<br />
[[PulseAudio/Configuration]] was initially created to discuss PA configuration; then its goal was changed to be a replacement for this whole article; then it was abandoned. Currently it's marked for merge in [[PulseAudio#Configuration]]: is there anything worth being merged from there? -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 04:44, 30 November 2014 (UTC)<br />
<br />
:It seems to focus more on generic explanation/configuration, where the main article is mostly about troubleshooting (considering the size of that section, you'd consider moving it to [[PulseAudio/Troubleshooting]] ...) -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:40, 30 November 2014 (UTC)<br />
<br />
::How much sense would it make to actually merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] and then simply redirect [[PulseAudio/Configuration]] to [[PulseAudio#Configuration]]?<br />
::I'd agree with moving Troubleshooting to [[PulseAudio/Troubleshooting]].<br />
::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 12:01, 2 December 2014 (UTC)<br />
<br />
:::I do agree it makes sense to merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] in [[PulseAudio/Configuration]]. I made an attempt in this way. [[User:Gabx|Gabx]] ([[User talk:Gabx|talk]]) 18:24, 28 December 2014 (UTC)<br />
<br />
::::I like what I see so far, more extensive configuration in the main article also allows to cut back on [[PulseAudio/Troubleshooting]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 23:29, 28 December 2014 (UTC)<br />
<br />
== <s>Restore package list</s> ==<br />
Why [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=381413&oldid=381339 revert the list]? I think Arch News is just a temp reminder. Arch Wiki should keep all needed info.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 09:37, 1 August 2015 (UTC)<br />
<br />
:I'm not sure what the right policy is for this (hence my query in my edit summary) but I would just point out that the [https://www.archlinux.org/news/?page=12 archive] does stretch back to 2002 so I don't think it's unsafe to link to that material. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 16:34, 1 August 2015 (UTC)<br />
<br />
::That's true, but the set of split packages can change in the future... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:37, 1 August 2015 (UTC)<br />
::: Exactly, so at that time, the news page is out of date and only wiki page could be updated to keep up.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
:::We should ask for a more extensive optdepends instead of maintaining this information here. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:03, 1 August 2015 (UTC)<br />
<br />
::::Alternatively creating a ''pulseaudio-modules'' group should be equally simple for the packager, more comprehensible to the user and most naturally referenceable from the wiki. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:14, 1 August 2015 (UTC)<br />
:::::Then before a group is created, should we restore the package list?--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
::::::I don't think any action need be taken until such a time that the set of split packages changes. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 17:14, 7 September 2015 (UTC)<br />
<br />
:::::::Considering [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=next&oldid=408749], I think including the list explicitly is useful already. Restored in [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=409861&oldid=409859]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:30, 22 November 2015 (UTC)<br />
<br />
== Equalizer module is unsupported ==<br />
<br />
As of {{pkg|pulseaudio}}-7.0-2, loading the {{ic|module-equalizer-sink}} module results in the following warning:<br />
<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased latency or audible artifacts.<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: If you're facing audio problems, try unloading this module as a potential workaround.<br />
<br />
Running ''qpaeq'' then makes PulseAudio crash with this error:<br />
<br />
pulseaudio[535]: E: [pulseaudio] iface-module.c: Assertion 'pa_dbus_protocol_add_interface(m->dbus_protocol, m->path, &module_interface_info, m) >= 0' failed at modules/dbus/iface-module.c:309, function pa_dbusiface_module_new(). Aborting.<br />
<br />
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:43, 28 September 2015 (UTC)<br />
<br />
:This is not correct. Recently installed {{pkg|pulseaudio}}-7.0-2 and following the instructions in the wiki am successfully running the equalizer.<br />
<br />
:[[User:Brettski|brettski]] ([[User talk:Brettski|talk]]) 03:46, 13 October 2015 (UTC)<br />
<br />
::This is odd. You should have at least seen the first warning in your journal... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:01, 13 October 2015 (UTC)<br />
<br />
== Adding User to Audio Group ==<br />
<br />
Currently, the article says, "There is no need to add your user to audio group, as it uses udev and logind to dynamically give access to the currently "active" user". That is a little heavy-handed; perhaps a wording like "There is '''usually''' no need..."? For instance, on one of my machines running pulse audio, I was unable to play any sounds as "me", but could using root. The server is running headless, and I access it over SSH. It's understandable that udev doesn't consider "me" the currently "active" user in this scenario. It is essential to know that adding a user to the audio group helps in this circumstance, so I appreciate the explicit mention of that group. Does my rewording make sense, or is there a better rewording? [[User:Lmat|Lmat]] ([[User talk:Lmat|talk]]) 14:29, 1 March 2016 (UTC)<br />
:This looks like a reasonable rewording. Additionally I would considering explicitly describing in which cases it might make sense in the Wiki. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 14:56, 1 March 2016 (UTC)<br />
<br />
== Default sink @DEFAULT_SINK@ and keyboard control ==<br />
<br />
I got a hard time finding {{ic|pactl set-sink-volume @DEFAULT_SINK@ -5%}}.<br />
<br />
{{ic|@DEFAULT_SINK@}} comes very handy and fixes a long time frustration with PulseAudio (with sink indices changing each time I plug unplug a jack, or to get commands working across multiple machines with different sinks).<br />
<br />
It will probably help more people to make some changes or add a Tip about {{ic|@DEFAULT_SINK@}} somewhere ([[PulseAudio#Keyboard volume control]] ?).<br />
<br />
Only after finding about it, I found [[Xbindkeys#Xbindkeysrc]]. Maybe [[PulseAudio#Keyboard volume control]] could also Tip about [[Xbindkeys#Xbindkeysrc]].<br />
<br />
(I would have edit the page, if only I knew which changes was best: add a Tip and/or change the command lines and/or something else ?)<br />
<br />
-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 09:55, 4 September 2016 (UTC)<br />
<br />
: I suppose changing the commands is the best approach. However for those who want to edit a specific sink a small note should be added. This is just my personal opinion on this matter. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 10:11, 4 September 2016 (UTC)<br />
<br />
:: I think it is better suited as a tip, because if you start directly with {{ic|@DEFAULT_SINK@}}, it's not clear at all what the shortcut is for. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:07, 4 September 2016 (UTC)<br />
<br />
:: I've added the tip and edited the [[xbindkeys]] page to link to both [[PulseAudio]] and [[ALSA]] pages for alternative commands. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:37, 4 September 2016 (UTC)<br />
<br />
::: Thanks. I also discovered {{ic|@DEFAULT_SOURCE@}} (for microphone) and I've added tips in [[PulseAudio/Examples#Set default input sources]] and [[PulseAudio/Examples#Set the default output source]] -- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:55, 4 September 2016 (UTC)<br />
<br />
: Hey, Gravemind2a, does {{ic|amixer -q -D pulse sset Master 5%+ unmute}} work for you? Take a look at my comment right above yours, in this Talk page. --[[User:Denilsonsa|Denilsonsa]] ([[User talk:Denilsonsa|talk]]) 11:03, 4 September 2016 (UTC)<br />
<br />
:: Yes it works. But if it also works directly with PulseAudio {{ic|@DEFAULT_SINK@}}, why go through alsa amixer ? (and also long time ago I had issues with fast repeating asynchronous amixer volume commands making left/right speaker unbalanced, that actually made me drop Alsa in favor to PulseAudio)-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:29, 4 September 2016 (UTC)<br />
<br />
<br />
== Networked audio ==<br />
<br />
I have added a stub/[[PulseAudio#Networked_audio|section]] about sending/receiving audio through the network using PA. The relevant documentation is [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/ here]. I have a working networked PulseAudio setup, it's available [https://github.com/nodiscc/srv01/tree/master/roles/pulseaudio here] as an ansible playbook, please allow for some time for me to port the most important information here. --[[User:Nodiscc|Nodiscc]] ([[User talk:Nodiscc|talk]]) 14:45, 21 November 2017 (UTC)<br />
<br />
== Note: Some confusion may occur ==<br />
<br />
confusion is even bigger after reading this. be more explicit, give examples, what is the advatage and aim of doing what they do? --[[User:UBF6|UBF6]] ([[User talk:UBF6|talk]]) 10:11, 1 May 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Arduino&diff=546997Talk:Arduino2018-10-10T14:41:34Z<p>Mortan1961: /* scons uploading does not work */ Close</p>
<hr />
<div>== stty ==<br />
I think we should add option {{ic|min 1}} to {{ic|stty}} command. also i realized that after calling Arduino IDE's terminal {{ic|icrnl}} had changed to {{ic|-icrnl}}. So i suggest we update the command to ::<br />
{{ic|stty -F /dev/ttyACM0 cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts icrnl min 1}} [[User:Tsester|Tsester]] ([[User talk:Tsester|talk]]) 10:51, 18 June 2016 (UTC)<br />
<br />
== Missing tools ==<br />
<br />
Compiling Arduino sketchbooks fails with message: "Parameter 'tools' is mandatory."<br />
I compared the arch package to the 64-bit linux download from Arduino (found at https://www.arduino.cc/en/Main/Software) and <br />
discovered that the arch package was missing the directory: /usr/share/arduino/hardware/tools. I fixed the compilation error by<br />
moving that tools directory from the Arduino download into the correct location. Unsure if I am missing a dependency or the <br />
package is broken -- I'm new to Arch.<br />
<br />
{{Unsigned|05:38, 5 January 2017|Jfmathews}}</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:AppArmor&diff=546996Talk:AppArmor2018-10-10T14:40:07Z<p>Mortan1961: /* Desktop notifications */ Close</p>
<hr />
<div></div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:AppArmor&diff=546994Talk:AppArmor2018-10-10T14:38:26Z<p>Mortan1961: /* re: LTS kernel edits */ Close</p>
<hr />
<div>== <s>Desktop notifications</s> ==<br />
<br />
Has anyone managed to get [[AppArmor#Get desktop notification on DENIED actions]] to actually work?<br />
<br />
When {{ic|auditd.service}} starts it changes the permissions of {{ic|/var/log/audit/}} and {{ic|/var/log/audit/audit.log}}. Even when I change ACLs so that I can read {{ic|/var/log/audit/audit.log}}, aa-notify still shows {{ic|Cannot read '/var/log/audit/audit.log'}}.<br />
<br />
-- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 10:06, 2 October 2018 (UTC)<br />
:I'm sorry for inconvenience. I proposed different approach, see https://wiki.archlinux.org/index.php?title=AppArmor&type=revision&diff=545635&oldid=545631 . I hope this one will work.<br />
:[[User:Teples|Teples]] ([[User talk:Teples|talk]]) 12:26, 2 October 2018 (UTC)<br />
<br />
::Thanks, now it works for me :) -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 17:14, 2 October 2018 (UTC)<br />
::: AFAIK if auditd.service isn't started then there is nothing logged to /var/log/audit/audit.log so https://wiki.archlinux.org/index.php?title=AppArmor&type=revision&diff=545662&oldid=545635 doesn't make sense. I think auditd is the only process which logs there. Did you observe something different?<br />
:::[[User:Teples|Teples]] ([[User talk:Teples|talk]]) 17:55, 2 October 2018 (UTC)<br />
<br />
::::No, but this allows to allows to start {{ic|auditd.service}} later, after login. Without {{ic|-f /var/log/audit/audit.log}} aa-notify would try read {{ic|/var/log/kern.log}} and fail. So if {{ic|auditd.service}} is started after login, you would need to re-login for apparmor-notify.desktop to start. -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 18:01, 2 October 2018 (UTC)<br />
<br />
:::::Ok, thx for info.<br />
:::::[[User:Teples|Teples]] ([[User talk:Teples|talk]]) 18:58, 2 October 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Advanced_Linux_Sound_Architecture&diff=545699Talk:Advanced Linux Sound Architecture2018-10-02T23:43:08Z<p>Mortan1961: /* Split up article into Main/Troubleshoot sections and reorganize Troubleshooting */ Close</p>
<hr />
<div>== Manually reloading settings from ~/.asoundrc ==<br />
<br />
Since the old "sudo rc.d restart alsa" and "sudo alsa force-reload" commands don't work anymore, it took me a bit of time the other day to figure out how to restart alsa without restarting the whole machine. Sometimes I make changes to ~/.asoundrc and want to make them effective without rebooting and this was the only command I found that could acheive this:<br />
alsactl kill rescan<br />
This should probably be added to the wiki somewhere but I wasn't sure where the best spot for it would be. Should it be a new section? There's a few areas of the alsa wiki that just say to "restart alsa" without specifying how to do so. These could probably be updated as well.<br />
<br />
[[User:Mynis|Mynis]] ([[User talk:Mynis|talk]]) 10:04, 14 May 2013 (UTC) mynis<br />
<br />
One year later, just in case somebody else with that problem gets here: <code>~/.asoundrc</code> is loaded by the ALSA library, not the kernel part. You can’t actually “restart ALSA” because it is not a daemon—you could reload the driver module but that is not going to have any other effect. ALSA configuration is loaded for each instance of the library, so to reload it, all you have to do is restart the programs that are using it.<br />
--[[User:Lachs0r|Lachs0r]] ([[User talk:Lachs0r|talk]]) 13:03, 29 May 2014 (UTC)<br />
<br />
:Alternatively, run {{ic|$ alsactl nrestore}}. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 13:29, 10 August 2014 (UTC)<br />
<br />
== On high quality resampling ==<br />
<br />
I’m not actually an Arch user and I don’t know what the default configuration is like, but to be honest, I believe the ALSA setup should use the libspeex-derived resampler by default, which offers much better quality than dumb linear interpolation, but without the performance implications of libsamplerate’s best converter.<br />
<br />
I don’t think any human being is able to tell the difference between libspeex and libsamplerate’s sinc resamplers because they both have about the same noise floor, which is actually lower than what 16-bit PCM audio can even represent. Thus, using the slower one is completely pointless.<br />
<br />
To support my claims, I’ve used the linear interpolation as well as some of the libspeex and libsamplerate converters. The test file was an 8 second 1-22050 Hz sine sweep generated with SoX as 32-bit signed integer PCM with 44.1 kHz sample rate. The output sample rate was 48 kHz, hence the most common conversion by far. The results were obtained by playing the test file through an ALSA ''rate'' device with a ''file'' device as its slave.<br />
<br />
These are the spectrograms of the results: [http://abload.de/img/resamplersgyoik.png]<br />
<br />
As you can see, all of these are way better than linear interpolation. The ''speexrate'' resampler might look bad at first in comparison to the others, but notice that the visible aliasing lines are actually very close to the noise floor, and certainly not bad enough to be noticeable. Not on this sine sweep, and certainly not on typical audio content. This is not a bad result at all, especially considering how fast this resampler is!<br />
<br />
Well, how fast is it? My tests have shown it to be roughly twice as fast as the corresponding ''libsamplerate'' resampler, and the trend continues with the higher quality modes:<br />
<br />
<pre><br />
linear: 0.01s user 0.04s system 0% cpu 8.138 total<br />
<br />
samplerate: 0.38s user 0.01s system 4% cpu 8.147 total<br />
speexrate: 0.24s user 0.01s system 2% cpu 8.137 total<br />
<br />
samplerate_medium: 0.60s user 0.01s system 7% cpu 8.149 total<br />
speexrate_medium: 0.32s user 0.06s system 4% cpu 8.143 total<br />
<br />
samplerate_best: 1.36s user 0.01s system 16% cpu 8.204 total<br />
speexrate_best: 0.79s user 0.01s system 9% cpu 8.166 total<br />
</pre><br />
<br />
Given these facts, it seems more like the common recommendation of using ''samplerate_best'' is based on a cargo cult myth rather than actual testing.<br />
--[[User:Lachs0r|Lachs0r]] ([[User talk:Lachs0r|talk]]) 13:06, 29 May 2014 (UTC)<br />
<br />
:Using subjective and pejorative terms like "placebo-quality" and "cult" that have no technical meaning whatsoever and only flame is highly discouraged. [Sampling] frequency is expressed in hertz, so it should be (in the article) 48000 Hz or better yet 48 kHz (there is a space in between the unit and the value, as suggested by several standards and norms). You used that here correctly, so why not in the article? I would also suggest you create a new page with the results you presented here and please include the exact procedure you used, so that others can reproduce it. Usually one should experiment with different scenarios, so testing several different input audio files, different resolutions and resampling converters with 96 kHz and 192 kHz as output SR would be nice. I appreciate your work, but the form you present it in could be better. --[[User:Emeres|Emeres]] ([[User talk:Emeres|talk]]) 12:26, 6 June 2014 (UTC)<br />
<br />
::Oh, I just left the first line of the section intact when I edited it. Yes, should have been 48 kHz. The results when resampling to different resolutions are very similar. The sine sweep was chosen because it shows certain characteristics such as aliasing, quantization noise and so on very clearly in the spectrograms (or actual listening tests), and using different input samples would serve no real purpose for that particular demonstration (hell, even the sine sweep is really hard to ABX with these resamplers). Some other graphs would be worthy additions, but actually that work has already been done by somebody else[http://src.infinitewave.ca], just lacking the results for the lower quality modes of the Speex resampler (note: on that site, libsamplerate is referred to by its code name “Secret Rabbit Code”). Sorry about the language I’ve employed here and in the summaries for some of my other edits; I was just disgruntled with the state of the Arch Wiki and the fact that I often had to tech support people who just followed some bad/outdated advice given in various articles. I tend to speak my mind in the wrong place when something like that happens. --[[User:Lachs0r|Lachs0r]] ([[User talk:Lachs0r|talk]]) 14:26, 6 June 2014 (UTC)<br />
<br />
== General Article Cleanup ==<br />
<br />
As stated in the section title, I think this page could use a large cleanup.<br />
Currently the troubleshooting section is quite a bit larger than the core<br />
article itself, and has some questionable advice, a lack of any sort of<br />
ordering, and just a big lack of consistency/concision in general. Just some<br />
examples:<br />
<br />
<s>[[Advanced_Linux_Sound_Architecture#Getting_S.2FPDIF_output]]<br />
<br />
Starts off referencing Gnome, when it should probably start the section<br />
off with the desktop agnostic method referenced below it.</s><br />
This has been addressed.<br />
<br />
<s>[[Advanced_Linux_Sound_Architecture#No_sound_with_Audigy_2_ZS]]</s><br />
<br />
This is arguably a bad solution. I'd be surprised if amixer could not accomplish this.<br />
<br />
:It looks like amixer could be used, but a confirmation from someone, who actually has the hardware would be better: {{bc|amixer sset 'Audigy Analog/Digital Output Jack' unmute # or on}}[https://help.ubuntu.com/community/SoundTroubleshootingProcedure#Step_15 Source 1], [http://forums.asterisk.org/viewtopic.php?f=1&t=88313&start=0#p193053 source 2]. The meq note should be expanded why it is relevant for headphones. It does cut in higher frequencies quite a bit, so I guess the author meant 2.0 in comparison to > 4.0, where higher frequencies are often the main aspect of the overall sound. Dmix references need to be inspected. Maybe a configuration like [https://bbs.archlinux.org/viewtopic.php?pid=1450413#p1450413 this one] should be emphasized, instead of the ever returning pcm.dmixed. The trouble shooting section could use a 'general troubleshooting' subsection on the top. I have a few lines written already, but the default section comes first.<br />
: -- [[User:Emeres|Emeres]] ([[User talk:Emeres|talk]]) 21:36, 13 September 2014 (UTC)<br />
<br />
::I've owned an Audigy 2, and alsamixer had no problem unmuting the card. Removed the section. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 14:48, 25 November 2014 (UTC)<br />
<br />
[[Advanced_Linux_Sound_Architecture#Using_mbeq]]<br />
<br />
I'm not sure how the note regarding stereophonic sound is relevant.<br />
<br />
These are obviously small issues, but the page is full of them. The<br />
troubleshooting section could most likely be trimmed down quite a bit just by<br />
combining similar problem cases and their respective solutions. Given the state<br />
of the troubleshooting section, I wouldn't be surprised if at least a few of the<br />
issues are fixed in current ALSA/Linux revisions.<br />
--[[User:Pyroh|Pyroh]] ([[User talk:Pyroh|talk]]) 01:42, 25 July 2014 (UTC)<br />
<br />
:I've already gotten started on the most egregious offenses, though there's still quite a<br />
:bit to do in terms of converting the page to a consistent writing style. I suppose this post<br />
:could be considered a bump, as I don't want to larger changes without some community<br />
:consultation. --[[User:Pyroh|Pyroh]] ([[User talk:Pyroh|talk]]) 02:30, 26 July 2014 (UTC)Pyroh<br />
<br />
::Hi, first of all please take care when removing nowiki tags from templates, I've had to [https://wiki.archlinux.org/index.php?title=Advanced_Linux_Sound_Architecture&diff=326866&oldid=326858 restore] some you removed.<br />
::Troubleshooting sections tend to become outdated in all articles, so it's very welcome if you try to update this article; it seems you're doing a good job in summarizing all your edits, so it's easy to understand what you're doing.<br />
::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:00, 26 July 2014 (UTC)<br />
<br />
:::Thanks. I initially just removed all of the (nowiki tags) and then changed '1=' to '2=' and vice versa until there were no more {{ic|Template Error:}} messages. I assume you are implying that a lack of said error messages are not necessarily indicative of codified text being correctly displayed? I took a quick look over everything and it seemed to look fine, but I might have missed something as I was mainly checking the second portion of {{hc/{{bc references and I saw that you added nowiki tags around only the first portions.<br />
:::--[[User:Pyroh|Pyroh]] ([[User talk:Pyroh|talk]]) 07:04, 26 July 2014 (UTC)<br />
<br />
::::Correct, the fact that you don't see Template Errors does ''not'' mean that everything's all right. One frequent case is when the | (pipe) symbol has to be displayed, like in the cases that I've fixed; for example writing {{ic|<nowiki>{{bc|lsmod | grep snd}}</nowiki>}} displays: {{bc|lsmod | grep snd}}<br />
::::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:52, 27 July 2014 (UTC)<br />
<br />
:::::The terms of card and device can be easily explained as follows; Card is a singular sound card which has one to many Devices. A multichannel card has a different device for each of the channels so the front, center, rear, and side each have their own device number. It should probably be noted that there is a common problem with having nvidia HDMI audio. The HDMI interface will be set as the default even when adding "options snd_hda_intel index=-2" what instead works is blacklisting the snd_hda_intel. I think the article would be easier to read by using the same card names throughout the article instead of listing specific examples for each section. I'll start working on that since it has been a while since any updates have been made.<br />
:::::[[User:Lucid|Lucid]] ([[User talk:Lucid|talk]]) 15:04, 9 July 2016 (UTC)<br />
<br />
== Adding a brief section on terminology ==<br />
<br />
This article seems to assume that readers are familiar with many of the terms and concepts used by ALSA. For example, this page extensively uses the term "PCM," but never defines it. I propose we add a short section called "Terminology" to the beginning of this page. Some points of interest might include:<br />
* What is a "PCM"? And what does it stand for?<br />
* How does a "card" differ from a "device"? (The amixer program suggests they are not synonymous.)<br />
* Is a "device," in the context of ALSA, in fact a device in the context of Linux (i.e. a block/character special file located in /dev)?<br />
* What is a "mixer"? Is it a "device" itself, some kind of pseudo-device, or something else entirely?<br />
* "S/PDIF"?<br />
<br />
I'm not suggesting that we recreate the entire [http://www.alsa-project.org/main/index.php/Documentation ALSA documentation] here, but rather that we define some of the terms used by this article, in order to make the article more approachable by readers who are not necessarily familiar with the language and concepts of ALSA. Thoughts? [[User:EscapedNull|EscapedNull]] ([[User talk:EscapedNull|talk]]) 13:26, 24 October 2014 (UTC)<br />
<br />
:I second the need to explain the non-obvious terms used in the article, however if this could be addressed through simple external links anchored at the proper keywords, it would be the best solution. For example PCM and S/PDIF are not specific to ALSA, and a link to e.g. their Wikipedia articles would be a cleaner solution. About the rest, I admit I haven't done any searches to see if ALSA's docs can be linked to specific sections that explain the concepts in details; if really it wouldn't be possible, I'd still like to avoid a "Terminology" section, whose expansion limits would be very unclear, and instead I'd suggest explaining the concepts (e.g. how a "card" differs from a "device") where they first appear in the article. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 02:55, 25 October 2014 (UTC)<br />
<br />
::Thanks for the feedback. That solution sounds good to me. I'll skim over the ALSA documentation as well as Wikipedia to see if I can find some of the appropriate links. I'm afraid, however, that I'm not qualified to handle some of the more detailed tasks (i.e. "card" vs "device"). After all, that's why I asked. I'll begin by outlinking some terms that have a suitable page elsewhere, and leave the structure to be modified by those who understand ALSA a little better.<br />
<br />
::Additionally, I'm not sure how much of this article also applies to other sound infrastructures, such as [[OSS]] and [[PulseAudio]], as I've never used anything else. With that being said, I wonder if it would be beneficial to move some of the broader topics to [[Sound]] or the like. That may have to be a project for another day, however. [[User:EscapedNull|EscapedNull]] ([[User talk:EscapedNull|talk]]) 13:17, 25 October 2014 (UTC)<br />
<br />
:::If you feel a section is lacking some details but you can't fix it yourself, fell free to mark it with [[Template:Expansion]] with a proper reason message.<br />
:::About splitting generic content, I'm not sure either, but it would certainly require a separate discussion with a more specific plan.<br />
:::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:31, 26 October 2014 (UTC)<br />
<br />
== Mention caps package in equalizer section ==<br />
<br />
I tried to follow the System-wide equalizer section (using ALSAEqual), but got the following error:<br />
<br />
Failed to load plugin "/usr/lib/ladspa/caps.so": /usr/lib/ladspa/caps.so: cannot open shared object file: No such file or directory<br />
<br />
It works after installing the {{Pkg|caps}} package, so I guess it should be mentioned that this package is required. —[[User:LucasWerkmeister|LucasWerkmeister]] ([[User talk:LucasWerkmeister|talk]]) 12:36, 17 January 2016 (UTC)<br />
<br />
== Set the default sound card - Given advice does not work for me ==<br />
<br />
I tried the settings listed in this section without any success on my Raspberry Pi. <br />
<br />
{{hc|/etc/modprobe.d/alsa-base.conf|2=<br />
options snd_mia index=0<br />
options snd_hda_intel index=1<br />
}}<br />
<br />
The order of the sound cards remained unchanged even after a reboot. Can anyone confirm?<br />
<br />
[[User:PhilippD|PhilippD]] ([[User talk:PhilippD|talk]]) 19:23, 26 July 2016 (UTC)<br />
<br />
== Replace older "index=" method with newer "slots=" method ==<br />
<br />
“The slots option is especially useful for avoiding the possible hot-plugging and the resultant slot conflict.”<br />
<br />
http://alsa.opensrc.org/MultipleCards#How_to_choose_a_particular_order_for_multiple_installed_cards<br />
<br />
[[User:Markus00000|Markus00000]] ([[User talk:Markus00000|talk]]) 06:02, 14 September 2016 (UTC)<br />
<br />
== apulse ==<br />
<br />
Re [https://wiki.archlinux.org/index.php?title=Advanced_Linux_Sound_Architecture&diff=479867&oldid=479856], these packages do not depend on {{Pkg|pulseaudio}}? See [https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=apulse] or [https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=apulse-git]. Note that also both {{aur|skype}} and {{pkg|firefox}} have pulseaudio listed in the depends, but as ''optional'' depends. Thus there's no installation and subsequent activation of pulseaudio. <br />
<br />
More generally, apulse is useful to list if you're not interested in using pulseaudio but still want access to application using it directly. Similar to [[PulseAudio#Installation]] which lists {{Pkg|pulseaudio-alsa}} for compability with applications using libalsa directly, or [[Advanced_Linux_Sound_Architecture#OSS_compatibility]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 06:22, 16 June 2017 (UTC)<br />
<br />
:Hmm, I overlooked that they're just optional deps. Though the other two compatibility layers look like officially supported solutions, but apulse still seems to be a hack. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:24, 16 June 2017 (UTC)<br />
<br />
::Sure, but it's a legitimate project and we have plenty of unofficial solutions described on the wiki. It doesn't have to be as prominent as [[Advanced_Linux_Sound_Architecture#OSS_compatibility]], but I still think it has a place somewhere in the article. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 09:00, 16 June 2017 (UTC)<br />
<br />
:::I second this. It should be at least mentioned for those coming here looking for compatibility solutions. Can the content be brought back? -- [[User:Calimeroteknik|Calimeroteknik]] ([[User talk:Calimeroteknik|talk]]) 18:30, 16 June 2017 (UTC)<br />
<br />
::::Alright, I'm fine with it if it includes a note that apulse is not part of ALSA. Also if it appears in the installation section, it shouldn't be much more than a reference to the project and packages. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:16, 16 June 2017 (UTC)<br />
<br />
== Enable the microphone ==<br />
<br />
It would be nice to comment that people should try to see if the Capture channel is really turned on BEFORE try to listen it... In my case the channel doesn't accept the 'mute' or 'unmute' commands, just the <code> amixer sset Capture toggle </code> managed to turn it on, and then I could test using what this sessions tells about. [[User:Joaoantonicoardoso|Joaoantonicoardoso]] ([[User talk:Joaoantonicoardoso|talk]]) 20:27, 16 July 2017 (UTC)<br />
<br />
== asoundrc.txt ==<br />
<br />
It is no longer included in alsa-lib (or any other package, for that matter). Is the problem with packaging or the wiki? If the latter, we should probably change this:<br />
<br />
:Below are (modified) excerpts from asoundrc.txt, which is usually found in alsa-lib package...<br />
<br />
--[[User:NoSuck|NoSuck]] ([[User talk:NoSuck|talk]]) 08:03, 12 May 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:PulseAudio&diff=545698Talk:PulseAudio2018-10-02T23:38:46Z<p>Mortan1961: /* Restore package list */ Strike</p>
<hr />
<div>==<s>Configuration of the PulseAudio ALSA plugin</s>==<br />
Can anybody give an example where to use the ''pcm.pulse'' setting? --[[User:BertiBoeller|BertiBoeller]] 12:33, 17 October 2009 (EDT)<br />
<br />
== Abandoned draft ==<br />
<br />
[[PulseAudio/Configuration]] was initially created to discuss PA configuration; then its goal was changed to be a replacement for this whole article; then it was abandoned. Currently it's marked for merge in [[PulseAudio#Configuration]]: is there anything worth being merged from there? -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 04:44, 30 November 2014 (UTC)<br />
<br />
:It seems to focus more on generic explanation/configuration, where the main article is mostly about troubleshooting (considering the size of that section, you'd consider moving it to [[PulseAudio/Troubleshooting]] ...) -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:40, 30 November 2014 (UTC)<br />
<br />
::How much sense would it make to actually merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] and then simply redirect [[PulseAudio/Configuration]] to [[PulseAudio#Configuration]]?<br />
::I'd agree with moving Troubleshooting to [[PulseAudio/Troubleshooting]].<br />
::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 12:01, 2 December 2014 (UTC)<br />
<br />
:::I do agree it makes sense to merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] in [[PulseAudio/Configuration]]. I made an attempt in this way. [[User:Gabx|Gabx]] ([[User talk:Gabx|talk]]) 18:24, 28 December 2014 (UTC)<br />
<br />
::::I like what I see so far, more extensive configuration in the main article also allows to cut back on [[PulseAudio/Troubleshooting]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 23:29, 28 December 2014 (UTC)<br />
<br />
== <s>Restore package list</s> ==<br />
Why [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=381413&oldid=381339 revert the list]? I think Arch News is just a temp reminder. Arch Wiki should keep all needed info.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 09:37, 1 August 2015 (UTC)<br />
<br />
:I'm not sure what the right policy is for this (hence my query in my edit summary) but I would just point out that the [https://www.archlinux.org/news/?page=12 archive] does stretch back to 2002 so I don't think it's unsafe to link to that material. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 16:34, 1 August 2015 (UTC)<br />
<br />
::That's true, but the set of split packages can change in the future... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:37, 1 August 2015 (UTC)<br />
::: Exactly, so at that time, the news page is out of date and only wiki page could be updated to keep up.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
:::We should ask for a more extensive optdepends instead of maintaining this information here. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:03, 1 August 2015 (UTC)<br />
<br />
::::Alternatively creating a ''pulseaudio-modules'' group should be equally simple for the packager, more comprehensible to the user and most naturally referenceable from the wiki. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:14, 1 August 2015 (UTC)<br />
:::::Then before a group is created, should we restore the package list?--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
::::::I don't think any action need be taken until such a time that the set of split packages changes. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 17:14, 7 September 2015 (UTC)<br />
<br />
:::::::Considering [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=next&oldid=408749], I think including the list explicitly is useful already. Restored in [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=409861&oldid=409859]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:30, 22 November 2015 (UTC)<br />
<br />
== Equalizer module is unsupported ==<br />
<br />
As of {{pkg|pulseaudio}}-7.0-2, loading the {{ic|module-equalizer-sink}} module results in the following warning:<br />
<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased latency or audible artifacts.<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: If you're facing audio problems, try unloading this module as a potential workaround.<br />
<br />
Running ''qpaeq'' then makes PulseAudio crash with this error:<br />
<br />
pulseaudio[535]: E: [pulseaudio] iface-module.c: Assertion 'pa_dbus_protocol_add_interface(m->dbus_protocol, m->path, &module_interface_info, m) >= 0' failed at modules/dbus/iface-module.c:309, function pa_dbusiface_module_new(). Aborting.<br />
<br />
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:43, 28 September 2015 (UTC)<br />
<br />
:This is not correct. Recently installed {{pkg|pulseaudio}}-7.0-2 and following the instructions in the wiki am successfully running the equalizer.<br />
<br />
:[[User:Brettski|brettski]] ([[User talk:Brettski|talk]]) 03:46, 13 October 2015 (UTC)<br />
<br />
::This is odd. You should have at least seen the first warning in your journal... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:01, 13 October 2015 (UTC)<br />
<br />
== Adding User to Audio Group ==<br />
<br />
Currently, the article says, "There is no need to add your user to audio group, as it uses udev and logind to dynamically give access to the currently "active" user". That is a little heavy-handed; perhaps a wording like "There is '''usually''' no need..."? For instance, on one of my machines running pulse audio, I was unable to play any sounds as "me", but could using root. The server is running headless, and I access it over SSH. It's understandable that udev doesn't consider "me" the currently "active" user in this scenario. It is essential to know that adding a user to the audio group helps in this circumstance, so I appreciate the explicit mention of that group. Does my rewording make sense, or is there a better rewording? [[User:Lmat|Lmat]] ([[User talk:Lmat|talk]]) 14:29, 1 March 2016 (UTC)<br />
:This looks like a reasonable rewording. Additionally I would considering explicitly describing in which cases it might make sense in the Wiki. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 14:56, 1 March 2016 (UTC)<br />
<br />
== Default sink @DEFAULT_SINK@ and keyboard control ==<br />
<br />
I got a hard time finding {{ic|pactl set-sink-volume @DEFAULT_SINK@ -5%}}.<br />
<br />
{{ic|@DEFAULT_SINK@}} comes very handy and fixes a long time frustration with PulseAudio (with sink indices changing each time I plug unplug a jack, or to get commands working across multiple machines with different sinks).<br />
<br />
It will probably help more people to make some changes or add a Tip about {{ic|@DEFAULT_SINK@}} somewhere ([[PulseAudio#Keyboard volume control]] ?).<br />
<br />
Only after finding about it, I found [[Xbindkeys#Xbindkeysrc]]. Maybe [[PulseAudio#Keyboard volume control]] could also Tip about [[Xbindkeys#Xbindkeysrc]].<br />
<br />
(I would have edit the page, if only I knew which changes was best: add a Tip and/or change the command lines and/or something else ?)<br />
<br />
-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 09:55, 4 September 2016 (UTC)<br />
<br />
: I suppose changing the commands is the best approach. However for those who want to edit a specific sink a small note should be added. This is just my personal opinion on this matter. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 10:11, 4 September 2016 (UTC)<br />
<br />
:: I think it is better suited as a tip, because if you start directly with {{ic|@DEFAULT_SINK@}}, it's not clear at all what the shortcut is for. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:07, 4 September 2016 (UTC)<br />
<br />
:: I've added the tip and edited the [[xbindkeys]] page to link to both [[PulseAudio]] and [[ALSA]] pages for alternative commands. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:37, 4 September 2016 (UTC)<br />
<br />
::: Thanks. I also discovered {{ic|@DEFAULT_SOURCE@}} (for microphone) and I've added tips in [[PulseAudio/Examples#Set default input sources]] and [[PulseAudio/Examples#Set the default output source]] -- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:55, 4 September 2016 (UTC)<br />
<br />
: Hey, Gravemind2a, does {{ic|amixer -q -D pulse sset Master 5%+ unmute}} work for you? Take a look at my comment right above yours, in this Talk page. --[[User:Denilsonsa|Denilsonsa]] ([[User talk:Denilsonsa|talk]]) 11:03, 4 September 2016 (UTC)<br />
<br />
:: Yes it works. But if it also works directly with PulseAudio {{ic|@DEFAULT_SINK@}}, why go through alsa amixer ? (and also long time ago I had issues with fast repeating asynchronous amixer volume commands making left/right speaker unbalanced, that actually made me drop Alsa in favor to PulseAudio)-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:29, 4 September 2016 (UTC)<br />
<br />
<br />
== Networked audio ==<br />
<br />
I have added a stub/[[PulseAudio#Networked_audio|section]] about sending/receiving audio through the network using PA. The relevant documentation is [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/ here]. I have a working networked PulseAudio setup, it's available [https://github.com/nodiscc/srv01/tree/master/roles/pulseaudio here] as an ansible playbook, please allow for some time for me to port the most important information here. --[[User:Nodiscc|Nodiscc]] ([[User talk:Nodiscc|talk]]) 14:45, 21 November 2017 (UTC)<br />
<br />
== Note: Some confusion may occur ==<br />
<br />
confusion is even bigger after reading this. be more explicit, give examples, what is the advatage and aim of doing what they do? --[[User:UBF6|UBF6]] ([[User talk:UBF6|talk]]) 10:11, 1 May 2018 (UTC)<br />
<br />
== <s>Can't build package with modern glibc</s> ==<br />
<br />
Package (latest, version 11.1) fails to build with the latest (current) glibc headers.<br />
<br />
Applying the following patch will fix the build:<br />
<br />
'''fix-modern-glibc-memfd_create.patch'''<br />
<br />
--- a/src/pulsecore/memfd-wrappers.h 2018-05-17 00:31:19.000000000 -0400<br />
+++ b/src/pulsecore/memfd-wrappers.h 2018-05-17 00:32:02.000000000 -0400<br />
@@ -23,6 +23,7 @@<br />
#ifdef HAVE_MEMFD<br />
<br />
#include <sys/syscall.h><br />
+#include <sys/mman.h><br />
#include <fcntl.h><br />
<br />
/*<br />
@@ -33,10 +34,10 @@<br />
* a whole conflicts with the original glibc header <fnctl.h>.<br />
*/<br />
<br />
-static inline int memfd_create(const char *name, unsigned int flags) {<br />
+/*static inline int memfd_create(const char *name, unsigned int flags) {<br />
return syscall(SYS_memfd_create, name, flags);<br />
}<br />
-<br />
+*/<br />
/* memfd_create(2) flags */<br />
<br />
#ifndef MFD_CLOEXEC<br />
<br />
{{unsigned|04:45, 17 May 2018|Barbariccow}}<br />
<br />
:This should be reported on the bug tracker, not here. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:34, 17 May 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:PulseAudio&diff=545697Talk:PulseAudio2018-10-02T23:36:21Z<p>Mortan1961: /* Configuration of the PulseAudio ALSA plugin */ Strike. See "Expose PulseAudio sources, sinks and mixers to ALSA" section.</p>
<hr />
<div>==<s>Configuration of the PulseAudio ALSA plugin</s>==<br />
Can anybody give an example where to use the ''pcm.pulse'' setting? --[[User:BertiBoeller|BertiBoeller]] 12:33, 17 October 2009 (EDT)<br />
<br />
== Abandoned draft ==<br />
<br />
[[PulseAudio/Configuration]] was initially created to discuss PA configuration; then its goal was changed to be a replacement for this whole article; then it was abandoned. Currently it's marked for merge in [[PulseAudio#Configuration]]: is there anything worth being merged from there? -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 04:44, 30 November 2014 (UTC)<br />
<br />
:It seems to focus more on generic explanation/configuration, where the main article is mostly about troubleshooting (considering the size of that section, you'd consider moving it to [[PulseAudio/Troubleshooting]] ...) -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:40, 30 November 2014 (UTC)<br />
<br />
::How much sense would it make to actually merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] and then simply redirect [[PulseAudio/Configuration]] to [[PulseAudio#Configuration]]?<br />
::I'd agree with moving Troubleshooting to [[PulseAudio/Troubleshooting]].<br />
::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 12:01, 2 December 2014 (UTC)<br />
<br />
:::I do agree it makes sense to merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] in [[PulseAudio/Configuration]]. I made an attempt in this way. [[User:Gabx|Gabx]] ([[User talk:Gabx|talk]]) 18:24, 28 December 2014 (UTC)<br />
<br />
::::I like what I see so far, more extensive configuration in the main article also allows to cut back on [[PulseAudio/Troubleshooting]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 23:29, 28 December 2014 (UTC)<br />
<br />
== Restore package list ==<br />
Why [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=381413&oldid=381339 revert the list]? I think Arch News is just a temp reminder. Arch Wiki should keep all needed info.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 09:37, 1 August 2015 (UTC)<br />
<br />
:I'm not sure what the right policy is for this (hence my query in my edit summary) but I would just point out that the [https://www.archlinux.org/news/?page=12 archive] does stretch back to 2002 so I don't think it's unsafe to link to that material. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 16:34, 1 August 2015 (UTC)<br />
<br />
::That's true, but the set of split packages can change in the future... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:37, 1 August 2015 (UTC)<br />
::: Exactly, so at that time, the news page is out of date and only wiki page could be updated to keep up.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
:::We should ask for a more extensive optdepends instead of maintaining this information here. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:03, 1 August 2015 (UTC)<br />
<br />
::::Alternatively creating a ''pulseaudio-modules'' group should be equally simple for the packager, more comprehensible to the user and most naturally referenceable from the wiki. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:14, 1 August 2015 (UTC)<br />
:::::Then before a group is created, should we restore the package list?--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
::::::I don't think any action need be taken until such a time that the set of split packages changes. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 17:14, 7 September 2015 (UTC)<br />
<br />
:::::::Considering [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=next&oldid=408749], I think including the list explicitly is useful already. Restored in [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=409861&oldid=409859]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:30, 22 November 2015 (UTC)<br />
<br />
== Equalizer module is unsupported ==<br />
<br />
As of {{pkg|pulseaudio}}-7.0-2, loading the {{ic|module-equalizer-sink}} module results in the following warning:<br />
<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased latency or audible artifacts.<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: If you're facing audio problems, try unloading this module as a potential workaround.<br />
<br />
Running ''qpaeq'' then makes PulseAudio crash with this error:<br />
<br />
pulseaudio[535]: E: [pulseaudio] iface-module.c: Assertion 'pa_dbus_protocol_add_interface(m->dbus_protocol, m->path, &module_interface_info, m) >= 0' failed at modules/dbus/iface-module.c:309, function pa_dbusiface_module_new(). Aborting.<br />
<br />
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:43, 28 September 2015 (UTC)<br />
<br />
:This is not correct. Recently installed {{pkg|pulseaudio}}-7.0-2 and following the instructions in the wiki am successfully running the equalizer.<br />
<br />
:[[User:Brettski|brettski]] ([[User talk:Brettski|talk]]) 03:46, 13 October 2015 (UTC)<br />
<br />
::This is odd. You should have at least seen the first warning in your journal... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:01, 13 October 2015 (UTC)<br />
<br />
== Adding User to Audio Group ==<br />
<br />
Currently, the article says, "There is no need to add your user to audio group, as it uses udev and logind to dynamically give access to the currently "active" user". That is a little heavy-handed; perhaps a wording like "There is '''usually''' no need..."? For instance, on one of my machines running pulse audio, I was unable to play any sounds as "me", but could using root. The server is running headless, and I access it over SSH. It's understandable that udev doesn't consider "me" the currently "active" user in this scenario. It is essential to know that adding a user to the audio group helps in this circumstance, so I appreciate the explicit mention of that group. Does my rewording make sense, or is there a better rewording? [[User:Lmat|Lmat]] ([[User talk:Lmat|talk]]) 14:29, 1 March 2016 (UTC)<br />
:This looks like a reasonable rewording. Additionally I would considering explicitly describing in which cases it might make sense in the Wiki. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 14:56, 1 March 2016 (UTC)<br />
<br />
== Default sink @DEFAULT_SINK@ and keyboard control ==<br />
<br />
I got a hard time finding {{ic|pactl set-sink-volume @DEFAULT_SINK@ -5%}}.<br />
<br />
{{ic|@DEFAULT_SINK@}} comes very handy and fixes a long time frustration with PulseAudio (with sink indices changing each time I plug unplug a jack, or to get commands working across multiple machines with different sinks).<br />
<br />
It will probably help more people to make some changes or add a Tip about {{ic|@DEFAULT_SINK@}} somewhere ([[PulseAudio#Keyboard volume control]] ?).<br />
<br />
Only after finding about it, I found [[Xbindkeys#Xbindkeysrc]]. Maybe [[PulseAudio#Keyboard volume control]] could also Tip about [[Xbindkeys#Xbindkeysrc]].<br />
<br />
(I would have edit the page, if only I knew which changes was best: add a Tip and/or change the command lines and/or something else ?)<br />
<br />
-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 09:55, 4 September 2016 (UTC)<br />
<br />
: I suppose changing the commands is the best approach. However for those who want to edit a specific sink a small note should be added. This is just my personal opinion on this matter. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 10:11, 4 September 2016 (UTC)<br />
<br />
:: I think it is better suited as a tip, because if you start directly with {{ic|@DEFAULT_SINK@}}, it's not clear at all what the shortcut is for. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:07, 4 September 2016 (UTC)<br />
<br />
:: I've added the tip and edited the [[xbindkeys]] page to link to both [[PulseAudio]] and [[ALSA]] pages for alternative commands. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:37, 4 September 2016 (UTC)<br />
<br />
::: Thanks. I also discovered {{ic|@DEFAULT_SOURCE@}} (for microphone) and I've added tips in [[PulseAudio/Examples#Set default input sources]] and [[PulseAudio/Examples#Set the default output source]] -- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:55, 4 September 2016 (UTC)<br />
<br />
: Hey, Gravemind2a, does {{ic|amixer -q -D pulse sset Master 5%+ unmute}} work for you? Take a look at my comment right above yours, in this Talk page. --[[User:Denilsonsa|Denilsonsa]] ([[User talk:Denilsonsa|talk]]) 11:03, 4 September 2016 (UTC)<br />
<br />
:: Yes it works. But if it also works directly with PulseAudio {{ic|@DEFAULT_SINK@}}, why go through alsa amixer ? (and also long time ago I had issues with fast repeating asynchronous amixer volume commands making left/right speaker unbalanced, that actually made me drop Alsa in favor to PulseAudio)-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:29, 4 September 2016 (UTC)<br />
<br />
<br />
== Networked audio ==<br />
<br />
I have added a stub/[[PulseAudio#Networked_audio|section]] about sending/receiving audio through the network using PA. The relevant documentation is [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/ here]. I have a working networked PulseAudio setup, it's available [https://github.com/nodiscc/srv01/tree/master/roles/pulseaudio here] as an ansible playbook, please allow for some time for me to port the most important information here. --[[User:Nodiscc|Nodiscc]] ([[User talk:Nodiscc|talk]]) 14:45, 21 November 2017 (UTC)<br />
<br />
== Note: Some confusion may occur ==<br />
<br />
confusion is even bigger after reading this. be more explicit, give examples, what is the advatage and aim of doing what they do? --[[User:UBF6|UBF6]] ([[User talk:UBF6|talk]]) 10:11, 1 May 2018 (UTC)<br />
<br />
== <s>Can't build package with modern glibc</s> ==<br />
<br />
Package (latest, version 11.1) fails to build with the latest (current) glibc headers.<br />
<br />
Applying the following patch will fix the build:<br />
<br />
'''fix-modern-glibc-memfd_create.patch'''<br />
<br />
--- a/src/pulsecore/memfd-wrappers.h 2018-05-17 00:31:19.000000000 -0400<br />
+++ b/src/pulsecore/memfd-wrappers.h 2018-05-17 00:32:02.000000000 -0400<br />
@@ -23,6 +23,7 @@<br />
#ifdef HAVE_MEMFD<br />
<br />
#include <sys/syscall.h><br />
+#include <sys/mman.h><br />
#include <fcntl.h><br />
<br />
/*<br />
@@ -33,10 +34,10 @@<br />
* a whole conflicts with the original glibc header <fnctl.h>.<br />
*/<br />
<br />
-static inline int memfd_create(const char *name, unsigned int flags) {<br />
+/*static inline int memfd_create(const char *name, unsigned int flags) {<br />
return syscall(SYS_memfd_create, name, flags);<br />
}<br />
-<br />
+*/<br />
/* memfd_create(2) flags */<br />
<br />
#ifndef MFD_CLOEXEC<br />
<br />
{{unsigned|04:45, 17 May 2018|Barbariccow}}<br />
<br />
:This should be reported on the bug tracker, not here. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:34, 17 May 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:PulseAudio&diff=545696Talk:PulseAudio2018-10-02T23:32:08Z<p>Mortan1961: /* Can't build package with modern glibc */ Strike</p>
<hr />
<div>==Configuration of the PulseAudio ALSA plugin==<br />
Can anybody give an example where to use the ''pcm.pulse'' setting? --[[User:BertiBoeller|BertiBoeller]] 12:33, 17 October 2009 (EDT)<br />
<br />
== Abandoned draft ==<br />
<br />
[[PulseAudio/Configuration]] was initially created to discuss PA configuration; then its goal was changed to be a replacement for this whole article; then it was abandoned. Currently it's marked for merge in [[PulseAudio#Configuration]]: is there anything worth being merged from there? -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 04:44, 30 November 2014 (UTC)<br />
<br />
:It seems to focus more on generic explanation/configuration, where the main article is mostly about troubleshooting (considering the size of that section, you'd consider moving it to [[PulseAudio/Troubleshooting]] ...) -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 10:40, 30 November 2014 (UTC)<br />
<br />
::How much sense would it make to actually merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] and then simply redirect [[PulseAudio/Configuration]] to [[PulseAudio#Configuration]]?<br />
::I'd agree with moving Troubleshooting to [[PulseAudio/Troubleshooting]].<br />
::-- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 12:01, 2 December 2014 (UTC)<br />
<br />
:::I do agree it makes sense to merge [[PulseAudio/Configuration#Easy_configuration]] and [[PulseAudio/Configuration#Advanced_configuration]] in [[PulseAudio/Configuration]]. I made an attempt in this way. [[User:Gabx|Gabx]] ([[User talk:Gabx|talk]]) 18:24, 28 December 2014 (UTC)<br />
<br />
::::I like what I see so far, more extensive configuration in the main article also allows to cut back on [[PulseAudio/Troubleshooting]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 23:29, 28 December 2014 (UTC)<br />
<br />
== Restore package list ==<br />
Why [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=381413&oldid=381339 revert the list]? I think Arch News is just a temp reminder. Arch Wiki should keep all needed info.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 09:37, 1 August 2015 (UTC)<br />
<br />
:I'm not sure what the right policy is for this (hence my query in my edit summary) but I would just point out that the [https://www.archlinux.org/news/?page=12 archive] does stretch back to 2002 so I don't think it's unsafe to link to that material. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 16:34, 1 August 2015 (UTC)<br />
<br />
::That's true, but the set of split packages can change in the future... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:37, 1 August 2015 (UTC)<br />
::: Exactly, so at that time, the news page is out of date and only wiki page could be updated to keep up.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
:::We should ask for a more extensive optdepends instead of maintaining this information here. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:03, 1 August 2015 (UTC)<br />
<br />
::::Alternatively creating a ''pulseaudio-modules'' group should be equally simple for the packager, more comprehensible to the user and most naturally referenceable from the wiki. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:14, 1 August 2015 (UTC)<br />
:::::Then before a group is created, should we restore the package list?--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 12:57, 19 August 2015 (UTC)<br />
<br />
::::::I don't think any action need be taken until such a time that the set of split packages changes. -- [[User:Chazza|Chazza]] ([[User talk:Chazza|talk]]) 17:14, 7 September 2015 (UTC)<br />
<br />
:::::::Considering [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=next&oldid=408749], I think including the list explicitly is useful already. Restored in [https://wiki.archlinux.org/index.php?title=PulseAudio&diff=409861&oldid=409859]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 14:30, 22 November 2015 (UTC)<br />
<br />
== Equalizer module is unsupported ==<br />
<br />
As of {{pkg|pulseaudio}}-7.0-2, loading the {{ic|module-equalizer-sink}} module results in the following warning:<br />
<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: module-equalizer-sink is currently unsupported, and can sometimes cause PulseAudio crashes, increased latency or audible artifacts.<br />
pulseaudio[535]: W: [pulseaudio] module-equalizer-sink.c: If you're facing audio problems, try unloading this module as a potential workaround.<br />
<br />
Running ''qpaeq'' then makes PulseAudio crash with this error:<br />
<br />
pulseaudio[535]: E: [pulseaudio] iface-module.c: Assertion 'pa_dbus_protocol_add_interface(m->dbus_protocol, m->path, &module_interface_info, m) >= 0' failed at modules/dbus/iface-module.c:309, function pa_dbusiface_module_new(). Aborting.<br />
<br />
-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:43, 28 September 2015 (UTC)<br />
<br />
:This is not correct. Recently installed {{pkg|pulseaudio}}-7.0-2 and following the instructions in the wiki am successfully running the equalizer.<br />
<br />
:[[User:Brettski|brettski]] ([[User talk:Brettski|talk]]) 03:46, 13 October 2015 (UTC)<br />
<br />
::This is odd. You should have at least seen the first warning in your journal... -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:01, 13 October 2015 (UTC)<br />
<br />
== Adding User to Audio Group ==<br />
<br />
Currently, the article says, "There is no need to add your user to audio group, as it uses udev and logind to dynamically give access to the currently "active" user". That is a little heavy-handed; perhaps a wording like "There is '''usually''' no need..."? For instance, on one of my machines running pulse audio, I was unable to play any sounds as "me", but could using root. The server is running headless, and I access it over SSH. It's understandable that udev doesn't consider "me" the currently "active" user in this scenario. It is essential to know that adding a user to the audio group helps in this circumstance, so I appreciate the explicit mention of that group. Does my rewording make sense, or is there a better rewording? [[User:Lmat|Lmat]] ([[User talk:Lmat|talk]]) 14:29, 1 March 2016 (UTC)<br />
:This looks like a reasonable rewording. Additionally I would considering explicitly describing in which cases it might make sense in the Wiki. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 14:56, 1 March 2016 (UTC)<br />
<br />
== Default sink @DEFAULT_SINK@ and keyboard control ==<br />
<br />
I got a hard time finding {{ic|pactl set-sink-volume @DEFAULT_SINK@ -5%}}.<br />
<br />
{{ic|@DEFAULT_SINK@}} comes very handy and fixes a long time frustration with PulseAudio (with sink indices changing each time I plug unplug a jack, or to get commands working across multiple machines with different sinks).<br />
<br />
It will probably help more people to make some changes or add a Tip about {{ic|@DEFAULT_SINK@}} somewhere ([[PulseAudio#Keyboard volume control]] ?).<br />
<br />
Only after finding about it, I found [[Xbindkeys#Xbindkeysrc]]. Maybe [[PulseAudio#Keyboard volume control]] could also Tip about [[Xbindkeys#Xbindkeysrc]].<br />
<br />
(I would have edit the page, if only I knew which changes was best: add a Tip and/or change the command lines and/or something else ?)<br />
<br />
-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 09:55, 4 September 2016 (UTC)<br />
<br />
: I suppose changing the commands is the best approach. However for those who want to edit a specific sink a small note should be added. This is just my personal opinion on this matter. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 10:11, 4 September 2016 (UTC)<br />
<br />
:: I think it is better suited as a tip, because if you start directly with {{ic|@DEFAULT_SINK@}}, it's not clear at all what the shortcut is for. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:07, 4 September 2016 (UTC)<br />
<br />
:: I've added the tip and edited the [[xbindkeys]] page to link to both [[PulseAudio]] and [[ALSA]] pages for alternative commands. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 11:37, 4 September 2016 (UTC)<br />
<br />
::: Thanks. I also discovered {{ic|@DEFAULT_SOURCE@}} (for microphone) and I've added tips in [[PulseAudio/Examples#Set default input sources]] and [[PulseAudio/Examples#Set the default output source]] -- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:55, 4 September 2016 (UTC)<br />
<br />
: Hey, Gravemind2a, does {{ic|amixer -q -D pulse sset Master 5%+ unmute}} work for you? Take a look at my comment right above yours, in this Talk page. --[[User:Denilsonsa|Denilsonsa]] ([[User talk:Denilsonsa|talk]]) 11:03, 4 September 2016 (UTC)<br />
<br />
:: Yes it works. But if it also works directly with PulseAudio {{ic|@DEFAULT_SINK@}}, why go through alsa amixer ? (and also long time ago I had issues with fast repeating asynchronous amixer volume commands making left/right speaker unbalanced, that actually made me drop Alsa in favor to PulseAudio)-- [[User:Gravemind2a|Gravemind2a]] ([[User talk:Gravemind2a|talk]]) 11:29, 4 September 2016 (UTC)<br />
<br />
<br />
== Networked audio ==<br />
<br />
I have added a stub/[[PulseAudio#Networked_audio|section]] about sending/receiving audio through the network using PA. The relevant documentation is [https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/ here]. I have a working networked PulseAudio setup, it's available [https://github.com/nodiscc/srv01/tree/master/roles/pulseaudio here] as an ansible playbook, please allow for some time for me to port the most important information here. --[[User:Nodiscc|Nodiscc]] ([[User talk:Nodiscc|talk]]) 14:45, 21 November 2017 (UTC)<br />
<br />
== Note: Some confusion may occur ==<br />
<br />
confusion is even bigger after reading this. be more explicit, give examples, what is the advatage and aim of doing what they do? --[[User:UBF6|UBF6]] ([[User talk:UBF6|talk]]) 10:11, 1 May 2018 (UTC)<br />
<br />
== <s>Can't build package with modern glibc</s> ==<br />
<br />
Package (latest, version 11.1) fails to build with the latest (current) glibc headers.<br />
<br />
Applying the following patch will fix the build:<br />
<br />
'''fix-modern-glibc-memfd_create.patch'''<br />
<br />
--- a/src/pulsecore/memfd-wrappers.h 2018-05-17 00:31:19.000000000 -0400<br />
+++ b/src/pulsecore/memfd-wrappers.h 2018-05-17 00:32:02.000000000 -0400<br />
@@ -23,6 +23,7 @@<br />
#ifdef HAVE_MEMFD<br />
<br />
#include <sys/syscall.h><br />
+#include <sys/mman.h><br />
#include <fcntl.h><br />
<br />
/*<br />
@@ -33,10 +34,10 @@<br />
* a whole conflicts with the original glibc header <fnctl.h>.<br />
*/<br />
<br />
-static inline int memfd_create(const char *name, unsigned int flags) {<br />
+/*static inline int memfd_create(const char *name, unsigned int flags) {<br />
return syscall(SYS_memfd_create, name, flags);<br />
}<br />
-<br />
+*/<br />
/* memfd_create(2) flags */<br />
<br />
#ifndef MFD_CLOEXEC<br />
<br />
{{unsigned|04:45, 17 May 2018|Barbariccow}}<br />
<br />
:This should be reported on the bug tracker, not here. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:34, 17 May 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Arduino&diff=545695Talk:Arduino2018-10-02T23:28:55Z<p>Mortan1961: /* scons uploading does not work */ Strike</p>
<hr />
<div>== <s>scons uploading does not work</s> ==<br />
scons upload gives<br />
<br />
avrdude: stk500_recv(): programmer is not responding<br />
<br />
arduino-cmake worked, I tried to copy the avrdude line from cmake to scons, but it wouldn't work for some reason. I'm using arduino uno v3, arduino 1:1.0-3 from AUR. --[[User:Ichernev|Ichernev]] ([[User talk:Ichernev|talk]]) 22:38, 5 May 2012 (UTC)<br />
<br />
== stty ==<br />
I think we should add option {{ic|min 1}} to {{ic|stty}} command. also i realized that after calling Arduino IDE's terminal {{ic|icrnl}} had changed to {{ic|-icrnl}}. So i suggest we update the command to ::<br />
{{ic|stty -F /dev/ttyACM0 cs8 9600 ignbrk -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts icrnl min 1}} [[User:Tsester|Tsester]] ([[User talk:Tsester|talk]]) 10:51, 18 June 2016 (UTC)<br />
<br />
== Missing tools ==<br />
<br />
Compiling Arduino sketchbooks fails with message: "Parameter 'tools' is mandatory."<br />
I compared the arch package to the 64-bit linux download from Arduino (found at https://www.arduino.cc/en/Main/Software) and <br />
discovered that the arch package was missing the directory: /usr/share/arduino/hardware/tools. I fixed the compilation error by<br />
moving that tools directory from the Arduino download into the correct location. Unsure if I am missing a dependency or the <br />
package is broken -- I'm new to Arch.<br />
<br />
{{Unsigned|05:38, 5 January 2017|Jfmathews}}</div>Mortan1961https://wiki.archlinux.org/index.php?title=AppArmor&diff=545569AppArmor2018-10-02T01:05:05Z<p>Mortan1961: /* Speed-up AppArmor start by caching profiles */ Separate section on enabling cache and changing cache location</p>
<hr />
<div>[[Category:Security]]<br />
[[Category:Kernel]]<br />
[[ja:AppArmor]]<br />
{{Related articles start}}<br />
{{Related|Security}}<br />
{{Related|SELinux}}<br />
{{Related|TOMOYO Linux}}<br />
{{Related articles end}}<br />
[https://gitlab.com/apparmor AppArmor] is a [[Mandatory Access Control]] (MAC) system, implemented upon the [[Wikipedia:Linux_Security_Modules|Linux Security Modules]] (LSM).<br />
<br />
AppArmor, like most other LSMs, supplements rather than replaces the default Discretionary Access Control (DAC). As such it's impossible to grant a process more privileges than it had in the first place. <br />
<br />
Ubuntu, SUSE and a number of other distributions use it by default. RHEL (and its variants) use SELinux which requires good userspace integration to work properly. SELinux attaches labels to all files, processes and objects and is therefore very flexible. However configuring SELinux is considered to be very complicated and requires a supported filesystem. AppArmor on the other hand works using file paths and its configuration can be easily adapted.<br />
<br />
AppArmor proactively protects the operating system and applications from external or internal threats and even zero-day attacks by enforcing a specific rule set on a per application basis. Security policies completely define what system resources individual applications can access, and with what privileges. Access is denied by default if no profile says otherwise. A few default policies are included with AppArmor and using a combination of advanced static analysis and learning-based tools, AppArmor policies for even very complex applications can be deployed successfully in a matter of hours.<br />
<br />
Every breach of policy triggers a message in the system log, and AppArmor can be configured to notify users with real-time violation warnings popping up on the desktop.<br />
<br />
== Installation ==<br />
<br />
AppArmor is available in {{Pkg|linux}} ([https://git.archlinux.org/svntogit/packages.git/commit/?id=c46609a4b0325c363455264844091b71de01eddc since 4.18.8.arch1-1]), {{Pkg|linux-zen}} ([https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux-zen&id=3ab708208c8e13d5de08dabebc442d2d0be7a585 since 4.18.8.zen1-1]) and {{Pkg|linux-hardened}} ([https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux-hardened&id=14eccc6c604d37fa3001146f5bd4ca32ffa15c4f since 4.17.4.a-1]).<br />
<br />
To enable AppArmor as default security model on every boot, set the following [[kernel parameters]]:<br />
<br />
apparmor=1 security=apparmor<br />
<br />
[[Install]] {{Pkg|apparmor}} for userspace tools and libraries to control AppArmor. To load all AppArmor profiles on startup, [[enable]] {{ic|apparmor.service}}.<br />
<br />
==== Custom kernel ====<br />
<br />
When [[Kernels#Compilation|compiling the kernel]], it is required to set at least the following options:<br />
<br />
CONFIG_SECURITY_APPARMOR=y<br />
CONFIG_AUDIT=y<br />
<br />
To use AppArmor as the default Linux security model and omitting the need of setting kernel parameters, also set the following options:<br />
<br />
CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1<br />
CONFIG_DEFAULT_SECURITY_APPARMOR=y<br />
<br />
== Usage ==<br />
<br />
=== Display current status ===<br />
<br />
To test if AppArmor has been correctly enabled:<br />
<br />
{{hc|$ cat /sys/module/apparmor/parameters/enabled|<br />
Y<br />
}}<br />
<br />
{{ic|Y}} — enabled, {{ic|N}} — disabled, {{ic|no such file}} — module not in kernel.<br />
<br />
To display the current loaded status use {{ic|apparmor_status}}:<br />
<br />
{{hc|# apparmor_status|<br />
apparmor module is loaded.<br />
44 profiles are loaded.<br />
44 profiles are in enforce mode.<br />
...<br />
0 profiles are in complain mode.<br />
0 processes have profiles defined.<br />
0 processes are in enforce mode.<br />
0 processes are in complain mode.<br />
0 processes are unconfined but have a profile defined.<br />
}}<br />
<br />
=== Parsing profiles ===<br />
<br />
To load (enforce or complain), unload, reload, cache and stat profiles use {{ic|apparmor_parser}}. The default action ({{ic|-a}}) is to load a new profile in enforce mode, loading it in complain mode is possible using the {{ic|-C}} switch, in order to overwrite an existing profile use the {{ic|-r}} option and to remove a profile use {{ic|-R}}. Each action may also apply to multiple profiles. Refer to {{man|8|apparmor_parser|url=https://man.cx/apparmor_parser(8)}} man page for more information.<br />
<br />
=== Disabling loading ===<br />
<br />
Disable AppArmor by unloading all profiles for the current session:<br />
<br />
# aa-teardown <br />
<br />
To prevent from loading AppArmor profiles at the next boot [[disable]] {{ic|apparmor.service}}. To prevent the kernel from loading AppArmor, remove {{ic|1=apparmor=1 security=apparmor}} from the [[kernel parameters]].<br />
<br />
== Configuration ==<br />
<br />
=== Auditing and generating profiles ===<br />
<br />
To create new profiles the [[Audit framework]] should be running. This is because Arch Linux adopted [[systemd]] and doesn't do kernel logging to file by default. AppArmor can grab kernel audit logs from the userspace auditd daemon, allowing you to build a profile.<br />
<br />
New AppArmor profiles can be created by utilizing {{man|8|aa-genprof|url=https://manpages.debian.org/unstable/apparmor-utils/aa-genprof.8.en.html}} and {{man|8|aa-logprof|url=https://manpages.debian.org/unstable/apparmor-utils/aa-logprof.8.en.html}} tools available in {{pkg|apparmor}} package. Detailed guide about using those tools is available at [https://gitlab.com/apparmor/apparmor/wikis/Profiling_with_tools AppArmor wiki - Profiling with tools].<br />
<br />
Alternatively profiles may be also created manually, see guide available at [https://gitlab.com/apparmor/apparmor/wikis/Profiling_by_hand AppArmor wiki - Profiling by hand].<br />
<br />
=== Understanding profiles ===<br />
<br />
Profiles are human readable text files residing under {{ic|/etc/apparmor.d/}} describing how binaries should be treated when executed. A basic profile looks similar to this:<br />
<br />
{{hc|/etc/apparmor.d/usr.bin.test|<br />
#include <tunables/global><br />
<br />
profile test /usr/lib/test/test_binary {<br />
#include <abstractions/base><br />
<br />
# Main libraries and plugins<br />
/usr/share/TEST/** r,<br />
/usr/lib/TEST/** rm,<br />
<br />
# Configuration files and logs<br />
@{HOME}/.config/ r,<br />
@{HOME}/.config/TEST/** rw,<br />
}<br />
}}<br />
<br />
Strings preceded by a {{ic|@}} symbol are variables defined by abstractions ({{ic|/etc/apparmor.d/abstractions/}}), tunables ({{ic|/etc/apparmor.d/tunables/}}) or by the profile itself. {{ic|#include}} includes other profile-files directly. Paths followed by a set of characters are [https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Core_Policy_Reference#file-access-rules access permissions]. Pattern matching is done using [https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Core_Policy_Reference#apparmor-globbing-syntax AppArmor's globbing syntax].<br />
<br />
Most common use cases are covered by the following statements:<br />
<br />
* {{ic|r}} — read: read data<br />
* {{ic|w}} — write: create, delete, write to a file and extend it<br />
* {{ic|m}} — memory map executable: memory map a file executable<br />
* {{ic|x}} — execute: execute file; needs to be preceded by a [https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Core_Policy_Reference#execute-rules qualifier]<br />
<br />
Remember that those permission do not allow binaries to exceed the permission dictated by the Discretionary Access Control (DAC).<br />
<br />
This is merely a short overview, for a more detailed guide be sure to have a look at the {{man|5|apparmor.d|url=http://manpages.ubuntu.com/manpages/bionic/man5/apparmor.d.5.html}} man page and [https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Core_Policy_Reference documentation].<br />
<br />
== Tips and tricks ==<br />
<br />
=== Get desktop notification on DENIED actions ===<br />
<br />
The notification daemon displays desktop notifications whenever AppArmor denies a program access. To automatically start {{ic|aa-notify}} daemon on login follow below steps:<br />
<br />
1. Install and enable [[Audit framework]].<br />
<br />
2. Allow your desktop user to read audit logs with [[Access Control Lists]]:<br />
# setfacl -m u:<user>:rx /var/log/audit # allow <user> to read and navigate below /var/log/audit directory<br />
# setfacl -R -m u:<user>:r /var/log/audit # allow <user> to read all files in /var/log/audit<br />
# setfacl -dm u:<user>:r /var/log/audit # allow <user> to read all new files created inside /var/log/audit<br />
<br />
3. Create desktop launcher with the below content:<br />
{{hc|~/.config/autostart/apparmor-notify.desktop|2=<br />
[Desktop Entry]<br />
Type=Application<br />
Name=AppArmor Notify<br />
Comment=Receive on screen notifications of AppArmor denials<br />
TryExec=/usr/bin/aa-notify<br />
Exec=/usr/bin/aa-notify -p -s 1 -w 60<br />
StartupNotify=false<br />
NoDisplay=true<br />
}}<br />
<br />
4. Re-login and check if {{ic|aa-notify}} daemon is running:<br />
$ ps aux |grep aa-notify<br />
<br />
{{Note|Depending on your specific system configuration there could be A LOT of notifications displayed.}}<br />
<br />
To undo above, run:<br />
# setfacl -R -b /var/log/audit<br />
$ rm ~/.config/autostart/apparmor-notify.desktop<br />
<br />
For more information, see {{man|8|aa-notify|url=https://manpages.debian.org/unstable/apparmor-notify/aa-notify.8.en.html}}.<br />
<br />
=== Speed-up AppArmor start by caching profiles ===<br />
<br />
Since AppArmor has to translate the configured profiles into a binary format it may significantly increase the boot time. You can check current AppArmor startup time with:<br />
<br />
$ systemd-analyze blame |grep apparmor<br />
<br />
To enable caching AppAmror profiles uncomment:<br />
<br />
{{hc|/etc/apparmor/parser.conf|2=<br />
## Turn creating/updating of the cache on by default<br />
write-cache<br />
}}<br />
<br />
To change default cache location from {{ic|/etc/apparmor.d/cache.d/}} to {{ic|/var/cache/apparmor/}} add:<br />
<br />
{{hc|/etc/apparmor/parser.conf|2=<br />
cache-loc=/var/cache/apparmor<br />
}}<br />
<br />
Reboot and check AppArmor startup time again to see improvement:<br />
<br />
$ systemd-analyze blame |grep apparmor<br />
<br />
== Troubleshooting ==<br />
<br />
=== Failing to start Samba SMB/CIFS server ===<br />
<br />
See [[Samba#Permission issues on AppArmor]].<br />
<br />
== See also ==<br />
<br />
* [[Wikipedia:AppArmor]]<br />
* [https://gitlab.com/apparmor/apparmor/wikis/home AppArmor wiki]<br />
* [https://gitlab.com/apparmor/apparmor/wikis/AppArmor_Core_Policy_Reference AppArmor Core Policy Reference] — Detailed description of available options in a profile<br />
* [https://ubuntuforums.org/showthread.php?t=1008906 Ubuntu Tutorial] — General overview of available utilities and profile creation<br />
* [https://help.ubuntu.com/community/AppArmor Ubuntu Wiki] — Basic command overview<br />
* [https://gitlab.com/apparmor/apparmor/wikis/AppArmor_versions AppArmor Versions] — Version overview and links to the respective release notes<br />
* [https://gitlab.com/apparmor/apparmor/wikis/Kernel_interfaces Kernel Interfaces] — Low level interfaces to the AppArmor kernel module<br />
* [[wikipedia:Linux Security Modules]] — Linux kernel module on which basis AppArmor is build upon<br />
* [https://doc.opensuse.org/documentation/leap/security/single-html/book.security/index.html#part.apparmor AppArmor in openSUSE Security Guide]</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:AppArmor&diff=545568Talk:AppArmor2018-10-02T00:49:09Z<p>Mortan1961: /* re: LTS kernel edits */ Strike</p>
<hr />
<div>==<s> re: LTS kernel edits </s>==<br />
<br />
The {{pkg|linux-lts}} package [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux-lts&id=ff72f001939615403dd11b4975a7dbb3b2dcfdf2 has dropped support for AppArmor] so using that isn't a solution. -- [[User:Thestinger|thestinger]] ([[User talk:Thestinger|talk]]) 12:35, 5 July 2014 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:AppArmor&diff=545567Talk:AppArmor2018-10-02T00:47:36Z<p>Mortan1961: /* core/linux 3.14 Removed Apparmor Support */ Close</p>
<hr />
<div>== re: LTS kernel edits ==<br />
<br />
The {{pkg|linux-lts}} package [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux-lts&id=ff72f001939615403dd11b4975a7dbb3b2dcfdf2 has dropped support for AppArmor] so using that isn't a solution. -- [[User:Thestinger|thestinger]] ([[User talk:Thestinger|talk]]) 12:35, 5 July 2014 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:AppArmor&diff=545566Talk:AppArmor2018-10-02T00:46:41Z<p>Mortan1961: /* blog about arch apparmor */ Close</p>
<hr />
<div>== <s>core/linux 3.14 Removed Apparmor Support</s>==<br />
<br />
Just when 3.13 came around and had working apparmor in the stock kernel, it got removed from mainline in 3.14. So this article is going to require deep rewrites, and someone will need to bring linux-apparmor up to date and maintain that.<br />
{{unsigned|10 April 2014 3:40|Zanny}}<br />
<br />
Can anyone provide informations about why the apparmor support has been dropped? [[User:Marcus039|Marcus039]] ([[User talk:Marcus039|talk]]) 01:25, 21 February 2016 (UTC)<br />
<br />
:One main point was that it was enabled in the kernel, although the required userspace tools were not supported in the official repos. See [http://archlinux.2023198.n4.nabble.com/Trimming-down-our-default-kernel-configuration-td4696628.html] for the discussion. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 09:03, 21 February 2016 (UTC)<br />
<br />
== re: LTS kernel edits ==<br />
<br />
The {{pkg|linux-lts}} package [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/linux-lts&id=ff72f001939615403dd11b4975a7dbb3b2dcfdf2 has dropped support for AppArmor] so using that isn't a solution. -- [[User:Thestinger|thestinger]] ([[User talk:Thestinger|talk]]) 12:35, 5 July 2014 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Java&diff=516405Java2018-04-07T09:45:24Z<p>Mortan1961: /* Installation */ Reformat package section to separate officially and unofficially supported sorted by version</p>
<hr />
<div>[[Category:Programming languages]]<br />
[[cs:Java]]<br />
[[de:Java]]<br />
[[es:Java]]<br />
[[fa:Java]]<br />
[[fr:Java]]<br />
[[it:Java]]<br />
[[ja:Java]]<br />
[[pt:Java]]<br />
[[ru:Java]]<br />
{{Related articles start}}<br />
{{Related|Java Package Guidelines}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related articles end}}<br />
<br />
From the [[Wikipedia:Java (programming language)|Wikipedia article]]:<br />
<br />
:Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java virtual machine ([[Wikipedia:Java virtual machine|JVM]]) regardless of computer architecture.<br />
<br />
Arch Linux officially supports the open source [http://openjdk.java.net/ OpenJDK] versions 7, 8, 9, and 10. All these JVM can be installed without conflict and switched between using helper script {{Ic|archlinux-java}}. Several other Java environments are available in [[AUR]] but are not officially supported.<br />
<br />
== Installation ==<br />
<br />
{{Note|<br />
*Installing a JDK will automatically pull its JRE dependency.<br />
*After installation, the Java environment will need to be recognized by the shell ({{Ic|$PATH}} variable). This can be done by sourcing {{Ic|/etc/profile}} from the command line or by logging out/in again of a Desktop Environment.}}<br />
<br />
Two ''common'' packages are respectively pulled as dependency, named {{Pkg|java-runtime-common}} (containing common files for Java Runtime Environments) and {{Pkg|java-environment-common}} (containing common files for Java Development Kits). The provided environment file {{Ic|/etc/profile.d/jre.sh}} points to a linked location {{Ic|/usr/lib/jvm/default/bin}}, set by the {{ic|archlinux-java}} helper script. The links {{Ic|/usr/lib/jvm/default}} and {{Ic|/usr/lib/jvm/default-runtime}} should '''always''' be edited with {{Ic|archlinux-java}}. This is used to display and point to a working default Java environment in {{Ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}</nowiki>}} or a Java runtime in {{Ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}/jre</nowiki>}}.<br />
<br />
Most executables of the Java installation are provided by direct links in {{Ic|/usr/bin}}, while others are available in {{Ic|$PATH}}.<br />
<br />
{{Warning|File {{Ic|/etc/profile.d/jdk.sh}} is not provided any more by any package.}}<br />
<br />
=== Officially supported packages ===<br />
<br />
{{App|OpenJDK 10|The open-source reference implementation of the tenth edition of Java SE.|http://openjdk.java.net/projects/jdk/10/|{{Pkg|jre10-openjdk-headless}} {{Pkg|jre10-openjdk}} {{Pkg|jdk10-openjdk}} {{Pkg|openjdk10-doc}} {{Pkg|openjdk10-src}}}}<br />
{{App|OpenJDK 9|The open-source implementation of the ninth edition of Java SE.|http://openjdk.java.net/projects/jdk9/|{{Pkg|jre9-openjdk-headless}} {{Pkg|jre9-openjdk}} {{Pkg|jdk9-openjdk}} {{Pkg|openjdk9-doc}} {{Pkg|openjdk9-src}}}}<br />
{{App|OpenJDK 8|The open-source implementation of the eight edition of Java SE.|http://openjdk.java.net/projects/jdk8/|{{Pkg|jre8-openjdk-headless}} {{Pkg|jre8-openjdk}} {{Pkg|jdk8-openjdk}} {{Pkg|openjdk8-doc}} {{Pkg|openjdk8-src}}}}<br />
{{App|OpenJDK 7|The open-source implementation of the seventh edition of Java SE.|http://openjdk.java.net/projects/jdk7/|{{Pkg|jre7-openjdk-headless}} {{Pkg|jre7-openjdk}} {{Pkg|jdk7-openjdk}} {{Pkg|openjdk7-doc}} {{Pkg|openjdk7-src}}}}<br />
{{App|OpenJFX 8|The open-source implementation of JavaFX. You [https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases do not need] to install this package if you are making use of Java SE (the Oracle's implementation of JRE and JDK described below). This package only concerns users of the open source implementation of Java (OpenJDK project).|http://openjdk.java.net/projects/openjfx/|{{Pkg|java-openjfx}} {{Pkg|java-openjfx-doc}} {{Pkg|java-openjfx-src}}}}<br />
<br />
=== Unofficially supported packages ===<br />
<br />
{{App|Java SE|Oracle's implementation of JRE and JDK.|http://www.oracle.com/technetwork/java/javase/downloads/index.html|{{AUR|jre}} {{AUR|jre6}} {{AUR|jre7}} {{AUR|jre8}} {{AUR|jre9}} {{AUR|jre-devel}} {{AUR|jdk}} {{AUR|jdk5}} {{AUR|jdk6}} {{AUR|jdk7}} {{AUR|jdk8}} {{AUR|jdk9}} {{AUR|jdk-devel}}}}<br />
{{App|OpenJ9|Eclipse's implementation of JRE, contributed by IBM.|https://www.eclipse.org/openj9/|{{AUR|jdk8-openj9-bin}} {{AUR|jdk9-openj9-bin}}}}<br />
{{App|IBM J9 8|IBM's implementation of the eighth edition of JRE.|https://developer.ibm.com/javasdk/downloads/sdk8/|{{AUR|jdk8-j9-bin}}}}<br />
{{App|IBM J9 7|IBM's implementation of the seventh edition of JRE.|https://developer.ibm.com/javasdk/downloads/sdk7/|{{AUR|jdk7-j9-bin}} {{AUR|jdk7r1-j9-bin}}}}<br />
{{App|Parrot VM|a VM with experimental support for Java [http://trac.parrot.org/parrot/wiki/Languages] through two different methods: either as a [http://code.google.com/p/parrot-jvm/ Java VM bytecode translator], or as a [https://github.com/chrisdolan/perk Java compiler targeting the Parrot VM].|http://www.parrot.org/|{{AUR|parrot}}}}<br />
<br />
{{Note|32-bit versions of Java SE can be found by prefixing {{ic|bin32-}}, e.g. {{AUR|bin32-jre}} and {{AUR|bin32-jdk}}. They use {{AUR|java32-runtime-common}}, which functions as {{Pkg|java-runtime-common}} by suffixing with {{ic|32}}, e.g. {{ic|java32}}. The same analogy applies to {{AUR|java32-environment-common}}, which is only used by 32-bit JDK packages.}}<br />
<br />
== Flagging packages as out-of-date ==<br />
<br />
Although the Arch Linux package releases may contain a reference to the proprietary versions the packages are based on, the open-source project has its own versioning scheme: <br />
<br />
* {{Pkg|jre7-openjdk}}, {{Pkg|jdk7-openjdk}}, and {{Pkg|jre7-openjdk-headless}} should be flagged as out-of-date based on the [http://icedtea.wildebeest.org/download/source ''IcedTea'' version] (e.g. {{ic|2.4.3}}), rather than on the Oracle reference version (e.g. {{ic|u45}} in the release {{ic|7.u45_2.4.3-1}}).<br />
* {{Pkg|icedtea-web}} should be flagged as out-of-date based on the [http://icedtea.wildebeest.org/download/source ''IcedTea Web'' version] (e.g. {{ic|1.4.1}}). This is independent of the ''IcedTea'' version.<br />
<br />
== Switching between JVM ==<br />
<br />
The helper script {{Ic|archlinux-java}} provides such functionalities:<br />
<br />
archlinux-java <COMMAND><br />
<br />
COMMAND:<br />
status List installed Java environments and enabled one<br />
get Return the short name of the Java environment set as default<br />
set <JAVA_ENV> Force <JAVA_ENV> as default<br />
unset Unset current default Java environment<br />
fix Fix an invalid/broken default Java environment configuration<br />
<br />
=== List compatible Java environments installed ===<br />
<br />
$ archlinux-java status<br />
<br />
Example:<br />
<br />
$ archlinux-java status<br />
Available Java environments:<br />
java-7-openjdk (default)<br />
java-8-openjdk/jre<br />
<br />
Note the ''(default)'' denoting that {{Ic|java-7-openjdk}} is currently set as default. Invocation of {{Ic|java}} and other binaries will rely on this Java install. Also note on the previous output that only the ''JRE'' part of OpenJDK 8 is installed here.<br />
<br />
=== Change default Java environment ===<br />
<br />
# archlinux-java set <JAVA_ENV_NAME><br />
<br />
Example:<br />
<br />
# archlinux-java set java-8-openjdk/jre<br />
<br />
{{Tip|To see possible {{ic|<JAVA_ENV_NAME>}} names, use {{ic|archlinux-java status}}.}}<br />
<br />
Note that {{Ic|archlinux-java}} will not let you set an invalid Java environment. In the previous example, {{pkg|jre8-openjdk}} is installed but {{pkg|jdk8-openjdk}} is '''not''' so trying to set {{Ic|java-8-openjdk}} will fail:<br />
<br />
# archlinux-java set java-8-openjdk<br />
'/usr/lib/jvm/java-8-openjdk' is not a valid Java environment path<br />
<br />
=== Unsetting the default Java environment ===<br />
<br />
There should be no need to unset a Java environment as packages providing them should take care of this. Still should you want to do so, just use command {{Ic|unset}}:<br />
<br />
# archlinux-java unset<br />
<br />
=== Fixing the default Java environment ===<br />
<br />
If an invalid Java environment link is set, calling the {{Ic|archlinux-java fix}} command tries to fix it. Also note that if no default Java environment is set, this will look for valid ones and try to set it for you. Officially supported packages "OpenJDK 7" and "OpenJDK 8" will be considered first in this order, then un-official packages from [[AUR]].<br />
<br />
# archlinux-java fix<br />
<br />
=== Launching an application with the non-default java version ===<br />
<br />
If you want to launch an application with another version of java than the default one (for example if you have both version jre7 and jre8 installed on your system), you can wrap your application in a small bash script to locally change the default PATH of java. For example if the default version is jre7 and you want use jre8:<br />
<br />
#!/bin/sh <br />
<br />
export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH<br />
exec /path/to/application "$@"<br />
<br />
== Package pre-requisites to support {{Ic|archlinux-java}} ==<br />
<br />
{{Note|This info also applies to {{ic|archlinux32-java}} for 32-bit Java packages, with the proper inclusion of {{ic|32}} to the package/executable names, where applicable.}}<br />
<br />
This section is targeted at packager willing to provide packages in [[AUR]] for an alternate JVM and be able to integrate with Arch Linux JVM scheme to use {{Ic|archlinux-java}}. To do so, packages should:<br />
<br />
* Place all files under {{Ic|/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME} }}<br />
* Ensure all executables for which [https://www.archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://www.archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common] provide links are available in the corresponding package <br />
* Ship links from {{Ic|/usr/bin}} to executables, only if these links do not already belong to [https://www.archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://www.archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common]<br />
* Suffix man pages with {{Ic|-${VENDOR_NAME}${JAVA_MAJOR_VERSION} }} to prevent conflicts (see [https://www.archlinux.org/packages/extra/x86_64/jre8-openjdk/files/ jre8-openjdk file list] where man pages are suffixed with {{Ic|-openjdk8}})<br />
* Do not declare any [[PKGBUILD#conflicts|conflicts]] nor [[PKGBUILD#replaces|replaces]] with other JDKs, {{Ic|java-runtime}}, {{Ic|java-runtime-headless}} nor {{Ic|java-environment}}<br />
* Use script {{Ic|archlinux-java}} in ''install functions'' to set the Java environment as default '''if no other valid Java environment is already set''' (ie: package should not '''force''' install as default). See [https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/java7-openjdk officially supported Java environment package sources] for examples<br />
<br />
Also please note that:<br />
* Packages that need '''any''' Java environment should declare dependency on {{Ic|java-runtime}}, {{Ic|java-runtime-headless}} or {{Ic|java-environment}} as usual<br />
* Packages that need a '''specific Java vendor''' should declare dependency on the corresponding package<br />
* OpenJDK packages now declare {{Ic|1=provides="java-runtime-openjdk=${pkgver}"}} etc. This enables a third-party package to declare dependency on an OpenJDK without specifying a version<br />
<br />
== Troubleshooting ==<br />
<br />
=== MySQL ===<br />
<br />
Due to the fact that the JDBC-drivers often use the port in the URL to establish a connection to the database, it is considered "remote" (i.e., MySQL does not listen to the port as per its default settings) despite the fact that they are possibly running on the same host, Thus, to use JDBC and MySQL you should enable remote access to MySQL, following the instructions in [[MySQL#Grant remote access]].<br />
<br />
=== Impersonate another window manager ===<br />
<br />
You may use the {{pkg|wmname}} from [http://tools.suckless.org/x/wmname suckless.org] to make the JVM believe you are running a different window manager. This may solve a rendering issue of Java GUIs occurring in window managers like [[Awesome]] or [[Dwm]] or [[Ratpoison]].<br />
<br />
$ wmname LG3D<br />
<br />
You must restart the application in question after issuing the wmname command.<br />
<br />
This works because the JVM contains a hard-coded list of known, non-re-parenting window managers. For maximum irony, some users prefer to impersonate {{ic|LG3D}}, the non-re-parenting window manager [[wikipedia:Project_Looking_Glass|written by Sun, in Java]].<br />
<br />
=== Illegible fonts ===<br />
<br />
In addition to the suggestions mentioned below in [[#Better font rendering]], some fonts may still not be legible afterwards. If this is the case, there is a good chance Microsoft fonts are being used. Install {{AUR|ttf-ms-fonts}} from the [[AUR]].<br />
<br />
=== Missing text in some applications ===<br />
<br />
If some applications are completely missing texts it may help to use the options under [[#Tips and tricks]] as suggested in {{Bug|40871}}.<br />
<br />
=== Applications not resizing with WM, menus immediately closing ===<br />
The standard Java GUI toolkit has a hard-coded list of "non-reparenting" window managers. If using one that is not on that list, there can be some problems with running some Java applications. One of the most common problems is "gray blobs", when the Java application renders as a plain gray box instead of rendering the GUI. Another one might be menus responding to your click, but closing immediately.<br />
<br />
There are several things that may help:<br />
<br />
* For {{Pkg|jre7-openjdk}} or {{Pkg|jre8-openjdk}}, append the line {{Ic|1=export _JAVA_AWT_WM_NONREPARENTING=1}} in {{ic|/etc/profile.d/jre.sh}}. Then, source the file {{ic|/etc/profile.d/jre.sh}} or log out and log back in.<br />
* For Oracle's JRE/JDK, use [https://wiki.haskell.org/Xmonad/Frequently_asked_questions#Using_SetWMName SetWMName.] However, its effect may be canceled when also using {{ic|XMonad.Hooks.EwmhDesktops}}. In this case, appending<br />
<br />
>> setWMName "LG3D"<br />
<br />
to the {{ic|LogHook}} may help.<br />
<br />
See [http://wiki.haskell.org/Xmonad/Frequently_asked_questions#Problems_with_Java_applications.2C_Applet_java_console] for more information.<br />
<br />
=== System freezes when debugging JavaFX Applications ===<br />
<br />
If your system freezes while debugging a JavaFX Application, you can try to supply the JVM option {{Ic|1=-Dsun.awt.disablegrab=true}}.<br />
<br />
See http://bugs.java.com/view_bug.do?bug_id=6714678<br />
<br />
== Tips and tricks ==<br />
<br />
{{Note|Suggestions in this section are applicable to all applications, using explicitly installed (external) Java runtime. Some applications are bundled with own (private) runtime or use own mechanics for GUI, font rendering, etc., so none of written below is guaranteed to work.}}<br />
<br />
Behavior of most Java applications can be controlled by supplying predefined variables to Java runtime. From [https://bbs.archlinux.org/viewtopic.php?id=72892 this forum post], a way to do it consists of adding the following line in your {{Ic|~/.bashrc}} (or {{Ic|/etc/profile.d/jre.sh}} to affect programs that are not run by sourcing {{Ic|~/.bashrc}}, e.g., launching a program from Gnome's Applications view):<br />
<br />
export _JAVA_OPTIONS="-D'''<option 1>''' -D'''<option 2>'''..."<br />
<br />
For example, to use system anti-aliased fonts and make swing use the GTK look and feel:<br />
<br />
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'<br />
<br />
=== Better font rendering ===<br />
<br />
Both closed source and open source implementations of Java are known to have improperly implemented anti-aliasing of fonts. This can be fixed with the following options: {{Ic|1=-Dawt.useSystemAAFontSettings=on}}, {{Ic|1=-Dswing.aatext=true}}<br />
<br />
See [[Java Runtime Environment fonts]] for more detailed information.<br />
<br />
=== Silence 'Picked up _JAVA_OPTIONS' message on command line ===<br />
<br />
Setting the _JAVA_OPTIONS environment variables makes java (openjdk) write to stderr messages of the form: 'Picked up _JAVA_OPTIONS=...'. To suppress those messages in your terminal you can unset the environment variable in your shell startup files and alias java to pass those same options as command line arguments:<br />
<br />
_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS"<br />
unset _JAVA_OPTIONS<br />
alias java='java "$_SILENT_JAVA_OPTIONS"'<br />
<br />
=== GTK LookAndFeel ===<br />
<br />
If your Java programs look ugly, you may want to set up the default look and feel for the swing components:<br />
<br />
{{Ic|1=swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}.<br />
<br />
Some Java programs insist on using the cross platform Metal look and feel. In some of these cases you can force these apps to use the GTK look and feel by setting the following property:<br />
<br />
{{Ic|1=swing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}.<br />
<br />
{{Note|Forcing Java to use GTK may break some applications. The JRE/JDK is linked against GTK2 while many desktop applications use GTK3. If a GTK3 app has Java plugins with GUI, the app is likely to crash when opening the Java GUI, as mixing GTK2 and GTK3 in the same process is not supported. Libreoffice 5.0 is an example of this.}}<br />
<br />
=== Better 2D performance ===<br />
<br />
Switching to OpenGL-based hardware acceleration pipeline will improve 2D performance<br />
<br />
export _JAVA_OPTIONS='-Dsun.java2d.opengl=true'<br />
<br />
=== Non-reparenting window managers / Grey window / Programs not drawing properly ===<br />
<br />
Non-reparenting window managers user should set the following environment variable in their {{Ic|.xinitrc}}<br />
<br />
export _JAVA_AWT_WM_NONREPARENTING=1<br />
<br />
Not setting this may result in java programs not being drawn properly.<br />
<br />
== See also ==<br />
<br />
* [http://math.hws.edu/javanotes/ Introduction to Programming Using Java]</div>Mortan1961https://wiki.archlinux.org/index.php?title=Java&diff=516394Java2018-04-07T09:14:48Z<p>Mortan1961: Add OpenJDK 10 information</p>
<hr />
<div>[[Category:Programming languages]]<br />
[[cs:Java]]<br />
[[de:Java]]<br />
[[es:Java]]<br />
[[fa:Java]]<br />
[[fr:Java]]<br />
[[it:Java]]<br />
[[ja:Java]]<br />
[[pt:Java]]<br />
[[ru:Java]]<br />
{{Related articles start}}<br />
{{Related|Java Package Guidelines}}<br />
{{Related|Java Runtime Environment Fonts}}<br />
{{Related articles end}}<br />
<br />
From the [[Wikipedia:Java (programming language)|Wikipedia article]]:<br />
<br />
:Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java virtual machine ([[Wikipedia:Java virtual machine|JVM]]) regardless of computer architecture.<br />
<br />
Arch Linux officially supports the open source [http://openjdk.java.net/ OpenJDK] versions 7, 8, 9, and 10. All these JVM can be installed without conflict and switched between using helper script {{Ic|archlinux-java}}. Several other Java environments are available in [[AUR]] but are not officially supported.<br />
<br />
== Installation ==<br />
<br />
{{Note|<br />
*Installing a JDK will automatically pull its JRE dependency.<br />
*After installation, the Java environment will need to be recognized by the shell ({{Ic|$PATH}} variable). This can be done by sourcing {{Ic|/etc/profile}} from the command line or by logging out/in again of a Desktop Environment.}}<br />
<br />
Two ''common'' packages are respectively pulled as dependency, named {{Pkg|java-runtime-common}} (containing common files for Java Runtime Environments) and {{Pkg|java-environment-common}} (containing common files for Java Development Kits). The provided environment file {{Ic|/etc/profile.d/jre.sh}} points to a linked location {{Ic|/usr/lib/jvm/default/bin}}, set by the {{ic|archlinux-java}} helper script. The links {{Ic|/usr/lib/jvm/default}} and {{Ic|/usr/lib/jvm/default-runtime}} should '''always''' be edited with {{Ic|archlinux-java}}. This is used to display and point to a working default Java environment in {{Ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}</nowiki>}} or a Java runtime in {{Ic|<nowiki>/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME}/jre</nowiki>}}.<br />
<br />
Most executables of the Java installation are provided by direct links in {{Ic|/usr/bin}}, while others are available in {{Ic|$PATH}}.<br />
<br />
{{Warning|File {{Ic|/etc/profile.d/jdk.sh}} is not provided any more by any package.}}<br />
<br />
The following packages are available:<br />
<br />
{{App|OpenJDK 7|The open-source implementation of the seventh edition of Java SE.|http://openjdk.java.net/projects/jdk7/|{{Pkg|jre7-openjdk-headless}} {{Pkg|jre7-openjdk}} {{Pkg|jdk7-openjdk}} {{Pkg|openjdk7-doc}} {{Pkg|openjdk7-src}}}}<br />
{{App|IBM J9 7|IBM's implementation of the seventh edition of JRE.|https://developer.ibm.com/javasdk/downloads/sdk7/|{{AUR|jdk7-j9-bin}} {{AUR|jdk7r1-j9-bin}}}}<br />
{{App|OpenJDK 8|The open-source implementation of the eight edition of Java SE.|http://openjdk.java.net/projects/jdk8/|{{Pkg|jre8-openjdk-headless}} {{Pkg|jre8-openjdk}} {{Pkg|jdk8-openjdk}} {{Pkg|openjdk8-doc}} {{Pkg|openjdk8-src}}}}<br />
{{App|OpenJFX 8|The open-source implementation of JavaFX. You [https://wiki.openjdk.java.net/display/OpenJFX/Repositories+and+Releases do not need] to install this package if you are making use of Java SE (the Oracle's implementation of JRE and JDK described below). This package only concerns users of the open source implementation of Java (OpenJDK project).|http://openjdk.java.net/projects/openjfx/|{{Pkg|java-openjfx}} {{Pkg|java-openjfx-doc}} {{Pkg|java-openjfx-src}}}}<br />
{{App|IBM J9 8|IBM's implementation of the eighth edition of JRE.|https://developer.ibm.com/javasdk/downloads/sdk8/|{{AUR|jdk8-j9-bin}}}}<br />
{{App|OpenJDK 9|The open-source implementation of the ninth edition of Java SE.|http://openjdk.java.net/projects/jdk9/|{{Pkg|jre9-openjdk-headless}} {{Pkg|jre9-openjdk}} {{Pkg|jdk9-openjdk}} {{Pkg|openjdk9-doc}} {{Pkg|openjdk9-src}}}}<br />
{{App|OpenJ9|Eclipse's implementation of JRE, contributed by IBM.|https://www.eclipse.org/openj9/|{{AUR|jdk8-openj9-bin}} {{AUR|jdk9-openj9-bin}}}}<br />
{{App|OpenJDK 10|The open-source reference implementation of the tenth edition of Java SE.|http://openjdk.java.net/projects/jdk/10/|{{Pkg|jre10-openjdk-headless}} {{Pkg|jre10-openjdk}} {{Pkg|jdk10-openjdk}} {{Pkg|openjdk10-doc}} {{Pkg|openjdk10-src}}}}<br />
{{App|Java SE|Oracle's implementation of JRE and JDK.|http://www.oracle.com/technetwork/java/javase/downloads/index.html|{{AUR|jre}} {{AUR|jre6}} {{AUR|jre7}} {{AUR|jre8}} {{AUR|jre9}} {{AUR|jre-devel}} {{AUR|jdk}} {{AUR|jdk5}} {{AUR|jdk6}} {{AUR|jdk7}} {{AUR|jdk8}} {{AUR|jdk9}} {{AUR|jdk-devel}}}}<br />
{{App|Parrot VM|a VM with experimental support for Java [http://trac.parrot.org/parrot/wiki/Languages] through two different methods: either as a [http://code.google.com/p/parrot-jvm/ Java VM bytecode translator], or as a [https://github.com/chrisdolan/perk Java compiler targeting the Parrot VM].|http://www.parrot.org/|{{AUR|parrot}}}}<br />
<br />
{{Note|32-bit versions of Java SE can be found by prefixing {{ic|bin32-}}, e.g. {{AUR|bin32-jre}} and {{AUR|bin32-jdk}}. They use {{AUR|java32-runtime-common}}, which functions as {{Pkg|java-runtime-common}} by suffixing with {{ic|32}}, e.g. {{ic|java32}}. The same analogy applies to {{AUR|java32-environment-common}}, which is only used by 32-bit JDK packages.}}<br />
<br />
== Flagging packages as out-of-date ==<br />
<br />
Although the Arch Linux package releases may contain a reference to the proprietary versions the packages are based on, the open-source project has its own versioning scheme: <br />
<br />
* {{Pkg|jre7-openjdk}}, {{Pkg|jdk7-openjdk}}, and {{Pkg|jre7-openjdk-headless}} should be flagged as out-of-date based on the [http://icedtea.wildebeest.org/download/source ''IcedTea'' version] (e.g. {{ic|2.4.3}}), rather than on the Oracle reference version (e.g. {{ic|u45}} in the release {{ic|7.u45_2.4.3-1}}).<br />
* {{Pkg|icedtea-web}} should be flagged as out-of-date based on the [http://icedtea.wildebeest.org/download/source ''IcedTea Web'' version] (e.g. {{ic|1.4.1}}). This is independent of the ''IcedTea'' version.<br />
<br />
== Switching between JVM ==<br />
<br />
The helper script {{Ic|archlinux-java}} provides such functionalities:<br />
<br />
archlinux-java <COMMAND><br />
<br />
COMMAND:<br />
status List installed Java environments and enabled one<br />
get Return the short name of the Java environment set as default<br />
set <JAVA_ENV> Force <JAVA_ENV> as default<br />
unset Unset current default Java environment<br />
fix Fix an invalid/broken default Java environment configuration<br />
<br />
=== List compatible Java environments installed ===<br />
<br />
$ archlinux-java status<br />
<br />
Example:<br />
<br />
$ archlinux-java status<br />
Available Java environments:<br />
java-7-openjdk (default)<br />
java-8-openjdk/jre<br />
<br />
Note the ''(default)'' denoting that {{Ic|java-7-openjdk}} is currently set as default. Invocation of {{Ic|java}} and other binaries will rely on this Java install. Also note on the previous output that only the ''JRE'' part of OpenJDK 8 is installed here.<br />
<br />
=== Change default Java environment ===<br />
<br />
# archlinux-java set <JAVA_ENV_NAME><br />
<br />
Example:<br />
<br />
# archlinux-java set java-8-openjdk/jre<br />
<br />
{{Tip|To see possible {{ic|<JAVA_ENV_NAME>}} names, use {{ic|archlinux-java status}}.}}<br />
<br />
Note that {{Ic|archlinux-java}} will not let you set an invalid Java environment. In the previous example, {{pkg|jre8-openjdk}} is installed but {{pkg|jdk8-openjdk}} is '''not''' so trying to set {{Ic|java-8-openjdk}} will fail:<br />
<br />
# archlinux-java set java-8-openjdk<br />
'/usr/lib/jvm/java-8-openjdk' is not a valid Java environment path<br />
<br />
=== Unsetting the default Java environment ===<br />
<br />
There should be no need to unset a Java environment as packages providing them should take care of this. Still should you want to do so, just use command {{Ic|unset}}:<br />
<br />
# archlinux-java unset<br />
<br />
=== Fixing the default Java environment ===<br />
<br />
If an invalid Java environment link is set, calling the {{Ic|archlinux-java fix}} command tries to fix it. Also note that if no default Java environment is set, this will look for valid ones and try to set it for you. Officially supported packages "OpenJDK 7" and "OpenJDK 8" will be considered first in this order, then un-official packages from [[AUR]].<br />
<br />
# archlinux-java fix<br />
<br />
=== Launching an application with the non-default java version ===<br />
<br />
If you want to launch an application with another version of java than the default one (for example if you have both version jre7 and jre8 installed on your system), you can wrap your application in a small bash script to locally change the default PATH of java. For example if the default version is jre7 and you want use jre8:<br />
<br />
#!/bin/sh <br />
<br />
export PATH=/usr/lib/jvm/java-8-openjdk/jre/bin/:$PATH<br />
exec /path/to/application "$@"<br />
<br />
== Package pre-requisites to support {{Ic|archlinux-java}} ==<br />
<br />
{{Note|This info also applies to {{ic|archlinux32-java}} for 32-bit Java packages, with the proper inclusion of {{ic|32}} to the package/executable names, where applicable.}}<br />
<br />
This section is targeted at packager willing to provide packages in [[AUR]] for an alternate JVM and be able to integrate with Arch Linux JVM scheme to use {{Ic|archlinux-java}}. To do so, packages should:<br />
<br />
* Place all files under {{Ic|/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-${VENDOR_NAME} }}<br />
* Ensure all executables for which [https://www.archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://www.archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common] provide links are available in the corresponding package <br />
* Ship links from {{Ic|/usr/bin}} to executables, only if these links do not already belong to [https://www.archlinux.org/packages/extra/any/java-runtime-common/files/ java-runtime-common] and [https://www.archlinux.org/packages/extra/any/java-environment-common/files/ java-environment-common]<br />
* Suffix man pages with {{Ic|-${VENDOR_NAME}${JAVA_MAJOR_VERSION} }} to prevent conflicts (see [https://www.archlinux.org/packages/extra/x86_64/jre8-openjdk/files/ jre8-openjdk file list] where man pages are suffixed with {{Ic|-openjdk8}})<br />
* Do not declare any [[PKGBUILD#conflicts|conflicts]] nor [[PKGBUILD#replaces|replaces]] with other JDKs, {{Ic|java-runtime}}, {{Ic|java-runtime-headless}} nor {{Ic|java-environment}}<br />
* Use script {{Ic|archlinux-java}} in ''install functions'' to set the Java environment as default '''if no other valid Java environment is already set''' (ie: package should not '''force''' install as default). See [https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/java7-openjdk officially supported Java environment package sources] for examples<br />
<br />
Also please note that:<br />
* Packages that need '''any''' Java environment should declare dependency on {{Ic|java-runtime}}, {{Ic|java-runtime-headless}} or {{Ic|java-environment}} as usual<br />
* Packages that need a '''specific Java vendor''' should declare dependency on the corresponding package<br />
* OpenJDK packages now declare {{Ic|1=provides="java-runtime-openjdk=${pkgver}"}} etc. This enables a third-party package to declare dependency on an OpenJDK without specifying a version<br />
<br />
== Troubleshooting ==<br />
<br />
=== MySQL ===<br />
<br />
Due to the fact that the JDBC-drivers often use the port in the URL to establish a connection to the database, it is considered "remote" (i.e., MySQL does not listen to the port as per its default settings) despite the fact that they are possibly running on the same host, Thus, to use JDBC and MySQL you should enable remote access to MySQL, following the instructions in [[MySQL#Grant remote access]].<br />
<br />
=== Impersonate another window manager ===<br />
<br />
You may use the {{pkg|wmname}} from [http://tools.suckless.org/x/wmname suckless.org] to make the JVM believe you are running a different window manager. This may solve a rendering issue of Java GUIs occurring in window managers like [[Awesome]] or [[Dwm]] or [[Ratpoison]].<br />
<br />
$ wmname LG3D<br />
<br />
You must restart the application in question after issuing the wmname command.<br />
<br />
This works because the JVM contains a hard-coded list of known, non-re-parenting window managers. For maximum irony, some users prefer to impersonate {{ic|LG3D}}, the non-re-parenting window manager [[wikipedia:Project_Looking_Glass|written by Sun, in Java]].<br />
<br />
=== Illegible fonts ===<br />
<br />
In addition to the suggestions mentioned below in [[#Better font rendering]], some fonts may still not be legible afterwards. If this is the case, there is a good chance Microsoft fonts are being used. Install {{AUR|ttf-ms-fonts}} from the [[AUR]].<br />
<br />
=== Missing text in some applications ===<br />
<br />
If some applications are completely missing texts it may help to use the options under [[#Tips and tricks]] as suggested in {{Bug|40871}}.<br />
<br />
=== Applications not resizing with WM, menus immediately closing ===<br />
The standard Java GUI toolkit has a hard-coded list of "non-reparenting" window managers. If using one that is not on that list, there can be some problems with running some Java applications. One of the most common problems is "gray blobs", when the Java application renders as a plain gray box instead of rendering the GUI. Another one might be menus responding to your click, but closing immediately.<br />
<br />
There are several things that may help:<br />
<br />
* For {{Pkg|jre7-openjdk}} or {{Pkg|jre8-openjdk}}, append the line {{Ic|1=export _JAVA_AWT_WM_NONREPARENTING=1}} in {{ic|/etc/profile.d/jre.sh}}. Then, source the file {{ic|/etc/profile.d/jre.sh}} or log out and log back in.<br />
* For Oracle's JRE/JDK, use [https://wiki.haskell.org/Xmonad/Frequently_asked_questions#Using_SetWMName SetWMName.] However, its effect may be canceled when also using {{ic|XMonad.Hooks.EwmhDesktops}}. In this case, appending<br />
<br />
>> setWMName "LG3D"<br />
<br />
to the {{ic|LogHook}} may help.<br />
<br />
See [http://wiki.haskell.org/Xmonad/Frequently_asked_questions#Problems_with_Java_applications.2C_Applet_java_console] for more information.<br />
<br />
=== System freezes when debugging JavaFX Applications ===<br />
<br />
If your system freezes while debugging a JavaFX Application, you can try to supply the JVM option {{Ic|1=-Dsun.awt.disablegrab=true}}.<br />
<br />
See http://bugs.java.com/view_bug.do?bug_id=6714678<br />
<br />
== Tips and tricks ==<br />
<br />
{{Note|Suggestions in this section are applicable to all applications, using explicitly installed (external) Java runtime. Some applications are bundled with own (private) runtime or use own mechanics for GUI, font rendering, etc., so none of written below is guaranteed to work.}}<br />
<br />
Behavior of most Java applications can be controlled by supplying predefined variables to Java runtime. From [https://bbs.archlinux.org/viewtopic.php?id=72892 this forum post], a way to do it consists of adding the following line in your {{Ic|~/.bashrc}} (or {{Ic|/etc/profile.d/jre.sh}} to affect programs that are not run by sourcing {{Ic|~/.bashrc}}, e.g., launching a program from Gnome's Applications view):<br />
<br />
export _JAVA_OPTIONS="-D'''<option 1>''' -D'''<option 2>'''..."<br />
<br />
For example, to use system anti-aliased fonts and make swing use the GTK look and feel:<br />
<br />
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'<br />
<br />
=== Better font rendering ===<br />
<br />
Both closed source and open source implementations of Java are known to have improperly implemented anti-aliasing of fonts. This can be fixed with the following options: {{Ic|1=-Dawt.useSystemAAFontSettings=on}}, {{Ic|1=-Dswing.aatext=true}}<br />
<br />
See [[Java Runtime Environment fonts]] for more detailed information.<br />
<br />
=== Silence 'Picked up _JAVA_OPTIONS' message on command line ===<br />
<br />
Setting the _JAVA_OPTIONS environment variables makes java (openjdk) write to stderr messages of the form: 'Picked up _JAVA_OPTIONS=...'. To suppress those messages in your terminal you can unset the environment variable in your shell startup files and alias java to pass those same options as command line arguments:<br />
<br />
_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS"<br />
unset _JAVA_OPTIONS<br />
alias java='java "$_SILENT_JAVA_OPTIONS"'<br />
<br />
=== GTK LookAndFeel ===<br />
<br />
If your Java programs look ugly, you may want to set up the default look and feel for the swing components:<br />
<br />
{{Ic|1=swing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}.<br />
<br />
Some Java programs insist on using the cross platform Metal look and feel. In some of these cases you can force these apps to use the GTK look and feel by setting the following property:<br />
<br />
{{Ic|1=swing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel}}.<br />
<br />
{{Note|Forcing Java to use GTK may break some applications. The JRE/JDK is linked against GTK2 while many desktop applications use GTK3. If a GTK3 app has Java plugins with GUI, the app is likely to crash when opening the Java GUI, as mixing GTK2 and GTK3 in the same process is not supported. Libreoffice 5.0 is an example of this.}}<br />
<br />
=== Better 2D performance ===<br />
<br />
Switching to OpenGL-based hardware acceleration pipeline will improve 2D performance<br />
<br />
export _JAVA_OPTIONS='-Dsun.java2d.opengl=true'<br />
<br />
=== Non-reparenting window managers / Grey window / Programs not drawing properly ===<br />
<br />
Non-reparenting window managers user should set the following environment variable in their {{Ic|.xinitrc}}<br />
<br />
export _JAVA_AWT_WM_NONREPARENTING=1<br />
<br />
Not setting this may result in java programs not being drawn properly.<br />
<br />
== See also ==<br />
<br />
* [http://math.hws.edu/javanotes/ Introduction to Programming Using Java]</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Pb&diff=511648Talk:Pb2018-02-22T06:24:03Z<p>Mortan1961: /* Adding: Lexers/Formatters/… */ Close</p>
<hr />
<div>__TOC__</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Apache_HTTP_Server&diff=511647Talk:Apache HTTP Server2018-02-22T06:20:14Z<p>Mortan1961: /* Shouldn't this page mention the need to disallow access to root directory? */ Close</p>
<hr />
<div>== PID-errors ==<br />
<br />
Keep getting PID-errors:<br />
systemd[1]: PID file /run/httpd/httpd.pid not readable (yet?) after start. (even when modules/mod_unique_id.so is disabled)<br />
<br />
About the PHP Installation, mod_mpm_prefork seems not the best choice:<br />
https://serverfault.com/questions/383526/how-do-i-select-which-apache-mpm-to-use/383634#383634<br />
I would vote for mod_proxy_handler<br />
<br />
[[User:Beta990|Beta990]] ([[User talk:Beta990|talk]]) 15:14, 16 March 2014 (UTC)<br />
<br />
== unique_id_module ==<br />
<br />
If the service httpd don't start, take a look at '''/var/log/httpd/error_log'''. If appears this line:<br />
-'''[alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "myhost"'''<br />
you must uncomment the line: '''LoadModule unique_id_module'''.<br />
Restart httpd and now it should work. --[[User:Nak|Nak]] 17:22, 22 April 2007 (GMT+1)<br />
<br />
== Using SSL ==<br />
<br />
Could the SSL section be expanded to include how to use .htaccess and mod_rewrite to redirect traffic for certain sections or the whole site? I found [http://blackflag.wordpress.com/2006/06/13/apache2-forcing-all-inbound-traffic-to-ssl/ apache2-forcing-all-inbound-traffic-to-ssl] to be a useful resource in this respect. [[User:Corburn|Corburn]] 13:58, 23 March 2012 (EDT)<br />
<br />
== User Directories ==<br />
<br />
Continuing discussion from the main page, you do '''not''' have to make your home directory ''world-readable'' in order to make your ''public_html'' directory available to the web server. To minimize home directory exposure, I generally set the permission for both ''/home/$USER'' and ''/home/$USER/public_html'' to '''0750''' and change the group ownership to '''http'''. E.g.:<br />
<br />
mkdir -p $HOME/public_html<br />
chmod 0750 $HOME $HOME/public_html<br />
chown $USER:http $HOME $HOME/public_html<br />
<br />
That way you have given only '''read''' (descend into) permission to the web server user for both your home directory and your userdir. [[User:Drankinatty|David C. Rankin, J.D.,P.E. -- Rankin Law Firm, PLLC]] ([[User talk:Drankinatty|talk]]) 07:22, 25 August 2015 (UTC)<br />
<br />
== userdir disable ==<br />
<br />
I think that section need add:<br />
#LoadModule userdir_module modules/mod_userdir.so<br />
to fully disable userdir.<br />
<br />
[[User:Jabalv|Jabalv]] ([[User talk:Jabalv|talk]]) 18:48, 25 December 2013 (UTC)<br />
<br />
:According to [http://httpd.apache.org/docs/2.4/mod/mod_userdir.html]:<br />
:"User directory substitution is not active by default in versions 2.1.4 and later. In earlier versions, UserDir public_html was assumed if no UserDir directive was present."<br />
:So I think it is safe to just not include the conf. --[[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 18:20, 23 August 2014 (UTC)<br />
<br />
== Which MPM to use with php-fpm and mod_proxy_fcgi? ==<br />
<br />
The section about php-fpm and mod_proxy_fcgi does not say which MPM (event, prefork, worker) is optimal for this configuration. If I understand correctly (but I'm not an expert), the default mpm_event_module would be the best choice. It would be good to document this, because users coming from a mod_php / mpm_prefork_module configuration would need to actively switch back to mpm_event_module. --[[User:Marcvangend|Marcvangend]] ([[User talk:Marcvangend|talk]]) 09:24, 23 November 2015 (UTC)<br />
<br />
The best MPM to use is to be determined by individual benchmarks. But event MPM should be good as a default.<br />
<br />
--------------<br />
<br />
:A good start would be to, at least, describe what MPMs are and what their main use is, since the term is used multiple times in the article. Something like:<br />
:Apache can be configured to use _one_ of several Multi-Processing Modules ([https://httpd.apache.org/docs/2.2/mpm.html MPM]s), which affect performance and the way it allocates resources in response to requests. mpm-prefork: ... mpm-worker: ... mpm-event: ...<br />
:https://tweaked.io/guide/apache2/ has a short summary of MPM specifics; but we should put up something more informative. :--[[User:Nodiscc|Nodiscc]] ([[User talk:Nodiscc|talk]]) 02:54, 18 November 2017 (UTC)<br />
<br />
--------------</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Apache_HTTP_Server&diff=511646Talk:Apache HTTP Server2018-02-22T06:19:38Z<p>Mortan1961: /* SSLCertificateChainFile */ Close</p>
<hr />
<div>== PID-errors ==<br />
<br />
Keep getting PID-errors:<br />
systemd[1]: PID file /run/httpd/httpd.pid not readable (yet?) after start. (even when modules/mod_unique_id.so is disabled)<br />
<br />
About the PHP Installation, mod_mpm_prefork seems not the best choice:<br />
https://serverfault.com/questions/383526/how-do-i-select-which-apache-mpm-to-use/383634#383634<br />
I would vote for mod_proxy_handler<br />
<br />
[[User:Beta990|Beta990]] ([[User talk:Beta990|talk]]) 15:14, 16 March 2014 (UTC)<br />
<br />
== unique_id_module ==<br />
<br />
If the service httpd don't start, take a look at '''/var/log/httpd/error_log'''. If appears this line:<br />
-'''[alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "myhost"'''<br />
you must uncomment the line: '''LoadModule unique_id_module'''.<br />
Restart httpd and now it should work. --[[User:Nak|Nak]] 17:22, 22 April 2007 (GMT+1)<br />
<br />
== Using SSL ==<br />
<br />
Could the SSL section be expanded to include how to use .htaccess and mod_rewrite to redirect traffic for certain sections or the whole site? I found [http://blackflag.wordpress.com/2006/06/13/apache2-forcing-all-inbound-traffic-to-ssl/ apache2-forcing-all-inbound-traffic-to-ssl] to be a useful resource in this respect. [[User:Corburn|Corburn]] 13:58, 23 March 2012 (EDT)<br />
<br />
== User Directories ==<br />
<br />
Continuing discussion from the main page, you do '''not''' have to make your home directory ''world-readable'' in order to make your ''public_html'' directory available to the web server. To minimize home directory exposure, I generally set the permission for both ''/home/$USER'' and ''/home/$USER/public_html'' to '''0750''' and change the group ownership to '''http'''. E.g.:<br />
<br />
mkdir -p $HOME/public_html<br />
chmod 0750 $HOME $HOME/public_html<br />
chown $USER:http $HOME $HOME/public_html<br />
<br />
That way you have given only '''read''' (descend into) permission to the web server user for both your home directory and your userdir. [[User:Drankinatty|David C. Rankin, J.D.,P.E. -- Rankin Law Firm, PLLC]] ([[User talk:Drankinatty|talk]]) 07:22, 25 August 2015 (UTC)<br />
<br />
== userdir disable ==<br />
<br />
I think that section need add:<br />
#LoadModule userdir_module modules/mod_userdir.so<br />
to fully disable userdir.<br />
<br />
[[User:Jabalv|Jabalv]] ([[User talk:Jabalv|talk]]) 18:48, 25 December 2013 (UTC)<br />
<br />
:According to [http://httpd.apache.org/docs/2.4/mod/mod_userdir.html]:<br />
:"User directory substitution is not active by default in versions 2.1.4 and later. In earlier versions, UserDir public_html was assumed if no UserDir directive was present."<br />
:So I think it is safe to just not include the conf. --[[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 18:20, 23 August 2014 (UTC)<br />
<br />
== Which MPM to use with php-fpm and mod_proxy_fcgi? ==<br />
<br />
The section about php-fpm and mod_proxy_fcgi does not say which MPM (event, prefork, worker) is optimal for this configuration. If I understand correctly (but I'm not an expert), the default mpm_event_module would be the best choice. It would be good to document this, because users coming from a mod_php / mpm_prefork_module configuration would need to actively switch back to mpm_event_module. --[[User:Marcvangend|Marcvangend]] ([[User talk:Marcvangend|talk]]) 09:24, 23 November 2015 (UTC)<br />
<br />
The best MPM to use is to be determined by individual benchmarks. But event MPM should be good as a default.<br />
<br />
--------------<br />
<br />
:A good start would be to, at least, describe what MPMs are and what their main use is, since the term is used multiple times in the article. Something like:<br />
:Apache can be configured to use _one_ of several Multi-Processing Modules ([https://httpd.apache.org/docs/2.2/mpm.html MPM]s), which affect performance and the way it allocates resources in response to requests. mpm-prefork: ... mpm-worker: ... mpm-event: ...<br />
:https://tweaked.io/guide/apache2/ has a short summary of MPM specifics; but we should put up something more informative. :--[[User:Nodiscc|Nodiscc]] ([[User talk:Nodiscc|talk]]) 02:54, 18 November 2017 (UTC)<br />
<br />
--------------<br />
<br />
==<s> Shouldn't this page mention the need to disallow access to root directory? </s>==<br />
<br />
Now I'm not an admin of an Apache server, so what I'm saying here is not necessarily correct. I was just browsing through Apache docs, and I found something that might be very interesting here.<br />
<br />
To be more exact, http://httpd.apache.org/docs/2.4/en/mod/core.html#directory states (in bold) that:<br />
<br />
----<br />
<br />
Note that the default access for <Directory "/"> is to permit all access. This means that Apache httpd will serve any file mapped from an URL. It is recommended that you change this with a block such as<br />
<br />
<Directory "/"><br />
Require all denied<br />
</Directory><br />
<br />
and then override this for directories you want accessible. See the Security Tips page for more details.<br />
<br />
----<br />
<br />
Okay, that sounds serious. Yet this article just claims that "The default configuration file should be fine for a simple setup."<br />
<br />
Am I right in my supposition that this recommendation should be changed to match the recommendation of Apache docs?<br />
<br />
{{unsigned|2016-01-03T18:41:59|Kmph}}<br />
<br />
:Hi, thanks for you concern.<br />
:The default {{ic|/etc/httpd/conf/httpd.conf}} provided by the Arch {{pkg|apache}} package already contains the following:<br />
:{{bc|<nowiki><br />
#<br />
# Deny access to the entirety of your server's filesystem. You must<br />
# explicitly permit access to web content directories in other<br />
# <Directory> blocks below.<br />
#<br />
<Directory /><br />
AllowOverride none<br />
Require all denied<br />
</Directory></nowiki>}}<br />
:So, there shouldn't be any issue.<br />
:[[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 18:31, 3 January 2016 (UTC)<br />
:: {{Comment|Close topic.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 07:46, 1 September 2017 (UTC)}}</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Uzbl&diff=511645Talk:Uzbl2018-02-22T06:18:23Z<p>Mortan1961: /* Cheat-sheet in two columns? */ Close</p>
<hr />
<div></div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Netctl&diff=511644Talk:Netctl2018-02-22T06:15:18Z<p>Mortan1961: /* Sucks for laptops */ Close</p>
<hr />
<div>== Explain WPAConfigSection ==<br />
<br />
It would be nice if there were an additional example using {{ic|1=Security=wpa-configsection}} that explained each line in the example ({{ic|/etc/netctl/examples/wireless-wpa-configsection}}). I'd imagine I'm not the first person discouraged from using netctl-auto because of this. -- [[User:RyneEverett|Ryne Everett]] ([[User talk:RyneEverett|talk]]) 16:28, 21 June 2015 (UTC)<br />
<br />
:As stated in the [https://projects.archlinux.org/netctl.git/tree/docs/netctl.profile.5.txt#n281 netctl.profile(5)] man page, the {{ic|WPAConfigSection}} variable is an array of config lines passed to [[wpa_supplicant]]. See [http://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf example wpa_supplicant.conf] (shipped with the Arch package at {{ic|/etc/wpa_supplicant/wpa_supplicant.conf}}) for detailed explanation. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:20, 21 June 2015 (UTC)<br />
<br />
::Thanks, I wouldn't have guessed that would be the file to explain those values. If/When I figure it out I may add an additional example section explaining just the required values. (Surely all 10 in the example aren't required?) This is too common of a need (required for netctl-auto) to require so much studying. -- [[User:RyneEverett|Ryne Everett]] ([[User talk:RyneEverett|talk]]) 19:38, 21 June 2015 (UTC)<br />
<br />
:::Remember that you are configuring ''wpa_supplicant'', not ''netctl'', so the info belongs to [[WPA supplicant]] (it may already be there). -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:27, 21 June 2015 (UTC)<br />
<br />
== DHCP clients ==<br />
<br />
I had the problem described under "Job for netctl@wlan(...).service failed", and changing my netctl profiles to use dhclient solved it. My {{ic|/etc/dhcpcd.conf}} was unchanged from the version in the package, and my {{ic|/etc/dhclient.conf}} was based on {{ic|/usr/share/dhclient/dhclient.conf.example}} from the dhclient client package. These request different options from the DHCP server:<br />
{{hc|/etc/dhcpcd.conf|<br />
...<br />
# Rapid commit support.<br />
# Safe to enable by default because it requires the equivalent option set<br />
# on the server to actually work.<br />
option rapid_commit<br />
<br />
# A list of options to request from the DHCP server.<br />
option domain_name_servers, domain_name, domain_search, host_name<br />
option classless_static_routes<br />
# Most distributions have NTP support.<br />
option ntp_servers<br />
# Respect the network MTU. This is applied to DHCP routes.<br />
option interface_mtu<br />
<br />
# A ServerID is required by RFC2131.<br />
require dhcp_server_identifier}}<br />
and<br />
{{hc|/etc/dhclient.conf|<br />
...<br />
request subnet-mask, broadcast-address, time-offset, routers,<br />
domain-name, domain-name-servers, host-name;<br />
require subnet-mask, domain-name-servers;}}<br />
I removed {{ic|1=DHCPClient='dhclient'}} from my netctl profiles, and made dhcpcd request the extra options by adding<br />
{{bc|option subnet_mask, broadcast_address, time_offset, routers}}<br />
to {{ic|/etc/dhcpcd.conf}}, and netctl works O.K. with dhcpcd as the DHCP client.<br />
<br />
I don't know why requesting the extra options should make a difference, and I haven't tried any tests to see which of them are necessary.--[[User:Pdc|Pdc]] ([[User talk:Pdc|talk]]) 19:41, 25 August 2015 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Frequently_asked_questions&diff=511643Talk:Frequently asked questions2018-02-22T06:14:11Z<p>Mortan1961: /* Is a package downloaded from mingw-get of Windows console the same as of from pacman */ Close</p>
<hr />
<div></div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Blu-ray&diff=511642Talk:Blu-ray2018-02-22T06:11:17Z<p>Mortan1961: /* major refactoring */ Close</p>
<hr />
<div>== mpv instead of mplayer ==<br />
<br />
Should we update the wiki for playing bluray with mpv instead of mplayer, since new development is focused on mpv? {{Unsigned| 15:36, 23 March 2015|Robin007bond}}<br />
<br />
:mplayer is still developed [https://projects.archlinux.org/svntogit/packages.git/log/trunk?h=packages/mplayer], the situation is similar to xterm/rxvt-unicode. I think it's easy enough for people adapt instructions through [https://github.com/mpv-player/mpv/blob/master/DOCS/mplayer-changes.rst]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 14:48, 23 March 2015 (UTC)<br />
<br />
== AACS Updater ==<br />
<br />
The current libaacs implementation does not use the online database. The wiki page only has instructions for manually downloading the KEYDB.cfg from the page. Any instructions how to actually build AACS updater could be added here and forwared to upstream, as there is no GNU compatible project files (Makefile) to compile this on any Linux, or at least I can not figure out how to compile! [[User:Wild Penguin|Wild Penguin]] ([[User talk:Wild Penguin|talk]]) 06:10, 5 June 2016 (UTC)<br />
<br />
== libaacs is partly broken ==<br />
<br />
Also, currently libaacs seems to be broken unless a VUK is found - see https://bbs.archlinux.org/viewtopic.php?id=213353. [[User:Wild Penguin|Wild Penguin]] ([[User talk:Wild Penguin|talk]]) 06:10, 5 June 2016 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Xinit&diff=511641Talk:Xinit2018-02-22T06:09:04Z<p>Mortan1961: /* /etc/profile.d/locale.sh */ Close</p>
<hr />
<div>== Running "Notes" Section ==<br />
The two sets of notes at the bottom of [[xinitrc#Configuration]] should be condensed in some way. The first five bullet points all concern which tty X is running on. I could create this as its own subsection, and contain the information there, though I am not entirely convinced that this is necessary/appropriate/needed on this page at all. Would it be more appropriate to merge the relevant sections into the Xorg article, perhaps? [[User:Pid1|Pid1]] ([[User talk:Pid1|talk]]) 00:30, 26 July 2015 (UTC)<br />
<br />
:First of all, the first 4 points are inaccurate. Back in [https://wiki.archlinux.org/index.php?title=General_troubleshooting&diff=270284&oldid=239571 2013], this was indeed handled by the default {{ic|/etc/X11/xinit/xserverrc}}, which contained {{bc|<nowiki><br />
#!/bin/sh<br />
if [ -z "$XDG_VTNR" ]; then<br />
exec /usr/bin/X -nolisten tcp "$@"<br />
else<br />
exec /usr/bin/X -nolisten tcp "$@" vt$XDG_VTNR<br />
fi<br />
</nowiki>}}<br />
:Now it contains only {{bc|<nowiki><br />
#!/bin/sh<br />
exec /usr/bin/X -nolisten tcp "$@"<br />
</nowiki>}}<br />
:This will be more work than it seemed, we should investigate... Nevertheless, ''startx'' handles the {{ic|vt}} parameter, but plain ''xinit'' doesn't, so I'd say the note is perfectly suitable for this page.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:17, 26 July 2015 (UTC)<br />
<br />
::Thanks for the insights. I will cross-reference the documentation with what is provided here, and update accordingly. [[User:Pid1|Pid1]] ([[User talk:Pid1|talk]]) 13:01, 26 July 2015 (UTC)<br />
:::I've split this off into a new Running section. I think this section should be split into startx and xinit subsections and explain the details of using xinit in a way that is not a block of notes [[User:Ziusudra|Ziusudra]] ([[User talk:Ziusudra|talk]]) 00:19, 11 February 2016 (UTC)<br />
<br />
== propose to add to automatic startx ==<br />
<br />
When combine automatic startx + automatic login to console, it may come to infinite loop/crash if (a) ~/.xinitrc goes wrong somewhere, after editing; or (b) after pacman -Syyu and Xorg crash. I propose to check if the last GUI session (startx session) really last long before start a new one.<br />
<br />
{{bc|1=<nowiki><br />
if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then<br />
if [[ -f /tmp/login-check-startx.flag ]]; then<br />
rm /tmp/login-check-startx.flag<br />
echo -e "\nFile '/tmp/login-check-startx.flag' found, maybe the last GUI session did not last long!\n"<br />
## do nothing, start automatic console login<br />
else<br />
touch /tmp/login-check-startx.flag<br />
( sleep 120; rm /tmp/login-check-startx.flag ) &<br />
exec startx<br />
fi<br />
fi<br />
## Change '/tmp/login-check-startx.flag' to '$HOME/login-check-startx.flag' if you want that check also valid after reboot.<br />
</nowiki>}}<br />
<br />
[[User:Triplc|Triplc]] ([[User talk:Triplc|talk]]) 20:42, 20 April 2016 (UTC)<br />
<br />
:You might do that without the temporary file by simply looking at the age of the log file: {{bc|<nowiki><br />
if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then<br />
if [[ ! -e ~/.local/share/xorg/Xorg.0.log || $(find ~/.local/share/xorg/Xorg.0.log -mmin +2) != "" ]]; then<br />
exec startx<br />
fi<br />
fi<br />
</nowiki>}}<br />
:Or even more simply, don't {{ic|exec startx}}, check its return code and drop to interactive shell on errors: {{bc|<nowiki><br />
if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then<br />
startx && exit<br />
fi<br />
</nowiki>}} -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:10, 20 April 2016 (UTC)<br />
<br />
::Thanks Lahwaacz. But (a) so the age of a file is based on it's creation time, not update time. OK, i did not know that. (b) about the startx exit code, i am not sure that it will correctly set if i edit something wrong in ~/.xinitrc which make GUI session crash<br />
::: I just tried to change the resolution of X (xrandr...) and ~/.local/share/xorg/Xorg.0.log updated and get the new timestamp [[User:Triplc|Triplc]] ([[User talk:Triplc|talk]]) 21:36, 20 April 2016 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Xinit&diff=511640Talk:Xinit2018-02-22T06:07:58Z<p>Mortan1961: /* about "&" and "exec" in .xinitrc */ Close</p>
<hr />
<div>== Running "Notes" Section ==<br />
The two sets of notes at the bottom of [[xinitrc#Configuration]] should be condensed in some way. The first five bullet points all concern which tty X is running on. I could create this as its own subsection, and contain the information there, though I am not entirely convinced that this is necessary/appropriate/needed on this page at all. Would it be more appropriate to merge the relevant sections into the Xorg article, perhaps? [[User:Pid1|Pid1]] ([[User talk:Pid1|talk]]) 00:30, 26 July 2015 (UTC)<br />
<br />
:First of all, the first 4 points are inaccurate. Back in [https://wiki.archlinux.org/index.php?title=General_troubleshooting&diff=270284&oldid=239571 2013], this was indeed handled by the default {{ic|/etc/X11/xinit/xserverrc}}, which contained {{bc|<nowiki><br />
#!/bin/sh<br />
if [ -z "$XDG_VTNR" ]; then<br />
exec /usr/bin/X -nolisten tcp "$@"<br />
else<br />
exec /usr/bin/X -nolisten tcp "$@" vt$XDG_VTNR<br />
fi<br />
</nowiki>}}<br />
:Now it contains only {{bc|<nowiki><br />
#!/bin/sh<br />
exec /usr/bin/X -nolisten tcp "$@"<br />
</nowiki>}}<br />
:This will be more work than it seemed, we should investigate... Nevertheless, ''startx'' handles the {{ic|vt}} parameter, but plain ''xinit'' doesn't, so I'd say the note is perfectly suitable for this page.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 08:17, 26 July 2015 (UTC)<br />
<br />
::Thanks for the insights. I will cross-reference the documentation with what is provided here, and update accordingly. [[User:Pid1|Pid1]] ([[User talk:Pid1|talk]]) 13:01, 26 July 2015 (UTC)<br />
:::I've split this off into a new Running section. I think this section should be split into startx and xinit subsections and explain the details of using xinit in a way that is not a block of notes [[User:Ziusudra|Ziusudra]] ([[User talk:Ziusudra|talk]]) 00:19, 11 February 2016 (UTC)<br />
<br />
== propose to add to automatic startx ==<br />
<br />
When combine automatic startx + automatic login to console, it may come to infinite loop/crash if (a) ~/.xinitrc goes wrong somewhere, after editing; or (b) after pacman -Syyu and Xorg crash. I propose to check if the last GUI session (startx session) really last long before start a new one.<br />
<br />
{{bc|1=<nowiki><br />
if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then<br />
if [[ -f /tmp/login-check-startx.flag ]]; then<br />
rm /tmp/login-check-startx.flag<br />
echo -e "\nFile '/tmp/login-check-startx.flag' found, maybe the last GUI session did not last long!\n"<br />
## do nothing, start automatic console login<br />
else<br />
touch /tmp/login-check-startx.flag<br />
( sleep 120; rm /tmp/login-check-startx.flag ) &<br />
exec startx<br />
fi<br />
fi<br />
## Change '/tmp/login-check-startx.flag' to '$HOME/login-check-startx.flag' if you want that check also valid after reboot.<br />
</nowiki>}}<br />
<br />
[[User:Triplc|Triplc]] ([[User talk:Triplc|talk]]) 20:42, 20 April 2016 (UTC)<br />
<br />
:You might do that without the temporary file by simply looking at the age of the log file: {{bc|<nowiki><br />
if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then<br />
if [[ ! -e ~/.local/share/xorg/Xorg.0.log || $(find ~/.local/share/xorg/Xorg.0.log -mmin +2) != "" ]]; then<br />
exec startx<br />
fi<br />
fi<br />
</nowiki>}}<br />
:Or even more simply, don't {{ic|exec startx}}, check its return code and drop to interactive shell on errors: {{bc|<nowiki><br />
if [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]]; then<br />
startx && exit<br />
fi<br />
</nowiki>}} -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:10, 20 April 2016 (UTC)<br />
<br />
::Thanks Lahwaacz. But (a) so the age of a file is based on it's creation time, not update time. OK, i did not know that. (b) about the startx exit code, i am not sure that it will correctly set if i edit something wrong in ~/.xinitrc which make GUI session crash<br />
::: I just tried to change the resolution of X (xrandr...) and ~/.local/share/xorg/Xorg.0.log updated and get the new timestamp [[User:Triplc|Triplc]] ([[User talk:Triplc|talk]]) 21:36, 20 April 2016 (UTC)<br />
<br />
== <s>/etc/profile.d/locale.sh</s> ==<br />
<br />
Should there be some mention of /etc/profile.d/locale.sh here? I had to add this to my .xinitrc file in order for my locale to load properly when using startx. <br />
<br />
[[User:Archies|Archies]] ([[User talk:Archies|talk]]) 22:51, 12 September 2016 (UTC)<br />
<br />
:{{ic|/etc/profile.d/locale.sh}} should be loaded by {{ic|/etc/profile}}. Is the locale loaded at the point you run startx? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:38, 13 September 2016 (UTC)<br />
<br />
::I went ahead and commented the line out and tested my locale, it is now loaded before and after startx, whereas before /etc/profile.d/locale.sh was run the first time it was certainly not loaded after startx. This is across two separate installs of arch. I don't use a display manager and I did follow the installation guide thoroughly both times. I can't really explain it. This is the issue I was having https://github.com/robbyrussell/oh-my-zsh/issues/3436 and adding locale.sh to my .xinitrc was what solved the issue. It's now commented out and locale still is loaded. I can't explain it. [[User:Archies|Archies]] ([[User talk:Archies|talk]]) 16:38, 13 September 2016 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=EFI_system_partition&diff=511304EFI system partition2018-02-17T21:03:44Z<p>Mortan1961: /* Create the partition */ Remove 550 MiB recommendation because FAT32 is explicitly specified during formatting.</p>
<hr />
<div>[[Category:Boot process]]<br />
[[ja:EFI システムパーティション]]<br />
[[zh-hans:EFI System Partition]]<br />
[[fr:ESP]]<br />
[[ru:EFI System Partition]]<br />
The [[Wikipedia:EFI System partition|EFI System Partition]] (also called ESP or EFISYS) is a FAT32 formatted physical partition (in the main partition table of the disk, not under LVM or software RAID etc.) from where the [[UEFI]] firmware launches the UEFI bootloader and application. <br />
<br />
It is an OS independent partition that acts as the storage place for the EFI bootloaders and applications to be launched by the EFI firmware. It is mandatory for UEFI boot. <br />
<br />
{{Warning|If [[Dual boot with Windows|dual-booting]] with an existing installation of Windows on a UEFI/GPT system, avoid reformatting the UEFI partition, as this includes the Windows ''.efi'' file required to boot it. In other words, use the existing partition as is and simply [[#Mount the partition]].}}<br />
<br />
== Create the partition ==<br />
<br />
The following two sections show how to create an EFI System Partition (ESP).<br />
<br />
{{Note|It is recommended to use [[GPT]] for UEFI boot, because some UEFI firmwares do not allow UEFI/MBR boot.}}<br />
<br />
To avoid potential problems with some EFIs, ESP size should be at least 512 MiB.<br />
<br />
According to a Microsoft note[https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/configure-uefigpt-based-hard-drive-partitions#diskpartitionrules], the minimum size for the EFI System Partition (ESP) would be 100 MiB, though this is not stated in the UEFI Specification. Note that for [[Advanced Format]] 4K Native drives (4-KiB-per-sector) drives, the size is at least 256 MiB, because it is the minimum partition size of FAT32 drives (calculated as sector size (4KiB) x 65527 &#61; 256 MiB), due to a limitation of the FAT32 file format.<br />
<br />
=== GPT partitioned disks ===<br />
<br />
EFI System Partition on GPT has the [[Wikipedia:GUID Partition Table#Partition type GUIDs|partition type GUID]] {{ic|C12A7328-F81F-11D2-BA4B-00A0C93EC93B}}.<br />
<br />
'''Choose one''' of the following methods to create an ESP for a GPT partitioned disk:<br />
<br />
* [[fdisk|fdisk/gdisk]]: Create a partition with partition type EFI System ({{ic|EFI System}} in ''fdisk'' or {{ic|EF00}} in ''gdisk''). Proceed to [[#Format the partition]] section below.<br />
* [[GNU Parted]]: Create a FAT32 partition and in Parted set/activate the {{ic|boot}} flag ('''not''' {{ic|legacy_boot}} flag) on that partition. Proceed to [[#Mount the partition]] section below.<br />
<br />
=== MBR partitioned disks ===<br />
<br />
EFI System Partition on MBR has the [[Wikipedia:Partition type|partition type ID]] {{ic|EF}}.<br />
<br />
Create a partition with partition type {{ic|EFI (FAT-12/16/32)}} using fdisk. Proceed to [[#Format the partition]].<br />
<br />
== Format the partition ==<br />
<br />
After creating the ESP, you '''must''' [[File systems#Create a file system|format]] it as [[FAT32]]:<br />
<br />
# mkfs.fat -F32 /dev/sd''xY''<br />
<br />
If you used GNU Parted above, it should already be formatted.<br />
<br />
If you get the message {{ic|WARNING: Not enough clusters for a 32 bit FAT!}}, reduce cluster size with {{ic|mkfs.fat -s2 -F32 ...}} or {{ic|-s1}}; otherwise the partition may be unreadable by UEFI. See {{man|8|mkfs.fat}} for supported cluster sizes.<br />
<br />
== Mount the partition ==<br />
<br />
The kernels and initramfs files need to be accessible by the [[boot loader]] or UEFI itself to successfully boot the system. Thus if you want to keep the setup simple, your boot loader choice limits the available mount points for EFI System Partition.<br />
<br />
The simplest scenarios for mounting EFI System Partition are:<br />
<br />
* [[mount]] ESP to {{ic|/boot/efi}} and use a [[boot loader]] which has a driver for your root file system (eg. [[GRUB]], [[rEFInd]]).<br />
* [[mount]] ESP to {{ic|/boot}}. This is the preferred method when directly booting a [[EFISTUB]] kernel from UEFI.<br />
<br />
=== Alternative mount points ===<br />
<br />
If you do not use one of the simple methods from [[#Mount the partition]], you will need to copy your boot files to ESP (referred to hereafter as {{ic|''esp''}}).<br />
<br />
# mkdir -p ''esp''/EFI/arch<br />
# cp -a /boot/vmlinuz-linux ''esp''/EFI/arch/<br />
# cp -a /boot/initramfs-linux.img ''esp''/EFI/arch/<br />
# cp -a /boot/initramfs-linux-fallback.img ''esp''/EFI/arch/<br />
<br />
{{Note|When using an Intel CPU, you may need to copy the [[Microcode]] to the boot-entry location.}}<br />
<br />
Furthermore, you will need to keep the files on the ESP up-to-date with later kernel updates. Failure to do so could result in an unbootable system. The following sections discuss several mechanisms for automating it.<br />
<br />
==== Using bind mount ====<br />
<br />
Instead of mounting the ESP itself to {{ic|/boot}}, you can mount a directory of the ESP to {{ic|/boot}} using a bind [[mount]] (see {{man|8|mount}}). This allows [[pacman]] to update the kernel directly while keeping the ESP organized to your liking.<br />
<br />
{{Note|<br />
* This requires a kernel and bootloader compatible with FAT32. This is not an issue for a regular Arch install, but could be problematic for other distributions (namely those that require symlinks in {{ic|/boot/}}). See the forum post [https://bbs.archlinux.org/viewtopic.php?pid&#61;1331867#p1331867 here].<br />
* You ''must'' use the {{ic|1=root=}} [[Kernel parameters#Parameter list|kernel parameter]] in order to boot using this method.}}<br />
<br />
Just like in [[#Alternative mount points]], copy all boot files to a directory on your ESP, but mount the ESP '''outside''' {{ic|/boot}}. Then bind mount the directory:<br />
<br />
# mount --bind ''esp''/EFI/arch /boot<br />
<br />
After verifying success, edit your [[Fstab]] to make the changes persistent:<br />
<br />
{{hc|/etc/fstab|<br />
''esp''/EFI/arch /boot none defaults,bind 0 0<br />
}}<br />
<br />
==== Using systemd ====<br />
<br />
[[Systemd]] features event triggered tasks. In this particular case, the ability to detect a change in path is used to sync the EFISTUB kernel and initramfs files when they are updated in {{ic|/boot/}}. The file watched for changes is {{ic|initramfs-linux-fallback.img}} since this is the last file built by mkinitcpio, to make sure all files have been built before starting the copy. The ''systemd'' path and service files to be created are:<br />
<br />
{{hc|/etc/systemd/system/efistub-update.path|2=<br />
[Unit]<br />
Description=Copy EFISTUB Kernel to EFI System Partition<br />
<br />
[Path]<br />
PathChanged=/boot/initramfs-linux-fallback.img<br />
<br />
[Install]<br />
WantedBy=multi-user.target<br />
WantedBy=system-update.target<br />
}}<br />
<br />
{{hc|/etc/systemd/system/efistub-update.service|2=<br />
[Unit]<br />
Description=Copy EFISTUB Kernel to EFI System Partition<br />
<br />
[Service]<br />
Type=oneshot<br />
ExecStart=/usr/bin/cp -af /boot/vmlinuz-linux ''esp''/EFI/arch/<br />
ExecStart=/usr/bin/cp -af /boot/initramfs-linux.img ''esp''/EFI/arch/<br />
ExecStart=/usr/bin/cp -af /boot/initramfs-linux-fallback.img ''esp''/EFI/arch/<br />
}}<br />
<br />
Then [[enable]] and [[start]] {{ic|efistub-update.path}}.<br />
<br />
{{Tip|For [[Secure Boot]] with your own keys, you can set up the service to also sign the image using {{Pkg|sbsigntools}}:<br />
<br />
{{bc|1=ExecStart=/usr/bin/sbsign --key ''/path/to/db.key'' --cert ''/path/to/db.crt'' --output ''esp''/EFI/arch/vmlinuz-linux /boot/vmlinuz-linux}}<br />
<br />
}}<br />
<br />
==== Using incron ====<br />
<br />
{{Pkg|incron}} can be used to run a script syncing the EFISTUB Kernel after kernel updates.<br />
<br />
{{hc|/usr/local/bin/efistub-update|<br />
#!/bin/sh<br />
cp -af /boot/vmlinuz-linux ''esp''/EFI/arch/<br />
cp -af /boot/initramfs-linux.img ''esp''/EFI/arch/<br />
cp -af /boot/initramfs-linux-fallback.img ''esp''/EFI/arch/<br />
}}<br />
<br />
{{Note|The first parameter {{ic|/boot/initramfs-linux-fallback.img}} is the file to watch. The second parameter {{ic|IN_CLOSE_WRITE}} is the action to watch for. The third parameter {{ic|/usr/local/bin/efistub-update}} is the script to execute.}}<br />
<br />
{{hc|/etc/incron.d/efistub-update.conf|<br />
/boot/initramfs-linux-fallback.img IN_CLOSE_WRITE /usr/local/bin/efistub-update<br />
}}<br />
<br />
In order to use this method, [[enable]] the {{ic|incrond.service}}.<br />
<br />
==== Using mkinitcpio hook ====<br />
<br />
Mkinitcpio can generate a hook that does not need a system level daemon to function. It spawns a background process which waits for the generation of {{ic|vmlinuz}}, {{ic|initramfs-linux.img}}, and {{ic|initramfs-linux-fallback.img}} before copying the files.<br />
<br />
Add {{ic|efistub-update}} to the list of hooks in {{ic|/etc/mkinitcpio.conf}}.<br />
<br />
{{hc|/etc/initcpio/install/efistub-update|<nowiki><br />
#!/usr/bin/env bash<br />
build() {<br />
/usr/local/bin/efistub-copy &<br />
}<br />
<br />
help() {<br />
cat <<HELPEOF<br />
This hook waits for mkinitcpio to finish and copies the finished ramdisk and kernel to the ESP<br />
HELPEOF<br />
}<br />
</nowiki>}}<br />
<br />
{{hc|/usr/local/bin/efistub-copy|<br />
#!/usr/bin/env bash<br />
<br />
wait $PPID<br />
<br />
cp -af /boot/vmlinuz-linux ''esp''/EFI/arch/<br />
cp -af /boot/initramfs-linux.img ''esp''/EFI/arch/<br />
cp -af /boot/initramfs-linux-fallback.img ''esp''/EFI/arch/<br />
<br />
echo "Synced kernel with ESP"<br />
}}<br />
<br />
==== Using mkinitcpio hook (2) ====<br />
<br />
Another '''alternative''' to the above solutions, that is potentially cleaner because there are less copies and does not need a system level daemon to function. The logic is reversed, the initramfs is directly stored in the EFI partition, not copied in {{ic|/boot/}}. Then the kernel and any other additional files are copied to the ESP partition, thanks to a mkinitcpio hook.<br />
<br />
Edit the file {{ic|/etc/mkinitcpio.d/linux.preset}} :<br />
<br />
{{hc|/etc/mkinitcpio.d/linux.preset|2=<br />
# mkinitcpio preset file for the 'linux' package<br />
<br />
# Directory to copy the kernel, the initramfs...<br />
ESP_DIR="''esp''/EFI/arch"<br />
<br />
ALL_config="/etc/mkinitcpio.conf"<br />
ALL_kver="/boot/vmlinuz-linux"<br />
<br />
PRESETS=('default' 'fallback')<br />
<br />
#default_config="/etc/mkinitcpio.conf"<br />
default_image="${ESP_DIR}/initramfs-linux.img"<br />
default_options="-A esp-update-linux"<br />
<br />
#fallback_config="/etc/mkinitcpio.conf"<br />
fallback_image="${ESP_DIR}/initramfs-linux-fallback.img"<br />
fallback_options="-S autodetect"<br />
}}<br />
<br />
Then create the file {{ic|/etc/initcpio/install/esp-update-linux}} which need to be executable :<br />
<br />
{{hc|/etc/initcpio/install/esp-update-linux|2=<br />
# Directory to copy the kernel, the initramfs...<br />
ESP_DIR="''esp''/EFI/arch"<br />
<br />
build() {<br />
cp -af /boot/vmlinuz-linux "${ESP_DIR}/"<br />
# If ucode is used uncomment this line<br />
#cp -af /boot/intel-ucode.img "${ESP_DIR}/"<br />
}<br />
<br />
help() {<br />
cat <<HELPEOF<br />
This hook copies the kernel to the ESP partition<br />
HELPEOF<br />
}<br />
}}<br />
<br />
To test that, just run:<br />
<br />
# rm /boot/initramfs-linux-fallback.img<br />
# rm /boot/initramfs-linux.img<br />
# mkinitcpio -p linux<br />
<br />
==== Using pacman hook ====<br />
<br />
A last option relies on the [[pacman hooks]] that are run at the end of the transaction.<br />
<br />
The first file is a hook that monitors the relevant files, and it is run if they were modified in the former transaction.<br />
<br />
{{hc|/etc/pacman.d/hooks/999-kernel-efi-copy.hook|<nowiki><br />
[Trigger]<br />
Type = File<br />
Operation = Install<br />
Operation = Upgrade<br />
Target = boot/vmlinuz*<br />
Target = usr/lib/initcpio/*<br />
Target = boot/intel-ucode.img<br />
<br />
[Action]<br />
Description = Copying linux and initramfs to EFI directory...<br />
When = PostTransaction<br />
Exec = /usr/local/bin/kernel-efi-copy.sh<br />
</nowiki>}}<br />
<br />
The second file is the script itself. Create the file and make it [[executable]]:<br />
<br />
{{hc|/usr/local/bin/kernel-efi-copy.sh|<nowiki><br />
#!/usr/bin/env bash<br />
#<br />
# Copy kernel and initramfs images to EFI directory<br />
#<br />
<br />
ESP_DIR="</nowiki>''esp''<nowiki>/EFI/arch"<br />
<br />
for file in /boot/vmlinuz*<br />
do<br />
cp -af "$file" "$ESP_DIR/$(basename "$file").efi"<br />
[[ $? -ne 0 ]] && exit 1<br />
done<br />
<br />
for file in /boot/initramfs*<br />
do<br />
cp -af "$file" "$ESP_DIR/"<br />
[[ $? -ne 0 ]] && exit 1<br />
done<br />
<br />
[[ -e /boot/intel-ucode.img ]] && cp -af /boot/intel-ucode.img "$ESP_DIR/"<br />
<br />
exit 0<br />
</nowiki>}}<br />
<br />
== Known issues ==<br />
<br />
=== ESP on RAID ===<br />
It is possible to make the ESP part of a RAID1 array, but doing so brings the risk of data corruption, and further considerations need to be taken when creating the ESP.<br />
See [https://bbs.archlinux.org/viewtopic.php?pid=1398710#p1398710] and [https://bbs.archlinux.org/viewtopic.php?pid=1390741#p1390741] for details.<br />
<br />
== See also ==<br />
<br />
* [http://blog.uncooperative.org/blog/2014/02/06/the-efi-system-partition/ The EFI System Partition and the Default Boot Behavior]</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Java&diff=510529Talk:Java2018-02-12T02:03:08Z<p>Mortan1961: /* Use of Template:App */ Close</p>
<hr />
<div>== One more way to fix window manager related issues ==<br />
<br />
Faced some sort of "rendering problem" on MATE few days ago.<br />
Wmname crashed MATE completely, but I found a nice fix on one of Linux Mint forums.<br />
<br />
Here is [https://github.com/zheludkovm/JavaMatePatch git repo] with description and sources.<br />
It's a simple jar that injects into Java X11 class and force it to return fixed, user defined string, instead of actual WM name.<br />
<br />
Already posted PKGBUILD to AUR and think about posting this solution here.<br />
Is there anything special I should know/do before posting?<br />
<br />
[[User:Ffuugoo|Ffuugoo]] ([[User talk:Ffuugoo|talk]]) 10:06, 25 May 2014 (UTC)<br />
<br />
: Thanks for this info. It is about MATE so you should add it to [[MATE]] page. <br />
: If there is any bug link about this, please add it too so after this is fixed. Such workaround could/should be removed. <br />
: --[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 07:08, 14 June 2014 (UTC)<br />
<br />
:: The trick here that it is not just about MATE, but another solution to [[Java#Impersonate another window manager]].<br />
:: And as it's more accurate way (than wmname) to solve this problem, I think it should be marked as recomended.<br />
:: --[[User:Ffuugoo|Ffuugoo]] ([[User talk:Ffuugoo|talk]]) 09:32, 30 June 2014 (UTC)<br />
::: Then it is ok to add it here. Any information about the bug in upstream? If there is, please add it here for tracking.--[[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 09:02, 27 July 2014 (UTC)<br />
<br />
== GTK+3 on Java 9 ==<br />
<br />
Java 9 released on the 21/9/2017, and with it came the ability to force AWT, Swing and JavaFX programs to use GTK+3[http://openjdk.java.net/jeps/283] with the GTK Look and Feel. As such I propose editing the GTK Look and Feel section [https://wiki.archlinux.org/index.php/Java#GTK_LookAndFeel] to include this. GTK+3 is enabled using -Djdk.gtk.version=3 (or 2, 2.2) in _JAVA_OPTIONS, meaning it can be placed in a users .rc file or in /etc/environment. <br />
<br />
Note that to enable this, users will have to use extra/jdk9-openjdk, extra/jre9-openjdk and extra/jre9-openjdk-headless, before changing their version using archlinux-java.<br />
<br />
== Installing official oracle jdk ==<br />
<br />
I would like to add a section to how to install the latest jdk directly from oracle website<br />
the solution is to: <br />
<br />
1-download the tar.gz binary archive from oracle<br />
<br />
2-untar the file to /usr/lib/jvm/<br />
<br />
3-run the # archlinux-java status command to get the name of the detected java versions by the archlinux-java program<br />
<br />
4-run # sudo archlinux-java set jdk-X.X.X to Force <JAVA_ENV> as default<br />
<br />
now all jdk binaries like javac and java will point to the correct version.<br />
<br />
the reason for this is that the package maintainer for package jdk9-openjdk Guillaume Alaux seem to not have plans for OpenJFX for OpenJDK9 mainly due to lack of time and interest: [https://bugs.archlinux.org/task/55776?project=1&string=jdk9-openjdk#comments]<br />
<br />
any way do you approve this solution ??<br />
--[[User:Technotux2055|Technotux2055]] ([[User talk:Technotux2055|talk]]) 04:08, 24 December 2017 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Mutt&diff=510527Talk:Mutt2018-02-12T01:53:58Z<p>Mortan1961: /* Using mixmaster in Mutt */ Close</p>
<hr />
<div>==Maildir==<br />
<br />
{{bc|1=<br />
set folder=$HOME/mail<br />
}}<br />
Does the folder need a trailing slash? like<br />
{{bc|1=<br />
set folder=$HOME/mail/<br />
}}<br />
[[User:Napterk|Napterk]] ([[User talk:Napterk|talk]]) 06:45, 4 April 2016 (UTC)<br />
<br />
==Deleted section in Display recipient instead of sender in "Sent" folder view==<br />
<br />
This section was originally under `Display recipient instead of sender in "Sent" folder view`<br />
<br />
I removed it because there's a much simpler way, but this might be useful for some edge cases, so feel free to put it back (with a caveat that it's sub-optimal). The deleted section follows.<br />
<br />
{{unsigned|10:11, 27 September 2016|Ostiensis}}<br />
<br />
=== Old content ===<br />
<br />
The "columns" of the index can be configured through the {{ic|index_format}} variable. Its syntax is documented in the {{ic|muttrc}} man page. The values of our concern are {{ic|%t}} (recipient) and {{ic|%F}} (sender).<br />
<br />
To change the columns according to the current folder, we need to use a hook:<br />
{{hc|muttrc|<nowiki><br />
folder-hook .*[sS]ent.* 'set index_format="%2C | %Z [%d] %-30.30t (%-4.4c) %?M?<%M> ?%s"'<br />
folder-hook ! .*[sS]ent.* 'set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %?M?<%M> ?%s"'<br />
</nowiki>}}<br />
<br />
The exclamation mark means ''everything that does not match the following regex''. Of course you can change the index_format following your taste, and the regular expression if the folder does not have ''Sent'' nor ''sent'' in its name.<br />
<br />
Let us centralize the settings, it will simplify future tweaking.<br />
{{hc|muttrc|<nowiki><br />
set my_index_format_pre='set index_format="%2C | %Z [%d] %-30.30'<br />
set my_index_format_post=' (%-4.4c) %?M?<%M> ?%s"'<br />
<br />
folder-hook .*[sS]ent.* "$my_index_format_pre"t"$my_index_format_post"<br />
folder-hook ! .*[sS]ent.* "$my_index_format_pre"F"$my_index_format_post"<br />
</nowiki>}}<br />
<br />
== Neomutt ==<br />
<br />
As it stands neomutt is still a drop-in replacement for mutt, apart from the changed names and paths (mutt -> neomutt). However, as the projects continue to diverge, this may change and require a separate article ([[Neovim]] is similar). -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 07:14, 26 October 2017 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Users_and_groups&diff=510525Talk:Users and groups2018-02-12T01:40:43Z<p>Mortan1961: /* The instructions may create a security loophole */ Close</p>
<hr />
<div>== Username change tips ==<br />
<br />
On 2nd though I'm unsure about the edit "Merging "change a user's login name" + Username change tips".<br />
<br />
Does the Username change tips apply *only* for change of a user's login name or to *all* usermod commands for the active user ?<br />
[[User:Ua4000|Ua4000]] ([[User talk:Ua4000|talk]]) 16:23, 22 June 2017 (UTC) 2017-06-22T18:23:28 Ua4000<br />
<br />
Now it should be correct, "Change a user's login name or home directory" is in one chapter, together with the infos + warning about the change on a actual user.<br />
[[User:Ua4000|Ua4000]] ([[User talk:Ua4000|talk]]) 19:13, 23 June 2017 (UTC)<br />
<br />
== Unclear to me: Change a user's login name or home directory ==<br />
<br />
This instructions from the page could be clearer:<br />
<br />
To change a user's home directory:<br />
<br />
# usermod -d /my/new/home -m ''username''<br />
<br />
The {{ic|-m}} option also automatically creates the new directory and moves the content there.<br />
<br />
{{Tip|You can create a link from the user's former home directory to the new one. Doing this will allow programs to find files that have hardcoded paths.<br />
<br />
# ln -s /my/new/home/ /my/old/home<br />
<br />
Make sure there is '''no''' trailing {{ic|/}} on {{ic|/my/old/home}}.<br />
}}<br />
<br />
Can we add an example? Say username is {{ic|archie}} and old home folder was {{ic|/mnt/sda3/home/archie}}. New home directory shall become {{ic|/home/archie}}. So, according to the instrcutions:<br />
<br />
# usermod -d /home/archie archie<br />
<br />
(Not using -m because files shall stay at {{ic|/mnt/sda3/home/archie}})<br />
<br />
Then create a link from former home directory {{ic|/mnt/sda3/home/archie}} to the new one {{ic|/home/archie}}, so:<br />
<br />
# ln -s /home/archie/ /mnt/sda3/home/archie<br />
<br />
However then there is a link in {{ic|/mnt/sda3/home/archie/}} {{ic|archie}} that points to {{ic|/home/archie}}. Shouldn't it be the other way around? So when the system looks up {{ic|/home/archie}} instead it will go to {{ic|/mnt/sda3/home/archie}}?<br />
<br />
Thanks in advance -- [[User:GNUrocks|GNUrocks]] ([[User talk:GNUrocks|talk]]) 20:50, 26 October 2017 (UTC)<br />
<br />
:The tip assumes that the {{ic|-m}} flag was used. This is indicated in the first sentence: "You can create a link '''from the user's former home directory to the new one.'''" -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 21:02, 26 October 2017 (UTC)<br />
<br />
== Group list ==<br />
It is a good idea to add a column with the default gid to every group in the wiki table ? e.g. what is group 102 ?<br />
# ls -la /usr/share/polkit-1<br />
# drwxr-x--- 1 root 102 44 Dec 22 02:14 rules.d<br />
Also I found in my cups directory files owned by 9xx. My first idea was to look in the wiki article...<br />
<br />
[[User:Ua4000|Ua4000]] ([[User talk:Ua4000|talk]]) 09:03, 24 December 2017 (UTC)<br />
<br />
:You can find those in [[DeveloperWiki:UID / GID Database]]. Also note that there were recently some changes towards dynamic allocation of the IDs [https://wiki.archlinux.org/index.php/Talk:DeveloperWiki:UID_/_GID_Database#GIDs_are_now_generated_dynamically_.2F_the_static_GIDs_here_are_not_valid_anymore], so the table may not be entirely correct. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:09, 24 December 2017 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:QEMU&diff=510524Talk:QEMU2018-02-12T01:36:11Z<p>Mortan1961: /* Starting QEMU virtual machines with systemd */ Close</p>
<hr />
<div>== Linear RAID ==<br />
<br />
When I was updating the article yesterday, I had tried to fit the section about linear raid (boot a VM from a partition by prepending a MBR to it) into the article better. But I'm not sure the technique described is the right one at all. It looks like it works, but wouldn't it be easier to install a bootloader directly to the partition (e.g. syslinux)? Then the VM could be booted directly from the partition simply by using it as its virtual disk.<br />
--[[User:Synchronicity|Synchronicity]] ([[User talk:Synchronicity|talk]]) 19:23, 9 May 2012 (UTC)<br />
<br />
:What about Windows installations then? [[User:Nesk|Nesk]] ([[User talk:Nesk|talk]]) 09:18, 4 October 2016 (UTC)<br />
<br />
== Creating bridge manually ==<br />
<br />
I really don't know what to do with this section. I'd say it has been superseded by [[QEMU#Creating bridge using qemu-bridge-helper]] (available since qemu-1.1, we now have qemu-1.5) - or is someone still using this method? Perhaps link to https://en.wikibooks.org/wiki/QEMU/Networking#TAP_interfaces or http://wiki.qemu.org/Documentation/Networking/NAT is sufficient. What do you think? -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:42, 22 July 2013 (UTC)<br />
<br />
:Actually, I've become a happy user of this method. I've written some scripts to easily create bridge interface, TAP interface, and combined with Xyne's [http://xyne.archlinux.ca/notes/network/dhcp_with_dns.html excellent scripts] to set up NAT and launch DHCP server, I have complete solution to easily manage multiple VMs on one (or even more) bridge.<br />
:My scripts are available on github: [https://github.com/lahwaacz/archlinux-dotfiles/blob/master/Scripts/qemu-launcher.sh], [https://github.com/lahwaacz/archlinux-dotfiles/blob/master/Scripts/qemu-tap-helper.sh], [https://github.com/lahwaacz/archlinux-dotfiles/blob/master/Scripts/qemu-mac-hasher.py] but I won't probably integrate them into the wiki, I'l just leave a note when I do some more testing.<br />
:The thing is, what to do with the current content? Personally I think that links to [https://en.wikibooks.org/wiki/QEMU/Networking#TAP_interfaces], [http://wiki.qemu.org/Documentation/Networking/NAT] and my scripts are sufficient (of course others are welcome). I'd also leave the note at the end to ''disable the firewall on the bridge'', I find it extremely useful.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 18:24, 5 September 2013 (UTC)<br />
<br />
:I would not remove something that works still heh.--[[User:Webdawg|Webdawg]] ([[User talk:Webdawg|talk]]) 07:31, 17 July 2016 (UTC)<br />
<br />
== Kexec Hackery When Using a Real Partition ==<br />
<br />
After banging my head against a wall long enough and figuring out what {{ic|-kernel}} and {{ic|-initrd}} were really calling, I put a note above the appropriate section and mentioned two ways to use the guest's images. (Otherwise, you'll have to worry if the host and guest images match.) The first -- mount the partition(s) -- is more appropriate for "low-volume-handling" of VMs. The second -- using kexec -- becomes more useful when you're juggling more than a few VMs.<br />
<br />
I'm only mentioning this hack because (as of now) [[Kexec]] only mentions use for rebooting into another kernel, not switching out the kernel before the system is even up. This hack comes from from https://digitalocean.uservoice.com/forums/136585-digitalocean/suggestions/2814988-give-option-to-use-the-droplet-s-own-bootloader- which has two suggestions. The most recent, using systemd units by jkuan, doesn't work because jkuan tried to copy a {{ic|.target}} file into a {{ic|.service}} file and systemd wants {{ic|ExecStart}} in a {{ic|.service}} file. The second one, replacing {{ic|/usr/bin/init}} by andrew_sparks, works for me on my Arch instance at DigitalOcean.<br />
<br />
Adaptation from said post:<br />
<br />
# pacman -S kexec-tools<br />
# pacman -R systemd-sysvcompat<br />
<br />
{{hc|1=/tmp/init|2=<br />
#!/bin/sh<br />
<br />
kexec --load /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --append="root=/dev/sda init=/usr/lib/systemd/systemd" &&<br />
mount -o ro,remount / && kexec -e<br />
exec /usr/lib/systemd/systemd<br />
}}<br />
<br />
# cd [/path/to/vm]/usr/bin<br />
# mv init init.dist<br />
# cp /tmp/init ./<br />
# chmod 755 init<br />
<br />
I'm leaving this on the Talk page as I haven't even tried it out in QEMU myself. Also, my eyes are about ready to pop out of my head, so I'm barring myself from figuring out the appropriate way to edit this in for the time being. [[User:BrainwreckedTech|BrainwreckedTech]] ([[User talk:BrainwreckedTech|talk]]) 21:23, 14 January 2014 (UTC)<br />
<br />
== Replace -net with -netdev ==<br />
<br />
The {{ic|-net}} option is deprecated and replaced by {{ic|-netdev}}. I think this article should be modified to reflect that.<br />
http://en.wikibooks.org/wiki/QEMU/Networking#cite_ref-1<br />
[[User:Axper|axper]] ([[User talk:Axper|talk]]) 18:12, 1 July 2014 (UTC)<br />
<br />
:Yes {{ic|-net}} is the old syntax as stated in [https://wiki.gentoo.org/wiki/QEMU/Options#Pass-through Gentoo's Wiki] where we should use {{ic|1=-netdev user,id=vmnic -device virtio-net,netdev=vmnic}} [[User:Pickfire|Pickfire]] ([[User talk:Pickfire|talk]]) 04:11, 31 March 2017 (UTC)<br />
<br />
== I'm rewriting the network section ==<br />
<br />
https://wiki.archlinux.org/index.php/User:Axper/sandbox/qemu_network<br />
[[User:Axper|axper]] ([[User talk:Axper|talk]]) 20:07, 2 July 2014 (UTC)<br />
<br />
::I think a lot of networking topics could be moved outside of the QEMU page. Many virtualization applications share the same basic principles with regards to networking, such as tun/tap creating, bridges, VDE, etc. There are a few networking schemes that are QEMU-specific, for example multicast sockets and {{ic|-net socket,...}}, and these could be mentioned on the QEMU page, although these are less reliable and rarely used in comparison to tap devices. We should also of course note the QEMU-specific command line options in the QEMU page, but for general concepts and commands independent of the virtualization applications, they could go on pages dedicated to the task. The best example is VDE, which is in no way limited to QEMU, yet it still doesn't have its own page on the Arch wiki.<br />
<br />
::Incidentally, I'm planning on rewriting [[User Mode Linux]] (yes, I promise I will get around to it), which happens to share the "tap with bridge" and VDE concepts with QEMU. It would be nice if I could link to pages dedicated to those topics and only write UML-specific commands in the page, instead of duplicating a bunch of general information. I'm not familiar very familiar with Xen or LXC or Docker or the like, but I would suspect that they also share some networking infrastructure. We could possibly even create a category just for these types of pages, for example "Virtual Networking" or "Advanced Networking". [[User:EscapedNull|EscapedNull]] ([[User talk:EscapedNull|talk]]) 13:32, 19 February 2015 (UTC)<br />
<br />
== -enable-kvm vs -machine type=pc,accel=kvm ==<br />
<br />
The section [[QEMU#Enabling_KVM]] recommends {{ic|-enable-kvm}}, while [[QEMU#Virtual_machine_runs_too_slowly]] recommends {{ic|1=-machine type=pc,accel=kvm}}. Is there any difference between the two? Is one preferred over the other? Should we just link to the former section from the latter (and possibly move both command line switches to the same section)? [[User:EscapedNull|EscapedNull]] ([[User talk:EscapedNull|talk]]) 17:23, 18 January 2015 (UTC)<br />
<br />
:2.5 years later... Has anyone found an answer to the question of `-enable-kvm` VS `-machine type=pc,accel=kvm`? -[[User:Physicist1616|Physicist1616]] ([[User talk:Physicist1616|talk]]) 19:32, 3 August 2017 (UTC)<br />
<br />
== virtio-gpu ==<br />
<br />
Any tutorial on using the new virtio-gpu which is introduced in qemu-2.4 and kernel 4.2? [[User:Adam900710|Adam900710]] ([[User talk:Adam900710|talk]]) 02:44, 19 August 2015 (UTC)<br />
<br />
:Should be "plug and play" with recent kernel and other packages: [https://www.kraxel.org/blog/2016/09/using-virtio-gpu-with-libvirt-and-spice/ article]. The article is about libvirt, but I've run Arch guest on Arch host successfully with qemu script. [[User:Nesk|Nesk]] ([[User talk:Nesk|talk]]) 09:24, 4 October 2016 (UTC)<br />
<br />
== host only networking ==<br />
<br />
I added a quick and easy method but it was deleted. I found errors in what is here. Is it worth my time to correct them or will they be deleted? {{unsigned|16:39, 4 January 2016|Netskink}}<br />
<br />
:You are welcome to make any corrections. Nobody can tell you if they will be kept or reverted beforehand, but if you're afraid to waste your time feel free to just point them out using an [[Help:Template|Article status templates|article status template]] (should be less time consuming). -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 22:28, 21 February 2016 (UTC)<br />
<br />
== Windows 7 specific issues ==<br />
<br />
I have noticed that for me, any attempts at installing Windows 7 using qemu with virt-manager as a frontend stalls on "Starting Windows." This is immediately after booting the computer for the first time. In Virt-manager, I am able to change the Display from QXL to Cirrus to fix the issue. I'm not sure if this applies to this page in particular, but if so, might be worth adding to the "Troubleshooting" section -- [[User:Ephreal|Ephreal]] ([[User talk:Ephreal|talk]]) 14:25, 10 August 2016 (UTC)<br />
<br />
== Using existing partition on GPT disk (with linear RAID or otherwise) ==<br />
<br />
[https://wiki.archlinux.org/index.php/QEMU#Simulate_virtual_disk_with_MBR_using_linear_RAID Section on using existing partition] is pretty awesome, but it is MBR-specific. Can someone with enough knowledge create a similar section about GPT disk please?<br />
<br />
== Could not access KVM kernel module: Permission denied ==<br />
<br />
Simply changing {{ic|1=group = "78"}} to {{ic|1=group = "kvm"}} in {{ic|/etc/libvirt/qemu.conf}} was not enough for me to fix this issue. Indeed, some files were still installed with gid 78, which you can confirm with:<br />
<br />
find / -gid 78<br />
<br />
So in the end, I still had to change the group id of kvm to workaround this issue:<br />
<br />
groupmod -g 78 kvm<br />
<br />
{{unsigned|17:15, 1 September 2017|Nivata}}<br />
<br />
== Starting QEMU virtual machines with systemd in 2018 ==<br />
<br />
The custom service script uses KillMethod=none to avoid the virtual machine being killed before shutdown. Here is an example to avoid this logic using {{Pkg|socat}}:<br />
<br />
ExecStart=/usr/bin/env qemu-system-x86_64 -name %i … -monitor unix:/var/run/qemu/%i.monitor,server,nowait<br />
ExecStop=/bin/sh -c 'echo system_powerdown | socat stdio,ignoreeof unix-connect:/var/run/qemu/%i.monitor'<br />
<br />
In this way, the stop command will exit when the QEMU monitor closes the socket. Other options, e.g. PIDFile or KillMode are not necessary.<br />
<br />
While a unix socket is used for this example, it works as well with telnet/tcp-connect.<br />
[[User:Ypnos|Ypnos]] ([[User talk:Ypnos|talk]]) 18:29, 30 January 2018 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:NetworkManager&diff=510522Talk:NetworkManager2018-02-12T01:32:43Z<p>Mortan1961: /* Add reccomendation to change dhcp client */ Close</p>
<hr />
<div>== Add recommendation to install dhclient ==<br />
<br />
NetworkManager tries to use dhclient by default but falls back to dhcpcd if dhclient is not installed.<br />
<br />
However, if NetworkManager uses dhcpcd, NetworkManager does not terminate dhcpcd when systemd tells NetworkManager to shut down. See [https://mailman.archlinux.org/pipermail/arch-general/2014-April/035827.html this mailing list thread].<br />
<br />
I wanted to suggest some ideas here before making any drastic changes.<br />
<br />
I think there should be a recommendation to install dhclient in the "Base install" section, above "VPN support". Installing dhclient is preferred because it plays nicely with NetworkManager. Also, dhclient requires no configuration for NetworkManager to use it.<br />
<br />
If adding a recommendation in the "Base install" section is too much, I would at least like to add this issue to the troubleshooting section so others are not baffled by NetworkManager leaving dhcpcd running.<br />
<br />
[[User:KlipperKyle|KlipperKyle]] ([[User talk:KlipperKyle|talk]]) 03:54, 10 April 2014 (UTC)<br />
<br />
:The behaviour is obviously intentional as per the provided systemd unit:<br />
{{hc|/usr/lib/systemd/system/NetworkManager.service|2=<br />
...<br />
# NM doesn't want systemd to kill its children for it<br />
KillMode=process<br />
}}<br />
:Ideally this problem would be resolved in the NetworkManager itself, feel free to submit a bug.<br />
:-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 06:28, 10 April 2014 (UTC)<br />
<br />
::Thanks, Lahwaacz. It appears the NetworkManager team already knows about the dhcpcd issue ([https://bugzilla.gnome.org/show_bug.cgi?id=723746 Bug 723746]).<br />
::Also, after more poking around it appears that dhclient is left running after stopping NetworkManager. However, NetworkManager actually restarts dhclient when NetworkManager starts up. (NetworkManager does not restart dhcpcd when initializing.)<br />
::Shall I add a section about dhcpcd not properly restarting to the troubleshooting section?<br />
::[[User:KlipperKyle|KlipperKyle]] ([[User talk:KlipperKyle|talk]]) 02:20, 12 April 2014 (UTC)<br />
<br />
:::Adding a note to our wiki will not help to resolve the real problem - please add comments to the upstream bug report you referenced. They are missing the detail about {{ic|KillMode}} in systemd unit.<br />
:::Additionally, could you test if resetting {{ic|KillMode}} back to default {{ic|control-group}} actually works? I.e. create the following file:<br />
{{hc|/etc/systemd/system/NetworkManager.service.d/killmode.conf|<nowiki><br />
[Service]<br />
KillMode=control-group<br />
</nowiki>}}<br />
:::-- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 09:06, 12 April 2014 (UTC)<br />
[[User:0xdelta|0xdelta]] ([[User talk:0xdelta|talk]]) 07:52, 10 July 2016 (UTC)<br />
: I'm sorry to bump such an old thread, but there are still some issues with NetworkManager and dhcpcd: At university we use the "eduroam" wireless network. To make things short, I could not connect to the internet via NetworkManager/dhcpcd, but using the console worked. Finally I installed dhclient and edited the NetworkManager config to use dhclient, and that solved my problem. But that took some hours for me to find out (I'm kind of a newbie). It would be nice to mention that workaround in the Troubleshooting section, what do you think?<br />
<br />
:: NetworkManager with dhcpcd didn't work because {{Pkg|networkmanager}} is built without dhcpcd support [https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/networkmanager&id=a1df79cbcebaec0c043789eb31965e57d17b6cdb]. AFAIK it's recommended to use {{ic|1=dhcp=internal}}. ––&#160;[[User:Nl6720|<span style="font-family:serif; font-weight:bold; color:#800080;">nl6720</span>]]&#8239;[[User talk:Nl6720|<span style="color:#808080; vertical-align:super; font-size:smaller; font-weight:lighter;">talk</span>]] 08:15, 10 July 2016 (UTC)<br />
<br />
:: You're right. But even the internal dhcp client wouldn't work with eduroam. It always timed out after 45 seconds. [[User:0xdelta|0xdelta]] ([[User talk:0xdelta|talk]]) 08:22, 10 July 2016 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:NVIDIA&diff=510521Talk:NVIDIA2018-02-12T01:30:11Z<p>Mortan1961: /* Missing CLI instructions for nvidia-settings? */ Close</p>
<hr />
<div>== TV-Out ==<br />
<br />
NVoption Online Version - great tool to make tv-out easy and fast <br />
<br />
[I'm using gmplayer with gl and twinview]<br />
[http://www.sorgonet.com/linux/nv-online/]http://www.sorgonet.com/linux/nv-online/ {{Unsigned|01:23, 23 March 2006|Suw}}<br />
<br />
:A user found this useful to get TV-Out working with an old Geforce 2 MX: {{AUR|nvtv}} -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 13:56, 3 March 2016 (UTC)<br />
<br />
== '/dev/nvidia0' Input/Output error... suggested fixes ==<br />
<br />
Can anyone verify that the BIOS related suggestions work and are not coincidentally set (either automatically when changing the IRQ or turning off ACPI) while troubleshooting? I have found little information that confirms any of the suggestions would work. The file permissions thing seems to be completely unfounded and never works (as noted in the article) that I could find. It would probably be a good idea if we cleaned out items that have not been verified to work. For my setup I was having this error and none of the items in the wiki nor the many file permission search results worked. -- [[User:Clickthem|click, them so hard]] 19:16, 4 March 2012 (EST)<br />
:I've added an Accuracy template, please next time add it yourself so that discussions like this are more visible. -- [[User:Kynikos|Kynikos]] 05:40, 6 March 2012 (EST)<br />
<br />
== Run a test ==<br />
<br />
There is confusing paragraph saying ''You can run a test to see if the Xorg server will function correctly without a configuration file.''. IMHO, it should be clarified what kind of test the author has in mind, an exact command would be helpful. Currently, this suggestion is simply confusing, especially to less experienced users. --[[User:Mloskot|Mloskot]] ([[User talk:Mloskot|talk]]) 19:52, 26 November 2012 (UTC)<br />
<br />
: It's strange. I agree. The link goes to the section for running X. After a beat, I realized you simply try to launch X. And in my case the screen was black. So the "test" failed. A better instruction might say to try launching launching X, and then provide the link which describes all the ways this is done--depending on your configuration. [[User:Xtian|Xtian]] ([[User talk:Xtian|talk]]) 22:05, 21 October 2017 (UTC)<br />
<br />
== nvidia-xconfig ==<br />
<br />
Several of the commands which are suggested to be run with nvidia-xconfig (such as nvidia-xconfig --twinview) don't work with the current nvidia packages in the repository. I just went through setting mine up so I intend to clean up the ones that I can from my experience. Some don't seem to have a 1:1 replacement (there is a --dynamic-twinview argument now; is that the same as --twinview was?). [[User:Techprophet|Teh]] ([[User talk:Techprophet|talk]]) 13:10, 20 June 2013 (UTC)<br />
<br />
While it shouldn't be necessary to use xconfig to get nvidia working on X, creating a 20-nvidia.conf file is an integral step to fix screen tearing for people that suffer from that issue. Perhaps this section should have this explained and include a link to the nvidia troubleshooting article which contains the section about fixing screen tearing? --[[User:TheChickenMan|TheChickenMan]] ([[User talk:TheChickenMan|talk]]) 21:54, 22 December 2016 (UTC)<br />
<br />
:Troubleshooting sections link to the main documentation, not vice versa. Otherwise there would be no point in having separate troubleshooting sections. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 22:03, 22 December 2016 (UTC)<br />
<br />
== Accuracy of driver selection ==<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=189859 A thread on the forums] revealed that nvidia is more conservative in their suggestion than needed and checking their website tells you to use an older driver (nvidia-340xx) while the latest 'nvidia' one will do just fine. [https://bbs.archlinux.org/viewtopic.php?pid=1475567#p1475567 Gusar suggested] the removal of the second point in [https://wiki.archlinux.org/index.php/NVIDIA#Installation the 'Installing' section]. Do we want to get rid of this potentially useful, although somewhat confusing info? -- [[User:Karol|Karol]] ([[User talk:Karol|talk]]) 02:52, 15 November 2014 (UTC)<br />
<br />
:Well, I've [https://wiki.archlinux.org/index.php?title=NVIDIA&diff=344863&oldid=344745 rewritten] the second point to make it clearer, I hope I got it correctly. However steps 2 and 3 there should probably merged into one, because they deal with the same problem, i.e. finding the correct driver to install. Maybe we could use a table? (just brainstorming). -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:47, 16 November 2014 (UTC)<br />
<br />
== Compositing ==<br />
<br />
I think it could be helpful for anyone that's still using X server to be guided on setting up compositing.<br />
<br />
One way to update the Xorg.conf file to enable composition is to use the nvidia command line tool:<br />
# nvidia-xconfig --composite<br />
<br />
The other is to edit the file manually, as per the example below adding the Composite Option to the Extensions section of /etc/X11/xorg.conf:<br />
<br />
Section "Extensions"<br />
Option "Composite" "Enable"<br />
EndSection<br />
<br />
For those running KDE, to check if compositing is enabled they can run the following command, compositing information is at the end of the output:<br />
$ qdbus org.kde.KWin /KWin supportInformation<br />
[[User:Esdaniel|Esdaniel]] ([[User talk:Esdaniel|talk]]) 06:25, 16 October 2017 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Intel_graphics&diff=510520Talk:Intel graphics2018-02-12T01:27:39Z<p>Mortan1961: /* There is no i915.powersave option */ Close</p>
<hr />
<div>== <s>Corrupted fonts after resume from ram</s> ==<br />
<br />
I've finally found searching across many forums the solution for my i915 graphic card.<br />
<br />
My card is: "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)".<br />
<br />
The problem is: After resuming from ram, some letter have a missing orizzontal line, for example I see ¦ instead of |. Another thing is that sometime, after resuming, the cpu goes to 100% of usage with no apparent reason.<br />
<br />
The solution is: Create the file /etc/modprobe.d/local.conf (if it doesn't already exist) and add to it the line "options drm_kms_helper poll=N".<br />
<br />
I cannot understand this mystery but now I can use "Suspend to ram" as many times as I want.<br />
{{unsigned|13 August 2013|Livix}}<br />
<br />
:Closing -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 00:14, 11 November 2017 (UTC)<br />
<br />
== [drm:intel_pipe_update_start [i915]] *ERROR* Potential atomic update failure on pipe A ==<br />
<br />
Maybe the solution to get rid of the above dmesg log spamming could be mentioned? You just add `options i915 enable_psr=0` to the file `/etc/modprobe.d/i915.conf`. [[User:Bjourne|Bjourne]] ([[User talk:Bjourne|talk]]) 17:04, 19 August 2016 (UTC)<br />
<br />
== Backlight is not adjustable after trying various acpi_osi values ==<br />
<br />
[http://unix.stackexchange.com/q/315178/3645 Full details] on Stack Exchange.<br />
<br />
{{unsigned|20:04, 8 October 2016|L0b0}}<br />
<br />
== DRI3 confusion ==<br />
<br />
I've seen in the forum people ask from time to time how to enable DRI3 on their system.<br />
<br />
As stated many times there, DRI3 should be on for most (if not all) of them. But people keep telling them to check<br />
<br />
cat /var/log/Xorg.0.log | grep DRI<br />
<br />
which shows up this message:<br />
<br />
GLX: Initialized DRI2 GL provider for screen 0<br />
<br />
which is *not accurate*.<br />
<br />
If you run this command instead:<br />
<br />
LC_ALL=C LIBGL_DEBUG=verbose glxinfo | grep DRI<br />
<br />
you might stump with this other message:<br />
<br />
libGL: Using DRI3 for screen 0<br />
<br />
which proves you are using DRI3 even though X11 doesn't reply with the correct information.<br />
<br />
The command was adapted from [https://lists.x.org/archives/xorg-devel/2014-June/042735.html xorg mailing list].<br />
<br />
So, it think adding this information in the page could be of major interest. What do you think?<br />
<br />
[[User:Franzrogar|Franzrogar]] ([[User talk:Franzrogar|talk]]) 07:01, 4 November 2016 (UTC)<br />
<br />
== Guide for screen scaling with external displays via xrandr? ==<br />
<br />
I tried to find instructions for scaling the display resolution without stretching on this wiki page, but the section only says that it's not implemented in the Intel drivers yet. However, [https://unix.stackexchange.com/questions/220387/how-to-set-scaling-mode-for-external-displays-on-intel-gpu this stackexchange thread] has a workaround using an xrandr transform matrix. Should this be added to the wiki page?<br />
<br />
[[User:Ibara|Ibara]] ([[User talk:Ibara|talk]]) 12:35, 22 May 2017 (UTC)<br />
<br />
== <s>SNA vs UXA</s> ==<br />
<br />
As apparently there is still the believe that UXA can and should be used, here are several sources showing that UXA has been deprecated a long time ago and compared to SNA has absolutely no benefit:<br />
<br />
* Performance comparison from 2013: https://ickle.wordpress.com/2013/10/01/a-glamorous-refresh/<br />
* https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/log/?qt=grep&q=sna<br />
* https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/log/?qt=grep&q=uxa<br />
<br />
Please do not revert changes without asking why.<br />
--[[User:EoD|EoD]] ([[User talk:EoD|talk]]) 02:04, 9 November 2017 (UTC)<br />
<br />
:Nowhere in your links it is said that UXA has been "deprecated", which is quite different from being inactive. And the benchmark concerns only one specific hardware configuration, you can't pull general statements out of that. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:31, 9 November 2017 (UTC)<br />
<br />
::As said, what configuration is "best" highly depends on hardware setup. (including configurations that don't include xf86-video-intel at all) Closing -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 16:35, 9 November 2017 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Intel_graphics&diff=510519Talk:Intel graphics2018-02-12T01:27:04Z<p>Mortan1961: /* The new intel driver is a little bit faster than modesetting */ Close</p>
<hr />
<div>== <s>Corrupted fonts after resume from ram</s> ==<br />
<br />
I've finally found searching across many forums the solution for my i915 graphic card.<br />
<br />
My card is: "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)".<br />
<br />
The problem is: After resuming from ram, some letter have a missing orizzontal line, for example I see ¦ instead of |. Another thing is that sometime, after resuming, the cpu goes to 100% of usage with no apparent reason.<br />
<br />
The solution is: Create the file /etc/modprobe.d/local.conf (if it doesn't already exist) and add to it the line "options drm_kms_helper poll=N".<br />
<br />
I cannot understand this mystery but now I can use "Suspend to ram" as many times as I want.<br />
{{unsigned|13 August 2013|Livix}}<br />
<br />
:Closing -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 00:14, 11 November 2017 (UTC)<br />
<br />
== <s>There is no i915.powersave option</s> ==<br />
<br />
It's probably some mistake. I have an HD Graphics 4000 and I note no "powersave" option in output of <code>modinfo -p i915</code> and <code>systool -m i915 -av</code> commands. This is the output of both commands: [http://pastebin.com/E21whTaL modprobe], [http://pastebin.com/fsZ4yvdK systool].<br />
<br />
--[[User:Shau-kote|Shau-kote]] ([[User talk:Shau-kote|talk]]) 13:18, 14 October 2015 (UTC)<br />
<br />
:Lack of ''powersave'' parameter for i915 confirmed as of today with ''xf86-video-intel 1:2.99.917+691+ga77397a-1'' (on both an Atom Pineview and Core i3 ''Ivy'' boxes). Also by ''dmesg'':<br />
[ 0.980110] i915: unknown parameter 'powersave' ignored<br />
[ 1.069323] [drm] Initialized i915 1.6.0 20160229 for 0000:00:02.0 on minor 0<br />
[[User:Kozaki|kozaki]] ([[User talk:Kozaki|talk]]) 20:24, 12 August 2016 (UTC)<br />
:Article now looks OK to me after Tharre contribution as September 24, 2016 00:55. --[[User:Kozaki|kozaki]] ([[User talk:Kozaki|talk]]) 11:16, 24 September 2016 (UTC)<br />
<br />
::Closing. -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 00:15, 11 November 2017 (UTC)<br />
<br />
== [drm:intel_pipe_update_start [i915]] *ERROR* Potential atomic update failure on pipe A ==<br />
<br />
Maybe the solution to get rid of the above dmesg log spamming could be mentioned? You just add `options i915 enable_psr=0` to the file `/etc/modprobe.d/i915.conf`. [[User:Bjourne|Bjourne]] ([[User talk:Bjourne|talk]]) 17:04, 19 August 2016 (UTC)<br />
<br />
== Backlight is not adjustable after trying various acpi_osi values ==<br />
<br />
[http://unix.stackexchange.com/q/315178/3645 Full details] on Stack Exchange.<br />
<br />
{{unsigned|20:04, 8 October 2016|L0b0}}<br />
<br />
== DRI3 confusion ==<br />
<br />
I've seen in the forum people ask from time to time how to enable DRI3 on their system.<br />
<br />
As stated many times there, DRI3 should be on for most (if not all) of them. But people keep telling them to check<br />
<br />
cat /var/log/Xorg.0.log | grep DRI<br />
<br />
which shows up this message:<br />
<br />
GLX: Initialized DRI2 GL provider for screen 0<br />
<br />
which is *not accurate*.<br />
<br />
If you run this command instead:<br />
<br />
LC_ALL=C LIBGL_DEBUG=verbose glxinfo | grep DRI<br />
<br />
you might stump with this other message:<br />
<br />
libGL: Using DRI3 for screen 0<br />
<br />
which proves you are using DRI3 even though X11 doesn't reply with the correct information.<br />
<br />
The command was adapted from [https://lists.x.org/archives/xorg-devel/2014-June/042735.html xorg mailing list].<br />
<br />
So, it think adding this information in the page could be of major interest. What do you think?<br />
<br />
[[User:Franzrogar|Franzrogar]] ([[User talk:Franzrogar|talk]]) 07:01, 4 November 2016 (UTC)<br />
<br />
== Guide for screen scaling with external displays via xrandr? ==<br />
<br />
I tried to find instructions for scaling the display resolution without stretching on this wiki page, but the section only says that it's not implemented in the Intel drivers yet. However, [https://unix.stackexchange.com/questions/220387/how-to-set-scaling-mode-for-external-displays-on-intel-gpu this stackexchange thread] has a workaround using an xrandr transform matrix. Should this be added to the wiki page?<br />
<br />
[[User:Ibara|Ibara]] ([[User talk:Ibara|talk]]) 12:35, 22 May 2017 (UTC)<br />
<br />
== <s>SNA vs UXA</s> ==<br />
<br />
As apparently there is still the believe that UXA can and should be used, here are several sources showing that UXA has been deprecated a long time ago and compared to SNA has absolutely no benefit:<br />
<br />
* Performance comparison from 2013: https://ickle.wordpress.com/2013/10/01/a-glamorous-refresh/<br />
* https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/log/?qt=grep&q=sna<br />
* https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/log/?qt=grep&q=uxa<br />
<br />
Please do not revert changes without asking why.<br />
--[[User:EoD|EoD]] ([[User talk:EoD|talk]]) 02:04, 9 November 2017 (UTC)<br />
<br />
:Nowhere in your links it is said that UXA has been "deprecated", which is quite different from being inactive. And the benchmark concerns only one specific hardware configuration, you can't pull general statements out of that. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:31, 9 November 2017 (UTC)<br />
<br />
::As said, what configuration is "best" highly depends on hardware setup. (including configurations that don't include xf86-video-intel at all) Closing -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 16:35, 9 November 2017 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Intel_graphics&diff=510518Talk:Intel graphics2018-02-12T01:26:26Z<p>Mortan1961: /* GUC? */ Close</p>
<hr />
<div>== <s>Corrupted fonts after resume from ram</s> ==<br />
<br />
I've finally found searching across many forums the solution for my i915 graphic card.<br />
<br />
My card is: "Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)".<br />
<br />
The problem is: After resuming from ram, some letter have a missing orizzontal line, for example I see ¦ instead of |. Another thing is that sometime, after resuming, the cpu goes to 100% of usage with no apparent reason.<br />
<br />
The solution is: Create the file /etc/modprobe.d/local.conf (if it doesn't already exist) and add to it the line "options drm_kms_helper poll=N".<br />
<br />
I cannot understand this mystery but now I can use "Suspend to ram" as many times as I want.<br />
{{unsigned|13 August 2013|Livix}}<br />
<br />
:Closing -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 00:14, 11 November 2017 (UTC)<br />
<br />
== <s>There is no i915.powersave option</s> ==<br />
<br />
It's probably some mistake. I have an HD Graphics 4000 and I note no "powersave" option in output of <code>modinfo -p i915</code> and <code>systool -m i915 -av</code> commands. This is the output of both commands: [http://pastebin.com/E21whTaL modprobe], [http://pastebin.com/fsZ4yvdK systool].<br />
<br />
--[[User:Shau-kote|Shau-kote]] ([[User talk:Shau-kote|talk]]) 13:18, 14 October 2015 (UTC)<br />
<br />
:Lack of ''powersave'' parameter for i915 confirmed as of today with ''xf86-video-intel 1:2.99.917+691+ga77397a-1'' (on both an Atom Pineview and Core i3 ''Ivy'' boxes). Also by ''dmesg'':<br />
[ 0.980110] i915: unknown parameter 'powersave' ignored<br />
[ 1.069323] [drm] Initialized i915 1.6.0 20160229 for 0000:00:02.0 on minor 0<br />
[[User:Kozaki|kozaki]] ([[User talk:Kozaki|talk]]) 20:24, 12 August 2016 (UTC)<br />
:Article now looks OK to me after Tharre contribution as September 24, 2016 00:55. --[[User:Kozaki|kozaki]] ([[User talk:Kozaki|talk]]) 11:16, 24 September 2016 (UTC)<br />
<br />
::Closing. -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 00:15, 11 November 2017 (UTC)<br />
<br />
== [drm:intel_pipe_update_start [i915]] *ERROR* Potential atomic update failure on pipe A ==<br />
<br />
Maybe the solution to get rid of the above dmesg log spamming could be mentioned? You just add `options i915 enable_psr=0` to the file `/etc/modprobe.d/i915.conf`. [[User:Bjourne|Bjourne]] ([[User talk:Bjourne|talk]]) 17:04, 19 August 2016 (UTC)<br />
<br />
== <s>The new intel driver is a little bit faster than modesetting</s> ==<br />
<br />
Modesetting was faster and better then xf86-video-intel, but after 09/04 upgrade, xf86-video-intel is 10%-20% faster. Do you noted the difference?<br />
<br />
{{unsigned| 11:58, 10 September 2016 | Gnanini }}<br />
<br />
: Nope, unfortunately the driver is still to buggy to see any real progress happening. I am fighting screen stuttering without any success, see [[Talk:Dell XPS 13 (2016)#Screen stuttering]]. -- [[User:Edh|Edh]] ([[User talk:Edh|talk]]) 08:24, 16 September 2016 (UTC)<br />
<br />
:: Closing. -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 00:13, 11 November 2017 (UTC)<br />
<br />
== Backlight is not adjustable after trying various acpi_osi values ==<br />
<br />
[http://unix.stackexchange.com/q/315178/3645 Full details] on Stack Exchange.<br />
<br />
{{unsigned|20:04, 8 October 2016|L0b0}}<br />
<br />
== DRI3 confusion ==<br />
<br />
I've seen in the forum people ask from time to time how to enable DRI3 on their system.<br />
<br />
As stated many times there, DRI3 should be on for most (if not all) of them. But people keep telling them to check<br />
<br />
cat /var/log/Xorg.0.log | grep DRI<br />
<br />
which shows up this message:<br />
<br />
GLX: Initialized DRI2 GL provider for screen 0<br />
<br />
which is *not accurate*.<br />
<br />
If you run this command instead:<br />
<br />
LC_ALL=C LIBGL_DEBUG=verbose glxinfo | grep DRI<br />
<br />
you might stump with this other message:<br />
<br />
libGL: Using DRI3 for screen 0<br />
<br />
which proves you are using DRI3 even though X11 doesn't reply with the correct information.<br />
<br />
The command was adapted from [https://lists.x.org/archives/xorg-devel/2014-June/042735.html xorg mailing list].<br />
<br />
So, it think adding this information in the page could be of major interest. What do you think?<br />
<br />
[[User:Franzrogar|Franzrogar]] ([[User talk:Franzrogar|talk]]) 07:01, 4 November 2016 (UTC)<br />
<br />
== Guide for screen scaling with external displays via xrandr? ==<br />
<br />
I tried to find instructions for scaling the display resolution without stretching on this wiki page, but the section only says that it's not implemented in the Intel drivers yet. However, [https://unix.stackexchange.com/questions/220387/how-to-set-scaling-mode-for-external-displays-on-intel-gpu this stackexchange thread] has a workaround using an xrandr transform matrix. Should this be added to the wiki page?<br />
<br />
[[User:Ibara|Ibara]] ([[User talk:Ibara|talk]]) 12:35, 22 May 2017 (UTC)<br />
<br />
== <s>SNA vs UXA</s> ==<br />
<br />
As apparently there is still the believe that UXA can and should be used, here are several sources showing that UXA has been deprecated a long time ago and compared to SNA has absolutely no benefit:<br />
<br />
* Performance comparison from 2013: https://ickle.wordpress.com/2013/10/01/a-glamorous-refresh/<br />
* https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/log/?qt=grep&q=sna<br />
* https://cgit.freedesktop.org/xorg/driver/xf86-video-intel/log/?qt=grep&q=uxa<br />
<br />
Please do not revert changes without asking why.<br />
--[[User:EoD|EoD]] ([[User talk:EoD|talk]]) 02:04, 9 November 2017 (UTC)<br />
<br />
:Nowhere in your links it is said that UXA has been "deprecated", which is quite different from being inactive. And the benchmark concerns only one specific hardware configuration, you can't pull general statements out of that. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 07:31, 9 November 2017 (UTC)<br />
<br />
::As said, what configuration is "best" highly depends on hardware setup. (including configurations that don't include xf86-video-intel at all) Closing -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 16:35, 9 November 2017 (UTC)</div>Mortan1961https://wiki.archlinux.org/index.php?title=CUPS/Troubleshooting&diff=510517CUPS/Troubleshooting2018-02-12T01:20:44Z<p>Mortan1961: /* Permission issue */ Remove outdated section</p>
<hr />
<div>[[Category:Printers]]<br />
[[ja:CUPS/トラブルシューティング]]<br />
[[ru:CUPS (Русский)/Troubleshooting]]<br />
{{Related articles start}}<br />
{{Related|CUPS}}<br />
{{Related|CUPS/Printer-specific problems}}<br />
{{Related articles end}}<br />
<br />
This article covers all non-specific (ie, not related to any one printer) troubleshooting of CUPS and printing drivers (but not problems related to printer sharing), including methods of determining the exact nature of the problem, and of solving the identified problem. <br />
<br />
== Introduction ==<br />
<br />
The best way to get printing working is to set 'LogLevel' in {{ic|/etc/cups/cupsd.conf}} to:<br />
LogLevel debug<br />
<br />
And then viewing the output from {{ic|/var/log/cups/error_log}} like this:<br />
# tail -n 100 -f /var/log/cups/error_log<br />
<br />
The characters at the left of the output stand for:<br />
*D=Debug<br />
*E=Error<br />
*I=Information<br />
*And so on<br />
<br />
These files may also prove useful:<br />
*{{ic|/var/log/cups/page_log}} - Echoes a new entry each time a print is successful<br />
*{{ic|/var/log/cups/access_log}} - Lists all cupsd http1.1 server activity<br />
<br />
Of course, it is important to know how CUPS works if wanting to solve related issues:<br />
# An application sends a .ps file (PostScript, a script language that details how the page will look) to CUPS when 'print' has been selected (this is the case with most programs).<br />
# CUPS then looks at the printer's PPD file (printer description file) and figures out what filters it needs to use to convert the .ps file to a language that the printer understands (like PJL, PCL), usually GhostScript.<br />
# GhostScript takes the input and figures out which filters it should use, then applies them and converts the .ps file to a format understood by the printer.<br />
# Then it is sent to the back-end. For example, if the printer is connected to a USB port, it uses the USB back-end.<br />
<br />
Print a document and watch {{ic|error_log}} to get a more detailed and correct image of the printing process.<br />
<br />
== Problems resulting from upgrades ==<br />
<br />
''Issues that appeared after CUPS and related program packages underwent a version increment''<br />
<br />
=== CUPS stops working ===<br />
<br />
The chances are that a new configuration file is needed for the new version to work properly. Messages such as "404 - page not found" may result from trying to manage CUPS via localhost:631, for example.<br />
<br />
To use the new configuration, copy {{ic|/etc/cups/cupsd.conf.default}} to {{ic|/etc/cups/cupsd.conf}} (backup the old configuration if needed) and restart CUPS to employ the new settings.<br />
<br />
=== All jobs are "stopped" ===<br />
<br />
{{Accuracy|This seems a rather brute-force way of fixing this; maybe the printer is simply disabled?}}<br />
<br />
If all jobs sent to the printer become "stopped", delete the printer and add it again.<br />
Using the [http://localhost:631 CUPS web interface], go to Printers > Delete Printer.<br />
<br />
To check the printer's settings go to ''Printers'', then ''Modify Printer''. Copy down the information displayed, click 'Modify Printer' to proceed to the next page(s), and so on.<br />
<br />
=== All jobs are "The printer is not responding" ===<br />
<br />
On networked printers, you should check that the hostname in the printer's URI resolves to the printer's IP address via DNS, e.g. if your printer's connection looks like this:<br />
<br />
lpd://BRN_020554/BINARY_P1<br />
<br />
then the hostname 'BRN_020554' needs to resolve to the printer's IP from the server running CUPS. If [[Avahi]] is being used, ensure that [[Avahi#Hostname_resolution|Avahi's hostname resolution]] is working.<br />
<br />
Alternatively, replace the hostname used in the URI with the printer's IP address.<br />
<br />
=== The PPD version is not compatible with gutenprint ===<br />
<br />
Run:<br />
# /usr/bin/cups-genppdupdate<br />
<br />
And restart CUPS (as pointed out in gutenprint's post-install message).<br />
<br />
=== Printers are not present in the print dialog for GTK3 applications ===<br />
<br />
As of GTK3 3.22, [[GTK+#Printers not shown in the GTK print dialog|printing support is moved to a new package]]{{Broken section link}}.<br />
<br />
Signs and symptoms: printer targets do not show up in the GTK3 print dialogs, making it impossible to print directly from from applications like [[gedit]], [[Chromium]], and [[Firefox]]; but printers still appear in the CUPS web interface and lpstat, and printing from the command line interface or GTK2 applications (GIMP, for example) still works.<br />
<br />
== Networking issues ==<br />
<br />
=== Unable to locate printer ===<br />
<br />
Even if CUPS can detect networked printers, you may still end up with an "Unable to locate printer" error when trying to print something. The solution to this problem is to enable Avahi's [[Avahi#Hostname_resolution|.local hostname resolution]]. See [[CUPS#Network]] for details.<br />
<br />
This problem may also arise when you have a firewall. You may need to disable your firewall or set the right rules. Using system-config-printer to detect network printers will do that automatically.<br />
<br />
=== Old CUPS server ===<br />
<br />
As of CUPS version 1.6, the client defaults to IPP 2.0. If the server uses CUPS <= 1.5 / IPP <= 1.1, the client does not downgrade the protocol automatically and thus cannot communicate with the server. A workaround is to append the {{ic|1=version=1.1}} option documented at [https://www.cups.org/doc/network.html#TABLE2] to the URI.<br />
<br />
=== Shared printer works locally but remote machine fails to print ===<br />
<br />
This is caused by a print job being sent through a filter twice, once on the local machine and once on the remote. See also the warning on the main [[CUPS#Network_2|CUPS]] page.<br />
<br />
== USB printers ==<br />
<br />
=== Conflict with SANE ===<br />
<br />
If you are also running [[SANE]], it's possible that it is conflicting with CUPS. To fix this create a [[Udev]] rule marking the device as matched by libsane:<br />
{{hc|/etc/udev/rules.d/99-printer.rules|output=<br />
ATTRS{idVendor}=="''vendor id''", ATTRS{idProduct}=="''product id''", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"}}<br />
<br />
=== Conflict with usblp ===<br />
<br />
USB printers can be accessed using two methods: The usblp kernel module and libusb. The former is the classic way. It is simple: data is sent to the printer by writing it to a device file as a simple serial data stream. Reading the same device file allows bi-di access, at least for things like reading out ink levels, status, or printer capability information (PJL). It works very well for simple printers, but for multi-function devices (printer/scanner) it is not suitable and manufacturers like HP supply their own backends. Source: [http://lists.linuxfoundation.org/pipermail/printing-architecture/2012/002412.html here].<br />
<br />
{{Warning|As of {{Pkg|cups}} version 1.6.0, it should no longer be necessary to blacklist the {{ic|usblp}} kernel module.<br />
<br />
If you find out this is the only way to fix a remaining issue please report this upstream to the CUPS bug tracker and maybe also get in contact with Till Kamppeter (Debian CUPS maintainer). See [http://cups.org/str.php?L4128 upstream bug] for more info.}}<br />
<br />
If you have problems getting your USB printer to work, you can try [[blacklisting]] the {{ic|usblp}} [[kernel module]]:<br />
<br />
{{hc|/etc/modprobe.d/blacklistusblp.conf|<br />
blacklist usblp<br />
}}<br />
<br />
Custom kernel users may need to manually load the {{ic|usbcore}} [[kernel module]] before proceeding.<br />
<br />
Once the modules are installed, plug in the printer and check if the kernel detected it by running the following:<br />
# journalctl -e<br />
or<br />
# dmesg<br />
<br />
If you are using {{ic|usblp}}, the output should indicate that the printer has been detected like so:<br />
Feb 19 20:17:11 kernel: printer.c: usblp0: USB Bidirectional<br />
printer dev 2 if 0 alt 0 proto 2 vid 0x04E8 pid 0x300E<br />
Feb 19 20:17:11 kernel: usb.c: usblp driver claimed interface cfef3920<br />
Feb 19 20:17:11 kernel: printer.c: v0.13: USB Printer Device Class driver<br />
<br />
If you blacklisted {{ic|usblp}}, you will see something like:<br />
usb 3-2: new full speed USB device using uhci_hcd and address 3<br />
usb 3-2: configuration #1 chosen from 1 choice<br />
<br />
=== USB autosuspend ===<br />
<br />
The Linux kernel automatically suspends USB devices when there is driver support and the devices are not in use. This can save power, but some USB printers think that they are disconnected when the kernel suspends the USB port, preventing printing. This can be fixed by deactivating autosuspend for the specific device, see [[Power management#USB autosuspend]].<br />
<br />
== HP issues ==<br />
<br />
See also [[CUPS/Printer-specific problems#HP]].<br />
<br />
=== CUPS: "/usr/lib/cups/backend/hp failed" ===<br />
<br />
{{Accuracy|Backend failures can be caused by many issues, and [[Avahi]] should not be required}}<br />
<br />
Make sure dbus is installed and running. If the error persists, try starting avahi-daemon.<br />
<br />
Try adding the printer as a Network Printer using the http:// protocol.<br />
<br />
{{Note|There might need to set permissions issues right.}}<br />
<br />
=== CUPS: Job is shown as complete but the printer does nothing ===<br />
<br />
This happens on HP printers when you select the (old) hpijs driver (e.g. the Deskjet D1600 series). Use the hpcups driver instead.<br />
<br />
Some HP printers require their firmware to be downloaded from the computer every time the printer is switched on. If there is an issue with udev (or equivalent) and the firmware download rule is never fired, you may experience this issue.<br />
As a workaround, you can manually download the firmware to the printer. Ensure the printer is plugged in and switched on, then run<br />
hp-firmware -n<br />
<br />
=== CUPS: '"foomatic-rip" not available/stopped with status 3' ===<br />
<br />
If receiving any of the following error messages in {{ic|/var/log/cups/error_log}} while using a HP printer, with jobs appearing to be processed while they all end up not being completed with their status set to 'stopped':<br />
Filter "foomatic-rip" for printer ''printer_name'' not available: No such file or director<br />
or:<br />
PID ''pid'' (/usr/lib/cups/filter/foomatic-rip) stopped with status 3!<br />
make sure {{pkg|hplip}} has been [[installed]].<br />
<br />
=== CUPS: "Filter failed" ===<br />
<br />
A "filter failed" error can be caused by any number of issues. The CUPS error log (by default {{ic|/var/log/cups/error_log}}) should record which filter failed and why.<br />
<br />
==== Missing ghostscript ====<br />
<br />
Install {{pkg|ghostscript}} ({{ic|/usr/lib/cups/filter/gstoraster}} needs it to run).<br />
<br />
==== Missing foomatic-db ====<br />
<br />
Install {{pkg|foomatic-db}} and {{pkg|foomatic-db-ppds}}. This fixes it in some cases.<br />
<br />
==== Bad permissions ====<br />
<br />
{{Accuracy|{{ic|chmod 666}} on a system device sounds dubious to say the least}}<br />
<br />
Change the permissions of the printer USB port. Get the bus and device number from {{ic|lsusb}}, then set the permission using:<br />
<br />
{{hc| lsusb |<br />
Bus <BUSID> Device <DEVID>: ID <PRINTERID>:<VENDOR> Hewlett-Packard DeskJet D1360}}<br />
<br />
Then substitute the provided device information to the <br />
<br />
# chmod 0666 /dev/bus/usb/<BUSID>/<DEVID><br />
<br />
To make the persistent permission change that will be triggered automatically each time the computer is rebooted, add the following line.<br />
<br />
{{hc|/etc/udev/rules.d/10-local.rules|2=<br />
SUBSYSTEM=="usb", ATTRS{idVendor}=="<VENDOR>", ATTRS{idProduct}=="<PRINTERID>", GROUP="lp", MODE:="666"<br />
}}<br />
<br />
Each system may vary, so consult [[udev#List attributes of a device]] wiki page.<br />
<br />
==== Avahi not enabled ====<br />
<br />
[[Start]], and [[enable]] the {{ic|avahi-daemon}} service.<br />
<br />
==== Out-of-date plugin ====<br />
<br />
This error can also indicate that the plugin is out of date (version is mismatched) and may occur after a system upgrade, possibly showing up as a {{ic|Plugin error}} message in the logs.<br />
If you have installed {{AUR|hplip-plugin}} you will need to update the package, otherwise re-run {{ic|hp-setup -i}} to install the latest version of the plugin.<br />
<br />
==== Outdated printer configuration ====<br />
<br />
As of {{AUR|hplip-plugin}} v3.17.11 hpijs is not longer available. If you have printers using hpijs they will fail to print. You must modify them and select the new hpcups driver instead.<br />
<br />
You can check if this is your case looking at cups error_log:<br />
<br />
{{hc| $ cat /var/log/cups/error_log {{!}} grep hpijs |<br />
...<br />
D [09/Jan/2018:14:32:58 +0000] [Job 97] '''sh: hpijs: command not found'''<br />
...}}<br />
<br />
=== CUPS: prints only an empty and an error-message page on HP LaserJet ===<br />
<br />
{{Out of date|The bug was reported in 2012; is this still an issue?}}<br />
<br />
There is a bug that causes CUPS to fail when printing images on HP LaserJet (in my case 3380). The bug has been reported and fixed by [https://bugs.launchpad.net/ubuntu/+source/cups-filters/+bug/998087 Ubuntu].<br />
The first page is empty, the second page contains the following error message:<br />
ERROR:<br />
invalidaccess<br />
OFFENDING COMMAND:<br />
filter<br />
STACK:<br />
/SubFileDecode<br />
endstream<br />
...<br />
<br />
In order to fix the issue, run the following command as root:<br />
# lpadmin -p ''printer'' -o pdftops-renderer-default=pdftops<br />
<br />
=== HPLIP 3.13: Plugin is installed, but HP Device Manager complains it is not ===<br />
<br />
The issue might have to do with the file permission change that had been made to {{ic|/var/lib/hp/hplip.state}}. To correct the issue, a simple {{ic|chmod 644 /var/lib/hp/hplip.state}} and {{ic|chmod 755 /var/lib/hp}} should be sufficient. For further information, please read this [https://bugs.launchpad.net/hplip/+bug/1131596 link].<br />
<br />
=== hp-toolbox: "Unable to communicate with device" ===<br />
<br />
# hp-toolbox<br />
# error: Unable to communicate with device (code=12): hp:/usb/''printer id''<br />
<br />
==== Permission problem ====<br />
<br />
{{Accuracy|Presumably, hp-toolbox tries to access /dev/usb/* or /dev/lp, so it needs to be in the {{ic|lp}} group. But why {{ic|sys}}? And I can't seem to reproduce this...}}<br />
<br />
It may be needed to add the user to the {{ic|lp}} and {{ic|sys}} [[group]]s.<br />
<br />
==== Virtual CDROM printers ====<br />
<br />
This can also be caused by printers such as the P1102 that provide a virtual CD-ROM drive for MS Windows drivers. The lp dev appears and then disappears. In that case, try the '''usb-modeswitch''' and '''usb-modeswitch-data''' packages, that lets one switch off the "Smart Drive" (udev rules included in said packages).<br />
<br />
==== Networked printers ====<br />
<br />
This can also occur with network attached printers using dynamic hostnames if the [[Avahi|avahi-daemon]] is not running. Another possibility is that ''hp-setup'' failed to locate the printer because the IP address of the the printer changed due to DHCP. If this is the case, consider adding a DHCP reservation for the printer in the DHCP server's configuration.<br />
<br />
=== hp-setup asks to specify the PPD file for the discovered printer ===<br />
<br />
Furthermore, when selecting a PPD file in hp-setup's graphical mode, the field does not update and no error message is shown.<br />
<br />
Or, if in interactive (console) mode, you may encounter something similar to this even when providing a correct path to a valid ppd file:<br />
<br />
Please enter the full filesystem path to the PPD file to use (q=quit) :/usr/share/ppd/HP/hp-deskjet_2050_j510_series.ppd.gz<br />
Traceback (most recent call last):<br />
File "/usr/bin/hp-setup", line 536, in <module><br />
desc = nickname_pat.search(nickname).group(1)<br />
TypeError: cannot use a string pattern on a bytes-like object<br />
<br />
The solution is to install and start {{pkg|cups}} before running {{ic|hp-setup}}.<br />
<br />
=== hp-setup: "Qt/PyQt 4 initialization failed" ===<br />
<br />
[[Install]] {{pkg|python-pyqt4}}, which is an optdepend of {{Pkg|hplip}}. Alternatively, to run hp-setup with the command line interface, use the {{ic|-i}} flag.<br />
<br />
=== hp-setup: finds the printer automatically but reports "Unable to communicate with device" when printing test page immediately afterwards ===<br />
<br />
This at least happens to hplip 3.13.5-2 for HP Officejet 6500A through local network connection. To solve the problem, specify the IP address of the HP printer for hp-setup to locate the printer.<br />
<br />
== Other ==<br />
<br />
=== Printer "Paused" or "Stopped" with Status "Rendering completed" ===<br />
<br />
==== Low ink ====<br />
<br />
When low on ink, some printers will get stuck in "Rendering completed" status and, if it is a network printer, the printer may even become unreachable from CUPS' perspective despite being properly connected to the network. Replacing the low/depleted ink cartridge(s) in this setting will return the printer to "Ready" status and, if it is a network printer, will make the printer available to CUPS again.<br />
<br />
{{Note|If you use third-party ink cartridges, the ink levels reported by the printer may be inaccurate. If you use third-party ink and your printer used to work fine but is now getting stuck on "Rendering completed" status, replace the ink cartridges regardless of the reported ink levels before trying other fixes.}}<br />
<br />
=== Printing fails with unauthorised error ===<br />
<br />
If a remote printer requests authentication CUPS will automatically add an {{ic|AuthInfoRequired}} directive to the printer in {{ic|/etc/cups/printers.conf}}. However, some graphical applications (for instance, some versions of [[LibreOffice]] [https://bugs.documentfoundation.org/show_bug.cgi?id=53029]) have no way to prompt for credentials, so printing fails.<br />
To fix this include the required username and password in the URI.<br />
See [https://bugs.launchpad.net/ubuntu/+source/cups/+bug/283811], [https://bbs.archlinux.org/viewtopic.php?id=61826].<br />
<br />
=== Unknown supported format: application/postscript ===<br />
<br />
Comment the lines:<br />
application/octet-stream application/vnd.cups-raw 0 -<br />
from {{ic|/etc/cups/mime.convs}}, and:<br />
application/octet-stream<br />
in {{ic|/etc/cups/mime.types}}.<br />
<br />
=== Print-Job client-error-document-format-not-supported ===<br />
<br />
Try installing the foomatic packages and use a foomatic driver.<br />
<br />
=== Unable to get list of printer drivers ===<br />
(Also applicable to error "-1 not supported!")<br />
<br />
Try to remove Foomatic drivers or refer to [[CUPS/Printer-specific problems#HPLIP Driver]] for a workaround.<br />
<br />
=== lp: Error - Scheduler Not Responding ===<br />
<br />
If you get this error, ensure [[CUPS]] is running, the environmental variable {{ic|CUPS_SERVER}} is unset, and that {{ic|/etc/cups/client.conf}} is correct.<br />
<br />
=== "Using invalid Host" error message ===<br />
<br />
Try adding {{ic|ServerAlias *}} into {{ic|/etc/cups/cupsd.conf}}.<br />
<br />
=== Cannot print from LibreOffice ===<br />
<br />
If you can print a test page from the [[CUPS]] web interface, but not from [[LibreOffice]], try to [[install]] the {{Pkg|a2ps}} package.<br />
<br />
=== Printer output shifted ===<br />
<br />
This seems to be caused by the wrong page size being set in [[CUPS]].<br />
<br />
=== Printer becomes stuck after a problem ===<br />
<br />
When an issue arises during printing, the printer in CUPS may become unresponsive. {{ic|lpq}} reports that the printer {{ic|is not ready}}, and it can be reactivated using {{ic|cupsenable}}. In the CUPS web interface, the printer is shown as ''Paused'', and can be reactivated by ''resuming'' the printer.<br />
<br />
To automatically have CUPS reactivate the printer, change [https://www.cups.org/doc/man-cupsd.conf.html?TOPIC=Man+Pages#ErrorPolicy ErrorPolicy] from the default {{ic|stop-printer}} to {{ic|retry-this-job}}.<br />
<br />
=== Samsung: URF ERROR - Incomplete Session by time out ===<br />
<br />
This error is usually encountered when printing files over the network through IPP to a Samsung printer, and is solved by using the {{aur|samsung-unified-driver}} package.<br />
<br />
{{Note|The corresponding error code 11-1112 corresponds to an internal wiring problem with the printer, so contacting Samsung's tech support is futile.}}<br />
<br />
=== Brother: Printer prints multiple copies ===<br />
<br />
Sometimes the printer will print multiple copies of a document (for instance a MFC-9330CDW printed 10 copies). The solution is to [[CUPS/Printer-specific problems#Updating the firmware|update the printer firmware]].<br />
<br />
=== Regular user cannot change properties of the printer or remove certain jobs ===<br />
<br />
If a regular user needs to be able to change the printers properties or manage the printer queue, the user may need to be added to the {{ic|sys}} group.</div>Mortan1961https://wiki.archlinux.org/index.php?title=Talk:Solid_state_drive&diff=510516Talk:Solid state drive2018-02-12T01:16:42Z<p>Mortan1961: /* atime: lazytime instead of noatime */ Close</p>
<hr />
<div>== Don't use noop ==<br />
<br />
The noop scheduler will perform slow but as a result it will greatly frees up CPU cycles. This in the real world will not increase the speed of your read/writes compared to CFS but instead consume less CPU resources. You can benchmark the deadline scheduler which MAY increase performance in some circumstances. By real world benchmarks, I mean anything but hdparm. {{unsigned|22:38, 21 December 2011|Tama00}}<br />
<br />
:Interesting assertion... do you have any data or a source to back it up?<br />
:[[User:Graysky|Graysky]] 17:20, 21 December 2011 (EST)<br />
<br />
::It seems that the cfq scheduler already knows what to do when SSD is detected, so there is no use to change it.<br />
::[[User:raymondcal|raymondcal]] 2012, may 29<br />
<br />
:::''CFQ has some optimizations for SSDs and if it detects a non-rotational media which can support higher queue depth (multiple requests at in flight at a time), then it cuts down on idling of individual queues and all the queues move to sync-noidle tree and only tree idle remains. This tree idling provides isolation with buffered write queues on async tree.''<br />
:::https://www.kernel.org/doc/Documentation/block/cfq-iosched.txt<br />
:::[[User:ushi|ushi]] 2013, November 03<br />
<br />
::::So does anyone have any good data? My research says deadline is best and that "cfq has some optimizations" doesn't mean it's better than others. <br />
::::[[User:MindfulMonk|MindfulMonk]] ([[User talk:MindfulMonk|talk]]) 22:38, 5 July 2014 (UTC)<br />
<br />
== TRIM and RAID ==<br />
<br />
The wiki article within the warning in the section '''Enable continuous TRIM by mount flag''' says: A possible [http://www.spinics.net/lists/raid/msg49440.html patch] has been posted on July 19, 2015.''"<br />
<br />
The quoted spinics article seems to be saying that there is a serious kernel bug which impacts when SSD's are being used with linux software raid.<br />
<br />
Is that a confirmed kernel bug? If it is then shouldnt the wiki point this out?<br />
{{unsigned|27 September 2015 08:26|Sja1440}}<br />
<br />
:The bug was manifested for particular brand SSD bios only, which were blacklisted. Since TRIM is a standard and other brands work fine, this issue was not regarded a kernel bug to my knowledge. Nonetheless, they may (have) merge(d) the patch to work-around the bios bugs. If someone has a related bug report where it is tracked or kernel commit, it would be useful to add, I agree. -[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 09:23, 27 September 2015 (UTC)<br />
<br />
::I found [http://linux.slashdot.org/story/15/07/30/1814200/samsung-finds-fixes-bug-in-linux-trim-code this] Slashdot discussion (linked with [https://wiki.archlinux.org/index.php?title=Solid_State_Drives&type=revision&diff=402057&oldid=400007]) where there's a link to a kernel commit, although they're talking of a bug in the firmware too, and in fact the devices seem to be still [https://github.com/torvalds/linux/blob/master/drivers/ata/libata-core.c#L4220 blacklisted]. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 02:26, 28 September 2015 (UTC)<br />
<br />
: Samsung's patch about data corruption are now merged, but full blacklist still here in Linux 4.5 https://github.com/torvalds/linux/blob/v4.5/drivers/ata/libata-core.c#L4223 for a lot of SDD brand, in particular all the popular Samsung 8 series (840|850 EVO|PRO). I still cannot find any information about the source issue and when it will be whitelisted. The article should warn user that all those SSD models should be avoided until a solution. Note that also --[[User:Nomorsad|Nomorsad]] ([[User talk:Nomorsad|talk]]) 11:03, 26 March 2016 (UTC)<br />
<br />
:: The article does warn; I have updated with your 4.5 link, thanks for follow-up. They added one more drive model to the blacklist since then.[https://wiki.archlinux.org/index.php?title=Solid_State_Drives&type=revision&diff=427892&oldid=424520] --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 11:19, 26 March 2016 (UTC)<br />
<br />
== Using discard option to mount root directory on xfs file system is no use ==<br />
<br />
After I modified /etc/fstab and add the discard option to the / entry, I reboot my laptop. But when I use mount command to check the options about the file system how to be mounted, there is no discard option in the / entry. and the other directory such as /home and /boot are mounted with discard option correctly.<br />
I have tried to remount root directory with discard option, but there is no use.<br />
<br />
{{unsigned|03:03, 27 May 2016|Cfunc}}<br />
<br />
:Did this perhaps solve itself after the next initramfs generation? --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 10:22, 4 August 2016 (UTC)<br />
<br />
== Remove the section on continuous trim ==<br />
<br />
The section on continuous trim should be removed and a warning added to the trim timer section. There are about a million reasons why people shouldn't use continuous trim and unless there is a very compelling reason for someone to use it that I don't know of, that information doesn't seem useful enough to stick around and could cause a lot of harm.<br />
<br />
[[User:Meskarune|Meskarune]] ([[User talk:Meskarune|talk]]) 13:30, 29 July 2016 (UTC)<br />
<br />
:Lack of information can cause a lot of harm as well, so I think we'd better keep the section. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 13:50, 29 July 2016 (UTC)<br />
:I've [https://wiki.archlinux.org/index.php?title=Solid_State_Drives&type=revision&diff=443642&oldid=443586 trimmed] the warning a little, so now I think the only reason against is performance related, although the given link for Theodor Ts'o's opinion doesn't work anymore. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 16:42, 29 July 2016 (UTC)<br />
<br />
::The link does not work, because [https://lars.ingebrigtsen.no/2016/07/28/the-end-of-gmane/ gmane] is unavailable at current (it is likely someone else will resume its web service so that links will return to availabilty). <br />
::I agree regarding continuous trim, it is important info. (I don't think we need the singular quote from the Ted T'so's rm'ed link, it dates).<br />
::Also, one may argue, since the identification and blacklisting of unreliable devices (some are explicitly whitelisted for certain trim methods too) the reasons to mount with discard have grown. Another reason to have continuous trim enabled devices: Imagine your device runs at about ~66% capacity occupation. Since the drives don't hold a table what's trimmed in last run, this means that each timed fstrim runs over a third of the drive, again and again. With a discard mount flag, any freed up space is only trimmed once. Now how much wear-levelling difference this means, depends on usage pattern. The more static the data on the drive (e.g. a mailing list archive like gmane), the more proportionate wear from fstrim. Even if wear-levelling is not an issue with the device, letting it perform an action once instead of redundant times is a matter of efficiency. If you find this a compelling reason, I don't know. --[[User:Indigo|Indigo]] ([[User talk:Indigo|talk]]) 07:13, 30 July 2016 (UTC)<br />
<br />
== fstrim, btrfs and other fs ==<br />
IMO, the table with trim support should note that running fstrim on btrfs produces different output than on other filesystems. If I run fstrim multiple times in a row for example on ext4, the first time I get "freed X bytes", and on the consequent runs I get "freed 0 bytes" and the subsequent runs are done immediately. On btrfs, however, I always get the same number and it takes the same time as the first run. I didn't tried on other filesystems than these two, but it can be confusing and suggest that there is some misconfiguration for users who are not aware of this. --[[User:Zopper|Zopper]] ([[User talk:Zopper|talk]]) 12:17, 1 Sep 2016 (UTC)<br />
<br />
== Periodic trim "Enabling the timer will activate the service weekly." ==<br />
<br />
So if I want a trim once a week, I don't enable the service but just the timer? And do I understand correctly that if I enable the service, I get a trim every reboot and if I enable both the service and the timer, I get a trim every reboot and every week? [[User:Raygun|Raygun]] ([[User talk:Raygun|talk]]) 09:37, 25 May 2017 (UTC)<br />
<br />
:{{ic|fstrim.service}} does not contain the {{ic|[Install]}} section, so it cannot be enabled. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 15:48, 25 May 2017 (UTC)</div>Mortan1961