Simplified doc-site generation
[AGL/documentation.git] / docs / 0_Getting_Started / 4_Troubleshooting / Generic_issues.md
1 ---
2 edit_link: ''
3 title: Generic issues
4 origin_url: >-
5   https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/docs/getting-started/troubleshooting.md
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/getting_started/master/image-development-workflow-getting-started-book.yml -->
9
10 # Troubleshooting
11
12 This topic describes various areas that could cause you problems. 
13
14 ## Including Extended Attributes
15
16 The
17 [Extended Attributes Set (`xattrs`)](https://linux-audit.com/using-xattrs-extended-attributes-on-linux/)
18 associated with the image during its construction must be copied to
19 the bootable media.
20 The `xattrs` supports
21 [Smack](https://en.wikipedia.org/wiki/Smack_(software)), which is a
22 Simplified Mandatory Access Control kernel.
23
24 **NOTE:** See
25   [https://www.kernel.org/doc/Documentation/security/Smack.txt](https://www.kernel.org/doc/Documentation/security/Smack.txt).
26   for detailed information on Smack.
27
28 **NOTE:** SMACK is a required feature for the AGL Application Framework.
29
30 Many methods exist that allow you to create bootable media (e.g. `dd`, `bmaptools`,
31 `tar`).
32 It is recommended that you do not use `tar` to create bootable media.
33 However, if you do, you must take these steps to copy `xattrs` to the media:
34
35 1. Verify your `tar` version is 1.28 or newer:
36
37    ```bash
38    $ tar --version
39    tar (GNU tar) 1.28
40    [snip]
41    ```
42
43 2. Optionally update `tar` if required.
44    Most systems come with `tar` installed.
45    If you need to install it, see the
46    "[Installing tar](https://www.howtoforge.com/tutorial/linux-tar-command/#installing-tar)"
47    section for instructions.
48
49    When you build an AGL distribution, a native up-to-date version of
50    `tar` is created.
51    Use the following command to see that version:
52
53    ```bash
54    $ tmp/sysroots/x86_64-linux/usr/bin/tar-native/tar --version
55    tar (GNU tar) 1.28
56    [snip]
57    ```
58
59 3. Copy the AGL files and Extended Attributes Set to your bootable media:
60
61    ```bash
62    $ tar --extract --xz --numeric-owner --preserve-permissions --preserve-order --totals \
63               --xattrs-include='*' --directory=DESTINATION_DIRECTORY --file=agl-demo-platform.....tar.xz
64    ```
65
66 ## Screen orientation for Splash and in Weston
67
68 Depending of your scren mounting the default orientation of the UI an/or splash screen might be incorrect.
69 To change the orientation of the splash screen patch
70
71 ```bash
72 File: /etc/systemd/system/sysinit.target.wants/psplash-start.service
73 Line:  ExecStart=/usr/bin/psplash -n -a 90
74 ```
75
76 To change the orientation of the UI in Weston patch
77
78 ```bash
79 File: /etc/xdg/weston/weston.ini
80 Line: transform=90
81 ```
82
83 ## Adding media files to play with MediaPlayer
84
85 AGL include the default MediaPlayer sample app which can be used to play music. The `lightmediascanner.service` by default will search for media under the `/media` folder. So if you plug in any USB stick containing music, they would be recognized and showed in the playlist of the MediaPlayer app menu.
86
87 The current supported format is OGG. Please convert your files to ogg to play with MediaPlayer.
88
89 **NOTE**: mp3 is not found by default. For this you need to enable the flags for mp3 support.
90
91 In case you want to store music in another place, modify the `/usr/lib/systemd/user/lightmediascanner.service` file and change the `--directory` parameter to the path of that folder.
92
93 If you don’t want to touch the ligthmediascanner service, you can also add a folder named "Music" under `/home/1001/Music` and put your music files there.
94
95 ## Configuring the Audio hardware
96
97 AGL uses alsa as Audio configuration master. If the correct HW is not setup, the Audio system will fail to start what will also fails the demo Home Screen launch.
98 You need to configure Audio in
99
100 * pipewire
101
102 ### pipewire
103
104 AGL does use the new pipewire infrastructure for sound.
105 The configuration is in:
106
107 * `/etc/pipewire/`
108 and
109 * `/etc/wireplumber/`
110
111 Please see https://git.automotivelinux.org/AGL/meta-agl-devel/tree/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-board-config-agl .