Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9689386
feat: Enhance Linux support for screen sharing and dependencies
jeanfbrito Dec 16, 2025
74d4c52
chore: Bump version to 4.10.2 in package.json
jeanfbrito Dec 16, 2025
5fd2177
feat(videoCall): Implement screen sharing request handling and cleanu…
jeanfbrito Dec 16, 2025
43fca4f
fix(videoCall): Improve screen sharing timeout handling and listener …
jeanfbrito Dec 16, 2025
bf19755
fix(videoCall): Refactor screen sharing listener cleanup and request …
jeanfbrito Dec 16, 2025
1536973
feat(gpuFallback): Implement GPU crash detection and fallback mode fo…
jeanfbrito Dec 17, 2025
14e6054
fix(app): Adjust crash count condition and preserve command-line argu…
jeanfbrito Dec 17, 2025
e215b0a
feat: Enhance Linux display server support and crash handling
jeanfbrito Dec 17, 2025
f16c74e
refactor(app): Streamline GPU crash handling and fallback logic
jeanfbrito Dec 17, 2025
ee99e2a
docs: Update Linux display server documentation and improve GPU crash…
jeanfbrito Dec 17, 2025
717c3d8
feat(scripts): Add installation and testing scripts for Linux
jeanfbrito Dec 18, 2025
afa9bcb
refactor(scripts): Improve error handling in installation and depende…
jeanfbrito Dec 19, 2025
6aeb28a
feat(linux): Enhance Wayland and X11 support for GPU handling
jeanfbrito Dec 19, 2025
2d67ca3
feat(videoCall): Introduce screen picker functionality for enhanced s…
jeanfbrito Dec 19, 2025
88f0833
refactor(videoCall): Improve screen sharing request handling and list…
jeanfbrito Dec 19, 2025
357e1d0
refactor(videoCall): Enhance webview handler setup and error management
jeanfbrito Dec 19, 2025
7c53c96
refactor(gpuFallback): Extend valid fallback modes and improve type s…
jeanfbrito Dec 19, 2025
da81f02
refactor(gpuFallback): Improve fallback mode handling in reducer
jeanfbrito Dec 19, 2025
54cb4bc
refactor(videoCall): Update display media request handling for improv…
jeanfbrito Dec 19, 2025
89b7f94
refactor(config): Clean up whitespace and improve logging consistency
jeanfbrito Dec 19, 2025
3bcca07
fix(build): Update electron-builder command to include appimage target
jeanfbrito Dec 22, 2025
1a4364e
feat(build): Add AppImage support to pull request workflow
jeanfbrito Dec 22, 2025
0c89de9
fix(build): Correct AppImage file extension in pull request workflow
jeanfbrito Dec 22, 2025
580c11d
fix(build): Add AppImage pattern to pull request workflow file matching
jeanfbrito Dec 22, 2025
6a5f124
feat(scripts): Add Linux AppImage testing script
jeanfbrito Dec 22, 2025
6afd8e1
refactor(gpuFallback): Simplify GPU fallback handling and improve log…
jeanfbrito Dec 22, 2025
55efccf
refactor(gpuFallback): Enhance Wayland handling and logging for X11 f…
jeanfbrito Dec 22, 2025
3a2cda8
feat(wayland): Enable native Wayland support by default
jeanfbrito Dec 23, 2025
7f469bb
fix: Address PR review comments
jeanfbrito Dec 23, 2025
602f141
fix(linux): Enforce X11 mode on Wayland sessions
jeanfbrito Dec 23, 2025
74faa87
feat(wayland): Enable native Wayland support by default
jeanfbrito Dec 23, 2025
b3615b7
fix(linux): Add proactive GPU detection with X11 fallback
jeanfbrito Dec 23, 2025
ca1b08f
fix(ci): Fix AppImage upload and PR comment updates
jeanfbrito Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions docs/linux-display-server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Linux Display Server Configuration

Rocket.Chat Desktop automatically detects and uses the best display server (Wayland or X11) for your system. If the app detects GPU issues during startup, it automatically switches to a compatible mode.

## Default Behavior

| Package Type | Display Server | Notes |
|--------------|---------------|-------|
| **deb/rpm** | Auto-detect | Uses Wayland if available, falls back to X11 |
| **Snap** | Auto-detect | Uses Wayland if available, falls back to X11 |
| **AppImage** | Auto-detect | Uses Wayland if available, falls back to X11 |

## Automatic GPU Crash Recovery

Starting with version 4.10.2, Rocket.Chat Desktop includes automatic GPU crash detection and recovery:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

1. **Crash Detection**: If the GPU process crashes during startup (e.g., due to incompatible drivers), the app detects this automatically.

2. **Automatic Fallback**: After detecting crashes, the app saves a fallback mode and relaunches with X11 forced.

3. **Persistent Setting**: The fallback mode is remembered across restarts, preventing repeated crashes.

4. **User Control**: You can view and reset the fallback mode in Settings > General > Display Server Mode.

## Wayland Support

Rocket.Chat Desktop includes native Wayland support with:
- PipeWire screen capture for video calls
- Native OS screen picker integration
- Hardware acceleration

### Requirements for Wayland
- `xdg-desktop-portal` (recommended, auto-suggested by deb/rpm packages)
- `xdg-desktop-portal-gtk` or desktop-specific portal backend
- PipeWire for screen sharing
- Modern GPU drivers

## Known Issues

### Virtual Machines
VMs with paravirtual graphics (QXL, VirtualBox, VMware) may have issues with Wayland GPU acceleration.

