zhiminy/EvalEng huggingface dataset:
Repository: stepjam/RLBench
Issue: The robotic arm vibrates continuously when executing the example in example
Root cause: Configuration Error

@stepjam 
Hello, thank you for providing such a good benchmark environment. I tried to learn to use rlbench, but when I executed example（any of
them), I found that the robotic arm kept vibrating and did not perform the desired action, as shown below:
![Video_20231115150512](https://github.com/stepjam/RLBench/assets/37623835/d559b56d-5d2e-47d7-92ca-f068c0135684)

 I thought maybe PyRep wasn't installed well, but in fact, the PyRep example worked well.
Can someone help me？

Excuse me, have you resolved this issue? I've encountered it as well.


@AGREATAPE news on this?
Repository: stepjam/RLBench
Issue: Loading demos at different resolutions causes incorrect data
Root cause: Algorithmic Error

If you create demos with rendering say, at 256x256 resolution, and then load them using https://github.com/stepjam/RLBench/blob/master/rlbench/utils.py#L41 with CameraConfigs with different sizes (i.e. 128x128),

then all images (including RGB + Depth) are scaled like so: https://github.com/stepjam/RLBench/blob/master/rlbench/utils.py#L198

However, whenever you scale an image, the intrinsics also have to change (for instance, the offset will be totally different). However, the same intrinsics are being used: https://github.com/stepjam/RLBench/blob/master/rlbench/utils.py#L260

This causes the images to look OK, but the point clouds to be totally incorrect.

A fix would transform the intrinsics as well before reconstructing the point cloud.

I don't have time to make a PR for this right now, but wanted to open the issue in case anyone runs into the same behavior. I'm currently getting around it by making sure I always load at the same resolution.
Repository: stepjam/RLBench
Issue: Missing actions for some timestep when using dataset_generator
Root cause: Validation Gap

Hi,

I am trying to generate a multi-task dataset using the provided dataset_generator script. However, when I load the low_dim_obs.pkl, some timesteps seem to miss the _observations.misc["executed_demo_joint_position_action"] property, which makes the trajectories discontinuous. At first I thought it might be just the first and the last timesteps, however, the missing values are often in the middle of the trajectory. Is this a known bug or am I missing some rationale behind this engineering decision.

Thanks
Repository: stepjam/RLBench
Issue: Real time plotting issue

I want to do animation of covariance matrix generated with a panda manipulator random action in reinforcement learning project. I want to analyses it using when the simulation is going on in rl bench.
unfortunately I got thsi error" GLib-GIO-CRITICAL **: 23:07:23.381: g_application_run: assertion 'acquired_context' failed"is it possible to generate any animation of plotting in real time during simulation loop going on?
Repository: stepjam/RLBench
Issue: File invalid Error 404
Root cause: Documentation Deficiency

I got a wrong of Error 404 when trying to access:

## Tasks

**To see gifs of each of the tasks, [see here](https://drive.google.com/drive/folders/1TqbulbbCEqVBd6SBHatphFlUK2JQLkYu?usp=sharing).**

Whether it was transferred or deleted?

![image](https://github.com/stepjam/RLBench/assets/97787941/7f289b77-fed3-47bb-9287-b3bf407c646c)
Repository: stepjam/RLBench
Issue: after installing RLBench, still no module named rlbench found
Root cause: Environment Incompatibility

![1](https://github.com/stepjam/RLBench/assets/150501800/73c19aa2-2ac2-42e3-b984-6c2422194777)
![2](https://github.com/stepjam/RLBench/assets/150501800/76ca300b-6907-4a3d-856e-156dd991211c)

I created a conda environment for rlbench. RLBench and PyRep are all installed under the same environment. 

PyRep module can be found and works. RLBench module not found. 

Please advise. Thanks. 

![2](https://github.com/stepjam/RLBench/assets/150501800/233b0bb5-6a1c-4792-a5b6-b5418991a8a0)

If I run conda list, it shows that both PyRep and RLBench are installed in the conda environment. 

> ![1](https://private-user-images.githubusercontent.com/150501800/315860464-73c19aa2-2ac2-42e3-b984-6c2422194777.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTEwNzMxODUsIm5iZiI6MTcxMTA3Mjg4NSwicGF0aCI6Ii8xNTA1MDE4MDAvMzE1ODYwNDY0LTczYzE5YWEyLTJhYzItNDJlMy1iOTg0LTZjMjQyMjE5NDc3Ny5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMzIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDMyMlQwMjAxMjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kMDkzYzNkNDY2OGRlMTE5MzI5OTMxMGVlYjFjNGU5ZmFkY2Q5MjAxM2Q1ODUzMmY1MDVmNjcyOGI3MDExZWU3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.gnTN08v9UhFuDR9FDQtOcykFL0yra12g65ftkaDJTAc) ![2](https://private-user-images.githubusercontent.com/150501800/315860473-76ca300b-6907-4a3d-856e-156dd991211c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTEwNzMxODUsIm5iZiI6MTcxMTA3Mjg4NSwicGF0aCI6Ii8xNTA1MDE4MDAvMzE1ODYwNDczLTc2Y2EzMDBiLTY5MDctNGEzZC04NTZlLTE1NmRkOTkxMjExYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMzIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDMyMlQwMjAxMjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYjhlNjY5Y2ZlNTNhZDA0MzZkZTQ5YTgyMzIzYTU4OTlhZmUyMmFmNmU5ODUyMmM1NzY4OWRhNDk2NTQxMzc5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.vI8PWk8l0IRBFCXNa5i4KNeXd-O6rJ5fvTEUt1uQ8KA)
> 
> I created a conda environment for rlbench. RLBench and PyRep are all installed under the same environment.
> 
> PyRep module can be found and works. RLBench module not found.
> 
> Please advise. Thanks.



I rebooted my ubuntu and resolved this problem.
Repository: stepjam/RLBench
Issue: inhomogeneous shape error when running the immitation learning example
Root cause: Validation Gap

## My environment
- OS: Ubuntu 23.04
- GPU: RTX 3090
- CoppeliaSim: CoppeliaSim_Edu_V4_1_0_Ubuntu20_04
- Python: 3.11.4
```
Package         Version
--------------- -------
cffi            1.14.2
html-testRunner 1.2.1
Jinja2          3.1.3
MarkupSafe      2.1.5
natsort         8.4.0
numpy           1.26.4
pillow          10.2.0
pip             23.0.1
pycparser       2.21
pyquaternion    0.9.9
PyRep           4.1.0.3
rlbench         1.2.0
setuptools      66.1.1
wheel           0.38.4
```

## How to reproduce
run 
```
python examples/imitation_learning.py
```
i got this error
```
Traceback (most recent call last):
  File "/home/fs/cod/RLBench/examples/imitation_learning.py", line 39, in <module>
    demos = np.array(demos).flatten()
            ^^^^^^^^^^^^^^^
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex
```

hello
I meet the same error,
I solved this problem by modifying this code: "demos = np.array(demos,dtype=object).flatten()"
and then downloading the related linux dependency package:"sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
"
Repository: stepjam/RLBench
Issue: Can you provide obs.delta_gripper_pose in the end effector frame
Root cause: Unimplemented Feature Gap

Hi,

Thanks for the work. Currently the obs has attribute gripper_pose in the world frame. I would like to do imitation learning with a model's action space defined as the delta gripper pose. I wrote a transformation function by myself, which use the next obs.gripper_pose and the current one. Transfer them from world frame to the end effector frame, then do reduction. But I found it is not perfect and I do not know reason. Could you please give me some insight?
Repository: stepjam/RLBench
Issue: cannot reshape array of size 16 into shape (3,4)
Root cause: Validation Gap

I setup the environment and run a sample. But get into the error below.

(VoxPoser) cyzhu@Fudan-ai:~/VoxPoser/RLBench/examples$ python3 single_task_rl.py 
Reset Episode
Traceback (most recent call last):
  File "/nfs/cyzhu/VoxPoser/RLBench/examples/single_task_rl.py", line 37, in <module>
    descriptions, obs = task.reset()
                        ^^^^^^^^^^^^
  File "/nfs/cyzhu/VoxPoser/RLBench/rlbench/task_environment.py", line 91, in reset
    return desc, self._scene.get_observation()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nfs/cyzhu/VoxPoser/RLBench/rlbench/backend/scene.py", line 258, in get_observation
    np.reshape(tip.get_matrix(), (3, 4))
  File "/nfs/cyzhu/anaconda3/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 285, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nfs/cyzhu/anaconda3/lib/python3.11/site-packages/numpy/core/fromnumeric.py", line 59, in _wrapfunc
    return bound(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^^
ValueError: cannot reshape array of size 16 into shape (3,4)
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex


Have you solved the error. I meet the same. Thanks for your reply
Repository: stepjam/RLBench
Issue: An error when running imitation_learning demo
Root cause: Validation Gap

(rlxintong) hgdx@hgdx-System:~/RLBench/examples$ python imitation_learning.py 
Traceback (most recent call last):
  File "imitation_learning.py", line 40, in <module>
    demos = np.array(demos).flatten()
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex


I have the same issue.

hello
I meet the same error,
I solved this problem by modifying this code: "demos = np.array(demos,dtype=object).flatten()"
and then downloading the related linux dependency package:"sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev
"
Repository: stepjam/RLBench
Issue: Door handle slipping off of fingers
Root cause: Unimplemented Feature Gap

Hi, I am training imitation learning policies to solve RLBench tasks. I am currently facing the following issue: even though the predicted trajectory is correct, the robot fails the task because the door handle of the fridge "slips" out of the fingers, see the gif below.

Is there any setting or change I can do to avoid or at least reduce this issue?
Thank you in advance! 

![open_fridge](https://github.com/stepjam/RLBench/assets/43339851/364c24d7-0340-403d-bcd1-4624c4593e36)
Repository: stepjam/RLBench
Issue: Use RLBench without X server
Root cause: Unimplemented Feature Gap

Hi @stepjam, is it possible to use RLBench on a machine without an X server?

you can use `xvfb-run -a python xx.py` to use RLBench in headless mode☺️

> you can use `xvfb-run -a python xx.py` to use RLBench in headless mode☺️

Xvfb is renders in CPU. To use GPU rendering, you need an X server. Follow the instructions below to set up headless GPU rendering.
https://github.com/stepjam/RLBench?tab=readme-ov-file#running-headless

Thanks @TengBoYuu!

@eugeneteoh unfortunately I am running my experiments on a machine without an X server. I was hoping there was an option for GPU rendering using for example EGL.

EGL isn't supported for CoppeliaSim (at least v4.1)
Repository: stepjam/RLBench
Issue: How can I use ur3  in gym.make?
Root cause: Documentation Deficiency

Hi, I want to change the Panda into UR3 when using the env = gym.make('reach_target-state-v0', render_mode='human'). But it seems that even if I make changes into  env = Environment(
    action_mode, obs_config=obs_config, headless=False,
    robot_setup='ur5') in 37 /rlbench/gym/rlbench_env.py it still doesn't work, can you tell me how to add ur3 to the environment and be able to call it via gym.make.

I have add the ur3.ttm as ur5.ttm. But when I launch the swap_arm.py, the error happends.
![image](https://github.com/stepjam/RLBench/assets/29306735/bf0ef4d2-814f-4ab5-99b2-c52b212355f6)
Repository: stepjam/RLBench
Issue: Consistent resetting through np.random.Generator
Root cause: Architectural Constraint

Currently, resetting is not consistent due to two things:

- Sampled boundary is random and depends on global np seed (https://github.com/stepjam/RLBench/blob/master/rlbench/backend/spawn_boundary.py#L159)
- max_attempts introduces more samples. Even if a global seed is set, objects are not guaranteed to be in the same position (https://github.com/stepjam/RLBench/blob/master/rlbench/backend/scene.py#L127)\

By using np.random.Generator, we can have a seed for a Scene instance, allowing potentially allowing more determinism.
https://github.com/Farama-Foundation/Gymnasium/blob/main/gymnasium/utils/seeding.py



Great, I also find that even if I have set global random seed, the boundary and object position varies.

Is this still active?
Repository: stepjam/RLBench
Issue: Robot disappears
Root cause: Environment Incompatibility

I found that sometimes the robot arm and objects disappeared suddenly when I running RLBench. These cases have to be categorized as failed cases. Is this phenomenon normal, or it's just something wrong with my config.
![屏幕截图 2024-06-23 134147](https://github.com/stepjam/RLBench/assets/141759286/1d4a809b-6316-4498-9ced-abfcbe41154c)



This may also related to stuck in headless mode.
Repository: stepjam/RLBench
Issue: Bug. UnboundLocalError while running the demos
Root cause: Validation Gap

Hello,

While trying to execute the demos (following the tutorials) I noticed that I get the following error:
`UnboundLocalError: local variable 'gripper_open' referenced before assignment`
This error is originating from line#374 of [scene.py](https://github.com/stepjam/RLBench/blob/f2c625fde9783702938de4e8df981a8f4941da26/rlbench/backend/scene.py#L374). It will get fixed if you define the `gripper_open` variable inside the while or move line#344 outside the if statement.
Repository: stepjam/RLBench
Issue: How to import a 3D model when building a new task?
Root cause: Documentation Deficiency

![EA5D7A91-1AF0-4AE4-8419-C720672739D2_1_201_a](https://github.com/stepjam/RLBench/assets/79798486/81bc8c1e-904f-47a3-8056-59b91b3d0bf3)
Dear authors
    I want to build a new task using "task_builder.py", but there is no response while I imported a 3D model (stl or obj format) and click import button. What should I do to fix this bug ?

I solve this problem by using pyrep API in task_builder.py

@ZJUshine What do you mean when you say you used "PyRep API in task_builder.py". Can you please elaborate? I am trying to import an STL file and running into the same issue. Thanks

I could provide my final code to you if you need it. Please give me your email, or I will share it here tomorrow.

```
    def import_3d_model(self, model_path):
        print('Importing 3D model from:', model_path)
        if not isfile(model_path):
            print_fail('Model file does not exist!')
            return

        try:
            model = Shape.import_mesh(model_path,scaling_factor=1)
            model.set_parent(self.task.get_base())
            print('3D model imported successfully!')
        except Exception as e:
            print_fail('Failed to import 3D model!')
            traceback.print_exc()
```
This is the main code for importing 3D models, I hope it works for you.

Thanks for this, I will try this out!
Repository: stepjam/RLBench
Issue: How to use pyrep suction end effector?
Root cause: Validation Gap

How can I swap out the panda gripper with a pyrep suction? I saved the .ttm file to the repo and added it to SUPPORTED_ROBOTS:

SUPPORTED_ROBOTS = {
    'panda': (Panda, PandaGripper, 7),
    'panda_suction': {Panda, SuctionCup, 7},
    'jaco': (Jaco, JacoGripper, 6),
    'mico': (Mico, MicoGripper, 6),
    'sawyer': (Sawyer, BaxterGripper, 7),
    'ur5': (UR5, Robotiq85Gripper, 6),
}

But I get the following error:

CURRENT ARM IS: panda_suction
qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 201, resource id: 0, major code: 140 (Unknown), minor code: 20
Loading arm from: /home/andrew/fmm/external/RLBench/rlbench/robot_ttms/panda_suction.ttm
Traceback (most recent call last):
  File "./external/RLBench/tools/dataset_generator.py", line 649, in <module>
    app.run(main)
  File "/home/andrew/.conda/envs/fmm/lib/python3.8/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/andrew/.conda/envs/fmm/lib/python3.8/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "./external/RLBench/tools/dataset_generator.py", line 633, in main
    run_all_variations(0, lock, task_index, variation_count, result_dict, file_lock, tasks)
  File "./external/RLBench/tools/dataset_generator.py", line 495, in run_all_variations
    rlbench_env.launch()
  File "/home/andrew/fmm/external/RLBench/rlbench/environment.py", line 111, in launch
    self._pyrep.import_model(arm_path)
  File "/home/andrew/.conda/envs/fmm/lib/python3.8/site-packages/pyrep/pyrep.py", line 282, in import_model
    handle = sim.simLoadModel(filename)
  File "/home/andrew/.conda/envs/fmm/lib/python3.8/site-packages/pyrep/backend/sim.py", line 345, in simLoadModel
    _check_return(val)
  File "/home/andrew/.conda/envs/fmm/lib/python3.8/site-packages/pyrep/backend/sim.py", line 27, in _check_return
    raise RuntimeError(
RuntimeError: The call failed on the V-REP side. Return value: -1
QMutex: destroying locked mutex

Hi @andrewliu2001, were you able to set up this particular robot arm?

Hi @andrewliu2001 @francescotaioli were you guys able to get a suction gripper working with panda? Thanks


Hi @rsriram315, I was working on other things, I didn't try it
Repository: stepjam/RLBench
Issue: Installable on macOS?
Root cause: Environment Incompatibility

Hello. I'm looking into a possible project using RLBench, and was wondering if there's any way to get RLBench running on macOS. CoppeliaSim has official binaries for darwin-arm64, so I just need to figure out whether it's possible to get RLBench working with such an install.

The application package has a _somewhat_ similar structure to that of the Ubuntu tarball, so I think it might be possible

Quick correction- Arm macOS didn't exit when 4.1.0 released so there's only an x86 binary for macOS for that version, but it works via Rosetta
Repository: stepjam/RLBench
Issue: An issue about the rlbench dataset
Root cause: Documentation Deficiency

Thanks For your great work！
Although RLBENCH provide the function to extract the image, depth, segmentation mask and action for imitation learning, I want to  obtatin the dataset without runing the script.
Are there any links to download the dataset?


Hey you got any way to get the dataset?

@Zhangwenyao1 could you plz tell me how to generate the dataset?
Repository: stepjam/RLBench
Issue: No module named 'rlbench.action_modes'; 'rlbench' is not a package
Root cause: Environment Incompatibility

When I followed the tutorial and ran the example, I encountered this issue:
Traceback (most recent call last):
  File "/root/exp/rlbench.py", line 2, in <module>
    from rlbench.action_modes.action_mode import MoveArmThenGripper
  File "/root/exp/rlbench.py", line 2, in <module>
    from rlbench.action_modes.action_mode import MoveArmThenGripper
ModuleNotFoundError: No module named 'rlbench.action_modes'; 'rlbench' is not a package
What should I do?

<img width="898" alt="image" src="https://github.com/user-attachments/assets/bae35a54-6d56-4cdb-81cd-04c6ebec289c">


i'm facing the same problem, Have you ever solved it ? 


ohoh, the problem solved, you need to use the system variable as mentioned on the doc
Repository: stepjam/RLBench
Issue: Question about performance and the configuration of the environment
Root cause: Configuration Error

Hi,
I have a question about performance and the configuration of the environment. I have a Gym environment that inside uses rlbench to train a reinforcement learning model. When measuring the performance of the simulation, I get about 0.12s average per task.step(), so given I have 50 num_steps per step of the gym environment, one step takes about 6 seconds. This is obviously way to slow to train a RL model, so I was wondering if maybe we missed a configuration of some sort, it seems to me like the simulation is running in real time and not as fast as possible.

This is the setup:
```python
 self.env = Environment(
            action_mode=MoveArmThenGripper(
                arm_action_mode=JointPosition(), gripper_action_mode=Discrete()),
            obs_config=obs_config,
            headless=True, shaped_rewards=True)
        
self.env.launch()
self.task = self.env.get_task(ReachTarget)
```
This is one step:
```python
def step(self, Z):
        num_steps = 50
        sum_reward = 0.0
        time = 0.0
        print(Z)
        for i in range(num_steps):
            action = self.decoder.decode_from_latent_variable(torch.from_numpy(Z), time)

            te = time.time()
            obs, reward, _ = self.task.step(action.detach().numpy()) # <=== SLOW HERE
            print(time.time() - te) # Output: 0.12534880638122559
            
            sum_reward += reward
            time += 1 / num_steps

        print(sum_reward)
        self.rewards.append(sum_reward)
        state = self.state_from_obs(obs)
        return state, sum_reward, True, True, {}
```

These are some versions we are using:
rlbench @ git+https://github.com/stepjam/RLBench.git@b80e51feb3694d9959cb8c0408cd385001b01382
CoppeliaSim_Edu_V4_1_0_Ubuntu20_04
Python 3.12.5
Repository: stepjam/RLBench
Issue:  Problem when running eval on rlbench
Root cause: Environment Incompatibility

Command used : bash online_evaluation_rlbench/eval_peract.sh

Loading model from train_logs/diffuser_actor_peract.pth
Gripper workspace
Gripper workspace size: [0.75823578 1.07414986 0.79873248]
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/teamspace/studios/this_studio/PyRep/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.

/commands/python: line 37: 40081 Aborted (core dumped) "$@"
/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torchdata/datapipes/init.py:18: UserWarning:
################################################################################
WARNING!
The 'datapipes', 'dataloader2' modules are deprecated and will be removed in a
future torchdata release! Please see https://github.com/pytorch/data/issues/1196
to learn more and leave feedback.
################################################################################

deprecation_warning()
Repository: stepjam/RLBench
Issue: issue while running nvidia-xconfig 
Root cause: Environment Incompatibility

Command : 

sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024
echo -e 'Section "ServerFlags"\n\tOption "MaxClients" "2048"\nEndSection\n' \
    | sudo tee /etc/X11/xorg.conf.d/99-maxclients.conf

tee: /etc/X11/xorg.conf.d/99-maxclients.conf: No such file or directory
Section "ServerFlags"
        Option "MaxClients" "2048"
EndSection

@rebecajohn  did these commands work for you for headless rendering? When I started the X server with `sudo nohup X :99 & disown`, my screen went black. Even after a reboot, the display remained frozen, and I had to manually revert `/etc/X11/xorg.conf` to make it functional again. Did you encounter similar issues or find a workaround?