**Symptoms:**
```
ERROR:viz_main_impl.cc:189] Exiting GPU process due to errors during initialization
```
Comment thread
jeanfbrito marked this conversation as resolved.
Resolved

**Automatic Recovery:** Starting with version 4.10.2, the app automatically detects this crash and switches to X11 mode. You should see the app restart and work normally after the first crash.

**Manual Solution:** If auto-recovery doesn't work, force X11 mode:
```bash
rocketchat-desktop --ozone-platform=x11
Comment thread
jeanfbrito marked this conversation as resolved.
Resolved
```

**Settings Option:** Go to Settings > General > Display Server Mode and select "Force X11".

### Screen Sharing Not Working on Wayland

If screen sharing doesn't work on Wayland:

1. Install portal dependencies:
```bash
# Ubuntu/Debian
sudo apt install xdg-desktop-portal xdg-desktop-portal-gtk pipewire

# Fedora
sudo dnf install xdg-desktop-portal xdg-desktop-portal-gtk pipewire

# Arch
sudo pacman -S xdg-desktop-portal xdg-desktop-portal-gtk pipewire
```

2. Restart your session or reboot

3. Verify PipeWire is running:
```bash
systemctl --user status pipewire
```

## Manual Override

You can force a specific display server:

```bash
# Force X11
rocketchat-desktop --ozone-platform=x11

# Force Wayland (if system supports it)
rocketchat-desktop --ozone-platform=wayland
```

## Troubleshooting

### Check Your Display Server
```bash
echo $XDG_SESSION_TYPE
# Output: "wayland" or "x11"
```

### Check GPU Support
```bash
# Check graphics card
lspci | grep -i vga

# Check VA-API support (hardware video decode)
vainfo
```

### Enable Verbose Logging
```bash
rocketchat-desktop --enable-logging --v=1
```

### Disable GPU Acceleration (last resort)
```bash
rocketchat-desktop --disable-gpu
```

## Resetting Display Server Mode

If the app auto-switched to X11 and you want to try Wayland again (e.g., after updating GPU drivers):

1. Open the app (it will run in X11 mode)
2. Go to Settings > General
3. Find "Display Server Mode"
4. Select "Auto-detect (Wayland/X11)"
5. The app will restart and attempt Wayland

If the GPU crashes again, the app will automatically switch back to X11.

## Best Practices

- **Real Hardware + Wayland**: Use default (auto-detection) for best experience
- **VM + Wayland**: The app will auto-detect and switch to X11 after first crash
- **X11 Session**: No configuration needed, works automatically
- **Snap Package**: Uses auto-detection like other package types

## Reporting Issues

When reporting display server issues, include:

1. Display server type: `echo $XDG_SESSION_TYPE`
2. Graphics card: `lspci | grep -i vga`
3. Distribution: `cat /etc/os-release`
4. Package type: snap/deb/rpm/AppImage
5. Full error output with `--enable-logging --v=1`
17 changes: 13 additions & 4 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,26 @@
"deb": {
"fpm": [
"--after-install=build/linux/postinst.sh"
],
"recommends": [
"xdg-desktop-portal",
"xdg-desktop-portal-gtk"
]
},
"rpm": {
"fpm": ["--rpm-rpmbuild-define=_build_id_links none"]
"fpm": [
"--rpm-rpmbuild-define=_build_id_links none",
"--rpm-tag=Recommends: xdg-desktop-portal",
"--rpm-tag=Recommends: xdg-desktop-portal-gtk"
]
},
"snap": {
"plugs": [
"desktop",
"desktop-legacy",
"home",
"x11",
"wayland",
"unity7",
"browser-support",
"network",
Expand All @@ -154,9 +163,9 @@
"audio-playback",
"audio-record",
"screen-inhibit-control",
"upower-observe"
],
"executableArgs": ["--ozone-platform=x11"]
"upower-observe",
"pipewire"
]
},
"afterSign": "./build/notarize.js",
"generateUpdatesFilesForAllChannels": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"productName": "Rocket.Chat",
"name": "rocketchat",
"description": "Official OSX, Windows, and Linux Desktop Clients for Rocket.Chat",
"version": "4.10.1",
"version": "4.10.2",
"author": "Rocket.Chat Support <support@rocket.chat>",
"copyright": "© 2016-2025, Rocket.Chat",
"homepage": "https://rocket.chat",
Expand Down
14 changes: 12 additions & 2 deletions src/app/PersistableValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,15 @@ type PersistableValues_4_9_0 = PersistableValues_4_7_2 & {
isVideoCallScreenCaptureFallbackEnabled: boolean;
};

export type GpuFallbackMode = 'none' | 'x11' | 'disabled';

type PersistableValues_4_10_2 = PersistableValues_4_9_0 & {
gpuFallbackMode: GpuFallbackMode;
};

export type PersistableValues = Pick<
PersistableValues_4_9_0,
keyof PersistableValues_4_9_0
PersistableValues_4_10_2,
keyof PersistableValues_4_10_2
>;

export const migrations = {
Expand Down Expand Up @@ -173,4 +179,8 @@ export const migrations = {
isTransparentWindowEnabled: false,
isVideoCallScreenCaptureFallbackEnabled: false,
}),
'>=4.10.2': (before: PersistableValues_4_9_0): PersistableValues_4_10_2 => ({
...before,
gpuFallbackMode: 'none',
}),
};
Loading
Loading